Skip to content

Commit

Permalink
Add bridge initialize params to sequencer config
Browse files Browse the repository at this point in the history
  • Loading branch information
ercecan committed Feb 20, 2025
1 parent bd779c4 commit 5357043
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/citrea_config/sequencer.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use serde::{Deserialize, Serialize};

use crate::PRE_FORK2_BRIDGE_INITIALIZE_PARAMS;

/// Rollup Configuration
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)]
pub struct SequencerConfig {
Expand All @@ -17,6 +19,8 @@ pub struct SequencerConfig {
pub da_update_interval_ms: u64,
/// Block production interval in ms
pub block_production_interval_ms: u64,
/// Bridge system contract initialize function parameters
pub bridge_initialize_params: String,
}

impl Default for SequencerConfig {
Expand All @@ -30,6 +34,7 @@ impl Default for SequencerConfig {
block_production_interval_ms: 100,
da_update_interval_ms: 100,
mempool_conf: SequencerMempoolConfig::default(),
bridge_initialize_params: PRE_FORK2_BRIDGE_INITIALIZE_PARAMS.to_string(),
}
}
}
Expand Down Expand Up @@ -92,6 +97,7 @@ mod tests {
deposit_mempool_fetch_limit = 10
da_update_interval_ms = 1000
block_production_interval_ms = 1000
bridge_initialize_params = "000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000000000000000000000000000000000000000002d4a209fb3a961d8b1f4ec1caa220c6a50b815febc0b689ddf0b9ddfbf99cb74479e41ac0063066369747265611400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a08000000003b9aca006800000000000000000000000000000000000000000000"
[mempool_conf]
pending_tx_limit = 100000
pending_tx_size = 200
Expand Down Expand Up @@ -123,6 +129,7 @@ mod tests {
},
da_update_interval_ms: 1000,
block_production_interval_ms: 1000,
bridge_initialize_params: PRE_FORK2_BRIDGE_INITIALIZE_PARAMS.to_string(),
};
assert_eq!(config, expected);
}
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ pub mod traits;
mod utils;

pub type Result<T> = anyhow::Result<T>;

pub const PRE_FORK2_BRIDGE_INITIALIZE_PARAMS: &str = "000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000008ac7230489e80000000000000000000000000000000000000000000000000000000000000000002d4a209fb3a961d8b1f4ec1caa220c6a50b815febc0b689ddf0b9ddfbf99cb74479e41ac0063066369747265611400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a08000000003b9aca006800000000000000000000000000000000000000000000";

0 comments on commit 5357043

Please sign in to comment.