Skip to content

feat(solidity-import): admit storage reads, writes, and logs after a closed CALL - #2940

Open
Th0rgal wants to merge 3 commits into
mainfrom
feat/solidity-import-post-call-state-access
Open

Th0rgal wants to merge 3 commits into
mainfrom
feat/solidity-import-post-call-state-access

Conversation

@Th0rgal

@Th0rgal Th0rgal commented Nov 24, 2026

Copy link
Copy Markdown
Member

Summary

  • Admit storage reads, storage writes, logs, and follow-up closed calls after a closed value-free CALL when every CEI barrier and reentrancy window in the function body is a closed transport (onlyClosedCallStateWindows, via eraseClosedInteractions), building directly on #2934 (Refs #2911).
  • Add Verity/Core/Model/ByteCallStorageFrames.lean with the callee hypothesis Denote.CallKeepsCallerStorage, persistent/transient post-call frame lemmas, and the inertCallee satisfiability witness (never assumed by imported models).
  • Record the open post-call window in the trust surface: admitted functions carry reentrancyTrusted, allowPostInteractionWrites (when the unerased body violates CEI), and the unchecked obligation solidity_post_call_state_access.
  • Add synthetic fixtures (PostCallStateAccess.sol, PostCallStateAccessChecks.lean, CallbackTransferSequenceModel.lean, PostCallWriteSequenceModel.lean, PostCallEventSequenceModel.lean), differential driver (check_post_call_state_access.py), and update check_reentrant_callback_rejections.py, check_extcodehash_rejections.py, check_interface_static_call_rejections.py, docs/SOLIDITY_IMPORT.md, and docs/TRUST_ASSUMPTIONS.md.

Scope

  • Independent PR directly against main.
  • Direct follow-up to #2934 (#2911 PR-1); synthetic fixtures only.

Verification Receipts (Head 11e252100337463ae2377d97644cb9a2af15fed6)

  • lake build Verity.Core.Model.ByteCallStorageFrames Compiler.SolidityImport.TransportBarriers Compiler.SolidityImport.Import Contracts.SolidityImportSmoke.PostCallStateAccessChecks Contracts.SolidityImportSmoke.InterfaceVoidCallTrustChecks Contracts.SolidityImportSmoke.CallbackTransferSequenceModel Contracts.SolidityImportSmoke.PostCallWriteSequenceModel Contracts.SolidityImportSmoke.PostCallEventSequenceModel: PASS (129 jobs, 0 sorry / 0 axiom / 0 native_decide in diff).
  • python3 scripts/solidity_differential/check_reentrant_callback_rejections.py: PASS (12/12 cases).
  • python3 scripts/check_proof_length.py: PASS (0 proofs over 50 lines).
  • make check (all lints, axioms, trust-surface registry, docs sync, macro health, storage layout, and python3 -m unittest discover -s scripts -p 'test_*.py'): PASS (1025 tests OK).
  • python3 scripts/check_importer_name_selection.py: PASS (48 importer files).
  • Mutation anchor preflight: PASS (476 storage + 21 memory-call anchors).

…CALL

Admit storage reads, storage writes and logs after a closed value-free
CALL when every CEI barrier and reentrancy window in the body is a closed
transport (onlyClosedCallStateWindows via eraseClosedInteractions),
building directly on #2934 (Refs #2911).

- Verity/Core/Model/ByteCallStorageFrames.lean: CallKeepsCallerStorage
  hypothesis, persistent/transient post-call frame lemmas, and inertCallee
  satisfiability witness.
- Trust surface: admitted functions carry reentrancyTrusted,
  allowPostInteractionWrites (when CEI is violated), and the unchecked
  solidity_post_call_state_access obligation.
- Synthetic smoke checks (PostCallStateAccessChecks,
  CallbackTransferSequenceModel, PostCallWriteSequenceModel,
  PostCallEventSequenceModel), differential script
  (check_post_call_state_access.py), and updated rejection controls.
@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
veritylang.com Ready Ready Preview Nov 25, 2026 8:50pm UTC

Request Review

@github-actions

Copy link
Copy Markdown
Contributor
\n### CI Failure Hints\n\nFailed jobs: `build-audits`\n\nCopy-paste local triage:\n```bash\nmake check\nlake build\nFOUNDRY_PROFILE=difftest forge test -vv\n```

@fricoben

Copy link
Copy Markdown
Member

Needs changes.

Review of #2940 (Th0rgal, draft) at head 11e252100337463ae2377d97644cb9a2af15fed6, base main.

