Skip to content

Commit e64eddd

Browse files
committed
feat(bin): kona consensus node
Adds kona consensus node binary with: - JWT library for authentication - Refactored CLI logic with shared utilities
1 parent 8ebc15a commit e64eddd

File tree

30 files changed

+3501
-476
lines changed

30 files changed

+3501
-476
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,33 @@ codegen-units = 1
5353

5454
[workspace.dependencies]
5555
# Shared
56-
base-access-lists = { path = "crates/shared/access-lists" }
5756
base-bundles = { path = "crates/shared/bundles" }
5857
base-cli-utils = { path = "crates/shared/cli-utils" }
5958
base-flashtypes = { path = "crates/shared/flashtypes" }
6059
base-primitives = { path = "crates/shared/primitives" }
60+
base-access-lists = { path = "crates/shared/access-lists" }
6161
base-reth-rpc-types = { path = "crates/shared/reth-rpc-types" }
62+
base-jwt = { path = "crates/shared/jwt" }
6263
# Client
6364
base-client-node = { path = "crates/client/node" }
6465
base-metering = { path = "crates/client/metering" }
6566
base-txpool = { path = "crates/client/txpool" }
6667
base-flashblocks = { path = "crates/client/flashblocks" }
68+
base-client-cli = { path = "crates/client/cli" }
69+
70+
# Kona
71+
kona-rpc = { git = "https://github.com/op-rs/kona", rev = "24e7e2658e09ac00c8e6cbb48bebe6d10f8fb69d" }
72+
kona-disc = { git = "https://github.com/op-rs/kona", rev = "24e7e2658e09ac00c8e6cbb48bebe6d10f8fb69d" }
73+
kona-engine = { git = "https://github.com/op-rs/kona", rev = "24e7e2658e09ac00c8e6cbb48bebe6d10f8fb69d" }
74+
kona-derive = { git = "https://github.com/op-rs/kona", rev = "24e7e2658e09ac00c8e6cbb48bebe6d10f8fb69d" }
75+
kona-gossip = { git = "https://github.com/op-rs/kona", rev = "24e7e2658e09ac00c8e6cbb48bebe6d10f8fb69d" }
76+
kona-genesis = { git = "https://github.com/op-rs/kona", rev = "24e7e2658e09ac00c8e6cbb48bebe6d10f8fb69d" }
77+
kona-registry = { git = "https://github.com/op-rs/kona", rev = "24e7e2658e09ac00c8e6cbb48bebe6d10f8fb69d" }
78+
kona-node-service = { git = "https://github.com/op-rs/kona", rev = "24e7e2658e09ac00c8e6cbb48bebe6d10f8fb69d" }
79+
kona-providers-alloy = { git = "https://github.com/op-rs/kona", rev = "24e7e2658e09ac00c8e6cbb48bebe6d10f8fb69d" }
80+
kona-cli = { git = "https://github.com/op-rs/kona", rev = "24e7e2658e09ac00c8e6cbb48bebe6d10f8fb69d" }
81+
kona-peers = { git = "https://github.com/op-rs/kona", rev = "24e7e2658e09ac00c8e6cbb48bebe6d10f8fb69d" }
82+
kona-sources = { git = "https://github.com/op-rs/kona", rev = "24e7e2658e09ac00c8e6cbb48bebe6d10f8fb69d" }
6783

6884
# reth
6985
reth-ipc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.3" }
@@ -185,19 +201,23 @@ alloy-rpc-types-beacon = { version = "1.0.41", features = ["ssz"] }
185201
# op-alloy
186202
op-alloy-flz = { version = "0.13.1", default-features = false }
187203
op-alloy-network = { version = "0.22.0", default-features = false }
204+
op-alloy-provider = { version = "0.22.0", default-features = false }
188205
op-alloy-rpc-types = { version = "0.22.0", default-features = false }
189206
op-alloy-consensus = { version = "0.22.0", default-features = false }
190207
op-alloy-rpc-jsonrpsee = { version = "0.22.0", default-features = false }
191208
op-alloy-rpc-types-engine = { version = "0.22.0", default-features = false }
192209
alloy-op-evm = { version = "0.23.3", default-features = false }
193210
alloy-op-hardforks = "0.4.4"
194211

