Skip to content

Commit

Permalink
Pull in nightly rust-fmt, use vid rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
pls148 committed Mar 5, 2025
1 parent d17974e commit ef7ee30
Show file tree
Hide file tree
Showing 282 changed files with 3,534 additions and 3,412 deletions.
4 changes: 2 additions & 2 deletions builder/src/bin/permissionless-builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ async fn main() -> anyhow::Result<()> {
match (base, upgrade) {
(FeeVersion::VERSION, MarketplaceVersion::VERSION) => {
run::<SequencerVersions<FeeVersion, MarketplaceVersion>>(genesis, opt).await
}
},
(FeeVersion::VERSION, _) => run::<SequencerVersions<FeeVersion, V0_0>>(genesis, opt).await,
(MarketplaceVersion::VERSION, _) => {
run::<SequencerVersions<MarketplaceVersion, V0_0>>(genesis, opt).await
}
},
_ => panic!(
"Invalid base ({base}) and upgrade ({upgrade}) versions specified in the toml file."
),
Expand Down
21 changes: 11 additions & 10 deletions builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ pub fn run_builder_api_service(url: Url, source: ProxyGlobalState<SeqTypes>) {

#[cfg(test)]
pub mod testing {
use std::{
num::NonZeroUsize,
sync::Arc,
time::{Duration, Instant},
};

use async_lock::RwLock;
use committable::Committable;
use espresso_types::{
Expand Down Expand Up @@ -74,18 +80,13 @@ pub mod testing {
},
HotShotConfig, PeerConfig, ValidatorConfig,
};
use jf_signature::bls_over_bn254::VerKey;
use sequencer::{context::Consensus, network, SequencerApiVersion};
use std::{
num::NonZeroUsize,
sync::Arc,
time::{Duration, Instant},
};
use surf_disco::Client;
use vbs::version::StaticVersion;

use super::*;
use crate::non_permissioned::BuilderConfig;
use jf_signature::bls_over_bn254::VerKey;

#[derive(Clone)]
pub struct HotShotTestConfig {
Expand Down Expand Up @@ -414,10 +415,10 @@ pub mod testing {
{
Ok(response) => {
tracing::info!("Received txn submitted response : {:?}", response);
}
},
Err(e) => {
panic!("Error submitting private transaction {:?}", e);
}
},
}

let seed = [207_u8; 32];
Expand Down Expand Up @@ -514,10 +515,10 @@ pub mod testing {
Ok(response) => {
tracing::info!("Received Builder Key : {:?}", response);
assert_eq!(response, builder_pub_key);
}
},
Err(e) => {
panic!("Error getting builder key {:?}", e);
}
},
}
}
}
6 changes: 2 additions & 4 deletions builder/src/non_permissioned.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{collections::VecDeque, num::NonZeroUsize, time::Duration};
use std::{collections::VecDeque, num::NonZeroUsize, sync::Arc, time::Duration};

use anyhow::Context;
use async_broadcast::broadcast;
Expand All @@ -22,10 +22,8 @@ use hotshot_types::{
node_implementation::Versions, EncodeBytes,
},
};
use marketplace_builder_shared::block::ParentBlockReferences;
use marketplace_builder_shared::utils::EventServiceStream;
use marketplace_builder_shared::{block::ParentBlockReferences, utils::EventServiceStream};
use sequencer::{catchup::StatePeers, L1Params, SequencerApiVersion};
use std::sync::Arc;
use tide_disco::Url;
use tokio::spawn;
use vbs::version::StaticVersionType;
Expand Down
5 changes: 3 additions & 2 deletions client/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::time::Duration;

use anyhow::Context;
use espresso_types::{FeeAccount, FeeAmount, FeeMerkleTree, Header};
use ethers::types::Address;
Expand All @@ -6,7 +8,6 @@ use jf_merkle_tree::{
prelude::{MerkleProof, Sha3Node},
MerkleTreeScheme,
};
use std::time::Duration;
use surf_disco::{
error::ClientError,
socket::{Connection, Unsupported},
Expand Down Expand Up @@ -110,7 +111,7 @@ impl SequencerClient {
} else {
sleep(Duration::from_millis(200)).await;
}
}
},
}
};

