-
Notifications
You must be signed in to change notification settings - Fork 351
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
fix(batcher): has_enough_balance used current_max_fee + new_max_fee in replacement message #1559
base: staging
Are you sure you want to change the base?
fix(batcher): has_enough_balance used current_max_fee + new_max_fee in replacement message #1559
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.
Works nice!
Co-authored-by: Julian Arce <[email protected]>
…e from computed replacement balance
154cc68
to
d7efa1b
Compare
This reverts commit 436ce43.
Changes to gas cost
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
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.
Works in my machine!
has_enough_balance
used current_max_fee + new_max_fee in replacement messageDescription
Currently the user balance is checked to ensure a user can pay for all there submitted proofs. Currently this check is done before replacement messages are handled and does not compute the total balance of proofs with replacement msg in mind. This leads to issues that when a replacement msg is posted the user balance check will fail as the batcher will check the total accumulated proof including the current msg to be replaced + the fee of the replacement msg. The check will fail as the contribution of the msg being replaced will be counted twice (first in the accumulated balance, and as the next proof added to the batch.
This pr addresses this issue by the following:
original_msg_max_fee
from the user_balanceThis PR also fixes a bug that was checking replacement_entry_is_valid after closing old sink.
To Test:
First observe the failing case:
staging
max_fee
Observe the fix:
max_fee
Type of change
Please delete options that are not relevant.
Checklist
testnet
, everything else tostaging