212+
# rollup-boost
213+
rollup-boost = { git = "https://github.com/flashbots/rollup-boost", tag = "v0.7.11" }
214+
# rollup-boost version that matches kona's dependency (used for consensus binary)
215+
rollup-boost-kona = { package = "rollup-boost", git = "https://github.com/flashbots/rollup-boost.git", rev = "7fda98f" }
216+
217+
195218
# op-revm
196219
op-revm = { version = "12.0.2", default-features = false }
197220

198-
# kona
199-
kona-registry = "0.4.5"
200-
201221
# tokio
202222
tokio = "1.48.0"
203223
tokio-stream = "0.1.17"
@@ -217,6 +237,11 @@ vergen = "9.0.6"
217237
vergen-git2 = "1.0.7"
218238
clap = { version = "4.5.53", features = ["derive", "env", "string"] }
219239

240+
# Tracing
241+
tracing = "0.1.43"
242+
tracing-appender = "0.2.4"
243+
tracing-subscriber = "0.3.22"
244+
220245
# Metrics
221246
metrics = { version = "0.24.3", default-features = false }
222247
prometheus = { version = "0.14.0", default-features = false }
@@ -227,6 +252,8 @@ metrics-exporter-prometheus = { version = "0.18.1", default-features = false }
227252
url = "2.5.7"
228253
lru = "0.16.3"
229254
rand = "0.9.2"
255+
strum = "0.27.2"
256+
backon = "1.6.0"
230257
uuid = "1.19.0"
231258
time = { version = "0.3.44", features = ["macros", "formatting", "parsing"] }
232259
rayon = "1.11"
@@ -239,21 +266,21 @@ rstest = "0.26.1"
239266
serde = "1.0.228"
240267
rustls = "0.23.35"
241268
httpmock = "0.8.2"
242-
tracing = "0.1.43"
243269
arc-swap = "1.7.1"
244270
once_cell = "1.21.3"
245271
itertools = "0.14.0"
246272
derive_more = "2.1.0"
247273
serde_json = "1.0.145"
248274
metrics-derive = "0.1.0"
249-
tracing-subscriber = "0.3.22"
250-
tracing-appender = "0.2"
251275
thiserror = "2.0"
252276
async-trait = "0.1.83"
253277
parking_lot = "0.12.3"
254278
auto_impl = "1.2.0"
255279
serde_with = "3.8.1"
256280
secp256k1 = "0.30"
281+
libp2p = "0.56.0"
282+
libp2p-identity = "0.2.12"
283+
discv5 = "0.10"
257284
either = { version = "1.15.0", default-features = false }
258285
tokio-util = { version = "0.7.4", features = ["codec"] }
259286
warp = "0.3.7"

bin/consensus/Cargo.toml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,34 @@ workspace = true
1515
[dependencies]
1616
# Workspace
1717
base-cli-utils.workspace = true
18+
base-client-cli.workspace = true
19+
base-jwt = { workspace = true, features = ["engine-validation"] }
20+
21+
# Kona
22+
kona-genesis.workspace = true
23+
kona-registry.workspace = true
24+
kona-disc = { workspace = true, features = ["metrics"] }
25+
kona-derive = { workspace = true, features = ["metrics"] }
26+
kona-engine = { workspace = true, features = ["metrics"] }
27+
kona-gossip = { workspace = true, features = ["metrics"] }
28+
kona-node-service = { workspace = true, features = ["metrics"] }
29+
kona-providers-alloy = { workspace = true, features = ["metrics"] }
30+
31+
# Reth (for serde feature on transitive dependencies)
32+
reth-optimism-node.workspace = true
1833

1934
# CLI
2035
clap.workspace = true
2136
eyre.workspace = true
37+
strum.workspace = true
38+
serde_json.workspace = true
39+
40+
# Tracing
41+
tracing.workspace = true
42+
tracing-subscriber = { workspace = true, features = ["fmt", "env-filter"] }
43+
44+
# Metrics
45+
metrics.workspace = true
2246

2347

2448
[build-dependencies]

0 commit comments

Comments
 (0)