Skip to content

Commit 34b9137

Browse files
authored
import rollup-boost-types instead of redefining types (#46)
* get flashblocks types from rollup boost repo * make fbutil inherit dependencies from the workspace
1 parent 532fe41 commit 34b9137

File tree

8 files changed

+78
-133
lines changed

8 files changed

+78
-133
lines changed

Cargo.toml

Lines changed: 54 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,9 @@ homepage = "https://github.com/flashbots/unichain-builder"
1616
authors = ["Flashbots <[email protected]>"]
1717
exclude = [".github/"]
1818

19-
[package]
20-
name = "unichain-builder"
21-
description = "Next-Gen Optimism L2 Block Builder"
22-
version.workspace = true
23-
edition.workspace = true
24-
rust-version.workspace = true
25-
license.workspace = true
26-
homepage.workspace = true
27-
repository.workspace = true
28-
authors.workspace = true
29-
exclude.workspace = true
30-
31-
[features]
32-
default = ["jemalloc"]
33-
jemalloc = ["rblib/jemalloc"]
34-
debug = ["tokio/full", "tokio/tracing", "dep:console-subscriber"]
35-
36-
[dependencies]
19+
[workspace.dependencies]
3720
rblib = { git = "https://github.com/flashbots/rblib", rev = "9eccd22047c3f8978ae022d575dca749a81684a8" }
21+
rollup-boost-types = { git = "https://github.com/flashbots/rollup-boost", rev = "b282527e5f46d0915d1e5bdf44338593bc8beb2d" }
3822

3923
futures = "0.3"
4024
tokio = "1.46"
@@ -59,19 +43,62 @@ atomic-time = "0.1"
5943

6044
secp256k1 = "0.30"
6145
jsonrpsee = "0.26.0"
62-
63-
# debug flag
64-
console-subscriber = { version = "0.4", optional = true }
46+
console-subscriber = "0.4"
6547
tracing-subscriber = "0.3.20"
48+
dashmap = "6.1"
49+
orx-concurrent-vec = "3.7.0"
50+
51+
[package]
52+
name = "unichain-builder"
53+
description = "Next-Gen Optimism L2 Block Builder"
54+
version.workspace = true
55+
edition.workspace = true
56+
rust-version.workspace = true
57+
license.workspace = true
58+
homepage.workspace = true
59+
repository.workspace = true
60+
authors.workspace = true
61+
exclude.workspace = true
62+
63+
[features]
64+
default = ["jemalloc"]
65+
jemalloc = ["rblib/jemalloc"]
66+
debug = ["tokio/full", "tokio/tracing", "dep:console-subscriber"]
67+
68+
[dependencies]
69+
rblib = { workspace = true }
70+
rollup-boost-types = { workspace = true }
71+
72+
futures = { workspace = true }
73+
tokio = { workspace = true }
74+
tokio-tungstenite = { workspace = true }
75+
parking_lot = { workspace = true }
76+
eyre = { workspace = true }
77+
moka = { workspace = true }
78+
tracing = { workspace = true }
79+
clap = { workspace = true }
80+
reqwest = { workspace = true }
81+
serde = { workspace = true }
82+
serde_json = { workspace = true }
83+
serde_yaml = { workspace = true }
84+
itertools = { workspace = true }
85+
url = { workspace = true }
86+
rand = { workspace = true }
87+
derive_more = { workspace = true }
88+
shellexpand = { workspace = true }
89+
humantime = { workspace = true }
90+
atomic-time = { workspace = true }
91+
secp256k1 = { workspace = true }
92+
jsonrpsee = { workspace = true }
93+
console-subscriber = { workspace = true, optional = true }
94+
tracing-subscriber = { workspace = true }
6695

6796
[dev-dependencies]
68-
rblib = { git = "https://github.com/flashbots/rblib", rev = "9eccd22047c3f8978ae022d575dca749a81684a8", features = [
69-
"test-utils",
70-
] }
97+
rblib = { workspace = true, features = ["test-utils"] }
7198

72-
dashmap = "6.1"
73-
orx-concurrent-vec = "3.7.0"
74-
itertools = "0.14"
99+
dashmap = { workspace = true }
100+
orx-concurrent-vec = { workspace = true }
101+
itertools = { workspace = true }
75102

76103
[lints.rust]
77104
type_alias_bounds = "allow"

src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
mod bundle;
22
mod platform;
3-
mod primitives;
43
mod state;
54

6-
pub use {bundle::*, platform::*, primitives::*, state::*};
5+
pub use {bundle::*, platform::*, state::*};

src/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ mod flashtestations;
2929
mod limits;
3030
mod platform;
3131
mod playground;
32-
mod primitives;
3332
mod publish;
3433
mod rpc;
3534
mod signer;

src/primitives.rs

Lines changed: 0 additions & 87 deletions
This file was deleted.

src/publish.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//! building jobs.
1111
1212
use {
13-
crate::{Flashblocks, primitives::*},
13+
crate::Flashblocks,
1414
atomic_time::AtomicOptionInstant,
1515
core::{net::SocketAddr, sync::atomic::Ordering},
1616
futures::{SinkExt, StreamExt},
@@ -20,6 +20,11 @@ use {
2020
prelude::{ext::CheckpointOpExt, *},
2121
reth::node::builder::PayloadBuilderAttributes,
2222
},
23+
rollup_boost_types::flashblocks::{
24+
ExecutionPayloadBaseV1,
25+
ExecutionPayloadFlashblockDeltaV1,
26+
FlashblocksPayloadV1,
27+
},
2328
std::{io, net::TcpListener, sync::Arc, time::Instant},
2429
tokio::{
2530
net::TcpStream,

src/tests/utils/ws.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use {
2-
crate::primitives::FlashblocksPayloadV1,
32
core::{
43
net::{IpAddr, Ipv4Addr, SocketAddr},
54
ops::Deref,
@@ -8,6 +7,7 @@ use {
87
futures::{FutureExt, StreamExt},
98
itertools::Itertools,
109
orx_concurrent_vec::ConcurrentVec,
10+
rollup_boost_types::flashblocks::FlashblocksPayloadV1,
1111
std::{sync::Arc, time::Instant},
1212
tokio::{net::TcpStream, sync::oneshot, task::JoinHandle},
1313
tokio_tungstenite::{

tools/fbutil/Cargo.toml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,21 @@ exclude.workspace = true
1313
[dependencies]
1414
unichain-builder = { path = "../.." }
1515

16-
futures = "0.3"
17-
tokio = "1.46"
18-
tokio-tungstenite = "0.27"
19-
clap = { version = "4.4", features = ["derive", "env", "string"] }
20-
tracing = "0.1"
21-
serde = { version = "1.0", features = ["derive"] }
22-
serde_json = "1.0"
23-
eyre = "0.6"
24-
url = "2.5.2"
25-
rand = "0.9"
26-
humantime = "2.2"
27-
# alloy = { version = "1.0.25", features = ["full"] }
28-
# op-alloy = { version = "0.19", features = ["full"] }
16+
rollup-boost-types = { workspace = true }
17+
18+
futures = { workspace = true }
19+
tokio = { workspace = true }
20+
tokio-tungstenite = { workspace = true }
21+
clap = { workspace = true }
22+
tracing = { workspace = true }
23+
serde = { workspace = true }
24+
serde_json = { workspace = true }
25+
eyre = { workspace = true }
26+
url = { workspace = true }
27+
rand = { workspace = true }
28+
humantime = { workspace = true }
29+
30+
# fbutil-specific dependencies
2931
human_format = "1.1.0"
3032
color-eyre = "0.6"
3133
chrono = "0.4.41"

tools/fbutil/src/watch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ use {
55
colored::Colorize,
66
futures::StreamExt,
77
human_format::Formatter,
8+
rollup_boost_types::flashblocks::FlashblocksPayloadV1,
89
std::time::Instant,
910
tokio_tungstenite::{connect_async, tungstenite::Message},
10-
unichain_builder::FlashblocksPayloadV1,
1111
};
1212

1313
#[derive(Debug, Clone, Args)]

0 commit comments

Comments
 (0)