Proof-only solidity_contract import for Vault - #2407
Open
fricoben wants to merge 7 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
| \n### CI Failure Hints\n\nFailed jobs: `build`\n\nCopy-paste local triage:\n```bash\nmake check\nlake build\nFOUNDRY_PROFILE=difftest forge test -vv\n``` |
fricoben
force-pushed
the
poc/solidity-contract-vault
branch
from
September 10, 2026 20:29
31877d7 to
a9bc3fe
Compare
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.
What this adds
A self-contained proof-only example under
Contracts/VaultFromSoliditythat imports an existing Solidity Vault directly into Lean and proves specifications against the imported transparent definitions. The handwrittenContracts/Vaultexample is unchanged.Pipeline
There is no production Python frontend, custom serialized instruction IR, generated model
.lean,CompilationModel, or bytecode. Python remains only as the disposable acceptance/mutation test orchestrator.Self-contained file guide
Contracts/VaultFromSolidity/Vault.solContracts/VaultFromSolidity/Importer/Importer.leanContracts/VaultFromSolidity/VaultFromSolidity.leansolidity_contract VaultFromSolidity from "Vault.sol".Contracts/VaultFromSolidity/Spec.leanContracts/VaultFromSolidity/Proofs/Execution.leanContracts/VaultFromSolidity/Importer/scripts/solidity_importer_test.pyDeterminism and fail-closed validation
--standard-jsonand--no-import-callback.sourceDigest.Developer UX
After Solidity edits, rebuild and reload Lean. The POC accepts only the registered Vault and a deliberately small Solidity subset.
Trust boundary
The proof-only importer remains trusted. Lean checks the generated definitions and every theorem about their execution; this is not yet a theorem that the Lean translation preserves all Solidity meaning. Exact revert bytes, deployment, calldata/dispatch, gas, bytecode, and full Solidity/EVM equivalence remain outside the claim. See
TRUST_ASSUMPTIONS.mdfor the precise host/compiler/importer assumptions.