Skip to content

Commit

Permalink
Remove unnecessary max_block_size param
Browse files Browse the repository at this point in the history
  • Loading branch information
shenkeyao committed Oct 21, 2024
1 parent dd42961 commit 6c9c56d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 16 deletions.
7 changes: 3 additions & 4 deletions builder/src/bin/permissionless-builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::{num::NonZeroUsize, path::PathBuf, time::Duration};
use builder::non_permissioned::{build_instance_state, BuilderConfig};
use clap::Parser;
use espresso_types::{
eth_signature_key::EthKeyPair, parse_duration, v0_3::ChainConfig, FeeVersion,
MarketplaceVersion, SequencerVersions, V0_0, V0_1,
eth_signature_key::EthKeyPair, parse_duration, FeeVersion, MarketplaceVersion,
SequencerVersions, V0_0, V0_1,
};
use hotshot::traits::ValidatedState;
use hotshot_types::{
Expand Down Expand Up @@ -156,13 +156,12 @@ async fn run<V: Versions>(
opt.tx_channel_capacity,
opt.event_channel_capacity,
opt.node_count,
instance_state,
instance_state.clone(),
validated_state,
opt.hotshot_event_streaming_url,
builder_server_url,
api_response_timeout_duration,
opt.max_block_size_increment_period,
ChainConfig::default().max_block_size.into(),
txn_timeout_duration,
base_fee,
)
Expand Down
1 change: 0 additions & 1 deletion builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,6 @@ pub mod testing {
hotshot_builder_api_url,
Duration::from_millis(2000),
Duration::from_secs(60),
ChainConfig::default().max_block_size.into(),
Duration::from_millis(500),
ChainConfig::default().base_fee,
)
Expand Down
5 changes: 2 additions & 3 deletions builder/src/non_permissioned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ impl BuilderConfig {
hotshot_builder_apis_url: Url,
max_api_timeout_duration: Duration,
max_block_size_increment_period: Duration,
protocol_max_block_size: u64,
maximize_txns_count_timeout_duration: Duration,
base_fee: FeeAmount,
) -> anyhow::Result<Self> {
Expand All @@ -102,7 +101,7 @@ impl BuilderConfig {
%tx_channel_capacity,
%event_channel_capacity,
?max_api_timeout_duration,
protocol_max_block_size,
?instance_state.chain_config.max_block_size,
?maximize_txns_count_timeout_duration,
"initializing builder",
);
Expand Down Expand Up @@ -148,7 +147,7 @@ impl BuilderConfig {
bootstrapped_view,
bootstrapped_view,
max_block_size_increment_period,
protocol_max_block_size,
instance_state.chain_config.max_block_size.into(),
);

let global_state = Arc::new(RwLock::new(global_state));
Expand Down
7 changes: 3 additions & 4 deletions marketplace-builder/src/bin/marketplace-builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use std::{num::NonZeroUsize, path::PathBuf, time::Duration};
use async_compatibility_layer::logging::{setup_backtrace, setup_logging};
use clap::Parser;
use espresso_types::{
eth_signature_key::EthKeyPair, parse_duration, v0_3::ChainConfig, FeeAmount, FeeVersion,
MarketplaceVersion, NamespaceId, SequencerVersions, V0_0, V0_1,
eth_signature_key::EthKeyPair, parse_duration, FeeAmount, FeeVersion, MarketplaceVersion,
NamespaceId, SequencerVersions, V0_0, V0_1,
};
use hotshot::traits::ValidatedState;
use hotshot_types::{
Expand Down Expand Up @@ -183,12 +183,11 @@ async fn run<V: Versions>(
bootstrapped_view,
opt.tx_channel_capacity,
opt.event_channel_capacity,
instance_state,
instance_state.clone(),
validated_state,
opt.hotshot_event_streaming_url,
builder_server_url,
api_response_timeout_duration,
ChainConfig::default().max_block_size.into(),
txn_timeout_duration,
base_fee,
bid_config,
Expand Down
5 changes: 1 addition & 4 deletions marketplace-builder/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ impl BuilderConfig {
events_api_url: Url,
builder_api_url: Url,
api_timeout: Duration,
protocol_max_block_size: u64,
maximize_txns_count_timeout_duration: Duration,
base_fee: FeeAmount,
bid_config: Option<BidConfig>,
Expand All @@ -160,7 +159,7 @@ impl BuilderConfig {
%tx_channel_capacity,
%event_channel_capacity,
?api_timeout,
protocol_max_block_size,
?instance_state.chain_config.max_block_size,
?maximize_txns_count_timeout_duration,
"initializing builder",
);
Expand Down Expand Up @@ -637,7 +636,6 @@ mod test {
urls.event.clone(),
urls.builder.clone(),
Duration::from_secs(2),
ChainConfig::default().max_block_size.into(),
Duration::from_secs(2),
base_fee,
Some(BidConfig {
Expand Down Expand Up @@ -769,7 +767,6 @@ mod test {
urls.event.clone(),
urls.builder.clone(),
Duration::from_secs(2),
ChainConfig::default().max_block_size.into(),
Duration::from_secs(2),
base_fee,
None,
Expand Down

0 comments on commit 6c9c56d

Please sign in to comment.