Summary

The semantics are sound. Post-call statements run against Response.commit. On success that is an arbitrary after world chosen by the adversary (ByteExternalCall.lean:50), so it over-approximates re-entry. CallKeepsCallerStorage is an optional Prop hypothesis, not an axiom, and no imported model or proof assumes it.

  • There is no new axiom, sorry, native_decide, heartbeat bump, implemented_by/unsafe, or allowlist/toml change.
  • Every function admitted through the new path carries solidity_post_call_state_access. The obligation is attached exactly when postCallState holds, which is the same condition that grants admission.
  • reentrancyTrusted is consumed only by the validation gate and the trust report. No proof under Compiler/Proofs reads it.

The gaps are in evidence and labelling:

  • Real re-entry is never run on all three routes.
  • The new A/B/C driver is not in CI.
  • The re-entrant rejection script lost all of its negatives.
  • reentrancyTrusted is reused with a meaning that contradicts its own doc.

Findings (severity-ordered)

  1. [important] Re-entry is never tested on the source EVM or the compiled model, and test(solidity-differential): re-entrant callback responder and three-route campaign (#2911 PR-1) #2934's responder is not used.

    • Re-entrant callees appear only in PostCallStateAccessChecks.lean. That file runs Denote alone, through a hand-written reenter adversary, against hand-pinned expected values.
    • check_post_call_state_access.py uses only the non-re-entrant RecordingCallResponders, one empty account and the sender EOA. Its docstring says re-entry is "covered by" the Lean file.
    • The compiled model (route C) is never run against a callee that calls back. ReentrantCallResponderMocks and ReentrantCallbackHook (test(solidity-differential): re-entrant callback responder and three-route campaign (#2911 PR-1) #2934) exist for exactly this.
    • I reproduced the four pinned re-entry outcomes on the real EVM with forge, solc 0.8.34, osaka, runs 466, under both via-IR and legacy. All match Denote:
      • same-credit re-spend gives Panic(0x11);
      • double spend with 20 credit leaves (0, 2);
      • pingThenCount callback leaves (2, 12);
      • the callback's log comes before the caller's.
    • So route A agrees with B. Route C stays unchecked under re-entry.
    • Ask: add the three contracts to check_reentrant_callback.py, using the hook to call back transferOut, pingThenCount and notify.
  2. [important] The A/B/C driver is not wired into CI, while the trust doc relies on it.

    • docs/TRUST_ASSUMPTIONS.md:2291 says the no-caching-across-the-call trust "is checked differentially" by check_post_call_state_access.py.
    • The script is not in scripts/solidity_differential/suite.py, unlike reentrant-callback at lines 237–242. The PR body does not list running it.
    • I ran it on the head: it passes for all three contracts (96 transactions, seed 6517).
    • Ask: register it in suite.py.
  3. [important] The rejection negatives were all flipped, with no replacement located negative and no mutant.

    • All 8 near misses in check_reentrant_callback_rejections.py (lines 22–36) are now positive controls (False), so the script checks only that the code elaborates. The new failAt at Import.lean:20505 has no Solidity-level located test.
    • The docstring (lines 1–8) says non-closed interactions "stay rejected (covered by PostCallStateAccessChecks.lean and check_extcodehash_rejections.py)". That is not accurate:
      • the Lean guards are hand-built Stmt classifier checks, not the importer's located error;
      • check_extcodehash_rejections.py deleted its post-call message and flipped its case.
    • My probe of 7 Solidity near misses found no shape that reaches the new message. A typed non-view call, a value call and delegatecall all reject earlier with other messages. So the gate may be defence in depth only. If so, say that. If not, add one located negative.
    • There is no mutant for onlyClosedCallStateWindows or eraseClosedInteractions (TransportBarriers.lean:292, :312).
    • Several flipped rows have no positive value check: second-call (two closed CALLs; no fixture makes two calls), try-catch-read, and require-storage-after-call. The PR body claims "follow-up closed calls" are admitted, but nothing compares their values.
  4. [medium, design] reentrancyTrusted is overloaded against its documented meaning.

    • Verity/Core/Model/Types.lean:1751 documents it as an "unproven author assertion … every external callee is a trusted contract that does not re-enter".
    • Import.lean:20549 sets it mechanically on any function with an open post-call window and no guard. The trust report then emits a reentrancy_trusted opt-out, so readers see "callee trusted" where the model is actually adversarial.
    • The obligation text admits the flag is only there to "record that the post-call window is open". Its real job is to pass validateReentrancyDisposition (Validation.lean:1493).
    • Semantically this is not weaker than a typed adversarial-world disposition: Denote is already adversarial, and nothing proof-side consumes the flag. It is weaker in labelling. It conflates trusted-callee with modelled-adversarially, and a later consumer could read the flag as licence to assume no re-entry.
    • Recommend a distinct adversarial disposition instead of reentrancyTrusted on this path.
  5. [low] CallKeepsCallerStorage frames storageWords only (ByteCallStorageFrames.lean:31).

    • It says nothing about storageArray, which ReentrantCallees covers separately. A proof over dynamic storage arrays gets no frame lemma from it.
    • This is incompleteness, not unsoundness. Either document it or add the storageArray conjunct.
  6. [low] Some admitted shapes have no fixture.

    • The probe admitted three shapes with no differential fixture:
      • a typed view call after the CALL;
      • address(this).balance after the CALL. It lowers to Expr.selfBalance, read from the committed world (Denote.lean:948), which is consistent but untested;
      • a CALL plus write inside a for loop.
    • Suggest adding them to the A/B/C plan.

What I ran vs read

Ran:

  • lake build of PostCallStateAccessChecks and the 3 sequence models on the head: PASS (127 jobs).
  • check_post_call_state_access.py (the A/B/C campaign, Anvil + Denote + compiled model) on the head: PASS for all 3 contracts. It needed uv --with eth-abi eth-utils rlp pycryptodome eth-hash because the host python lacks them.
  • Forge re-entry reproduction of the 4 pinned Denote outcomes under via-IR and legacy: all PASS (route A = B).
  • Importer probe of 7 Solidity near misses on the head: 3 rejected earlier with other messages, 4 admitted, and none reach the new message. For the selfBalance case I dumped the lowered body.
  • gh pr checks 2940: all green, nothing red. The foundry, import-mutations and compiler-regressions jobs were skipped by routing.

Read only:

  • The diff, the PR body, ByteExternalCall.commit / valid, ReentrantCallees, the reentrancyTrusted consumers, and suite registration.
  • "Fails on main": main's own rejection scripts list these exact shapes as expected located rejections. I did not run them, because main's build tree has no built Import.olean.

@fricoben

Copy link
Copy Markdown
Member

Hi @Th0rgal, Ben asked us to help land this one, so we'll push fix commits for the review findings above directly on top of your branch (our own commits only: nothing of yours is rewritten or force-pushed). Each push gets a fresh review and a verdict on its exact head. If you're pushing too, just let us know and we'll rebase our part.

@Th0rgal

Th0rgal commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

Thanks @fricoben! We're actively addressing all review findings from your review and will push fix commits directly on top of this branch (no force-push / no history rewrite, unless a clean rebase is needed after an earlier PR in the stack merges). Let's coordinate here so we don't duplicate effort.

…tate access

- Add real A/B/C re-entrant callback coverage (source EVM, Denote, compiled model) for SyntheticPostCallWrite, SyntheticCallbackTransfer, and SyntheticPostCallEvent in check_reentrant_callback.py using ReentrantCallbackHook / ReentrantCallResponderMocks (extended to 0..3 args, inert NO_CALLBACK, and read-only PURE_WORD view responder), pinning all four re-entry outcomes and no-callback negative controls.
- Wire post-call-state-access into scripts/solidity_differential/suite.py (and EXPECTED_CAMPAIGN_CHECKS in test_solidity_differential.py) alongside reentrant-callback.
- Add located negative controls for disallowed post-call shapes (call-then-codehash, value-call-then-write, delegatecall-then-write, second-call-value) to check_reentrant_callback_rejections.py, document Import.lean's post-call onlyClosedCallStateWindows check as defense in depth, and add four mutation anchors in check_memory_call_mutations.py (denote-yul-call-commit-world, reentrant-callback-commit-world, transport-erase-closed-interactions, transport-only-closed-call-state-windows).
- Introduce a dedicated reentrancyAdversarial disposition on FunctionSpec (reported as reentrancy_adversarial in collectStaticOptOuts, accepted by validateReentrancyDisposition) instead of overloading reentrancyTrusted on the post-CALL path.
- Extend CallKeepsCallerStorage in ByteCallStorageFrames.lean to frame storageArray alongside caller-owned storageWords (with executeChecked_storageArray_of_callKeepsCallerStorage).
- Expand PostCallStateAccess.sol and A/B/C plans to exercise sequential calls (twoPingsThenCount), post-call require (pingThenRequire), bounded loop call+write (pingLoop), post-call address(this).balance (pingThenBalance), post-call typed view call (pingThenView), and try/catch storage reads (tryNotifyRead).
…post-call-state-access

# Conflicts:
#	Compiler/SolidityImport/Import.lean
#	scripts/check_importer_name_selection.py
@Th0rgal
Th0rgal marked this pull request as ready for review November 25, 2026 20:50

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenCodeReview first-pass review

🟡 Scout triage + 0/4 paquet(s) reviewés sémantiquement. 8 finding(s) (1 high / 7 medium); les hunks hors paquets restent à couvrir par un humain ou Codex.

Paquets non couverts par la review sémantique

  • Compiler/SolidityImport/ReentrantCallResponderMocks.lean — error (Command failed: ocr review --from 2f421e6 --to 6286155 --format json --audience agent --rule /home/ubuntu/actions-runner-verity-ocr/_work/_temp/ocr-tools/rules.json --concurr)
  • scripts/solidity_differential/check_reentrant_callback.py — error (Command failed: ocr review --from 2f421e6 --to 6286155 --format json --audience agent --rule /home/ubuntu/actions-runner-verity-ocr/_work/_temp/ocr-tools/rules.json --concurr)
  • Verity/Core/Model/ByteCallStorageFrames.lean — error (Command failed: ocr review --from 2f421e6 --to 6286155 --format json --audience agent --rule /home/ubuntu/actions-runner-verity-ocr/_work/_temp/ocr-tools/rules.json --concurr)
  • Contracts/SolidityImportSmoke/PostCallWriteSequenceModel.lean — error (Command failed: ocr review --from 2f421e6 --to 6286155 --format json --audience agent --rule /home/ubuntu/actions-runner-verity-ocr/_work/_temp/ocr-tools/rules.json --concurr)

📝 3 groupe(s) de paquets au-delà du budget n'ont eu que le triage scout.

Large Lean diff routed to bounded packet review: 13 Lean file(s), 1936 changed supported line(s). Scout triage fallback_deterministic; strong packet review required. Full-file OCR was not attempted.

✅ Posted 8 inline comment(s).

OCR pilot metrics & packet coverage

OCR pilot metrics

  • Routing: large-lean-hotspots (router-v11)
  • Changed files: 26 supported / 26 total; Lean 13, trust docs 1, workflow/scripts 9, contracts 2, docs 1
  • Changed lines: 1936 supported; thresholds large Lean >=3 files or >800 lines
  • OCR: status scout_triage; comments 8; files 7; tokens 0; tool calls 0; warnings 1; duration 673s
  • Largest changed files: scripts/solidity_differential/check_reentrant_callback.py (+381/-70), Contracts/SolidityImportSmoke/PostCallStateAccessChecks.lean (+284/-0), Compiler/SolidityImport/ReentrantCallResponderMocks.lean (+135/-69), scripts/solidity_differential/check_post_call_state_access.py (+198/-0), Contracts/SolidityImportSmoke/PostCallStateAccess.sol (+143/-0)

Packet coverage

  • Packet review: enabled; selected 8/8 packet(s)
  • Scout: configured; status fallback_deterministic; model reviewer_scout
  • Scout lenses: provenance, verification-independence, environment-determinism, proof-soundness; rubric items checked 3
  • Scout provider HTTP status: 502
  • Scout provider error: <!DOCTYPE html> <!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]--> <!--[if IE 7]> <html class="no-js ie7 oldie" lang="en-US"> <![endif]--> <!--[if IE 8]> <html class="no-js ie8 oldie" lang="en-US"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]--> <head> <title>thomas.md | 502: Bad gateway</title> <meta charset="UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="X-UA-Compatible" content="I
  • Strong review: required; status blocked_packet_input
  • Residual risk: Triaged top 8 deterministically ranked packet(s); remaining changed hunks/files require Codex or human proof review, and selected packets still need strong reviewer analysis.
  • Strong packet-review blocker: Selected packets require semantic review; see packet review outcomes for actual coverage.
  • Covered packets:
    • Compiler/SolidityImport/ReentrantCallResponderMocks.lean:136 score 111 — theorem/public statement changed, public declaration/signature changed
    • scripts/solidity_differential/check_reentrant_callback.py:144 score 89 — theorem/public statement changed, public declaration/signature changed
    • Verity/Core/Model/ByteCallStorageFrames.lean:1 score 80 — public declaration/signature changed, changed imports
    • Contracts/SolidityImportSmoke/PostCallWriteSequenceModel.lean:1 score 78 — public declaration/signature changed, changed imports
    • Contracts/SolidityImportSmoke/PostCallEventSequenceModel.lean:1 score 78 — public declaration/signature changed, changed imports
    • Contracts/SolidityImportSmoke/CallbackTransferSequenceModel.lean:1 score 78 — public declaration/signature changed, changed imports
    • scripts/solidity_differential/check_post_call_state_access.py:1 score 73 — public declaration/signature changed, changed imports
    • Compiler/SolidityImport/ReentrantCallResponderMocks.lean:9 score 62 — public declaration/signature changed

Pilot mode: advisory only. Codex Review remains the merge gate.

· exact respond_staticcall_valid model oracle accounts request world hstatic
· cases respond model oracle accounts request world <;>
simp [Response.valid, hstatic] } }
environmentAt model oracle accounts gas emptyAccounts 1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 OCR scout — question de triage (non-review) [high]

