Skip to content

Commit e03db6d

Browse files
Merge pull request #14298 from starkware-libs/nimrod/merge-main-v0.14.3-into-main-1780407216
Merge main-v0.14.3 into main
2 parents 3f69787 + 651c584 commit e03db6d

95 files changed

Lines changed: 1151 additions & 721 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 64 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,8 @@ phf = "0.11"
335335
pretty_assertions = "1.4.0"
336336
primitive-types = "0.12.1"
337337
privacy-circuit-verify-v0 = { package = "privacy-circuit-verify", git = "https://github.com/starkware-libs/proving-utils", rev = "580135e" }
338-
privacy-circuit-verify-v1 = { package = "privacy-circuit-verify", git = "https://github.com/starkware-libs/proving-utils", rev = "1e0f8fc" }
339-
privacy-prove = { git = "https://github.com/starkware-libs/proving-utils", rev = "1e0f8fc" }
338+
privacy-circuit-verify-v1 = { package = "privacy-circuit-verify", git = "https://github.com/starkware-libs/proving-utils", tag = "v0.14.3-rc-1" }
339+
privacy-prove = { git = "https://github.com/starkware-libs/proving-utils", tag = "v0.14.3-rc-1" }
340340
proc-macro2 = "1.0"
341341
prometheus-parse = "0.2.4"
342342
prost = "0.12.1"

crates/apollo_consensus_orchestrator/src/dynamic_gas_price/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
//! - `compute_fee_actual`: the base fee for this block, calculated as the median of the most recent
66
//! `fee_proposal` values across `window_size` blocks.
77
//! - `compute_fee_target`: the fee we'd *like* for this block, derived from the STRK/USD oracle
8-
//! quote and a fixed USD-cost target.
8+
//! quote and a configurable USD-cost target.
99
//! - `compute_fee_proposal`: the target, clamped within a fixed multiplicative margin of
1010
//! `fee_actual` (so a proposer cannot move the fee too far per round).
1111
//!
@@ -44,10 +44,6 @@ const FRI_DECIMALS_SCALE: u128 = 10u128.pow(18);
4444
/// Denominator for parts-per-thousand calculations in fee_proposal bounds.
4545
pub(crate) const PPT_DENOMINATOR: u128 = 1000;
4646

47-
/// Target USD cost per L2 gas unit in atto-USD ($3e-9 = 3_000_000_000 atto-USD).
48-
// TODO(AndrewL): consider moving this to a dynamic config.
49-
pub(crate) const TARGET_ATTO_USD_PER_L2_GAS: u128 = 3_000_000_000;
50-
5147
/// Compute fee_actual for `height` as the median of the `fee_proposal` values
5248
/// recorded for heights `[height - window_size, height - 1]`.
5349
///

crates/apollo_consensus_orchestrator/src/dynamic_gas_price/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use std::collections::BTreeMap;
22

3+
use apollo_consensus_orchestrator_config::config::DEFAULT_SNIP35_TARGET_ATTO_USD_PER_L2_GAS;
34
use apollo_versioned_constants::VersionedConstants;
45
use rand::{RngExt, SeedableRng};
56
use rand_chacha::ChaCha8Rng;
@@ -13,7 +14,6 @@ use crate::dynamic_gas_price::{
1314
compute_fee_target,
1415
FeeProposalInfo,
1516
PPT_DENOMINATOR,
16-
TARGET_ATTO_USD_PER_L2_GAS,
1717
};
1818

1919
const TEST_FEE_PROPOSAL_WINDOW_SIZE: u64 = 10;
@@ -228,7 +228,7 @@ fn test_honest_proposer_always_passes_validation_fuzzed() {
228228
let fee_actual_value = rng.random_range(1u128..1_000_000_000_000_000_000);
229229
let strk_usd_rate = rng.random_range(1u128..2 * 10u128.pow(18));
230230
let fee_actual = GasPrice(fee_actual_value);
231-
let target = compute_fee_target(TARGET_ATTO_USD_PER_L2_GAS, strk_usd_rate);
231+
let target = compute_fee_target(DEFAULT_SNIP35_TARGET_ATTO_USD_PER_L2_GAS, strk_usd_rate);
232232
let oracle_result = if rng.random_bool(0.1) { None } else { target };
233233
let proposal = compute_fee_proposal(oracle_result, fee_actual, margin_ppt);
234234
assert!(

0 commit comments

Comments
 (0)