Skip to content

Commit 3aa4cc4

Browse files
committed
Merge remote-tracking branch 'origin/refactor/rollup-node-refactor' into feat/docker-compose-tests-issue-transactions
2 parents fa25829 + 46ebde7 commit 3aa4cc4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+4569
-5576
lines changed

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
with:
9393
cache-on-failure: true
9494
- name: Run doc
95-
run: cargo docs --document-private-items
95+
run: cargo docs --document-private-items --exclude rollup-node-chain-orchestrator
9696
env:
9797
RUSTDOCFLAGS: --cfg docsrs --show-type-layout --generate-link-to-definition --enable-index-page -Zunstable-options -D warnings
9898

Cargo.lock

Lines changed: 17 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ members = [
1414
"crates/engine",
1515
"crates/chain-orchestrator",
1616
"crates/l1",
17-
"crates/manager",
1817
"crates/network",
1918
"crates/node",
2019
"crates/primitives",
@@ -179,6 +178,7 @@ reth-cli-util = { git = "https://github.com/scroll-tech/reth.git", default-featu
179178

180179
# reth-scroll
181180
reth-scroll-chainspec = { git = "https://github.com/scroll-tech/reth.git", default-features = false }
181+
reth-scroll-consensus = { git = "https://github.com/scroll-tech/reth.git", default-features = false }
182182
reth-scroll-cli = { git = "https://github.com/scroll-tech/reth.git", default-features = false }
183183
reth-scroll-evm = { git = "https://github.com/scroll-tech/reth.git", default-features = false }
184184
reth-scroll-rpc = { git = "https://github.com/scroll-tech/reth.git", default-features = false }
@@ -190,7 +190,6 @@ reth-scroll-primitives = { git = "https://github.com/scroll-tech/reth.git", defa
190190
# rollup node
191191
rollup-node = { path = "crates/node" }
192192
rollup-node-chain-orchestrator = { path = "crates/chain-orchestrator" }
193-
rollup-node-manager = { path = "crates/manager" }
194193
rollup-node-primitives = { path = "crates/primitives" }
195194
rollup-node-providers = { path = "crates/providers" }
196195
rollup-node-sequencer = { path = "crates/sequencer" }

Makefile

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,20 @@ test:
7171
--no-fail-fast \
7272
-E 'not test(docker)'
7373

74+
.PHONY: test-docker
75+
test-docker:
76+
cargo nextest run \
77+
--workspace \
78+
--locked \
79+
--all-features \
80+
--no-fail-fast \
81+
--no-tests=pass \
82+
-E 'test(docker)' \
83+
--test-threads=1 \
84+
--failure-output immediate \
85+
--success-output never \
86+
--verbose
87+
7488
# Used to update the mainnet-sample.sql data. Provide the path to the sqlite database that should be read from
7589
# using `DB_PATH`.
7690
.PHONY: test-data
@@ -83,7 +97,7 @@ export-sample-test-data:
8397

8498
.PHONY: docs
8599
docs:
86-
cargo docs --document-private-items
100+
cargo docs --document-private-items --exclude rollup-node-chain-orchestrator
87101

88102
.PHONY: pr
89103
pr: lint test docs

crates/chain-orchestrator/Cargo.toml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,44 @@ alloy-eips = { workspace = true }
1616
alloy-json-rpc.workspace = true
1717
alloy-primitives.workspace = true
1818
alloy-provider.workspace = true
19+
alloy-rpc-types-engine.workspace = true
1920
alloy-transport.workspace = true
2021

2122
# rollup-node
23+
scroll-alloy-provider.workspace = true
2224
scroll-db.workspace = true
25+
scroll-engine.workspace = true
26+
rollup-node-providers.workspace = true
2327
rollup-node-primitives.workspace = true
28+
rollup-node-sequencer.workspace = true
29+
rollup-node-signer.workspace = true
2430
rollup-node-watcher.workspace = true
2531

2632
# scroll
33+
reth-scroll-engine-primitives.workspace = true
34+
reth-scroll-consensus.workspace = true
35+
reth-scroll-node.workspace = true
2736
reth-scroll-primitives.workspace = true
2837
scroll-alloy-consensus.workspace = true
2938
scroll-alloy-hardforks.workspace = true
3039
scroll-alloy-network.workspace = true
40+
scroll-derivation-pipeline.workspace = true
3141
scroll-network.workspace = true
3242

3343
# reth
3444
reth-chainspec.workspace = true
45+
reth-network-api.workspace = true
3546
reth-network-p2p.workspace = true
3647
reth-network-peers.workspace = true
3748
reth-primitives-traits.workspace = true
49+
reth-tasks.workspace = true
50+
reth-tokio-util.workspace = true
3851

3952
# misc
4053
futures.workspace = true
4154
metrics.workspace = true
4255
metrics-derive.workspace = true
56+
serde = { workspace = true, optional = true, features = ["derive"] }
4357
strum = "0.27.1"
4458
thiserror.workspace = true
4559
tokio = { workspace = true, features = ["full"] }
@@ -73,3 +87,34 @@ rand.workspace = true
7387
reqwest.workspace = true
7488
serde_json.workspace = true
7589
tokio.workspace = true
90+
91+
[features]
92+
test-utils = [
93+
"reth-chainspec/test-utils",
94+
"reth-network-p2p/test-utils",
95+
"reth-primitives-traits/test-utils",
96+
"reth-scroll-node/test-utils",
97+
"rollup-node-providers/test-utils",
98+
"rollup-node-watcher/test-utils",
99+
"scroll-db/test-utils",
100+
"scroll-engine/test-utils",
101+
"scroll-network/test-utils",
102+
]
103+
serde = [
104+
"dep:serde",
105+
"alloy-consensus/serde",
106+
"alloy-eips/serde",
107+
"alloy-primitives/serde",
108+
"alloy-rpc-types-engine/serde",
109+
"parking_lot/serde",
110+
"rand/serde",
111+
"reth-eth-wire-types/serde",
112+
"reth-network-api/serde",
113+
"reth-primitives-traits/serde",
114+
"reth-scroll-forks/serde",
115+
"reth-scroll-primitives/serde",
116+
"scroll-alloy-consensus/serde",
117+
"scroll-alloy-hardforks/serde",
118+
"scroll-engine/serde",
119+
"scroll-network/serde",
120+
]

crates/chain-orchestrator/src/action.rs

Lines changed: 0 additions & 57 deletions
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
use std::sync::Arc;
2+
3+
/// Configuration for the chain orchestrator.
4+
#[derive(Debug)]
5+
pub struct ChainOrchestratorConfig<ChainSpec> {
6+
/// The chain specification.
7+
chain_spec: Arc<ChainSpec>,
8+
/// The threshold for optimistic sync. If the received block is more than this many blocks
9+
/// ahead of the current chain, we optimistically sync the chain.
10+
optimistic_sync_threshold: u64,
11+
/// The L1 message queue index at which the V2 L1 message queue was enabled.
12+
l1_v2_message_queue_start_index: u64,
13+
}
14+
15+
impl<ChainSpec> ChainOrchestratorConfig<ChainSpec> {
16+
/// Creates a new chain configuration.
17+
pub const fn new(
18+
chain_spec: Arc<ChainSpec>,
19+
optimistic_sync_threshold: u64,
20+
l1_v2_message_queue_start_index: u64,
21+
) -> Self {
22+
Self { chain_spec, optimistic_sync_threshold, l1_v2_message_queue_start_index }
23+
}
24+
25+
/// Returns a reference to the chain specification.
26+
pub const fn chain_spec(&self) -> &Arc<ChainSpec> {
27+
&self.chain_spec
28+
}
29+
30+
/// Returns the optimistic sync threshold.
31+
pub const fn optimistic_sync_threshold(&self) -> u64 {
32+
self.optimistic_sync_threshold
33+
}
34+
35+
/// Returns the L1 message queue index at which the V2 L1 message queue was enabled.
36+
pub const fn l1_v2_message_queue_start_index(&self) -> u64 {
37+
self.l1_v2_message_queue_start_index
38+
}
39+
}

0 commit comments

Comments
 (0)