Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove patch overrides #107

Merged
merged 4 commits into from
Jul 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,274 changes: 649 additions & 625 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 4 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ members = [
]
default-members = ["bin/mev"]

[patch."https://github.com/ralexstokes/ethereum-consensus"]
ethereum-consensus = { git = "https://github.com/ralexstokes//ethereum-consensus", rev = "ef89b4a" }

[patch."https://github.com/ralexstokes/ssz-rs"]
ssz-rs = { git = "https://github.com/ralexstokes//ssz-rs", rev = "45ff6f1" }

[patch."https://github.com/ralexstokes/beacon-api-client"]
beacon-api-client = { git = "https://github.com/ralexstokes//beacon-api-client", rev = "53690a711e33614d59d4d44fb09762b4699e2a4e" }
[workspace.dependencies]
ethereum-consensus = { git = "https://github.com/ralexstokes/ethereum-consensus", rev = "e380108" }
beacon-api-client = { git = "https://github.com/ralexstokes/beacon-api-client", rev = "93d7e8c" }
ssz_rs = "0.9.0"
4 changes: 2 additions & 2 deletions mev-boost-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ serde = { version = "1.0", features = ["derive"] }
thiserror = "1.0.30"
parking_lot = "0.12.1"

ethereum-consensus = { git = "https://github.com/ralexstokes/ethereum-consensus" }
beacon-api-client = { git = "https://github.com/ralexstokes/beacon-api-client" }
ethereum-consensus = { workspace = true }
beacon-api-client = { workspace = true }

mev-rs = { path = "../mev-rs" }

Expand Down
4 changes: 2 additions & 2 deletions mev-build-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ thiserror = "1.0.30"
url = { version = "2.2.2", default-features = false }
serde = { version = "1.0", features = ["derive"] }

ethereum-consensus = { git = "https://github.com/ralexstokes/ethereum-consensus" }
beacon-api-client = { git = "https://github.com/ralexstokes/beacon-api-client" }
ethereum-consensus = { workspace = true }
beacon-api-client = { workspace = true }

