-
Notifications
You must be signed in to change notification settings - Fork 586
interface conversion: vm.StateDB is *state.hookedStateDB, not *state.StateDB in 2.0.4 with tracing ON #1577
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
Description
We running some tests on 2.0.4 and got the following panic from the node:
panic: interface conversion: vm.StateDB is *state.hookedStateDB, not *state.StateDB
goroutine 1088 [running]:
github.com/ethereum/go-ethereum/consensus/bor.(*Bor).Finalize(0xb48704b266e78e17?, {0x424ada8?, 0xc00069f088?}, 0x1deb5420518b1275?, {0x42760e0?, 0xc0307acca0?}, 0xc03476d6b0?)
/go/src/github.com/ethereum/go-ethereum/consensus/bor/bor.go:848 +0x4bb
github.com/ethereum/go-ethereum/core.(*StateProcessor).Process(0xc01d8b4de0, 0xc0251240a0, 0xc024f31a40, {0xc000aff040, 0x0, 0x0, {0x0, 0x0, 0x0}, 0x0, ...}, ...)
/go/src/github.com/ethereum/go-ethereum/core/state_processor.go:140 +0x151a
github.com/ethereum/go-ethereum/core.(*BlockChain).ProcessBlock.func3()
/go/src/github.com/ethereum/go-ethereum/core/blockchain.go:671 +0x14d
created by github.com/ethereum/go-ethereum/core.(*BlockChain).ProcessBlock in goroutine 1620
/go/src/github.com/ethereum/go-ethereum/core/blockchain.go:668 +0x625
Looking at code i can not see how it can work, as in 2.0.4 the following line added:
state := wrappedState.(*state.StateDB)
line 848 of consensus/bor.go
and it fails because wrappedState is created at
if hooks := cfg.Tracer; hooks != nil {
tracingStateDB = state.NewHookedState(statedb, hooks)
}
in state_processor
Can you please clarify these interface conversions?
Should it probably be
p.chain.engine.Finalize(p.blockchain, header, statedb, block.Body())
?
Reactions are currently unavailable