Question de couverture pour le reviewer humain/Codex — pas une review sémantique finale ni une approbation.

Why flagged: theorem/public statement changed, public declaration/signature changed; 140 changed line(s) near Compiler/SolidityImport/ReentrantCallResponderMocks.lean:136. Signals: theorem/public statement changed, public declaration/signature changed.
Added-line sample:

  • L136: /-- Run the model's public entry point named by the payload selector in the callback frame,
  • L137: using ′nestedCalls′ for any nested byte calls inside the callback. ′none′ is an instrumentation
  • L138: failure. -/
  • L140: (callee : Nat) (calldata : Bytes) (nestedCalls : ByteCallEnvironment := {}) :
  • L141: Option FrameResult :=

'scope': 'value-free CALLs whose callee re-enters the caller once (trailing and '
'post-CALL state access): source EVM / Denote / compiled model, plus '
'no-callback negative controls'})
print(f'reentrant callback A/B/C agree ({", ".join(passed)}): {output}')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 OCR scout — question de triage (non-review) [medium]

Question de couverture pour le reviewer humain/Codex — pas une review sémantique finale ni une approbation.

Why flagged: theorem/public statement changed, public declaration/signature changed; 367 changed line(s) near scripts/solidity_differential/check_reentrant_callback.py:144. Signals: theorem/public statement changed, public declaration/signature changed.
Added-line sample:

  • L144: """The hook constructor's writes: selector, argument count, arg0..arg2 and flags."""
  • L149: def slot_word(row, account, slot):
  • L150: """Storage word at ′(account, slot)′ after one transaction, as a route observed it."""
  • L151: for owner, key, value in row['storage']:
  • L152: if owner.lower() == account.lower() and int(key, 16) == slot:

