Skip to content
Merged
55 changes: 23 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ reth-network = { git = "https://github.com/scroll-tech/reth.git", default-featur
reth-network-api = { git = "https://github.com/scroll-tech/reth.git", default-features = false }
reth-network-peers = { git = "https://github.com/scroll-tech/reth.git", default-features = false }
reth-primitives = { git = "https://github.com/scroll-tech/reth.git", default-features = false }
reth-primitives-traits = { git = "https://github.com/scroll-tech/reth.git", default-features = false }
reth-provider = { git = "https://github.com/scroll-tech/reth.git", default-features = false }
reth-tasks = { git = "https://github.com/scroll-tech/reth.git" }
reth-tokio-util = { git = "https://github.com/scroll-tech/reth.git", default-features = false }
Expand Down Expand Up @@ -180,7 +181,6 @@ futures = { version = "0.3", default-features = false }
parking_lot = "0.12"
rand = { version = "0.9" }
reqwest = "0.12"
secp256k1 = { version = "0.29", default-features = false }
serde = { version = "1.0" }
sea-orm = { version = "1.1.0" }
thiserror = "2.0"
Expand Down
4 changes: 1 addition & 3 deletions bin/rollup/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ exclude.workspace = true
[dependencies]
# alloy
alloy-chains.workspace = true
alloy-provider.workspace = true
alloy-primitives.workspace = true
alloy-provider.workspace = true
alloy-rpc-types-engine.workspace = true
alloy-rpc-client.workspace = true
alloy-transport.workspace = true
Expand Down Expand Up @@ -58,7 +58,6 @@ rollup-node-watcher.workspace = true
clap = { version = "4", features = ["derive", "env"] }
eyre.workspace = true
reqwest = { version = "0.12", default-features = false }
secp256k1 = { workspace = true, features = ["global-context", "recovery"] }
tokio = { workspace = true, features = ["full"] }
tracing.workspace = true

Expand Down Expand Up @@ -109,7 +108,6 @@ serde = [
"scroll-engine/serde",
"scroll-network/serde",
"scroll-wire/serde",
"secp256k1/serde",
"rollup-node-manager/serde",
"alloy-chains/serde",
"reth-transaction-pool/serde",
Expand Down
12 changes: 8 additions & 4 deletions bin/rollup/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ use std::path::PathBuf;
/// A struct that represents the arguments for the rollup node.
#[derive(Debug, clap::Args)]
pub struct ScrollRollupNodeArgs {
/// Whether the rollup node should be run in dev mode.
#[arg(long)]
pub dev: bool,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this conflict with reth's dev CLI arg?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes sorry, I changed it to test but it reverted for some reason.

/// A bool to represent if new blocks should be bridged from the eth wire protocol to the
/// scroll wire protocol.
#[arg(long, default_value_t = false)]
Expand Down Expand Up @@ -46,17 +49,18 @@ pub struct L1ProviderArgs {
}

#[derive(Debug, Clone, clap::Args)]
#[group(requires_all = ["block_time", "payload_building_duration", "max_l1_messages_per_block"])]
pub struct SequencerArgs {
/// The block time for the sequencer.
#[arg(long)]
#[arg(long, required = false)]
pub block_time: u64,
/// The payload building duration for the sequencer (milliseconds)
#[arg(long)]
#[arg(long, required = false)]
pub payload_building_duration: u64,
/// The max L1 messages per block for the sequencer.
#[arg(long)]
#[arg(long, required = false)]
pub max_l1_messages_per_block: u64,
/// The fee recipient for the sequencer.
#[arg(long)]
#[arg(long, required = false)]
pub fee_recipient: Option<Address>,
}
6 changes: 3 additions & 3 deletions bin/rollup/src/import.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
use alloy_primitives::Signature;
use reth_network::import::{BlockImport as RethBlockImport, NewBlockEvent};
use reth_network_peers::PeerId;
use reth_scroll_primitives::ScrollBlock;
use scroll_network::NewBlockWithPeer;
use secp256k1::ecdsa::Signature;
use std::{
sync::Arc,
task::{Context, Poll},
};
use tokio::sync::mpsc::UnboundedSender;
use tracing::{trace, warn};

const ECDSA_SIGNATURE_LEN: usize = 64;
const ECDSA_SIGNATURE_LEN: usize = 65;

/// A block import implementation for the eth-wire protocol that sends block to the scroll-wire
/// protocol.
Expand Down Expand Up @@ -42,7 +42,7 @@ impl BridgeBlockImport {
if let Some(signature) = extra_data
.len()
.checked_sub(ECDSA_SIGNATURE_LEN)
.and_then(|i| Signature::from_compact(&extra_data[i..]).ok())
.and_then(|i| Signature::from_raw(&extra_data[i..]).ok())
{
let block = block.block.clone();
trace!(target: "scroll::bridge::import", peer_id = %peer_id, block = ?block.hash_slow(), "Received new block from eth-wire protocol");
Expand Down
Loading
Loading