Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions core/vm/logger_trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
8 changes: 8 additions & 0 deletions rollup/tracing/tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down