Skip to content

Commit f30636d

Browse files
mothrankn
andauthored
BM-248: Fixed lockin_priority_gas config (github#71)
This PR fixes the u128 value for `lockin_priority_gas` because toml does not support 128 unsigned ints. --------- Co-authored-by: kn <[email protected]>
1 parent 37fafdc commit f30636d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

crates/boundless-market/src/contracts/proof_market.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ where
214214
&self,
215215
request: &ProvingRequest,
216216
client_sig: &Bytes,
217-
priority_gas: Option<u128>,
217+
priority_gas: Option<u64>,
218218
) -> Result<u64, MarketError> {
219219
tracing::debug!("Calling requestIsLocked({:x})", request.id);
220220
let is_locked_in: bool =
@@ -236,8 +236,8 @@ where
236236
.context("Failed to get priority gas fee")?;
237237

238238
call = call
239-
.max_fee_per_gas(priority_fee.max_fee_per_gas + gas)
240-
.max_priority_fee_per_gas(priority_fee.max_priority_fee_per_gas + gas);
239+
.max_fee_per_gas(priority_fee.max_fee_per_gas + gas as u128)
240+
.max_priority_fee_per_gas(priority_fee.max_priority_fee_per_gas + gas as u128);
241241
}
242242

243243
let pending_tx = call.send().await.map_err(IProofMarketErrors::decode_error)?;

crates/broker/src/config.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub struct MarketConf {
5050
/// Optional additional gas to add to the transaction for lockinRequest, good
5151
/// for increasing the priority if competing with multiple provers during the
5252
/// same block
53-
pub lockin_priority_gas: Option<u128>,
53+
pub lockin_priority_gas: Option<u64>,
5454
/// Max input / image file size
5555
pub max_file_size: usize,
5656
}
@@ -325,6 +325,7 @@ max_stake = "0.1"
325325
skip_preflight_ids = ["0x0000000000000000000000000000000000000000000000000000000000000001"]
326326
max_file_size = 50_000_000
327327
allow_client_addresses = ["0x0000000000000000000000000000000000000000"]
328+
lockin_priority_gas = 100
328329
329330
[prover]
330331
status_poll_ms = 1000
@@ -416,6 +417,7 @@ error = ?"#;
416417
assert_eq!(config.market.min_deadline, 150);
417418
assert_eq!(config.market.lookback_blocks, 100);
418419
assert_eq!(config.market.allow_client_addresses, Some(vec![Address::ZERO]));
420+
assert_eq!(config.market.lockin_priority_gas, Some(100));
419421
assert_eq!(config.prover.status_poll_ms, 1000);
420422
assert!(config.prover.bonsai_r0_zkvm_ver.is_none());
421423
assert_eq!(config.batcher.txn_timeout, Some(45));

0 commit comments

Comments
 (0)