Skip to content

Commit

Permalink
Merge pull request #3304 from dessaya/fix-index
Browse files Browse the repository at this point in the history
fix: index all blocks at startup in archive node
  • Loading branch information
dessaya authored Mar 1, 2024
2 parents 0f2a9da + df40bc7 commit 2804485
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 51 deletions.
22 changes: 2 additions & 20 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -802,16 +802,14 @@ go.uber.org/fx v1.20.0 h1:ZMC/pnRvhsthOZh9MZjMq5U8Or3mA9zBSPaLnzs3ihQ=
go.uber.org/fx v1.20.0/go.mod h1:qCUj0btiR3/JnanEr1TYEePfSw6o/4qYJscgvzQ5Ub0=
go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A=
go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk=
go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI=
go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo=
go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so=
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE=
Expand All @@ -828,19 +826,9 @@ golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20200602180216-279210d13fed/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc=
golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg=
golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 h1:hNQpMuAJe5CtcUqCXaWga3FHu+kQvCqcsoVaQgSV60o=
golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08=
golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3 h1:/RIbNt/Zr7rVhIkQhooTxCxFcdWLGIKnZA4IXNFSrvo=
golang.org/x/exp v0.0.0-20240205201215-2c58cdc269a3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08=
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE=
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
golang.org/x/exp v0.0.0-20240222230149-e579c86f598f h1:ZOGWaLcjTjCpyqdYJX+zBLYv0wZi2IT+I0+Oq6j6CEA=
golang.org/x/exp v0.0.0-20240222230149-e579c86f598f/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ=
golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
Expand All @@ -854,8 +842,6 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.15.0 h1:SernR4v+D55NyBH2QiEQrlBAnj1ECL6AGrA5+dPaMY8=
golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
Expand Down Expand Up @@ -884,8 +870,6 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8=
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
Expand Down Expand Up @@ -994,8 +978,6 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc=
golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps=
golang.org/x/tools v0.18.0 h1:k8NLag8AGHnn+PHbl7g43CtqZAwG60vZkLqgyZgIHgQ=
golang.org/x/tools v0.18.0/go.mod h1:GL7B4CwcLLeo59yx/9UWWuNOW1n3VZ4f5axWfML7Lcg=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
2 changes: 1 addition & 1 deletion packages/evm/jsonrpc/chainbackend.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type ChainBackend interface {
ISCChainID() *isc.ChainID
ISCCallView(chainState state.State, scName string, funName string, args dict.Dict) (dict.Dict, error)
ISCLatestAliasOutput() (*isc.AliasOutputWithID, error)
ISCLatestState() state.State
ISCLatestState() (state.State, error)
ISCStateByBlockIndex(blockIndex uint32) (state.State, error)
ISCStateByTrieRoot(trieRoot trie.Hash) (state.State, error)
BaseToken() *parameters.BaseToken
Expand Down
71 changes: 52 additions & 19 deletions packages/evm/jsonrpc/evmchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/ethereum/go-ethereum/eth/tracers"
"github.com/ethereum/go-ethereum/rpc"
"github.com/labstack/gommon/log"
"github.com/samber/lo"

hivedb "github.com/iotaledger/hive.go/kvstore/database"
"github.com/iotaledger/hive.go/logger"
Expand Down Expand Up @@ -84,18 +85,29 @@ func NewEVMChain(
return
}
blocksFromPublisher.In() <- ev.Payload
if isArchiveNode {
e.index.IndexBlock(ev.Payload.TrieRoot)
}
})

// publish blocks on a separate goroutine so that we don't block the publisher
go func() {
for ev := range blocksFromPublisher.Out() {
e.publishNewBlock(ev.BlockInfo.BlockIndex(), ev.TrieRoot)
if isArchiveNode {
e.index.IndexBlock(ev.TrieRoot)
}
}
}()

