feat(model): callback-bounded adversaries — reentrancy specs at the call boundary (#1963 slice 6) - #2260
Merged
Merged
Conversation
…the call boundary (#1963/#2087) CallbackBounded: an adversary whose committed transitions are finite reentry schedules drawn from the caller's registered entrypoints — the callee may reenter through any entrypoints in any order before the first call's continuation, but cannot perform caller-state transitions no entrypoint could. Laws: denoteCall_preserves (per window, all kinds/results), denote_preserves (whole CallProgram), transaction_preserves (through the commit/revert boundary). Consumer corollaries added to ReentrancyRelyGuarantee (Midnight take/liquidate example): the single liquidate obligation now covers every externally opened window of any call program and the transaction boundary. Manifest/coverage/status artifacts updated (302 properties).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_5fbce0d2-840a-4e18-bc00-6af58be43c22) |
Contributor
There was a problem hiding this comment.
OpenCodeReview first-pass review
⚪ OCR did not run — this diff has no OCR-supported files. Not a review outcome.
No changed files matched OCR include rules.
OCR pilot metrics & packet coverage
OCR pilot metrics
- Routing: no-supported (router-v10)
- Changed files: 0 supported / 0 total; Lean 0, trust docs 0, workflow/scripts 0, contracts 0, docs 0
- Changed lines: 0 supported; thresholds large Lean >=3 files or >800 lines
- OCR: status no-supported; comments 0; files 0; tokens 0; tool calls 0; warnings 0; duration 0s
Pilot mode: advisory only. Codex Review remains the merge gate.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Lane 2.1 of the roadmap:
CallbackBoundedrestricts anAdversaryModel's committed transitions to finite reentry schedules drawn from the contract's registered entrypoints (ReentrancySpec), formalizing "the callee can call back into the caller, pick entrypoints, observe intermediate state, and reenter before the continuation" — while excluding caller-state magic no entrypoint could perform.CallbackBounded.denoteCall_preserves/denote_preserves/transaction_preserves: one invariant obligation per entrypoint covers every externally opened window of anyCallProgramand the transaction commit/revert boundary.take/liquidateexample (callback_bounded_program_preserves_I,callback_bounded_transaction_preserves_I).Validation: full
lake buildOK,make checkall passed, no sorry/admit/new axiom.Note
Medium Risk
Touches security-critical reentrancy and external-call adversary modeling, but is additive Lean proof infrastructure with no new axioms or runtime behavior changes.
Overview
Extends reentrancy rely-guarantee proofs to the external-call boundary: a
CallbackBoundedadversary may only commit finite reentry schedules drawn from the caller's registered entrypoints, not arbitrary caller-state updates.Adds
CallbackBridgewithdenoteCall_preserves/denote_preserves/transaction_preserves, so one per-entrypoint invariant obligation covers every externally opened window of anyCallProgramand the transaction commit/revert path.Wires the Midnight
take/liquidateexample withcallback_bounded_program_preserves_Iandcallback_bounded_transaction_preserves_I, and bumps theorem counters 300 → 302.Reviewed by Cursor Bugbot for commit c3f6924. Bugbot is set up for automated code reviews on this repo. Configure here.