{"record":{"id":"14c424f078e22b1a","repo":"ethereum/go-ethereum","slug":"eip2929-and-eip4762-are-both-activated","errorCode":null,"errorMessage":"eip2929 and eip4762 are both activated","messagePattern":"eip2929 and eip4762 are both activated","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"core/state/statedb.go","lineNumber":1497,"sourceCode":"\treturn ret.Root, ret, nil\n}\n\n// Prepare handles the preparatory steps for executing a state transition with.\n// This method must be invoked before state transition.\n//\n// Berlin fork:\n// - Add sender to access list (2929)\n// - Add destination to access list (2929)\n// - Add precompiles to access list (2929)\n// - Add the contents of the optional tx access list (2930)\n//\n// Potential EIPs:\n// - Reset access list (Berlin)\n// - Add coinbase to access list (EIP-3651)\n// - Reset transient storage (EIP-1153)\nfunc (s *StateDB) Prepare(rules params.Rules, sender, coinbase common.Address, dst *common.Address, precompiles []common.Address, list types.AccessList) {\n\tif rules.IsEIP2929 && rules.IsEIP4762 {\n\t\tpanic(\"eip2929 and eip4762 are both activated\")\n\t}\n\tif rules.IsEIP2929 {\n\t\t// Clear out any leftover from previous executions\n\t\tal := newAccessList()\n\t\ts.accessList = al\n\n\t\tal.AddAddress(sender)\n\t\tif dst != nil {\n\t\t\tal.AddAddress(*dst)\n\t\t\t// If it's a create-tx, the destination will be added inside evm.create\n\t\t}\n\t\tfor _, addr := range precompiles {\n\t\t\tal.AddAddress(addr)\n\t\t}\n\t\tfor _, el := range list {\n\t\t\tal.AddAddress(el.Address)\n\t\t\tfor _, key := range el.StorageKeys {\n\t\t\t\tal.AddSlot(el.Address, key)","sourceCodeStart":1479,"sourceCodeEnd":1515,"githubUrl":"https://github.com/ethereum/go-ethereum/blob/6bb0588ad8e7f922e4ad5580f51265a4097af08f/core/state/statedb.go#L1479-L1515","documentation":"StateDB.Prepare panics when the chain rules activate both EIP-2929 (Berlin access lists) and EIP-4762 (Prague/Verkle gas accounting) at the same time. These two EIPs define incompatible ways to charge gas for account/storage access, so the state transition logic cannot honor both. The panic is a hard configuration invariant check executed while preparing state for every transaction.","triggerScenarios":"Running a chain whose params.ChainConfig (genesis config) enables both the Berlin fork and the Verkle/EIP-4762 fork for the same block time, then executing or importing any block/transaction (Prepare is called per transaction from the state processor).","commonSituations":"Custom chain configs that copy mainnet fork settings and then also set a Verkle fork time; misconfigured dev/test genesis that flips on verkle-related fork fields; upgrading geth versions where an experimental Verkle fork block was previously ignored and now becomes active.","solutions":["Edit the genesis/chain config and remove or postpone the Verkle (EIP-4762) fork activation so it is not active alongside Berlin.","If Verkle was never intended, regenerate the genesis with only the standard forks (Berlin through Prague) enabled.","Re-init the datadir with the corrected genesis (geth init) so the stored config no longer has both EIPs active.","If you intentionally need Verkle rules, use a build/branch where the state transition supports EIP-4762 semantics without the 2929 path."],"exampleFix":"// before (genesis.json fragment)\n\"eip4762Block\": 0,\n\"berlinBlock\": 0\n\n// after\n\"berlinBlock\": 0\n// eip4762Block removed or set to a fork schedule the client supports","handlingStrategy":"validation","validationCode":"// before building the chain, reject configs activating both EIPs\nfunc validateConfig(cfg *params.ChainConfig) error {\n    // evaluate rules at the relevant fork time; 2929 is active from Berlin\n    if cfg.IsBerlin(big.NewInt(0)) && verkleActive(cfg) {\n        return errors.New(\"EIP-2929 and EIP-4762 must not both be active\")\n    }\n    return nil\n}","typeGuard":null,"tryCatchPattern":"Go panic: wrap node startup / block processing in a defer with recover() only at the top-level goroutine boundary to log the config error, then exit — do not swallow and continue, consensus state is invalid.","preventionTips":["Validate genesis/chain config for fork conflicts before geth init or node start.","Never hand-edit fork fields into a copied genesis without checking interactions.","Treat any experimental Verkle fields as unsupported unless your build explicitly targets them."],"tags":["eip-2929","eip-4762","chain-config","consensus","panic"],"backgroundTag":null,"analyzedSha":"6bb0588ad8e7f922e4ad5580f51265a4097af08f","analyzedAt":"2026-08-15T10:06:53.996Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}