-
Notifications
You must be signed in to change notification settings - Fork 15
fix: overfilled blocks should report max fullness instead of 0 #559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed the concerns raised in the description r.e. the toolkit - we'll need to update it so that the logic matches
EDIT: I misunderstood - the issue was instead that chains with existing overfilled blocks would cause the toolkit to fail to sync. @mpskowron is checking this
@ozgb I've done the test, added details to the ticket: https://shielded.atlassian.net/browse/PM-20839?focusedCommentId=56688 |
ozgb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM








Overview
Currently, if a block gets overfilled, its fullness is reported as 0% instead of 100%. This happens because
SyntheticCost::normalize()returnsNonewhen any dimension exceeds limits, and the code falls back toNormalizedCost::ZERO.This incorrect reporting affects fee adjustment calculations - the algorithm would treat an overfilled block as empty, leading to lower fees when they should be higher due to congestion.
This PR clamps costs to limits before normalizing, ensuring overfilled blocks report maximum fullness.
When the toolkit replays historical blocks to build its local ledger state:
If overfilled blocks exist in chain history, the toolkit's local state will diverge from on-chain for those blocks.
Questions:
🗹 TODO before merging
📌 Submission Checklist
🧪 Testing Evidence
Please describe any additional testing aside from CI:
Local load test sending over 20 shielded token mint transactions to fill the block (had to modify the code to allow block overfilling). The error message was displayed with block clamped correctly to the limits.
🔱 Fork Strategy
Links
Ticket: https://shielded.atlassian.net/browse/PM-20839