Skip to content

Commit 31807fb

Browse files
Move the bump behavior config values to the proof aggregator config files
1 parent cc96a7e commit 31807fb

4 files changed

Lines changed: 17 additions & 5 deletions

File tree

aggregation_mode/proof_aggregator/src/backend/config.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ pub struct Config {
2121
pub sp1_chunk_aggregator_vk_hash: String,
2222
pub monthly_budget_eth: f64,
2323
pub db_connection_urls: Vec<String>,
24+
pub max_bump_retries: u16,
25+
pub bump_retry_interval_seconds: u64,
26+
pub bump_increase_fee_multiplier: f64,
2427
}
2528

2629
impl Config {

aggregation_mode/proof_aggregator/src/backend/mod.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -334,10 +334,9 @@ impl ProofAggregator {
334334

335335
info!("Sending proof to ProofAggregationService contract...");
336336

337-
// TODO: Read from config
338-
let max_retries = 5;
339-
let retry_interval = Duration::from_secs(120);
340-
let fee_multiplier: f64 = 1.2;
337+
let max_retries = self.config.max_bump_retries;
338+
let retry_interval = Duration::from_secs(self.config.bump_retry_interval_seconds);
339+
let fee_multiplier: f64 = self.config.bump_increase_fee_multiplier;
341340

342341
for attempt in 0..max_retries {
343342
let mut tx_req = match aggregated_proof {
@@ -372,7 +371,7 @@ impl ProofAggregator {
372371
// Increase gas price/fees for retries before filling
373372
if attempt > 0 {
374373
tx_req = self
375-
.update_gas_fees(fee_multiplier, attempt, tx_req)
374+
.update_gas_fees(fee_multiplier, attempt as i32, tx_req)
376375
.await?;
377376
}
378377

config-files/config-proof-aggregator-ethereum-package.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ monthly_budget_eth: 15.0
2727
sp1_chunk_aggregator_vk_hash: "00d6e32a34f68ea643362b96615591c94ee0bf99ee871740ab2337966a4f77af"
2828
risc0_chunk_aggregator_image_id: "8908f01022827e80a5de71908c16ee44f4a467236df20f62e7c994491629d74c"
2929

30+
# These values modify the bumping behavior after the aggregated proof on-chain submission times out.
31+
max_bump_retries: 5
32+
bump_retry_interval_seconds: 120
33+
bump_increase_fee_multiplier: 1.2
34+
3035
ecdsa:
3136
private_key_store_path: "config-files/anvil.proof-aggregator.ecdsa.key.json"
3237
private_key_store_password: ""

config-files/config-proof-aggregator.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ monthly_budget_eth: 15.0
2727
sp1_chunk_aggregator_vk_hash: "00ba19eed0aaeb0151f07b8d3ee7c659bcd29f3021e48fb42766882f55b84509"
2828
risc0_chunk_aggregator_image_id: "d8cfdd5410c70395c0a1af1842a0148428cc46e353355faccfba694dd4862dbf"
2929

30+
# These values modify the bumping behavior after the aggregated proof on-chain submission times out.
31+
max_bump_retries: 5
32+
bump_retry_interval_seconds: 120
33+
bump_increase_fee_multiplier: 1.2
34+
3035
ecdsa:
3136
private_key_store_path: "config-files/anvil.proof-aggregator.ecdsa.key.json"
3237
private_key_store_password: ""

0 commit comments

Comments
 (0)