Skip to content
This repository was archived by the owner on Apr 18, 2025. It is now read-only.

Commit 9a5b56f

Browse files
committed
update l2geth util for l1 queue index
1 parent 1157cd3 commit 9a5b56f

File tree

6 files changed

+11
-4
lines changed

6 files changed

+11
-4
lines changed

external-tracer/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ pub struct TraceConfig {
2727
pub logger_config: LoggerConfig,
2828
/// chain config
2929
pub chain_config: Option<ChainConfig>,
30+
/// beginning index of l1 queue
31+
#[cfg(feature = "scroll")]
32+
pub l1_queue_index: u64,
3033
}
3134

3235
/// Configuration structure for `logger.Config`

geth-utils/l2geth/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.18
55
require (
66
github.com/holiman/uint256 v1.2.0
77
github.com/imdario/mergo v0.3.15
8-
github.com/scroll-tech/go-ethereum v1.10.14-0.20230809083042-eed2b93a7953
8+
github.com/scroll-tech/go-ethereum v1.10.14-0.20230815053544-f828d88a8c6a
99
)
1010

1111
require (

geth-utils/l2geth/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7q
103103
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
104104
github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA=
105105
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
106-
github.com/scroll-tech/go-ethereum v1.10.14-0.20230809083042-eed2b93a7953 h1:cNFBGyQuk5NVcOZJpYhClSUkvS/OiM6JThNm5eO5Qxw=
107-
github.com/scroll-tech/go-ethereum v1.10.14-0.20230809083042-eed2b93a7953/go.mod h1:DiN3p2inoXOxGffxSswDKqWjQ7bU+Mp0c9v0XQXKmaA=
106+
github.com/scroll-tech/go-ethereum v1.10.14-0.20230815053544-f828d88a8c6a h1:MAFYEgBGPwKkJv34Ep/tWxnDX9oOVaOJSSVjKFcjUYA=
107+
github.com/scroll-tech/go-ethereum v1.10.14-0.20230815053544-f828d88a8c6a/go.mod h1:DiN3p2inoXOxGffxSswDKqWjQ7bU+Mp0c9v0XQXKmaA=
108108
github.com/scroll-tech/zktrie v0.6.0 h1:xLrMAO31Yo2BiPg1jtYKzcjpEFnXy8acbB7iIsyshPs=
109109
github.com/scroll-tech/zktrie v0.6.0/go.mod h1:XvNo7vAk8yxNyTjBDj5WIiFzYW4bx/gJ78+NK6Zn6Uk=
110110
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU=

geth-utils/l2geth/trace.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ type Transaction struct {
5252
}
5353

5454
type TraceConfig struct {
55-
ChainID uint64 `json:"chain_id"`
55+
ChainID uint64 `json:"chain_id"`
56+
StartL1QueueIndex uint64 `json:"l1_queue_index"`
5657
// HistoryHashes contains most recent 256 block hashes in history,
5758
// where the lastest one is at HistoryHashes[len(HistoryHashes)-1].
5859
HistoryHashes []*hexutil.Big `json:"history_hashes"`
@@ -216,6 +217,7 @@ func L2Trace(config TraceConfig) (*types.BlockTrace, error) {
216217
&chainConfig,
217218
config.LoggerConfig,
218219
blockCtx,
220+
config.StartL1QueueIndex,
219221
blockCtx.Coinbase,
220222
stateDB,
221223
parent,

mock/src/test_ctx.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ pub fn gen_trace_config(
288288
chain_config: Some(external_tracer::ChainConfig::shanghai()),
289289
#[cfg(not(feature = "shanghai"))]
290290
chain_config: None,
291+
..Default::default()
291292
})
292293
}
293294

testool/src/statetest/executor.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ fn into_traceconfig(st: StateTest) -> (String, TraceConfig, StateTestResult) {
205205
chain_config: Some(external_tracer::ChainConfig::shanghai()),
206206
#[cfg(not(feature = "shanghai"))]
207207
chain_config: None,
208+
..Default::default()
208209
},
209210
st.result,
210211
)

0 commit comments

Comments
 (0)