Skip to content

Commit

Permalink
Merge pull request #69 from ralexstokes/refactor-crate-names
Browse files Browse the repository at this point in the history
reserve `mev-rs` for the "common" crate and rename binary
  • Loading branch information
ralexstokes authored Jan 31, 2023
2 parents b6cc136 + adf868d commit 4e6a6e4
Show file tree
Hide file tree
Showing 33 changed files with 48 additions and 48 deletions.
54 changes: 27 additions & 27 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[workspace]
members = [
"bin/mev-rs",
"bin/mev",
"mev-boost-rs",
"mev-relay-rs",
"mev-build-rs",
"mev-lib",
"mev-rs",
]
default-members = ["bin/mev-rs"]
default-members = ["bin/mev"]

[patch."https://github.com/ralexstokes/ethereum-consensus"]
ethereum-consensus = { git = "https://github.com/ralexstokes//ethereum-consensus", rev = "5531c285fc4030e265b8499612946d8a704e2c57" }
Expand Down
4 changes: 2 additions & 2 deletions bin/mev-rs/Cargo.toml → bin/mev/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "mev-rs"
name = "mev"
version = "0.2.1"
edition = "2021"
license = "MIT OR Apache-2.0"
Expand All @@ -14,7 +14,7 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] }
mev-boost-rs = { path = "../../mev-boost-rs" }
mev-relay-rs = { path = "../../mev-relay-rs" }
mev-build-rs = { path = "../../mev-build-rs" }
mev-lib = { path = "../../mev-lib" }
mev-rs = { path = "../../mev-rs" }

serde = { version = "1.0", features = ["derive"] }
toml = "0.5.9"
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion bin/mev-rs/src/cmd/boost.rs → bin/mev/src/cmd/boost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::cmd::config::Config;
use anyhow::{anyhow, Result};
use clap::Args;
use mev_boost_rs::Service;
use mev_lib::Network;
use mev_rs::Network;

#[derive(Debug, Args)]
#[clap(about = "🚀 connecting proposers to the external builder network")]
Expand Down
2 changes: 1 addition & 1 deletion bin/mev-rs/src/cmd/config.rs → bin/mev/src/cmd/config.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use anyhow::{Context, Result};
use clap::Args;
use mev_boost_rs::Config as BoostConfig;
use mev_lib::Network;
use mev_relay_rs::Config as RelayConfig;
use mev_rs::Network;
use serde::Deserialize;
use std::{fmt, path::Path};

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion bin/mev-rs/src/cmd/relay.rs → bin/mev/src/cmd/relay.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::cmd::config::Config;
use anyhow::{anyhow, Result};
use clap::{Args, Subcommand};
use mev_lib::Network;
use mev_relay_rs::Service;
use mev_rs::Network;

#[derive(Debug, Args)]
#[clap(about = "🏗 connecting builders to proposers", subcommand_negates_reqs = true)]
Expand Down
4 changes: 2 additions & 2 deletions bin/mev-rs/src/main.rs → bin/mev/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub enum NetworkArg {

// NOTE: define this mapping so only this crate needs the `clap` dependency while still being able
// to use the `clap::ValueEnum` machinery
impl From<NetworkArg> for mev_lib::Network {
impl From<NetworkArg> for mev_rs::Network {
fn from(arg: NetworkArg) -> Self {
match arg {
NetworkArg::Mainnet => Self::Mainnet,
Expand All @@ -27,7 +27,7 @@ impl From<NetworkArg> for mev_lib::Network {
}

#[derive(Debug, Parser)]
#[clap(author, version, name = "mev", about = "utilities for block space", long_about = None)]
#[clap(author, version, about = "utilities for block space", long_about = None)]
struct Cli {
#[clap(long, default_value_t, value_enum)]
network: NetworkArg,
Expand Down
2 changes: 1 addition & 1 deletion mev-boost-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ 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" }

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

[dev-dependencies]
rand = "0.8.5"
Expand Down
2 changes: 1 addition & 1 deletion mev-boost-rs/src/relay_mux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use ethereum_consensus::{
state_transition::{Context, Error as ConsensusError},
};
use futures::{stream, StreamExt};
use mev_lib::{
use mev_rs::{
BidRequest, BlindedBlockProvider, BlindedBlockProviderClient as Relay,
BlindedBlockProviderError, ExecutionPayload, SignedBlindedBeaconBlock, SignedBuilderBid,
SignedValidatorRegistration,
Expand Down
2 changes: 1 addition & 1 deletion mev-boost-rs/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use ethereum_consensus::{
state_transition::Context,
};
use futures::StreamExt;
use mev_lib::{BlindedBlockProviderClient as Relay, BlindedBlockProviderServer, Network};
use mev_rs::{BlindedBlockProviderClient as Relay, BlindedBlockProviderServer, Network};
use serde::Deserialize;
use std::{future::Future, net::Ipv4Addr, pin::Pin, task::Poll};
use tokio::task::{JoinError, JoinHandle};
Expand Down
4 changes: 2 additions & 2 deletions mev-boost-rs/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ use ethereum_consensus::{
};
use httpmock::prelude::*;
use mev_boost_rs::{Config, Service};
use mev_lib::{
use mev_relay_rs::{Config as RelayConfig, Service as Relay};
use mev_rs::{
sign_builder_message, BidRequest, BlindedBlockProviderClient as RelayClient, ExecutionPayload,
SignedBlindedBeaconBlock, SignedBuilderBid,
};
use mev_relay_rs::{Config as RelayConfig, Service as Relay};

use rand::seq::SliceRandom;
use std::{
Expand Down
2 changes: 1 addition & 1 deletion mev-build-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ parking_lot = "0.12.1"

ethereum-consensus = { git = "https://github.com/ralexstokes/ethereum-consensus" }

mev-lib = { path = "../mev-lib" }
mev-rs = { path = "../mev-rs" }
2 changes: 1 addition & 1 deletion mev-build-rs/src/engine_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use ethereum_consensus::{
ssz::ByteList,
state_transition::Context,
};
use mev_lib::{
use mev_rs::{
blinded_block_provider::Error as BlindedBlockProviderError,
types::{BidRequest as PayloadRequest, ExecutionPayload},
};
Expand Down
2 changes: 1 addition & 1 deletion mev-relay-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ 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" }

mev-lib = { path = "../mev-lib" }
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
Expand Up @@ -11,7 +11,7 @@ use ethereum_consensus::{
state_transition::{Context, Error as ConsensusError},
};
use mev_build_rs::EngineBuilder;
use mev_lib::{
use mev_rs::{
sign_builder_message, types::bellatrix as spec, verify_signed_builder_message, BidRequest,
BlindedBlockProvider, BlindedBlockProviderError, ExecutionPayload, ExecutionPayloadHeader,
SignedBlindedBeaconBlock, SignedBuilderBid, SignedValidatorRegistration,
Expand Down
2 changes: 1 addition & 1 deletion mev-relay-rs/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use ethereum_consensus::{
};
use futures::StreamExt;
use mev_build_rs::EngineBuilder;
use mev_lib::{BlindedBlockProviderServer, Network};
use mev_rs::{BlindedBlockProviderServer, Network};
use serde::Deserialize;
use std::{future::Future, net::Ipv4Addr, pin::Pin, sync::Arc, task::Poll};
use tokio::task::{JoinError, JoinHandle};
Expand Down
2 changes: 1 addition & 1 deletion mev-lib/Cargo.toml → mev-rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "mev-lib"
name = "mev-rs"
version = "0.2.1"
edition = "2021"
license = "MIT OR Apache-2.0"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 4e6a6e4

Please sign in to comment.