Skip to content

Commit 185d2cc

Browse files
committed
WIP
1 parent d73b543 commit 185d2cc

File tree

6 files changed

+84
-54
lines changed

6 files changed

+84
-54
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"

relay-api-types/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,9 @@ ethereum_ssz.workspace = true
1010
ethereum_ssz_derive.workspace = true
1111
serde.workspace = true
1212
superstruct.workspace = true
13+
14+
# Alloy dependencies
15+
alloy-primitives.workspace = true
16+
alloy-rpc-types-mev.workspace = true
17+
alloy-rpc-types-beacon = { workspace = true, features = ["ssz"] }
18+
alloy-rpc-types-engine.workspace = true

relay-api-types/src/lib.rs

Lines changed: 56 additions & 38 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/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,

0 commit comments

Comments
 (0)