-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor relay and builder concerns from boost
- Loading branch information
1 parent
1cd28b7
commit d7da4c0
Showing
30 changed files
with
185 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/target | ||
target | ||
/Cargo.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,7 @@ | ||
[package] | ||
name = "mev-boost-rs" | ||
version = "0.1.0" | ||
edition = "2021" | ||
license = "MIT OR Apache-2.0" | ||
rust-version = "1.60.0" | ||
[workspace] | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
tokio = { version = "1.0", features = ["full"] } | ||
tracing = "0.1" | ||
tracing-subscriber = { version = "0.3", features = ["env-filter"] } | ||
futures = "0.3.21" | ||
async-trait = "0.1.53" | ||
|
||
axum = "0.5.4" | ||
url = { version = "2.2.2", default-features = false } | ||
|
||
serde = { version = "1.0", features = ["derive"] } | ||
serde_json = "1.0.81" | ||
|
||
thiserror = "1.0.30" | ||
|
||
clap = { version = "3.1.14", features = ["derive"] } | ||
|
||
ethereum_consensus = { git = "https://github.com/ralexstokes/ethereum_consensus" } | ||
ssz_rs = { git = "https://github.com/ralexstokes/ssz_rs" } | ||
beacon-api-client = { git = "https://github.com/ralexstokes/beacon-api-client" } | ||
|
||
[dev-dependencies] | ||
rand = "0.8.5" | ||
|
||
[[bin]] | ||
name = "main" | ||
members = [ | ||
"mev-boost-rs", | ||
"mev-relay-rs", | ||
"mev-build-rs", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
Copyright (c) 2022 Alex Stokes | ||
|
||
Apache License | ||
Version 2.0, January 2004 | ||
http://www.apache.org/licenses/ | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[package] | ||
name = "mev-boost-rs" | ||
version = "0.1.0" | ||
edition = "2021" | ||
license = "MIT OR Apache-2.0" | ||
rust-version = "1.60.0" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
tokio = { version = "1.0", features = ["full"] } | ||
tracing = "0.1" | ||
tracing-subscriber = { version = "0.3", features = ["env-filter"] } | ||
futures = "0.3.21" | ||
async-trait = "0.1.53" | ||
|
||
url = { version = "2.2.2", default-features = false } | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde_json = "1.0.81" | ||
|
||
thiserror = "1.0.30" | ||
|
||
clap = { version = "3.1.14", features = ["derive"] } | ||
|
||
ethereum_consensus = { git = "https://github.com/ralexstokes/ethereum_consensus" } | ||
beacon-api-client = { git = "https://github.com/ralexstokes/beacon-api-client" } | ||
|
||
mev-build-rs = { path = "../mev-build-rs" } | ||
mev-relay-rs = { path = "../mev-relay-rs" } | ||
|
||
[dev-dependencies] | ||
rand = "0.8.5" | ||
|
||
[[bin]] | ||
name = "main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../LICENSE-APACHE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../LICENSE-MIT |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
mod relay_mux; | ||
mod service; | ||
|
||
pub use service::{Service, ServiceConfig}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[package] | ||
name = "mev-build-rs" | ||
version = "0.1.0" | ||
edition = "2021" | ||
license = "MIT OR Apache-2.0" | ||
rust-version = "1.60.0" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[features] | ||
default = ["serde", "api"] | ||
api = ["axum", "beacon-api-client", "tracing"] | ||
|
||
[dependencies] | ||
axum = { version = "0.5.4", optional = true } | ||
tracing = { version = "0.1", optional = true } | ||
async-trait = "0.1.53" | ||
serde = { version = "1.0", features = ["derive"], optional = true } | ||
thiserror = "1.0.30" | ||
|
||
ethereum_consensus = { git = "https://github.com/ralexstokes/ethereum_consensus" } | ||
ssz_rs = { git = "https://github.com/ralexstokes/ssz_rs" } | ||
beacon-api-client = { git = "https://github.com/ralexstokes/beacon-api-client", optional = true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../LICENSE-APACHE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../LICENSE-MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
mod builder; | ||
#[cfg(feature = "api")] | ||
mod builder_api_server; | ||
#[cfg(feature = "serde")] | ||
mod serde; | ||
mod types; | ||
|
||
pub use builder::{Builder, Error}; | ||
#[cfg(feature = "api")] | ||
pub use builder_api_server::Server as ApiServer; | ||
pub use types::*; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
pub use ethereum_consensus::bellatrix::mainnet::{ | ||
ExecutionPayload, ExecutionPayloadHeader, SignedBlindedBeaconBlock, | ||
}; | ||
pub use ethereum_consensus::builder::SignedValidatorRegistration; | ||
use ethereum_consensus::primitives::{BlsPublicKey, BlsSignature, Hash32, Slot}; | ||
use ssz_rs::prelude::*; | ||
|
||
#[derive(Debug, Default, Clone, PartialEq, Eq, Hash)] | ||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] | ||
pub struct BidRequest { | ||
#[serde(with = "crate::serde::as_string")] | ||
pub slot: Slot, | ||
pub parent_hash: Hash32, | ||
pub public_key: BlsPublicKey, | ||
} | ||
|
||
#[derive(Debug, Default, SimpleSerialize)] | ||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] | ||
pub struct BuilderBid { | ||
pub header: ExecutionPayloadHeader, | ||
pub value: U256, | ||
pub public_key: BlsPublicKey, | ||
} | ||
|
||
#[derive(Debug, Default, SimpleSerialize)] | ||
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] | ||
pub struct SignedBuilderBid { | ||
pub message: BuilderBid, | ||
pub signature: BlsSignature, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[package] | ||
name = "mev-relay-rs" | ||
version = "0.1.0" | ||
edition = "2021" | ||
license = "MIT OR Apache-2.0" | ||
rust-version = "1.60.0" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
async-trait = "0.1.53" | ||
thiserror = "1.0.30" | ||
http = "0.2.7" | ||
|
||
ethereum_consensus = { git = "https://github.com/ralexstokes/ethereum_consensus" } | ||
beacon-api-client = { git = "https://github.com/ralexstokes/beacon-api-client" } | ||
ssz_rs = { git = "https://github.com/ralexstokes/ssz_rs" } | ||
|
||
mev-build-rs = { path = "../mev-build-rs"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../LICENSE-APACHE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../LICENSE-MIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
mod client; | ||
mod relay; | ||
|
||
pub use client::{Client, Error as ClientError}; | ||
pub use relay::Relay; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.