theorem callKeepsCallerStorage_inertCallee : CallKeepsCallerStorage inertCallee :=
fun _ _ _ => ⟨fun _ _ => rfl, rfl⟩

end Compiler.CompilationModel.Denote

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 OCR scout — question de triage (non-review) [medium]

Question de couverture pour le reviewer humain/Codex — pas une review sémantique finale ni une approbation.

Why flagged: public declaration/signature changed, changed imports; 98 changed line(s) near Verity/Core/Model/ByteCallStorageFrames.lean:1. Signals: public declaration/signature changed, changed imports.
Added-line sample:

  • L1: import Verity.Core
  • L2: import Verity.Core.Model.ByteExternalCall
  • L3: (empty)
  • L4: /-!
  • L5: # Caller-storage hypothesis for code after a byte ′CALL′

SolidityImportSmoke.PostCallWriteSequenceModel.oracle args
(configure := Compiler.CompilationModel.SolidityImport.ReentrantCallResponderMocks.configure
SolidityImportSmoke.PostCallWriteSequenceModel.model
SolidityImportSmoke.PostCallWriteSequenceModel.oracle)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 OCR scout — question de triage (non-review) [medium]

Question de couverture pour le reviewer humain/Codex — pas une review sémantique finale ni une approbation.

Why flagged: public declaration/signature changed, changed imports; 48 changed line(s) near Contracts/SolidityImportSmoke/PostCallWriteSequenceModel.lean:1. Signals: public declaration/signature changed, changed imports.
Added-line sample:

  • L1: import Compiler.SolidityImport.Import
  • L2: import Compiler.SolidityImport.Differential
  • L3: import Compiler.SolidityImport.SequenceRunner
  • L4: import Compiler.SolidityImport.ReentrantCallResponderMocks
  • L5: import Compiler.CompilationModel

