forked from aeyakovenko/percolator
-
Notifications
You must be signed in to change notification settings - Fork 3
sync(audit): port toly upstream/master 3969c31..2052807 to fork-engine — 6 of 7 audit-validated SF ports + ENG-PORT-4 fixup #90
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7ef8be7
sync(engine): port withdraw_live_insurance_not_atomic empty-market ga…
dcccrypto 486381d
sync(engine): port account_has_unsettled_live_effects helper (ADAPTED…
dcccrypto 60bedc6
sync(engine): port sync_account_fee loss-safe anchor + ensure_fee_dra…
dcccrypto 61938f2
sync(engine): wire account_has_unsettled_live_effects at 4 callsites …
dcccrypto 0206a59
sync(engine): port enforce_side_mode_oi_gate per-account widening + n…
dcccrypto e2f1c67
test(audit): update 9 enforce_side_mode_oi_gate callsites for 6-arg s…
dcccrypto fe1d6fd
sync(engine): port resolve_market_not_atomic 4 SF hunks (pre-state, K…
dcccrypto 7d7689f
sync(engine): port force_close_resolved_not_atomic position-basis ear…
dcccrypto dac8bf6
chore(engine): remove last_crank_slot + gc_cursor refs from detailed_…
dcccrypto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
adl_a_basisdrift is a false positive here.In this engine, same-epoch ADL shrink is represented lazily:
settle_side_effects_liverefreshesadl_k_snap/f_snap/adl_epoch_snap, but it does not rewriteposition_basis_qoradl_a_basisunlessq_eff_new == 0. That makesaccount.adl_a_basis != self.get_a_side(side)a normal post-touch state, not an inconsistency. With this predicate in place, any account that has seen ordinary ADL shrink will start tripping the new guards and get blocked from withdraw/trade/convert/close and recurring fee sync even though its state is otherwise canonical. Either drop the A-basis comparison here, or make the live-touch path fully reattach basis/A snapshots before these guards run.🤖 Prompt for AI Agents