mev-rs = { path = "../mev-rs" }
5 changes: 3 additions & 2 deletions mev-build-rs/src/mempool_builder.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use async_trait::async_trait;
use beacon_api_client::{BeaconProposerRegistration, Client, ProposerDuty};
use beacon_api_client::{mainnet::Client, BeaconProposerRegistration, ProposerDuty};
use ethereum_consensus::{
clock::{convert_timestamp_to_slot, get_current_unix_time_in_secs},
crypto::SecretKey,
Expand Down Expand Up @@ -159,7 +159,8 @@ impl Builder {
// TODO update method on Context
.unwrap_or(self.context.min_genesis_time + self.context.genesis_delay);
let slot =
convert_timestamp_to_slot(*timestamp, genesis_time, self.context.seconds_per_slot);
convert_timestamp_to_slot(*timestamp, genesis_time, self.context.seconds_per_slot)
.expect("after genesis");
let coordinate = Coordinate { slot, parent_hash };
let mut state = self.state.lock();
tracing::trace!("at {coordinate:?}, inserting build job from engine API: {job:?}");
Expand Down
2 changes: 1 addition & 1 deletion mev-build-rs/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ impl Service {
let block_provider = builder.clone();
let engine_builder = builder.clone();

let current_epoch = clock.current_epoch();
let current_epoch = clock.current_epoch().expect("after genesis");
builder.initialize(current_epoch).await;

let clock = tokio::spawn(async move {
Expand Down
4 changes: 2 additions & 2 deletions mev-relay-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ http = "0.2.7"
url = { version = "2.2.2", default-features = false }
serde = { version = "1.0", features = ["derive"] }

ethereum-consensus = { git = "https://github.com/ralexstokes/ethereum-consensus" }
beacon-api-client = { git = "https://github.com/ralexstokes/beacon-api-client" }
ethereum-consensus = { workspace = true }
beacon-api-client = { workspace = true }

mev-rs = { path = "../mev-rs" }
mev-build-rs = { path = "../mev-build-rs" }
2 changes: 1 addition & 1 deletion mev-relay-rs/src/relay.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use async_trait::async_trait;
use beacon_api_client::Client;
use beacon_api_client::mainnet::Client;
use ethereum_consensus::{
builder::ValidatorRegistration,
clock::get_current_unix_time_in_secs,
Expand Down
4 changes: 2 additions & 2 deletions mev-relay-rs/src/service.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::relay::Relay;
use beacon_api_client::Client;
use beacon_api_client::mainnet::Client;
use ethereum_consensus::{crypto::SecretKey, state_transition::Context};
use futures::StreamExt;
use mev_rs::{blinded_block_provider::Server as BlindedBlockProviderServer, Error, Network};
Expand Down Expand Up @@ -83,7 +83,7 @@ impl Service {

tokio::pin!(slots);

let mut current_epoch = clock.current_epoch();
let mut current_epoch = clock.current_epoch().expect("after genesis");
let mut next_epoch = false;
while let Some(slot) = slots.next().await {
let epoch = clock.epoch_for(slot);
Expand Down
8 changes: 4 additions & 4 deletions mev-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ parking_lot = "0.12.1"

anvil-rpc = { git = "https://github.com/foundry-rs/foundry", rev = "b45456717ffae1af65acdc71099f8cb95e6683a0", optional = true}
reqwest = { version = "0.11.14", optional = true }
serde_json = {version = "1.0.92", optional = true }
serde_json = { version = "1.0.92", optional = true }

ethereum-consensus = { git = "https://github.com/ralexstokes/ethereum-consensus" }
beacon-api-client = { git = "https://github.com/ralexstokes/beacon-api-client", optional = true }
ssz-rs = { git = "https://github.com/ralexstokes/ssz-rs" }
ssz_rs = { workspace = true }
ethereum-consensus = { workspace = true }
beacon-api-client = { workspace = true, optional = true }
3 changes: 2 additions & 1 deletion mev-rs/src/blinded_block_provider/api/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ use crate::{
};
use axum::http::StatusCode;
use beacon_api_client::{
api_error_or_ok, ApiResult, Client as BeaconApiClient, Error as ApiError, VersionedValue,
api_error_or_ok, mainnet::Client as BeaconApiClient, ApiResult, Error as ApiError,
VersionedValue,
};

/// A `Client` for a service implementing the Builder APIs.
Expand Down
2 changes: 1 addition & 1 deletion mev-rs/src/blinded_block_provider/api/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl IntoResponse for Error {
fn into_response(self) -> Response {
let message = self.to_string();
let code = StatusCode::BAD_REQUEST;
(code, Json(ApiError { code, message })).into_response()
(code, Json(ApiError::ErrorMessage { code, message })).into_response()
}
}

Expand Down
4 changes: 3 additions & 1 deletion mev-rs/src/proposer_scheduler.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use beacon_api_client::{BeaconProposerRegistration, Client, Error as ApiError, ProposerDuty};
use beacon_api_client::{
mainnet::Client, BeaconProposerRegistration, Error as ApiError, ProposerDuty,
};
use ethereum_consensus::primitives::{BlsPublicKey, Epoch, Slot};
use parking_lot::Mutex;
use std::collections::HashMap;
Expand Down
4 changes: 3 additions & 1 deletion mev-rs/src/validator_registry.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use crate::{signing::verify_signed_builder_message, types::SignedValidatorRegistration};
use beacon_api_client::{Client, Error as ApiError, StateId, ValidatorStatus, ValidatorSummary};
use beacon_api_client::{
mainnet::Client, Error as ApiError, StateId, ValidatorStatus, ValidatorSummary,
};
use ethereum_consensus::{
builder::ValidatorRegistration,
primitives::{BlsPublicKey, ExecutionAddress, ValidatorIndex},
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "1.67"
channel = "1.70.0"
Loading