SolidityImportSmoke.PostCallEventSequenceModel.oracle args
(configure := Compiler.CompilationModel.SolidityImport.ReentrantCallResponderMocks.configure
SolidityImportSmoke.PostCallEventSequenceModel.model
SolidityImportSmoke.PostCallEventSequenceModel.oracle)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 OCR scout — question de triage (non-review) [medium]

Question de couverture pour le reviewer humain/Codex — pas une review sémantique finale ni une approbation.

Why flagged: public declaration/signature changed, changed imports; 43 changed line(s) near Contracts/SolidityImportSmoke/PostCallEventSequenceModel.lean:1. Signals: public declaration/signature changed, changed imports.
Added-line sample:

  • L1: import Compiler.SolidityImport.Import
  • L2: import Compiler.SolidityImport.Differential
  • L3: import Compiler.SolidityImport.SequenceRunner
  • L4: import Compiler.SolidityImport.ReentrantCallResponderMocks
  • L5: import Compiler.CompilationModel

SolidityImportSmoke.CallbackTransferSequenceModel.oracle args
(configure := Compiler.CompilationModel.SolidityImport.ReentrantCallResponderMocks.configure
SolidityImportSmoke.CallbackTransferSequenceModel.model
SolidityImportSmoke.CallbackTransferSequenceModel.oracle)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 OCR scout — question de triage (non-review) [medium]

