Skip to content

Commit 3ed43fe

Browse files
committed
WIP
1 parent d73b543 commit 3ed43fe

File tree

10 files changed

+83
-63
lines changed

10 files changed

+83
-63
lines changed

Cargo.toml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,40 @@ members = [
1111
"relay-server",
1212
"searcher-api-types",
1313
"searcher-client",
14-
"common"
14+
"common",
1515
]
1616

1717
[workspace.dependencies]
1818
async-trait = "0.1"
1919
axum = { version = "0.8", features = ["ws"] }
2020
bytes = "1.6"
21-
eth2 = { git = "https://github.com/cakevm/lighthouse", rev="68776b6" }
21+
eth2 = { git = "https://github.com/cakevm/lighthouse", rev = "68776b6" }
2222
ethereum_serde_utils = "0.8.0"
2323
ethereum_ssz = "0.9.0"
2424
ethereum_ssz_derive = "0.9.0"
2525
eyre = "0.6.12"
2626
flate2 = "1.0"
2727
futures = "0.3.30"
28-
http = "1.2"
29-
jsonrpsee = "0.24.9"
30-
jsonrpsee-core = "0.24.9"
28+
http = "1.3"
29+
jsonrpsee = "0.25.1"
30+
jsonrpsee-core = "0.25.1"
3131
mediatype = "0.19.13"
32-
reqwest = { version = "0.12.12", features = ["json"] }
32+
reqwest = { version = "0.12.19", features = ["json"] }
3333
serde = { version = "1.0", features = ["derive"] }
3434
serde_json = { version = "1", features = ["raw_value"] }
3535
serde_with = "3.12.0"
3636
superstruct = "0.9.0"
37-
tokio = { version = "1", default-features = false, features = ["signal", "rt-multi-thread", "macros"] }
38-
tokio-tungstenite = "0.24.0"
37+
tokio = { version = "1", default-features = false, features = [
38+
"signal",
39+
"rt-multi-thread",
40+
"macros",
41+
] }
42+
tokio-tungstenite = "0.26.2"
3943
tracing = { version = "0.1", features = ["attributes"] }
4044
url = "2.5.4"
4145

4246
alloy-primitives = "1.0.0"
4347
alloy-rlp = "0.3.11"
44-
alloy-rpc-types-mev = "0.14.0"
48+
alloy-rpc-types-mev = "1.0.9"
49+
alloy-rpc-types-beacon = "1.0.9"
50+
alloy-rpc-types-engine = "1.0.9"

builder-server/Cargo.toml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,12 @@ edition = "2021"
66
[dependencies]
77
async-trait.workspace = true
88
axum.workspace = true
9-
bytes.workspace = true
10-
ethereum_ssz.workspace = true
11-
flate2.workspace = true
12-
futures.workspace = true
139
http.workspace = true
1410
builder-api-types = { path = "../builder-api-types" }
1511
ethereum-apis-common = { path = "../common" }
16-
serde.workspace = true
1712
serde_json.workspace = true
1813
tokio.workspace = true
19-
tracing.workspace = true
2014

2115
[dev-dependencies]
2216
tower = "0.5.2"
17+
ethereum_ssz.workspace = true

common/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ version = "0.1.0"
44
edition = "2021"
55

66
[dependencies]
7-
async-trait.workspace = true
87
axum.workspace = true
98
bytes.workspace = true
109
ethereum_ssz.workspace = true
1110
flate2.workspace = true
12-
futures.workspace = true
1311
http.workspace = true
1412
mediatype.workspace = true
1513
serde.workspace = true

relay-api-types/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ ethereum_serde_utils.workspace = true
99
ethereum_ssz.workspace = true
1010
ethereum_ssz_derive.workspace = true
1111
serde.workspace = true
12-
superstruct.workspace = true
12+
13+
# Alloy dependencies
14+
alloy-rpc-types-beacon = { workspace = true, features = ["ssz"] }

relay-api-types/src/lib.rs

Lines changed: 56 additions & 33 deletions
Large diffs are not rendered by default.

