Skip to content

Commit

Permalink
compilage
Browse files Browse the repository at this point in the history
It compiles
  • Loading branch information
tbro committed Jul 26, 2024
1 parent 2e1e213 commit 17ed30f
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 14 deletions.
4 changes: 2 additions & 2 deletions builder/src/non_permissioned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use async_compatibility_layer::{
};
use async_std::sync::{Arc, RwLock};
use espresso_types::{
eth_signature_key::EthKeyPair, ChainConfig, FeeAmount, L1Client, NodeState, Payload, SeqTypes,
ValidatedState,
eth_signature_key::EthKeyPair, v0_3::ChainConfig, FeeAmount, L1Client, NodeState, Payload,
SeqTypes, ValidatedState,
};
use ethers::{
core::k256::ecdsa::SigningKey,
Expand Down
2 changes: 1 addition & 1 deletion sequencer/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use committable::Commitment;
use data_source::{CatchupDataSource, SubmitDataSource};
use derivative::Derivative;
use espresso_types::{
v0::traits::SequencerPersistence, AccountQueryData, BlockMerkleTree, ChainConfig,
v0::traits::SequencerPersistence, v0_3::ChainConfig, AccountQueryData, BlockMerkleTree,
FeeAccountProof, NodeState, PubKey, Transaction,
};
use ethers::prelude::Address;
Expand Down
3 changes: 2 additions & 1 deletion sequencer/src/api/data_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ use async_trait::async_trait;
use committable::Commitment;
use espresso_types::{
v0::traits::{PersistenceOptions, SequencerPersistence},
ChainConfig, PubKey, Transaction,
v0_3::ChainConfig,
PubKey, Transaction,
};
use ethers::prelude::Address;
use futures::future::Future;
Expand Down
2 changes: 1 addition & 1 deletion sequencer/src/api/sql.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::{bail, Context};
use async_trait::async_trait;
use committable::Commitment;
use espresso_types::{BlockMerkleTree, ChainConfig, FeeAccountProof, FeeMerkleTree};
use espresso_types::{v0_3::ChainConfig, BlockMerkleTree, FeeAccountProof, FeeMerkleTree};
use ethers::prelude::Address;
use futures::FutureExt;
use hotshot_query_service::{
Expand Down
7 changes: 5 additions & 2 deletions sequencer/src/bin/nasty-client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use clap::Parser;
use committable::Committable;
use derivative::Derivative;
use es_version::{SequencerVersion, SEQUENCER_VERSION};
use espresso_types::{BlockMerkleTree, FeeMerkleTree, Header, SeqTypes};
use espresso_types::{v0_3::IterableFeeInfo, BlockMerkleTree, FeeMerkleTree, Header, SeqTypes};
use futures::{
future::{FutureExt, TryFuture, TryFutureExt},
stream::{Peekable, StreamExt},
Expand Down Expand Up @@ -929,7 +929,10 @@ impl ResourceManager<Header> {
.await
})
.await?;
let builder_address = builder_header.fee_info().account();

// Since we have multiple fee accounts, we need to select one.
let accounts = builder_header.fee_info().accounts();
let builder_address = accounts.first().unwrap();

// Get the header of the state snapshot we're going to query so we can later verify our
// results.
Expand Down
3 changes: 2 additions & 1 deletion sequencer/src/catchup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ use async_trait::async_trait;
use committable::Commitment;
use espresso_types::{
v0::traits::{PersistenceOptions, StateCatchup},
AccountQueryData, BackoffParams, BlockMerkleTree, ChainConfig, FeeAccount, FeeMerkleCommitment,
v0_3::ChainConfig,
AccountQueryData, BackoffParams, BlockMerkleTree, FeeAccount, FeeMerkleCommitment,
};
use futures::future::FutureExt;
use hotshot_orchestrator::config::NetworkConfig;
Expand Down
6 changes: 4 additions & 2 deletions sequencer/src/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::{

use anyhow::Context;
use espresso_types::{
ChainConfig, FeeAccount, FeeAmount, GenesisHeader, L1BlockInfo, Upgrade, UpgradeType,
v0_3::ChainConfig, FeeAccount, FeeAmount, GenesisHeader, L1BlockInfo, Upgrade, UpgradeType,
};
use serde::{Deserialize, Serialize};
use vbs::version::Version;
Expand Down Expand Up @@ -265,7 +265,8 @@ mod test {
max_block_size: 30000.into(),
base_fee: 1.into(),
fee_recipient: FeeAccount::default(),
fee_contract: Some(Address::default())
fee_contract: Some(Address::default()),
bid_recipient: None
}
);
assert_eq!(
Expand Down Expand Up @@ -329,6 +330,7 @@ mod test {
max_block_size: 30000.into(),
base_fee: 1.into(),
fee_recipient: FeeAccount::default(),
bid_recipient: None,
fee_contract: None,
}
);
Expand Down
2 changes: 1 addition & 1 deletion sequencer/src/persistence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use async_trait::async_trait;
use committable::Commitment;
use espresso_types::ChainConfig;
use espresso_types::v0_3::ChainConfig;

pub mod fs;
pub mod no_storage;
Expand Down
2 changes: 1 addition & 1 deletion sequencer/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{sync::Arc, time::Duration};
use anyhow::{bail, ensure, Context};
use async_std::{stream::StreamExt, sync::RwLock};
use espresso_types::{
BlockMerkleTree, ChainConfig, Delta, FeeAccount, FeeMerkleTree, ValidatedState,
v0_3::ChainConfig, BlockMerkleTree, Delta, FeeAccount, FeeMerkleTree, ValidatedState,
};
use futures::future::Future;
use hotshot::traits::ValidatedState as HotShotState;
Expand Down
2 changes: 1 addition & 1 deletion types/src/v0/impls/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use jf_merkle_tree::{
use jf_vid::VidScheme;
use num_traits::CheckedSub;
use serde::{Deserialize, Serialize};
use std::{borrow::Borrow, ops::Add};
use std::ops::Add;
use thiserror::Error;
use vbs::version::Version;

Expand Down
2 changes: 1 addition & 1 deletion types/src/v0/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ pub type PrivKey = <PubKey as SignatureKey>::PrivateKey;

pub type NetworkConfig = hotshot_orchestrator::config::NetworkConfig<PubKey>;

use self::impls::{NodeState, ValidatedState};
pub use self::impls::{NodeState, ValidatedState};
pub use crate::v0_1::{
BLOCK_MERKLE_TREE_HEIGHT, FEE_MERKLE_TREE_HEIGHT, NS_ID_BYTE_LEN, NS_OFFSET_BYTE_LEN,
NUM_NSS_BYTE_LEN, NUM_TXS_BYTE_LEN, TX_OFFSET_BYTE_LEN,
Expand Down

0 comments on commit 17ed30f

Please sign in to comment.