Skip to content

Commit f886f18

Browse files
authored
chore: bring back rbuilder-operator (#733)
## πŸ“ Summary PR attempting to bring back [`rbuilder-operator`](https://github.com/flashbots/rbuilder-operator/) back into rbuilder repo a crate. WIP ## βœ… I have completed the following steps: * [ ] Run `make lint` * [ ] Run `make test` * [ ] Added tests (if applicable)
1 parent a0e24f1 commit f886f18

30 files changed

+3826
-17
lines changed

β€ŽCargo.lockβ€Ž

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

β€ŽCargo.tomlβ€Ž

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ exclude = [".github/"]
99

1010
[workspace]
1111
members = [
12-
"crates/rbuilder",
1312
"crates/rbuilder-primitives",
1413
"crates/rbuilder-config",
14+
"crates/rbuilder",
15+
"crates/rbuilder-operator",
1516
"crates/reth-rbuilder",
1617
"crates/rbuilder/src/test_utils",
1718
"crates/rbuilder/src/telemetry/metrics_macros",
@@ -126,6 +127,7 @@ alloy-serde = { version = "1.0.27" }
126127
alloy-rpc-types-beacon = { version = "1.0.27", features = ["ssz"] }
127128
alloy-rpc-types-engine = { version = "1.0.27", features = ["ssz"] }
128129
alloy-rpc-types-eth = { version = "1.0.27" }
130+
alloy-signer = { version = "1.0.27" }
129131
alloy-signer-local = { version = "1.0.27" }
130132
alloy-rpc-client = { version = "1.0.27" }
131133
alloy-genesis = { version = "1.0.27" }
@@ -145,6 +147,7 @@ jsonrpsee-types = { version = "0.24.4" }
145147
parking_lot = { version = "0.12.3" }
146148
tokio = { version = "1.40.0", default-features = false }
147149
futures = "0.3"
150+
futures-util = "0.3"
148151
auto_impl = { version = "1.2.0" }
149152
reqwest = { version = "0.12.8" }
150153
serde = { version = "1.0.210" }
@@ -161,6 +164,11 @@ prometheus = "0.13.4"
161164
ctor = "0.2"
162165
rand = "0.8"
163166
toml = "0.8.8"
167+
tonic = "0.13"
168+
prost = "0.13"
169+
prost-types = "0.13"
170+
exponential-backoff = "1.2.0"
171+
derivative = "2.2"
164172

165173
libc = { version = "0.2.161" }
166174
lazy_static = "1.4.0"

β€Žcrates/bid-scraper/Cargo.tomlβ€Ž

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ alloy-provider.workspace = true
1616
alloy-rpc-types-beacon.workspace = true
1717

1818
tokio = { workspace = true, default-features = false, features = ["rt", "rt-multi-thread", "macros","signal"] }
19-
tokio-util = "0.7.12"
19+
tokio-util.workspace = true
2020
tracing = "0.1.37"
2121
tracing-subscriber = { version = "0.3.18", features = ["env-filter", "json"] }
2222
log = "^0.4"
@@ -33,19 +33,19 @@ reqwest = { version = "^0.11", default-features = false, features = ["rustls", "
3333
lru = "^0.10"
3434
async-trait = "^0.1"
3535
tokio-tungstenite = { version = "0.26.2", features = ["rustls-tls-native-roots"] }
36-
tokio-stream = "0.1.16"
37-
futures-util = "^0.3"
36+
tokio-stream.workspace = true
37+
futures-util.workspace = true
3838
ethereum_ssz_derive = "0.9"
3939
ethereum_ssz = "0.9"
4040
ssz_types = "^0.5"
4141
hex = "^0.4"
42-
derivative = "2.2"
42+
derivative.workspace = true
4343
toml.workspace = true
4444
eyre = "0.6.12"
45-
thiserror = { version = "1.0.64" }
46-
parking_lot = { version = "0.12.3" }
45+
thiserror.workspace = true
46+
parking_lot.workspace = true
4747
strum = { version = "0.25", features = ["derive"] }
48-
exponential-backoff = "1.2.0"
48+
exponential-backoff.workspace = true
4949

5050
[dev-dependencies]
5151
proptest = "1.4"
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
[package]
2+
name = "rbuilder-operator"
3+
version.workspace = true
4+
edition.workspace = true
5+
rust-version.workspace = true
6+
license.workspace = true
7+
homepage.workspace = true
8+
repository.workspace = true
9+
exclude.workspace = true
10+
11+
[dependencies]
12+
rbuilder-primitives.workspace = true
13+
rbuilder-config.workspace = true
14+
rbuilder.workspace = true
15+
metrics_macros.workspace = true
16+
bid-scraper.workspace = true
17+
18+
# alloy
19+
alloy-primitives.workspace = true
20+
alloy-provider = { workspace = true, features = ["ipc", "pubsub"] }
21+
alloy-json-rpc.workspace = true
22+
alloy-transport-http.workspace = true
23+
alloy-transport.workspace = true
24+
alloy-rpc-types-beacon = { workspace = true, features = ["ssz"] }
25+
alloy-signer-local.workspace = true
26+
alloy-signer.workspace = true
27+
alloy-rpc-client.workspace = true
28+
29+
# reth
30+
reth-primitives.workspace = true
31+
32+
serde.workspace = true
33+
serde_json.workspace = true
34+
serde_with.workspace = true
35+
eyre.workspace = true
36+
jsonrpsee = { version = "0.20.3", features = ["full"] }
37+
tonic.workspace = true
38+
prost.workspace = true
39+
redis = "0.25.4"
40+
exponential-backoff.workspace = true
41+
time.workspace = true
42+
tracing.workspace = true
43+
tokio.workspace = true
44+
tokio-util.workspace = true
45+
tokio-stream.workspace = true
46+
url.workspace = true
47+
thiserror.workspace = true
48+
derivative.workspace = true
49+
reqwest.workspace = true
50+
hyper = "0.14"
51+
hyper-util = "0.1.17"
52+
http = "0.2.9"
53+
tower = "0.4"
54+
prometheus.workspace = true
55+
ctor.workspace = true
56+
clickhouse = { version = "0.12.2", features = ["time", "uuid", "native-tls"] }
57+
futures-util.workspace = true
58+
parking_lot.workspace = true
59+
lazy_static.workspace = true
60+
61+
[build-dependencies]
62+
built = { version = "0.7.1", features = ["git2", "chrono"] }
63+
tonic-build = "0.13"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
use std::{env, path::PathBuf};
2+
3+
fn main() -> Result<(), Box<dyn std::error::Error>> {
4+
built::write_built_file().expect("Failed to acquire build-time information");
5+
let proto_file = "./src/bidding_service_wrapper/proto/bidding_service.proto";
6+
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
7+
tonic_build::configure()
8+
.protoc_arg("--experimental_allow_proto3_optional") // for older systems
9+
.build_client(true)
10+
.build_server(true)
11+
.file_descriptor_set_path(out_dir.join("bidding_service_descriptor.bin"))
12+
.out_dir("./src/bidding_service_wrapper")
13+
.compile_protos(&[proto_file], &["proto"])?;
14+
Ok(())
15+
}

0 commit comments

Comments
Β (0)