Skip to content

Commit 4dd679c

Browse files
authored
feat: update initial fcs (#58)
* feat: bump reth * feat: set initial fcs to null hash for all states * fix: zepter
1 parent f1364ed commit 4dd679c

File tree

14 files changed

+543
-536
lines changed

14 files changed

+543
-536
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -116,18 +116,18 @@ large_enum_variant = "allow"
116116

117117
[workspace.dependencies]
118118
# alloy
119-
alloy-chains = { version = "0.1.32", default-features = false }
120-
alloy-consensus = { version = "0.13.0", default-features = false }
121-
alloy-eips = { version = "0.13.0", default-features = false }
122-
alloy-json-rpc = { version = "0.13.0", default-features = false }
123-
alloy-network = { version = "0.13.0", default-features = false }
124-
alloy-primitives = { version = "0.8.25", default-features = false }
125-
alloy-provider = { version = "0.13.0", default-features = false }
126-
alloy-rpc-client = { version = "0.13.0", default-features = false }
127-
alloy-rpc-types-engine = { version = "0.13.0", default-features = false }
128-
alloy-rpc-types-eth = { version = "0.13.0", default-features = false }
129-
alloy-sol-types = { version = "0.8.25", default-features = false }
130-
alloy-transport = { version = "0.13.0", default-features = false }
119+
alloy-chains = { version = "0.2.0", default-features = false }
120+
alloy-consensus = { version = "0.14.0", default-features = false }
121+
alloy-eips = { version = "0.14.0", default-features = false }
122+
alloy-json-rpc = { version = "0.14.0", default-features = false }
123+
alloy-network = { version = "0.14.0", default-features = false }
124+
alloy-primitives = { version = "1.0.0", default-features = false }
125+
alloy-provider = { version = "0.14.0", default-features = false }
126+
alloy-rpc-client = { version = "0.14.0", default-features = false }
127+
alloy-rpc-types-engine = { version = "0.14.0", default-features = false }
128+
alloy-rpc-types-eth = { version = "0.14.0", default-features = false }
129+
alloy-sol-types = { version = "1.0.0", default-features = false }
130+
alloy-transport = { version = "0.14.0", default-features = false }
131131

132132
# scroll-alloy
133133
scroll-alloy-consensus = { git = "https://github.com/scroll-tech/reth.git", default-features = false }

bin/rollup/src/network.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ where
151151
l1_provider,
152152
db,
153153
l1_notification_rx,
154-
ForkchoiceState::genesis(
155-
ctx.config().chain.chain.try_into().expect("must be a named chain"),
156-
),
154+
// initiating the safe and finalized block info with a null hash triggers a backfill
155+
// using the unsafe head at the EN.
156+
ForkchoiceState::default(),
157157
consensus,
158158
block_rx,
159159
);

