-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #244 from ethereum-optimism/refcell/bin-cleanup
fix: Sync Binary Cleanup
- Loading branch information
Showing
13 changed files
with
166 additions
and
107 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
[package] | ||
name = "kona-deriver" | ||
name = "kona-sync" | ||
version = "0.1.0" | ||
description = "Derives Payloads" | ||
description = "Derives and validates payloads to perform a derivation sync check" | ||
edition.workspace = true | ||
license.workspace = true | ||
authors.workspace = true | ||
repository.workspace = true | ||
homepage.workspace = true | ||
|
||
[dependencies] | ||
# Workspace Dependencies | ||
anyhow.workspace = true | ||
tracing.workspace = true | ||
alloy-primitives = { workspace = true, features = ["serde"] } | ||
kona-derive = { path = "../../crates/derive", version = "0.0.1", features = ["serde", "k256", "online"] } | ||
|
||
# Custom dependencies | ||
reqwest = "0.12" | ||
tokio = { version = "1.37.0", features = ["full"] } | ||
tracing-subscriber = "0.3.18" | ||
reqwest = "0.12" | ||
clap = { version = "4.5.4", features = ["derive", "env"] } | ||
serde = { version = "1.0.198", features = ["derive"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
# kona-sync | ||
|
||
A simple program that executes the [derivation pipeline][derive] over L1 Blocks and validates payloads. | ||
|
||
Used for validating derivation sync. | ||
|
||
[derive]: https://github.com/ethereum-optimism/kona/tree/main/crates/derive | ||
|
||
## Usage | ||
|
||
From the `kona` root directory, specify the binary with `cargo run --bin kona-sync`. | ||
Otherwise, just run with `cargo run .` | ||
|
||
Example below (uses the environment variables for the rpc cli flags since they are not specified). | ||
|
||
``` | ||
cargo run --bin kona-sync -vvv | ||
``` | ||
|
||
Optional flags (defaults to environment variables). | ||
|
||
`-v`: Verbosity | ||
`--l2-rpc-url` (`L2_RPC_URL`): The RPC URL used to validate the derived payload attributes and span batches. | ||
`--l1-rpc-url` (`L1_RPC_URL`): Used by the L1 Traversal Stage to grab new L1 Blocks. This can point to the local reth L1 node http endpoint. The online `AlloyChainProvider` that queries these blocks over RPC can be changed for some new provider implementation that just pulls the blocks from disk or the committed chain. Note, this new provider must implement the `ChainProvider` trait that the L1 Traversal Stage uses to pull in the L1 Blocks. | ||
`--beacon-url` (`BEACON_URL`): The beacon provider that is used to fetch blobs. This could probably also be optimized to pull in blobs when an L1 block is committed by grabbing the blob sidecars from the `Chain` passed into the Execution Extension's commit function. | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//! This module contains all CLI-specific code. | ||
use clap::{ArgAction, Parser}; | ||
|
||
/// The host binary CLI application arguments. | ||
#[derive(Parser, Clone, serde::Serialize, serde::Deserialize)] | ||
pub struct Cli { | ||
/// Verbosity level (0-4) | ||
#[arg(long, short, help = "Verbosity level (0-4)", action = ArgAction::Count)] | ||
pub v: u8, | ||
/// The l1 rpc URL | ||
#[clap(long)] | ||
pub l1_rpc_url: Option<String>, | ||
/// The l2 rpc URL | ||
#[clap(long)] | ||
pub l2_rpc_url: Option<String>, | ||
/// The Beacon URL | ||
#[clap(long)] | ||
pub beacon_url: Option<String>, | ||
/// The l2 block to start from. | ||
#[clap(long, short, help = "Starting l2 block, defaults to chain genesis if none specified")] | ||
pub start_l2_block: Option<u64>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.