Repository navigation
feat(solidity-import): admit structured low-level calls and hashed transient words in transient closures - #2965
Merged
Th0rgal merged 1 commit intoNov 27, 2026
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…ansient words in transient closures Extend the transient-closure inline-assembly gate in Compiler/SolidityImport/ExprHelpers.lean with two structurally matched block families: 1. Structured low-level call helpers (library-name independent, matched strictly by Yul AST and local types): - staticcallNoReturn and callNoReturn (literal 0 or full-word uint256 value local) over address and bytes memory locals - returnDataSize (uint256 target) - returnData (reusing matchYulReturndataCopyBlock? into a bytes memory local) - bubbleRevert (both the 0-arg free-pointer form and 1-arg bytes memory form) 2. Single-statement hashed-base transient word access (tstore/tload) at compile-time bytes32 bases B >= 2^128, add(B, k), or add(B, and(i, M)) with full-word index i and mask M < 2^128 keeping slots in [2^128, 2^256) disjoint from linear transient state slots. Rebased onto main after #2963 and #2964 with positive, negative-control, and live Anvil 3-route A/B/C differential tests (96 transactions).
Th0rgal
marked this pull request as ready for review
November 27, 2026 19:27
Th0rgal
force-pushed
the
feat/solidity-import-transient-lowlevel-and-hashed-slots
branch
from
November 27, 2026 19:27
83c4de8 to
cc950ca
Compare
Th0rgal
deleted the
feat/solidity-import-transient-lowlevel-and-hashed-slots
branch
November 27, 2026 22:35
This branch was successfully deployed
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.
Rebased onto
mainafter #2963 and #2964.Summary
Extends the transient-closure inline-assembly gate (
Compiler/SolidityImport/ExprHelpers.lean) with two structurally matched, library-name-independent block families:staticcallNoReturnandcallNoReturn(literal0or full-worduint256valuelocal) overaddressandbytes memorylocalsreturnDataSize(uint256target)returnData(reusingmatchYulReturndataCopyBlock?from feat(solidity-import): admit LowLevelCall.returnData() and value memory calls #2963 into abytes memorylocal)bubbleRevert(both 0-arg free-pointer form and 1-argrevert(add(d, 0x20), mload(d))over abytes memorylocal)tstore(S, v)/v := tload(S)at compile-timebytes32basesB >= 2^128,add(B, k), oradd(B, and(i, M))with full-word indexiand literal maskM < 2^128, keeping all slots in[2^128, 2^256)disjoint from linear transient state slots.Local Verification (
cc950cad00)lake buildonExprHelpers,Import,TransientStructuredAssemblyChecks,TransientStructuredAssemblySequenceModel,TransientNeutralAssemblyChecks,TransientStateVarChecks,TransientGuardChecks: PASSlake env leancheckeronExprHelpers,Import,TransientStructuredAssemblyChecks,TransientStructuredAssemblySequenceModel: exit 0python3 -m solidity_differential.check_transient_structured_assembly: 96/96 transactions agree bit-for-bit across source EVM (A), Lean Denote (B), and Verity Yul (C)python3 -m unittest scripts/test_solidity_differential.py: 18/18 OKscripts/check_importer_name_selection.py&scripts/lean_lint.py: PASS