Question de couverture pour le reviewer humain/Codex — pas une review sémantique finale ni une approbation.

Why flagged: public declaration/signature changed, changed imports; 42 changed line(s) near Contracts/SolidityImportSmoke/CallbackTransferSequenceModel.lean:1. Signals: public declaration/signature changed, changed imports.
Added-line sample:

  • L1: import Compiler.SolidityImport.Import
  • L2: import Compiler.SolidityImport.Differential
  • L3: import Compiler.SolidityImport.SequenceRunner
  • L4: import Compiler.SolidityImport.ReentrantCallResponderMocks
  • L5: import Compiler.CompilationModel



if __name__ == '__main__':
sys.exit(main())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 OCR scout — question de triage (non-review) [medium]

Question de couverture pour le reviewer humain/Codex — pas une review sémantique finale ni une approbation.

Why flagged: public declaration/signature changed, changed imports; 198 changed line(s) near scripts/solidity_differential/check_post_call_state_access.py:1. Signals: public declaration/signature changed, changed imports.
Added-line sample:

  • L1: """Imported storage reads, storage writes and logs after a closed CALL through source EVM, Denote and compiled model.
  • L2: (empty)
  • L3: ′PostCallStateAccess.sol′ holds three synthetic contracts whose effects follow an
  • L4: interaction: ′SyntheticPostCallWrite′ reads and writes storage, runs follow-up closed
  • L5: calls, checks ′require′ over storage, loops over a closed call + write, reads

let words := (List.range count).flatMap fun argIndex =>
(List.range 32).map fun byteIndex =>
UInt8.ofNat (slotValue world account (2 + argIndex) / 2 ^ (8 * (31 - byteIndex)) % 256)
selector ++ words

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 OCR scout — question de triage (non-review) [medium]

Question de couverture pour le reviewer humain/Codex — pas une review sémantique finale ni une approbation.

Why flagged: public declaration/signature changed; 64 changed line(s) near Compiler/SolidityImport/ReentrantCallResponderMocks.lean:9. Signals: public declaration/signature changed.
Added-line sample:

  • L9: slot 1 the argument count (0..3), slots 2..4 the argument words, slot 5 the flags, and slot 6
  • L12: Flags:
  • L13: * bit 0 (′1′): revert with no data after a successful callback (or inert call).
  • L14: * bit 1 (′2′): inert callee (increment the counter without calling back, then return or revert).
  • L15: * bit 2 (′4′): read-only view responder (write no storage, return ′arg0′ as 32 bytes; answers

@Th0rgal

Th0rgal commented Nov 25, 2026

Copy link
Copy Markdown
Member Author

All review findings from @fricoben are addressed and non-draft CI is 100% green on exact head 6286155135 (15/15 checks passed, ci-gate green). Ready for re-review & approval!

This branch was successfully deployed

1 active deployment
Preview — 62861551 Deployed Nov 25, 2026 by vercel[bot]
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.

2 participants