apollo_consensus_orchestrator: add SNIP-35 fee_proposal validation#13819
Conversation
e61ede6 to
fec5e8d
Compare
6bd60bb to
8020f60
Compare
8020f60 to
c410076
Compare
c66659e to
79105cf
Compare
34eefaa to
3fbc573
Compare
d756021 to
397780c
Compare
8842b22 to
1d1a4ac
Compare
397780c to
def2345
Compare
1d52c47 to
dfeb913
Compare
04360da to
abc579f
Compare
8cf6fde to
b15a802
Compare
abc579f to
040849d
Compare
PR SummaryHigh Risk Overview Threads Reviewed by Cursor Bugbot for commit a965ac1. Bugbot is set up for automated code reviews on this repo. Configure here. |
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 040849d. Configure here.
| let lower_bound = | ||
| fee_actual.0.saturating_mul(PPT_DENOMINATOR) / (PPT_DENOMINATOR + margin_ppt); | ||
| let upper_bound = | ||
| fee_actual.0.saturating_mul(PPT_DENOMINATOR + margin_ppt) / PPT_DENOMINATOR; |
There was a problem hiding this comment.
Duplicated fee bounds formula risks future inconsistency
Medium Severity
The lower/upper bound computation in the validator (validate_proposal.rs) is copy-pasted from the proposer path in compute_fee_proposal (snip35/mod.rs). Both use the same saturating_mul/division formula with PPT_DENOMINATOR and margin_ppt. If the bounds formula is ever updated in one location but not the other, honest proposers would be rejected by validators — a consensus-breaking bug. Extracting a shared helper (e.g., returning (lower, upper)) from the snip35 module would eliminate this risk.
Reviewed by Cursor Bugbot for commit 040849d. Configure here.
040849d to
522bb06
Compare
0a69e61 to
5adf1d4
Compare
ab23186 to
41b964d
Compare
19deb71 to
d86d400
Compare
41b964d to
5896df2
Compare
d86d400 to
f48b9c1
Compare
5896df2 to
ef7e93b
Compare
ef7e93b to
a965ac1
Compare
f48b9c1 to
78fa661
Compare



No description provided.