Skip to content

op-dispute-mon: Update credit monitoring to handle new withdrawal path#14496

Merged
ajsutton merged 3 commits intodevelopfrom
aj/update-withdrawals-logic
Feb 25, 2025
Merged

op-dispute-mon: Update credit monitoring to handle new withdrawal path#14496
ajsutton merged 3 commits intodevelopfrom
aj/update-withdrawals-logic

Conversation

@ajsutton
Copy link
Copy Markdown
Contributor

Description

Updates op-dispute-mon to handle the new withdrawal path for bonds. The withdrawal request isn't created in DelayedWETH until the game is closed so if the game is in undecided bond distribution mode, all withdrawal requests should be 0 (previously this alerted because it differs from the game credits). In normal or refund mode, it should either be 0 (haven't yet called claimCredit to start the withdrawal process) or matching the credit. Older versions of contracts report bond distribution mode as LegacyDistributionMode and the old rules still apply.

Also added some utility methods for comparing big ints because I'm sick of having to stop and think what the long .Cmp invocation actually means.

Tests

Updated unit tests.

Metadata

Fixes #14448

@ajsutton ajsutton requested review from a team as code owners February 23, 2025 23:05
@ajsutton ajsutton requested a review from Inphi February 23, 2025 23:05
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 15.26%. Comparing base (6934b39) to head (228aa6e).
Report is 22 commits behind head on develop.

❗ There is a different number of reports uploaded between BASE (6934b39) and HEAD (228aa6e). Click for more details.

HEAD has 6 uploads less than BASE
Flag BASE (6934b39) HEAD (228aa6e)
2 1
cannon-go-tests-64 2 0
cannon-go-tests-32 2 0
contracts-bedrock-tests 1 0
Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #14496       +/-   ##
============================================
- Coverage    46.48%   15.26%   -31.23%     
============================================
  Files         1018        8     -1010     
  Lines        87912      688    -87224     
============================================
- Hits         40865      105    -40760     
+ Misses       44003      571    -43432     
+ Partials      3044       12     -3032     
Flag Coverage Δ
cannon-go-tests-32 ?
cannon-go-tests-64 ?
contracts-bedrock-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1018 files with indirect coverage changes

@ajsutton ajsutton added this pull request to the merge queue Feb 25, 2025
Merged via the queue into develop with commit 4d138ef Feb 25, 2025
46 checks passed
@ajsutton ajsutton deleted the aj/update-withdrawals-logic branch February 25, 2025 00:11
Rjected pushed a commit to paradigmxyz/optimism that referenced this pull request Feb 25, 2025
ethereum-optimism#14496)

* op-dispute-mon: Load bond distribution mode.

* op-dispute-mon: Update credit monitoring to handle new withdrawal path.

* Simplify
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

op-dispute-mon: Update withdrawal credit monitoring

2 participants