iotex-core icon indicating copy to clipboard operation
iotex-core copied to clipboard

"Failed to get code hash. " message

Open dustinxie opened this issue 10 months ago • 0 comments

What version of iotex-core image (or code branch) are you using?

latest

What operating system and processor architecture are you using?

macOS

What did you do? If possible, provide a recipe for reproducing the error.

between block 16005000 and 16010000, it will hit this error

  1. copy the data from https://storage.googleapis.com/blockchain-golden/fullsync/mainnet/16m/
  2. start the node, it will run into this error

What did you expect to see?

investigate and completely understand why/where this error comes from, and is it expected behavior?

What did you see instead?

{"level":"error","ts":"2024-04-03T13:13:07.315Z","caller":"evm/evmstatedbadapter.go:908","msg":"Failed to get code hash.","ioAddr":"io1lccjrkzyw8jaren4a4lcyryfpn8m3qevtgun5s","error":"failed to get state of ns = 436f6465 and key = : state does not exist","errorVerbose":"state does not exist\ngithub.com/iotexproject/iotex-core/state.init\n\t/home/dustin/iotex-core/state/state.go:20\nruntime.doInit\n\t/usr/local/go/src/runtime/proc.go:6525\nruntime.doInit\n\t/usr/local/go/src/runtime/proc.go:6502\nruntime.doInit\n\t/usr/local/go/src/runtime/proc.go:6502\nruntime.doInit\n\t/usr/local/go/src/runtime/proc.go:6502\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:233\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1598\nfailed to get state of ns = 436f6465 and key = \ngithub.com/iotexproject/iotex-core/state/factory.(*stateDBWorkingSetStore).Get\n\t/home/dustin/iotex-core/state/factory/workingsetstore.go:94\ngithub.com/iotexproject/iotex-core/state/factory.(*workingSet).State\n\t/home/dustin/iotex-core/state/factory/workingset.go:271\ngithub.com/iotexproject/iotex-core/action/protocol/execution/evm.(*contract).GetCode\n\t/home/dustin/iotex-core/action/protocol/execution/evm/contract.go:108\ngithub.com/iotexproject/iotex-core/action/protocol/execution/evm.(*StateDBAdapter).GetCode\n\t/home/dustin/iotex-core/action/protocol/execution/evm/evmstatedbadapter.go:906\ngithub.com/iotexproject/iotex-core/action/protocol/execution/evm.(*StateDBAdapter).GetCodeSize\n\t/home/dustin/iotex-core/action/protocol/execution/evm/evmstatedbadapter.go:929\ngithub.com/ethereum/go-ethereum/core/vm.opExtCodeSize\n\t/home/dustin/go/pkg/mod/github.com/iotexproject/[email protected]/core/vm/instructions.go:346\ngithub.com/ethereum/go-ethereum/core/vm.(*EVMInterpreter).Run\n\t/home/dustin/go/pkg/mod/github.com/iotexproject/[email protected]/core/vm/interpreter.go:232\ngithub.com/ethereum/go-ethereum/core/vm.(*EVM).DelegateCall\n\t/home/dustin/go/pkg/mod/github.com/iotexproject/[email protected]/core/vm/evm.go:337\ngithub.com/ethereum/go-ethereum/core/vm.opDelegateCall\n\t/home/dustin/go/pkg/mod/github.com/iotexproject/[email protected]/core/vm/instructions.go:752\ngithub.com/ethereum/go-ethereum/core/vm.(*EVMInterpreter).Run\n\t/home/dustin/go/pkg/mod/github.com/iotexproject/[email protected]/core/vm/interpreter.go:232\ngithub.com/ethereum/go-ethereum/core/vm.(*EVM).create\n\t/home/dustin/go/pkg/mod/github.com/iotexproject/[email protected]/core/vm/evm.go:463\ngithub.com/ethereum/go-ethereum/core/vm.(*EVM).Create\n\t/home/dustin/go/pkg/mod/github.com/iotexproject/[email protected]/core/vm/evm.go:511\ngithub.com/iotexproject/iotex-core/action/protocol/execution/evm.executeInEVM\n\t/home/dustin/iotex-core/action/protocol/execution/evm/evm.go:496\ngithub.com/iotexproject/iotex-core/action/protocol/execution/evm.ExecuteContract\n\t/home/dustin/iotex-core/action/protocol/execution/evm/evm.go:253\ngithub.com/iotexproject/iotex-core/action/protocol/execution.(*Protocol).Handle\n\t/home/dustin/iotex-core/action/protocol/execution/protocol.go:77\ngithub.com/iotexproject/iotex-core/state/factory.(*workingSet).runAction\n\t/home/dustin/iotex-core/state/factory/workingset.go:178\ngithub.com/iotexproject/iotex-core/state/factory.(*workingSet).runActions\n\t/home/dustin/iotex-core/state/factory/workingset.go:110\ngithub.com/iotexproject/iotex-core/state/factory.(*workingSet).process\n\t/home/dustin/iotex-core/state/factory/workingset.go:455\ngithub.com/iotexproject/iotex-core/state/factory.(*workingSet).ValidateBlock\n\t/home/dustin/iotex-core/state/factory/workingset.go:632\ngithub.com/iotexproject/iotex-core/state/factory.(*stateDB).PutBlock\n\t/home/dustin/iotex-core/state/factory/statedb.go:340\ngithub.com/iotexproject/iotex-core/blockindex.(*SyncIndexers).PutBlock\n\t/home/dustin/iotex-core/blockindex/sync_indexers.go:69\ngithub.com/iotexproject/iotex-core/blockchain/blockdao.(*BlockIndexerChecker).CheckIndexer\n\t/home/dustin/iotex-core/blockchain/blockdao/blockindexer.go:111\ngithub.com/iotexproject/iotex-core/blockchain/blockdao.(*blockDAO).checkIndexers\n\t/home/dustin/iotex-core/blockchain/blockdao/blockdao.go:121\ngithub.com/iotexproject/iotex-core/blockchain/blockdao.(*blockDAO).Start\n\t/home/dustin/iotex-core/blockchain/blockdao/blockdao.go:115\ngithub.com/iotexproject/iotex-core/pkg/lifecycle.(*Lifecycle).OnStart.func1\n\t/home/dustin/iotex-core/pkg/lifecycle/lifecycle.go:55\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\t/home/dustin/go/pkg/mod/golang.org/x/[email protected]/errgroup/errgroup.go:75\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1598"}

dustinxie avatar Apr 05 '24 19:04 dustinxie