relay-client/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ impl RelayClient {
103103
pub async fn submit_block<E>(
104104
&self,
105105
query_params: &SubmitBlockQueryParams,
106-
body: &SubmitBlockRequest<E>,
106+
body: &SubmitBlockRequest,
107107
content_type: ContentType,
108108
content_encoding: ContentEncoding,
109109
) -> Result<(), Error>
@@ -219,7 +219,7 @@ impl RelayClient {
219219
pub async fn submit_block_optimistic_v2<E>(
220220
&self,
221221
query_params: &SubmitBlockQueryParams,
222-
body: &SubmitBlockRequest<E>,
222+
body: &SubmitBlockRequest,
223223
content_type: ContentType,
224224
content_encoding: ContentEncoding,
225225
) -> Result<(), Error>
@@ -281,7 +281,7 @@ impl RelayClient {
281281
match message {
282282
Ok(Message::Text(text)) => match serde_json::from_str::<TopBidUpdate>(&text) {
283283
Ok(update) => Some(Ok(update)),
284-
Err(e) => Some(Err(Error::InvalidJson(e, text))),
284+
Err(e) => Some(Err(Error::InvalidJson(e, text.as_str().to_string()))),
285285
},
286286
Ok(Message::Binary(bin)) => match serde_json::from_slice::<TopBidUpdate>(&bin) {
287287
Ok(update) => Some(Ok(update)),

relay-server/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,10 @@ edition = "2021"
66
[dependencies]
77
async-trait.workspace = true
88
axum.workspace = true
9-
bytes.workspace = true
10-
ethereum_ssz.workspace = true
119
ethereum-apis-common = { path = "../common" }
12-
flate2.workspace = true
1310
futures.workspace = true
1411
http.workspace = true
1512
relay-api-types = { path = "../relay-api-types" }
16-
serde.workspace = true
1713
serde_json.workspace = true
1814
tokio.workspace = true
1915
tracing.workspace = true

relay-server/src/builder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub trait Builder<E: EthSpec> {
2222
async fn submit_block(
2323
&self,
2424
query_params: SubmitBlockQueryParams,
25-
body: SubmitBlockRequest<E>,
25+
body: SubmitBlockRequest,
2626
) -> Result<(), ErrorResponse>;
2727
/// Submit a new block header to the relay.
2828
///
@@ -39,7 +39,7 @@ pub trait Builder<E: EthSpec> {
3939
async fn submit_block_optimistic_v2(
4040
&self,
4141
query_params: SubmitBlockQueryParams,
42-
body: SubmitBlockRequest<E>,
42+
body: SubmitBlockRequest,
4343
) -> Result<(), ErrorResponse>;
4444

4545
/// Submit a cancellation for all bids.

relay-server/src/server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ where
6262
async fn submit_block<I, A, E>(
6363
Query(query_params): Query<SubmitBlockQueryParams>,
6464
State(api_impl): State<I>,
65-
JsonOrSszMaybeGzipped(body): JsonOrSszMaybeGzipped<SubmitBlockRequest<E>>,
65+
JsonOrSszMaybeGzipped(body): JsonOrSszMaybeGzipped<SubmitBlockRequest>,
6666
) -> Result<Response<Body>, StatusCode>
6767
where
6868
E: EthSpec,
@@ -78,7 +78,7 @@ where
7878
async fn submit_block_optimistic_v2<I, A, E>(
7979
Query(query_params): Query<SubmitBlockQueryParams>,
8080
State(api_impl): State<I>,
81-
JsonOrSszMaybeGzipped(body): JsonOrSszMaybeGzipped<SubmitBlockRequest<E>>,
81+
JsonOrSszMaybeGzipped(body): JsonOrSszMaybeGzipped<SubmitBlockRequest>,
8282
) -> Result<Response<Body>, StatusCode>
8383
where
8484
E: EthSpec,

searcher-client/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ mod test {
5050
let resp = res.unwrap();
5151
assert_eq!(
5252
resp.bundle_hash.to_string(),
53-
"0xbfe05fa7cb2f9de981eeefe7246c9c9be6f69c3a3b33a05fdbf6afac42ddd294"
53+
"0x09ea03143e742135ad06cac0b440f94c2113fbb99bd50710459b1815ea8994cf"
5454
);
5555
}
5656
}

0 commit comments

Comments
 (0)