diff --git a/core/vm/logger_trace.go b/core/vm/logger_trace.go index 39f89286c03..72b893222d6 100644 --- a/core/vm/logger_trace.go +++ b/core/vm/logger_trace.go @@ -47,10 +47,16 @@ func traceLastNAddressCode(n int) traceFunc { func traceCodeWithAddress(l *StructLogger, address common.Address) { code := l.env.StateDB.GetCode(address) + keccakCodeHash := l.env.StateDB.GetKeccakCodeHash(address) - poseidonCodeHash := l.env.StateDB.GetPoseidonCodeHash(address) + codeHash := keccakCodeHash + poseidonCodeHash := common.Hash{} + if !l.env.chainRules.IsEuclid && l.env.chainConfig.Scroll.UseZktrie { + poseidonCodeHash = l.env.StateDB.GetPoseidonCodeHash(address) + codeHash = poseidonCodeHash + } codeSize := l.env.StateDB.GetCodeSize(address) - l.bytecodes[poseidonCodeHash] = CodeInfo{ + l.bytecodes[codeHash] = CodeInfo{ codeSize, keccakCodeHash, poseidonCodeHash, diff --git a/params/version.go b/params/version.go index 8f45867a884..b85c4244adc 100644 --- a/params/version.go +++ b/params/version.go @@ -24,7 +24,7 @@ import ( const ( VersionMajor = 5 // Major version component of the current release VersionMinor = 8 // Minor version component of the current release - VersionPatch = 8 // Patch version component of the current release + VersionPatch = 9 // Patch version component of the current release VersionMeta = "mainnet" // Version metadata to append to the version string ) diff --git a/rollup/tracing/tracing.go b/rollup/tracing/tracing.go index 3cd78149241..0658bdb36b5 100644 --- a/rollup/tracing/tracing.go +++ b/rollup/tracing/tracing.go @@ -182,6 +182,14 @@ func CreateTraceEnv(chainConfig *params.ChainConfig, chainContext core.ChainCont } func (env *TraceEnv) GetBlockTrace(block *types.Block) (*types.BlockTrace, error) { + if !env.chainConfig.Scroll.UseZktrie { + return nil, errors.New("scroll tracing methods are not available on MPT-enabled nodes") + } + + if env.chainConfig.IsEuclid(block.Time()) { + return nil, errors.New("cannot trace post euclid blocks with scroll specific RPC methods") + } + // Execute all the transaction contained within the block concurrently var ( txs = block.Transactions()