Expand Down
41 changes: 21 additions & 20 deletions contract-bindings-alloy/src/erc1967proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ interface ERC1967Proxy {
clippy::empty_structs_with_brackets
)]
pub mod ERC1967Proxy {
use super::*;
use alloy::sol_types as alloy_sol_types;

use super::*;
/// The creation / init bytecode of the contract.
///
/// ```text
Expand Down Expand Up @@ -143,7 +144,7 @@ pub mod ERC1967Proxy {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
>(_) => {},
}
}
#[automatically_derived]
Expand Down Expand Up @@ -209,7 +210,7 @@ pub mod ERC1967Proxy {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
>(_) => {},
}
}
#[automatically_derived]
Expand Down Expand Up @@ -275,7 +276,7 @@ pub mod ERC1967Proxy {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
>(_) => {},
}
}
#[automatically_derived]
Expand Down Expand Up @@ -335,7 +336,7 @@ pub mod ERC1967Proxy {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
>(_) => {},
}
}
#[automatically_derived]
Expand Down Expand Up @@ -501,7 +502,7 @@ pub mod ERC1967Proxy {
match _t {
alloy_sol_types::private::AssertTypeEq::<
<UnderlyingSolTuple as alloy_sol_types::SolType>::RustType,
>(_) => {}
>(_) => {},
}
}
#[automatically_derived]
Expand Down Expand Up @@ -580,16 +581,16 @@ pub mod ERC1967Proxy {
match self {
Self::AddressEmptyCode(_) => {
<AddressEmptyCode as alloy_sol_types::SolError>::SELECTOR
}
},
Self::ERC1967InvalidImplementation(_) => {
<ERC1967InvalidImplementation as alloy_sol_types::SolError>::SELECTOR
}
},
Self::ERC1967NonPayable(_) => {
<ERC1967NonPayable as alloy_sol_types::SolError>::SELECTOR
}
},
Self::FailedInnerCall(_) => {
<FailedInnerCall as alloy_sol_types::SolError>::SELECTOR
}
},
}
}
#[inline]
Expand Down Expand Up @@ -674,37 +675,37 @@ pub mod ERC1967Proxy {
match self {
Self::AddressEmptyCode(inner) => {
<AddressEmptyCode as alloy_sol_types::SolError>::abi_encoded_size(inner)
}
},
Self::ERC1967InvalidImplementation(inner) => {
<ERC1967InvalidImplementation as alloy_sol_types::SolError>::abi_encoded_size(
inner,
)
}
},
Self::ERC1967NonPayable(inner) => {
<ERC1967NonPayable as alloy_sol_types::SolError>::abi_encoded_size(inner)
}
},
Self::FailedInnerCall(inner) => {
<FailedInnerCall as alloy_sol_types::SolError>::abi_encoded_size(inner)
}
},
}
}
#[inline]
fn abi_encode_raw(&self, out: &mut alloy_sol_types::private::Vec<u8>) {
match self {
Self::AddressEmptyCode(inner) => {
<AddressEmptyCode as alloy_sol_types::SolError>::abi_encode_raw(inner, out)
}
},
Self::ERC1967InvalidImplementation(inner) => {
<ERC1967InvalidImplementation as alloy_sol_types::SolError>::abi_encode_raw(
inner, out,
)
}
},
Self::ERC1967NonPayable(inner) => {
<ERC1967NonPayable as alloy_sol_types::SolError>::abi_encode_raw(inner, out)
}
},
Self::FailedInnerCall(inner) => {
<FailedInnerCall as alloy_sol_types::SolError>::abi_encode_raw(inner, out)
}
},
}
}
}
Expand Down Expand Up @@ -739,7 +740,7 @@ pub mod ERC1967Proxy {
Some(<Upgraded as alloy_sol_types::SolEvent>::SIGNATURE_HASH) => {
<Upgraded as alloy_sol_types::SolEvent>::decode_raw_log(topics, data, validate)
.map(Self::Upgraded)
}
},
_ => alloy_sol_types::private::Err(alloy_sol_types::Error::InvalidLog {
name: <Self as alloy_sol_types::SolEventInterface>::NAME,
log: alloy_sol_types::private::Box::new(
Expand All @@ -763,7 +764,7 @@ pub mod ERC1967Proxy {
match self {
Self::Upgraded(inner) => {
alloy_sol_types::private::IntoLogData::into_log_data(inner)
}
},
}
}
}
Expand Down
Loading

0 comments on commit ef7ee30

Please sign in to comment.