crates/codec/src/decoding/v0/batch_header.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ mod tests {
127127
fn test_should_decode_header() -> eyre::Result<()> {
128128
// <https://etherscan.io/tx/0x2c7bb77d6086befd9bdcf936479fd246d1065cbd2c6aff55b1d39a67aff965c1>
129129
let raw_commit_calldata = read_to_bytes("./testdata/calldata_v0.bin")?;
130-
let commit_calldata = commitBatchCall::abi_decode(&raw_commit_calldata, true)?;
130+
let commit_calldata = commitBatchCall::abi_decode(&raw_commit_calldata)?;
131131

132132
let mut raw_batch_header = &*commit_calldata.parent_batch_header.to_vec();
133-
let header = BatchHeaderV0::try_from_buf(&mut raw_batch_header).unwrap();
133+
let header = BatchHeaderV0::try_from_buf(&mut raw_batch_header)?;
134134

135135
let expected = BatchHeaderV0::new(
136136
0,

crates/codec/src/decoding/v1/batch_header.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ mod tests {
135135
fn test_should_decode_header() -> eyre::Result<()> {
136136
// <https://etherscan.io/tx/0x27d73eef6f0de411f8db966f0def9f28c312a0ae5cfb1ac09ec23f8fa18b005b>
137137
let raw_commit_calldata = read_to_bytes("./testdata/calldata_v1.bin")?;
138-
let commit_calldata = commitBatchCall::abi_decode(&raw_commit_calldata, true)?;
138+
let commit_calldata = commitBatchCall::abi_decode(&raw_commit_calldata)?;
139139

140140
let mut raw_batch_header = &*commit_calldata.parent_batch_header.to_vec();
141-
let header = BatchHeaderV1::try_from_buf(&mut raw_batch_header).unwrap();
141+
let header = BatchHeaderV1::try_from_buf(&mut raw_batch_header)?;
142142

143143
let expected = BatchHeaderV1::new(
144144
1,

crates/codec/src/decoding/v3/batch_header.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ mod tests {
121121
fn test_should_decode_header() -> eyre::Result<()> {
122122
// <https://etherscan.io/tx/0xee0afe29207fe23626387bc8eb209ab751c1fee9c18e3d6ec7a5edbcb5a4fed4>
123123
let raw_commit_calldata = read_to_bytes("./testdata/calldata_v4_compressed.bin")?;
124-
let commit_calldata = commitBatchWithBlobProofCall::abi_decode(&raw_commit_calldata, true)?;
124+
let commit_calldata = commitBatchWithBlobProofCall::abi_decode(&raw_commit_calldata)?;
125125

126126
let mut raw_batch_header = &*commit_calldata.parent_batch_header.to_vec();
127-
let header = BatchHeaderV3::try_from_buf(&mut raw_batch_header).unwrap();
127+
let header = BatchHeaderV3::try_from_buf(&mut raw_batch_header)?;
128128

129129
let expected = BatchHeaderV3::new(
130130
4,

crates/engine/src/fcs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use rollup_node_primitives::BlockInfo;
77
///
88
/// The state is composed of the [`BlockInfo`] for `head`, `safe` block, and the `finalized`
99
/// blocks.
10-
#[derive(Debug, Clone)]
10+
#[derive(Debug, Default, Clone)]
1111
pub struct ForkchoiceState {
1212
head: BlockInfo,
1313
safe: BlockInfo,

crates/l1/src/abi/calls.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ impl CommitBatchCall {
4747
pub fn try_decode(calldata: &[u8]) -> Option<Self> {
4848
match calldata.get(0..4).map(|sel| sel.try_into().expect("correct slice length")) {
4949
Some(commitBatchCall::SELECTOR) => {
50-
commitBatchCall::abi_decode(calldata, true).map(Into::into).ok()
50+
commitBatchCall::abi_decode(calldata).map(Into::into).ok()
5151
}
5252
Some(commitBatchWithBlobProofCall::SELECTOR) => {
53-
commitBatchWithBlobProofCall::abi_decode(calldata, true).map(Into::into).ok()
53+
commitBatchWithBlobProofCall::abi_decode(calldata).map(Into::into).ok()
5454
}
5555
Some(commitBatchesCall::SELECTOR) => {
56-
commitBatchesCall::abi_decode(calldata, true).map(Into::into).ok()
56+
commitBatchesCall::abi_decode(calldata).map(Into::into).ok()
5757
}
5858
Some(_) | None => None,
5959
}

crates/l1/src/abi/logs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ sol! {
2424

2525
/// Tries to decode the provided log into the type T.
2626
pub fn try_decode_log<T: SolEvent>(log: &Log) -> Option<Log<T>> {
27-
T::decode_log(log, true).ok()
27+
T::decode_log(log).ok()
2828
}
2929

3030
impl From<QueueTransaction> for TxL1Message {

crates/node/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ alloy-eips.workspace = true
1515
alloy-rpc-types-engine.workspace = true
1616

1717
# scroll-alloy
18-
scroll-alloy-network.workspace = true
1918
scroll-alloy-provider.workspace = true
2019

2120
# reth

0 commit comments

Comments
 (0)