if isArchiveNode {
latestState, err := backend.ISCLatestState()
if err != nil {
log.Warnf("could not fetch latest state; skipping first indexing: %s", err.Error())
} else {
log.Infof("indexing from block index #%d; this may take some time...", latestState.BlockIndex())
e.index.IndexBlock(latestState.TrieRoot())
log.Info("indexing done")
}
}

return e
}

Expand Down Expand Up @@ -129,7 +141,7 @@ func (e *EVMChain) Signer() (types.Signer, error) {

func (e *EVMChain) ChainID() uint16 {
if e.chainID == 0 {
db := blockchainDB(e.backend.ISCLatestState())
db := blockchainDB(lo.Must(e.backend.ISCLatestState()))
e.chainID = db.GetChainID()
}
return e.chainID
Expand All @@ -144,25 +156,25 @@ func (e *EVMChain) ViewCaller(chainState state.State) vmerrors.ViewCaller {

func (e *EVMChain) BlockNumber() *big.Int {
e.log.Debugf("BlockNumber()")
db := blockchainDB(e.backend.ISCLatestState())
db := blockchainDB(lo.Must(e.backend.ISCLatestState()))
return big.NewInt(0).SetUint64(db.GetNumber())
}

func (e *EVMChain) GasRatio() util.Ratio32 {
e.log.Debugf("GasRatio()")
govPartition := subrealm.NewReadOnly(e.backend.ISCLatestState(), kv.Key(governance.Contract.Hname().Bytes()))
govPartition := subrealm.NewReadOnly(lo.Must(e.backend.ISCLatestState()), kv.Key(governance.Contract.Hname().Bytes()))
gasFeePolicy := governance.MustGetGasFeePolicy(govPartition)
return gasFeePolicy.EVMGasRatio
}

func (e *EVMChain) GasFeePolicy() *gas.FeePolicy {
govPartition := subrealm.NewReadOnly(e.backend.ISCLatestState(), kv.Key(governance.Contract.Hname().Bytes()))
govPartition := subrealm.NewReadOnly(lo.Must(e.backend.ISCLatestState()), kv.Key(governance.Contract.Hname().Bytes()))
gasFeePolicy := governance.MustGetGasFeePolicy(govPartition)
return gasFeePolicy
}

func (e *EVMChain) gasLimits() *gas.Limits {
govPartition := subrealm.NewReadOnly(e.backend.ISCLatestState(), kv.Key(governance.Contract.Hname().Bytes()))
govPartition := subrealm.NewReadOnly(lo.Must(e.backend.ISCLatestState()), kv.Key(governance.Contract.Hname().Bytes()))
gasLimits := governance.MustGetGasLimits(govPartition)
return gasLimits
}
Expand Down Expand Up @@ -229,7 +241,7 @@ func (e *EVMChain) checkEnoughL2FundsForGasBudget(sender common.Address, evmGas

func (e *EVMChain) iscStateFromEVMBlockNumber(blockNumber *big.Int) (state.State, error) {
if blockNumber == nil {
return e.backend.ISCLatestState(), nil
return e.backend.ISCLatestState()
}
iscBlockIndex, err := iscBlockIndexByEVMBlockNumber(blockNumber)
if err != nil {
Expand All @@ -244,7 +256,7 @@ func (e *EVMChain) iscStateFromEVMBlockNumber(blockNumber *big.Int) (state.State

func (e *EVMChain) iscStateFromEVMBlockNumberOrHash(blockNumberOrHash *rpc.BlockNumberOrHash) (state.State, error) {
if blockNumberOrHash == nil {
return e.backend.ISCLatestState(), nil
return e.backend.ISCLatestState()
}
if blockNumber, ok := blockNumberOrHash.Number(); ok {
return e.iscStateFromEVMBlockNumber(parseBlockNumber(blockNumber))
Expand All @@ -255,14 +267,18 @@ func (e *EVMChain) iscStateFromEVMBlockNumberOrHash(blockNumberOrHash *rpc.Block
}

func (e *EVMChain) iscAliasOutputFromEVMBlockNumber(blockNumber *big.Int) (*isc.AliasOutputWithID, error) {
if blockNumber == nil || blockNumber.Cmp(big.NewInt(int64(e.backend.ISCLatestState().BlockIndex()))) == 0 {
latestState, err := e.backend.ISCLatestState()
if err != nil {
return nil, err
}
if blockNumber == nil || blockNumber.Cmp(big.NewInt(int64(latestState.BlockIndex()))) == 0 {
return e.backend.ISCLatestAliasOutput()
}
iscBlockIndex, err := iscBlockIndexByEVMBlockNumber(blockNumber)
if err != nil {
return nil, err
}
latestBlockIndex := e.backend.ISCLatestState().BlockIndex()
latestBlockIndex := latestState.BlockIndex()
if iscBlockIndex > latestBlockIndex {
return nil, fmt.Errorf("no EVM block with number %s", blockNumber)
}
Expand Down Expand Up @@ -330,7 +346,12 @@ func (e *EVMChain) BlockByNumber(blockNumber *big.Int) (*types.Block, error) {
return cachedBlock, nil
}

block, err := e.blockByNumber(e.backend.ISCLatestState(), blockNumber)
latestState, err := e.backend.ISCLatestState()
if err != nil {
return nil, err
}

block, err := e.blockByNumber(latestState, blockNumber)
if err == nil && block == nil {
return nil, fmt.Errorf("not found")
}
Expand Down Expand Up @@ -362,7 +383,11 @@ func (e *EVMChain) TransactionByHash(hash common.Hash) (tx *types.Transaction, b
if cachedTx != nil {
return cachedTx, blockHash, blockNumber, txIndex, nil
}
db := blockchainDB(e.backend.ISCLatestState())
latestState, err := e.backend.ISCLatestState()
if err != nil {
return nil, common.Hash{}, 0, 0, err
}
db := blockchainDB(latestState)
return db.GetTransactionByHash(hash)
}

Expand All @@ -372,7 +397,11 @@ func (e *EVMChain) TransactionByBlockHashAndIndex(hash common.Hash, index uint64
if cachedTx != nil {
return cachedTx, bn, nil
}
db := blockchainDB(e.backend.ISCLatestState())
latestState, err := e.backend.ISCLatestState()
if err != nil {
return nil, 0, err
}
db := blockchainDB(latestState)
block := db.GetBlockByHash(hash)
if block == nil {
return nil, 0, err
Expand All @@ -387,7 +416,11 @@ func (e *EVMChain) TransactionByBlockNumberAndIndex(blockNumber *big.Int, index
if cachedTx != nil {
return cachedTx, blockHash, blockNumber.Uint64(), nil
}
db := blockchainDB(e.backend.ISCLatestState())
latestState, err := e.backend.ISCLatestState()
if err != nil {
return nil, common.Hash{}, 0, err
}
db := blockchainDB(latestState)
bn, err := blockNumberU64(db, blockNumber)
if err != nil {
return nil, common.Hash{}, 0, err
Expand All @@ -408,7 +441,7 @@ func (e *EVMChain) BlockByHash(hash common.Hash) *types.Block {
return cachedBlock
}

db := blockchainDB(e.backend.ISCLatestState())
db := blockchainDB(lo.Must(e.backend.ISCLatestState()))
block := db.GetBlockByHash(hash)
return block
}
Expand All @@ -419,7 +452,7 @@ func (e *EVMChain) TransactionReceipt(txHash common.Hash) *types.Receipt {
if rec != nil {
return rec
}
db := blockchainDB(e.backend.ISCLatestState())
db := blockchainDB(lo.Must(e.backend.ISCLatestState()))
return db.GetReceiptByTxHash(txHash)
}

Expand Down Expand Up @@ -511,7 +544,7 @@ func (e *EVMChain) Logs(query *ethereum.FilterQuery, params *LogsLimits) ([]*typ

// Initialize unset filter boundaries to run from genesis to chain head
first := big.NewInt(1) // skip genesis since it has no logs
last := new(big.Int).SetUint64(uint64(e.backend.ISCLatestState().BlockIndex()))
last := new(big.Int).SetUint64(uint64(lo.Must(e.backend.ISCLatestState()).BlockIndex()))
from := first
if query.FromBlock != nil && query.FromBlock.Cmp(first) >= 0 && query.FromBlock.Cmp(last) <= 0 {
from = query.FromBlock
Expand Down
3 changes: 2 additions & 1 deletion packages/evm/jsonrpc/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/ethereum/go-ethereum/eth/tracers"
"github.com/ethereum/go-ethereum/rlp"
"github.com/ethereum/go-ethereum/rpc"
"github.com/samber/lo"
"golang.org/x/crypto/sha3"

"github.com/iotaledger/wasp/packages/evm/evmerrors"
Expand Down Expand Up @@ -74,7 +75,7 @@ func (e *EthService) resolveError(err error) error {
return err
}
var resolveErr error
resolvedErr, resolveErr = vmerrors.Resolve(vmError, e.evmChain.ViewCaller(e.evmChain.backend.ISCLatestState()))
resolvedErr, resolveErr = vmerrors.Resolve(vmError, e.evmChain.ViewCaller(lo.Must(e.evmChain.backend.ISCLatestState())))
if resolveErr != nil {
return fmt.Errorf("could not resolve VMError: %w: %v", err, resolveErr)
}
Expand Down
6 changes: 3 additions & 3 deletions packages/evm/jsonrpc/waspevmbackend.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ func (b *WaspEVMBackend) ISCLatestAliasOutput() (*isc.AliasOutputWithID, error)
return latestAliasOutput, nil
}

func (b *WaspEVMBackend) ISCLatestState() state.State {
func (b *WaspEVMBackend) ISCLatestState() (state.State, error) {
latestState, err := b.chain.LatestState(chain.ActiveOrCommittedState)
if err != nil {
panic(fmt.Sprintf("couldn't get latest block index: %s ", err.Error()))
return nil, fmt.Errorf("couldn't get latest block index: %w", err)
}
return latestState
return latestState, nil
}

func (b *WaspEVMBackend) ISCStateByBlockIndex(blockIndex uint32) (state.State, error) {
Expand Down
8 changes: 2 additions & 6 deletions packages/solo/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,8 @@ func (b *jsonRPCSoloBackend) ISCLatestAliasOutput() (*isc.AliasOutputWithID, err
return latestAliasOutput, nil
}

func (b *jsonRPCSoloBackend) ISCLatestState() state.State {
latestState, err := b.Chain.LatestState(chain.ActiveOrCommittedState)
if err != nil {
panic(err)
}
return latestState
func (b *jsonRPCSoloBackend) ISCLatestState() (state.State, error) {
return b.Chain.LatestState(chain.ActiveOrCommittedState)
}

func (b *jsonRPCSoloBackend) ISCStateByBlockIndex(blockIndex uint32) (state.State, error) {
Expand Down
3 changes: 2 additions & 1 deletion packages/vm/core/testcore/blocklog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,9 @@ func TestBlocklogPruning(t *testing.T) {
for i := uint32(0); i <= 10; i++ {
_, err := ch.GetBlockInfo(i)
require.ErrorContains(t, err, "not found")
// evm has the jsonrpcindex
_, err = ch.EVM().BlockByNumber(big.NewInt(int64(i)))
require.ErrorContains(t, err, "not found")
require.NoError(t, err)
}
for i := uint32(11); i <= 20; i++ {
bi, err := ch.GetBlockInfo(i)
Expand Down

0 comments on commit 2804485

Please sign in to comment.