mirror of
https://github.com/luxfi/evm.git
synced 2026-09-24 00:27:44 +00:00
On lux-mainnet 2026-06-02 every newly-created L2 EVM chain (hanzo, zoo,
spc, pars) panicked at chain create with:
panic in eth.New: unable to commit genesis block to statedb:
triedb parent [0x56e81f17171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421] layer missing
Root cause: the operator does not specify state-scheme in chain config, so
vm.ethConfig.StateScheme = "" enters eth.New. backend.go then calls
customrawdb.ParseStateSchemeExt("", chainDb) which delegates to
geth/rawdb.ParseStateScheme — upstream returns PathScheme as the implicit
default for any database with no stored scheme (every fresh L2). That
silently re-enables path mode even though vm.go's preflight at the top
of Initialize hard-refuses it. Genesis commit then runs through pathdb's
Update with parentRoot=EmptyRootHash and dies the moment the layer tree
is consulted.
Fix: extract the scheme normalisation into resolveStateScheme() and lock
the empty-string default to HashScheme here, before backend.go can inherit
geth's path-by-default. Path explicit is still refused as before, so this
is purely an operator-default fix.
Adds:
- plugin/evm/vm_statescheme_test.go: TestResolveStateScheme covering all
four input cases (empty→hash, hash passthrough, path refused, custom
passthrough).
- core/genesis_pathdb_test.go: TestGenesisCommit_PathDB_{FreshDB,
SetupGenesisBlock_FreshDB} document the upstream pathdb genesis-commit
invariant on a fresh in-memory DB so future drift here is caught
immediately.
Also bumps compatibility.json to register v0.18.4-v0.18.18 with the
existing RPC chain VM protocol (42); restores TestCompatibility (which
was failing on main since v0.18.4 because the table was never updated).
Version: v0.18.17 -> v0.18.18.
43 lines
753 B
JSON
43 lines
753 B
JSON
{
|
|
"rpcChainVMProtocolVersion": {
|
|
"v0.18.18": 42,
|
|
"v0.18.17": 42,
|
|
"v0.18.16": 42,
|
|
"v0.18.15": 42,
|
|
"v0.18.14": 42,
|
|
"v0.18.13": 42,
|
|
"v0.18.12": 42,
|
|
"v0.18.11": 42,
|
|
"v0.18.10": 42,
|
|
"v0.18.9": 42,
|
|
"v0.18.8": 42,
|
|
"v0.18.7": 42,
|
|
"v0.18.6": 42,
|
|
"v0.18.5": 42,
|
|
"v0.18.4": 42,
|
|
"v0.8.13": 42,
|
|
"v0.8.12": 42,
|
|
"v0.8.11": 42,
|
|
"v0.8.10": 42,
|
|
"v0.8.9": 42,
|
|
"v0.8.8": 42,
|
|
"v0.8.5": 42,
|
|
"v0.8.4": 42,
|
|
"v0.8.3": 42,
|
|
"v0.8.2": 42,
|
|
"v0.8.1": 42,
|
|
"v0.8.0": 42,
|
|
"v0.7.10": 42,
|
|
"v0.7.9": 42,
|
|
"v0.7.8": 42,
|
|
"v0.7.7": 42,
|
|
"v0.7.6": 42,
|
|
"v0.7.5": 41,
|
|
"v0.7.4": 40,
|
|
"v0.7.3": 39,
|
|
"v0.7.2": 39,
|
|
"v0.7.1": 39,
|
|
"v0.7.0": 38
|
|
}
|
|
}
|