Skip to content

Commit e73bd0a

Browse files
committed
feat(e2e): support skipping signature delayer in signer
1 parent af9fa40 commit e73bd0a

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

mithril-test-lab/mithril-end-to-end/src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ pub struct Args {
123123
#[clap(long, default_value = "false")]
124124
use_p2p_passive_relays: bool,
125125

126+
/// Skip the signature delayer
127+
#[clap(long)]
128+
skip_signature_delayer: bool,
129+
126130
/// Use DMQ protocol (used to broadcast signatures)
127131
///
128132
/// Requires the Mithril nodes to be compiled with the 'future_dmq' feature
@@ -371,6 +375,7 @@ impl App {
371375
use_relays,
372376
relay_signer_registration_mode,
373377
relay_signature_registration_mode,
378+
skip_signature_delayer: args.skip_signature_delayer,
374379
use_p2p_passive_relays,
375380
use_era_specific_work_dir: args.mithril_next_era.is_some(),
376381
})

mithril-test-lab/mithril-end-to-end/src/mithril/infrastructure.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ pub struct MithrilInfrastructureConfig {
3535
pub relay_signer_registration_mode: String,
3636
pub relay_signature_registration_mode: String,
3737
pub use_p2p_passive_relays: bool,
38+
pub skip_signature_delayer: bool,
3839
pub use_dmq: bool,
3940
pub use_era_specific_work_dir: bool,
4041
}
@@ -69,6 +70,7 @@ impl MithrilInfrastructureConfig {
6970
relay_signer_registration_mode: "passthrough".to_string(),
7071
relay_signature_registration_mode: "passthrough".to_string(),
7172
use_p2p_passive_relays: false,
73+
skip_signature_delayer: false,
7274
use_dmq: false,
7375
use_era_specific_work_dir: false,
7476
}
@@ -395,6 +397,7 @@ impl MithrilInfrastructure {
395397
mithril_era_reader_adapter: &config.mithril_era_reader_adapter,
396398
mithril_era_marker_address: &config.devnet.mithril_era_marker_address()?,
397399
enable_certification,
400+
skip_signature_delayer: config.skip_signature_delayer,
398401
use_dmq: config.use_dmq,
399402
})?;
400403
signer.start().await?;

mithril-test-lab/mithril-end-to-end/src/mithril/signer.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub struct SignerConfig<'a> {
2525
pub mithril_era_reader_adapter: &'a str,
2626
pub mithril_era_marker_address: &'a str,
2727
pub enable_certification: bool,
28+
pub skip_signature_delayer: bool,
2829
pub use_dmq: bool,
2930
}
3031

@@ -53,6 +54,11 @@ impl Signer {
5354
)
5455
};
5556
let mithril_run_interval = format!("{}", signer_config.mithril_run_interval);
57+
let skip_signature_delayer = if signer_config.skip_signature_delayer {
58+
"true"
59+
} else {
60+
"false"
61+
};
5662
let mut env = HashMap::from([
5763
("NETWORK", "devnet"),
5864
("NETWORK_MAGIC", &magic_id),
@@ -84,6 +90,8 @@ impl Signer {
8490
("PRELOADING_REFRESH_INTERVAL_IN_SECONDS", "10"),
8591
("SIGNATURE_PUBLISHER_RETRY_DELAY_MS", "1"),
8692
("SIGNATURE_PUBLISHER_DELAYER_DELAY_MS", "1"),
93+
("SIGNATURE_PUBLISHER_SKIP_DELAYER", skip_signature_delayer),
94+
("PARTY_ID", &party_id),
8795
]);
8896
if signer_config.enable_certification {
8997
env.insert(

0 commit comments

Comments
 (0)