apollo_consensus_orchestrator: add SNIP-35 fee_proposals sliding window#13817
Conversation
69fb04b to
f876e52
Compare
e3b70b5 to
cf971d9
Compare
cf971d9 to
ccb5be3
Compare
ede28f9 to
67ab4b6
Compare
48bdd57 to
3f5a393
Compare
67ab4b6 to
eb2132c
Compare
29624cd to
e0a29c8
Compare
eb2132c to
496e9f7
Compare
e0a29c8 to
ec1e517
Compare
365c687 to
c02232e
Compare
9c55e10 to
cb5b659
Compare
c02232e to
500f0ce
Compare
cb5b659 to
01f8451
Compare
16af896 to
ac3e7d4
Compare
32331eb to
a14e00f
Compare
ac3e7d4 to
2b0cc53
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2b0cc53. Configure here.
ShahakShama
left a comment
There was a problem hiding this comment.
@ShahakShama reviewed 5 files and all commit messages, and made 4 comments.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on sirandreww-starkware).
crates/apollo_consensus_orchestrator/src/sequencer_consensus_context.rs line 940 at r3 (raw file):
Err(e) => { // Stop backfilling on the first error (likely `BlockNotFound` for // heights before the chain was SNIP-35-enabled). The remaining window
if a height is before SNIP-35 you should get Ok(block with None fee proposal), not Err
crates/apollo_consensus_orchestrator/src/sequencer_consensus_context.rs line 944 at r3 (raw file):
// are committed, falling back to `l2_gas_price`. warn!( "SNIP-35 backfill stopped at block {h}: {e:?}. Window has {} / \
stopped -> failed
crates/apollo_consensus_orchestrator/src/test_utils.rs line 328 at r3 (raw file):
} /// Default get_block returns NotFound for all blocks. Used by SNIP-35 backfill on startup.
If you want to simulate real life you should return a regular block here with none proposal fee
crates/apollo_consensus_orchestrator/src/snip35/mod.rs line 27 at r3 (raw file):
pub(crate) const PPT_DENOMINATOR: u128 = 1000; /// Number of fee_proposal values used to compute fee_actual (SNIP-35).
Add TODO to consider moving this to versioned constants
ShahakShama
left a comment
There was a problem hiding this comment.
@matanl-starkware should also review this
@ShahakShama made 1 comment.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on sirandreww-starkware).
matanl-starkware
left a comment
There was a problem hiding this comment.
@matanl-starkware made 1 comment.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on sirandreww-starkware).
crates/apollo_consensus_orchestrator/src/sequencer_consensus_context.rs line 238 at r3 (raw file):
l1_da_mode: L1DataAvailabilityMode, previous_proposal_init: Option<PreviousProposalInitInfo>, /// SNIP-35: sliding window of recent fee_proposal values (size from config).
At the moment, it's a const, and Shahak suggested making it a VC.
Either way - not config.
Code quote:
(size from config)
sirandreww-starkware
left a comment
There was a problem hiding this comment.
@sirandreww-starkware made 5 comments.
Reviewable status: 2 of 5 files reviewed, 4 unresolved discussions (waiting on ShahakShama).
crates/apollo_consensus_orchestrator/src/sequencer_consensus_context.rs line 238 at r3 (raw file):
Previously, matanl-starkware (Matan Lior) wrote…
At the moment, it's a const, and Shahak suggested making it a VC.
Either way - not config.
Done +-
crates/apollo_consensus_orchestrator/src/sequencer_consensus_context.rs line 940 at r3 (raw file):
Previously, ShahakShama wrote…
if a height is before SNIP-35 you should get Ok(block with None fee proposal), not Err
Done.
crates/apollo_consensus_orchestrator/src/sequencer_consensus_context.rs line 944 at r3 (raw file):
Previously, ShahakShama wrote…
stopped -> failed
Done.
crates/apollo_consensus_orchestrator/src/test_utils.rs line 328 at r3 (raw file):
Previously, ShahakShama wrote…
If you want to simulate real life you should return a regular block here with none proposal fee
Done
crates/apollo_consensus_orchestrator/src/snip35/mod.rs line 27 at r3 (raw file):
Previously, ShahakShama wrote…
Add TODO to consider moving this to versioned constants
Done.


No description provided.