Format
Each entry should include:- date
- commit or work range
- summary
- validation run
- known limitations
- next step
2026-07-03
Review Follow-up: RFC, Portfolio, and Gate State Alignment
Commit: feature commit for review follow-up documentation alignment Summary:- Reconciled the post-review assessment with the current repository state: RFC 0009/D-039 already reflect CLI M1 as landed, and D-045/Gate P0 already freeze non-primary target advancement.
- Updated the platform gap analysis so CLI and budget work no longer read as unplanned or unimplemented after RFC 0009 M1, D-040, RFC 0010, and Gate G0.
- Updated the implementation backlog so Gate G0 is treated as closed and the remaining work is correctly scoped to Gate P0 production hardening and CLI M3/M4 migration.
- This is a documentation alignment pass. It does not implement new FV-4 storage/aggregate trace obligations or change target capability ids.
- Continue P0 hardening in priority order, with the next EVM FV-4 slice focused on map/fixed-array storage obligations unless Solana live-equivalence work takes priority.
EVM Expression Assertion Executable Yul Trace Obligation
Commit: feature commit for FV-4 EVM expression/assertion executable trace obligation Summary:- Extended
ProofForge.IR.Semanticswith predicate expressions, boolean operators, casts, bitwise/shift operators, exponentiation, and assertion / assertion-equality statement execution for the focused scalar subset. - Extended
ProofForge.Backend.Evm.YulSemanticswithexp, matching the Yul emitted for EVM expression probes. - Added
expression_evm_yul_executable_trace_ok, which runsEvmExpressionProbethrough the generated selector-dispatched Yul subset and compares observable return words against the IR trace.
- This covers successful assertion/expression paths only. Revert/error traces, maps, arrays, structs, aggregate returns, and full EVM word overflow semantics are still future FV-4 slices.
- Extend executable obligations to map storage and fixed-array storage probes, then move into struct and aggregate return/state shapes.
EVM ValueVault Executable Yul Trace Obligation
Commit: feature commit for FV-4 ValueVault executable Yul trace obligation Summary:- Extended
ProofForge.IR.Semanticswith entrypoint argument binding, U32/U64sub/mul/div/mod,checkpointId, and event field evaluation as a no-op state effect. - Extended
ProofForge.Backend.Evm.YulSemanticswith calldata argument words, calldata size,number,keccak256, andlog0throughlog4execution as focused FV-4 primitives. - Added
value_vault_evm_yul_executable_trace_ok, which runs the shared ValueVault scenario through the generated selector-dispatched Yul subset and compares observable return words against the scalar IR trace.
- This is still a focused FV-4 slice, not a full EVM or libyul semantics. Event
logs are modeled as no-op after field evaluation, block number is fixed at
zero,
keccak256returns a deterministic placeholder for the non-observable log/topic paths used here, and assertions/maps/arrays/aggregates are not covered yet.
- Extend executable obligations from scalar storage to assertion, map, array, struct, and aggregate probes, then connect ValueVault user invariants to the IR semantics.
EVM Counter Executable Yul Trace Obligation
Commit: feature commit for FV-4 executable Yul trace obligation Summary:- Added
ProofForge.Backend.Evm.YulSemantics, a narrow executable model for the Counter-shaped generated Yul subset. - Covered selector calldata decoding, dispatcher
switch, internal function calls, local variables,sstore,sload, scalar arithmetic,mstore, and EVMreturnwords. - Extended
ProofForge.Backend.Evm.Refinementwithcounter_evm_yul_executable_trace_ok, which runsinitialize -> get -> increment -> getthrough the generated Yul dispatcher and compares observable return words against the scalar IR trace.
- This is still a focused FV-4 slice, not a full EVM or libyul semantics. The interpreter fails explicitly for unsupported Yul constructs and currently covers the Counter path only.
- Extend the Yul-subset interpreter and trace obligations toward ValueVault: multi-entry scalar storage behavior first, then assertions, maps, arrays, and aggregate return/state shapes.
EVM Counter Formal Trace Surface Obligation
Commit: feature commit for FV-4 EVM surface obligation Summary:- Added
ProofForge.Backend.Evm.Refinementwith aTraceObligationfor the Counterinitialize -> get -> increment -> getscenario. - Reused the scalar IR executable semantics to prove the expected observable
trace (
0then1) withnative_decide. - Added an EVM/Yul surface obligation that checks generated Yul has the selector-dispatched top-level functions required by the same trace.
- Imported the module from
ProofForge.Backend.Evm, so the theorem is checked by the existingjust buildCI path.
- This is the first FV-4 EVM anchor, not a full EVM refinement theorem. It does not yet interpret Yul storage operations or return words.
- Add a tiny Yul-subset interpreter for Counter-shaped Yul (
sstore,sload,add, selector-dispatched calls,return) and compare its observable trace against the IR trace.
Review Alignment: CLI RFC And Primary-Chain Portfolio Freeze
Commit: feature commit for review alignment Summary:- Accepted RFC 0009 as the durable target-first CLI surface and recorded that M1 has already landed through the compatibility layer; M3/M4 remain open.
- Corrected D-039 so it no longer reads as a pre-code freeze after code already exists, and added an explicit superseded-position note for that old wording.
- Tightened the target portfolio wording: current product implementation is
limited to
solana-sbpf-asm->evm->wasm-near;psy-dpn,aleo-leo, andwasm-cloudflare-workersare maintenance-only inventory until Gate P0 closes.
- This is a documentation and governance correction. It does not implement the missing end-to-end proof link between source-level invariants and generated EVM/Wasm artifacts.
- Start FV-4 as a separate implementation slice: add an EVM trace obligation patterned after the existing NEAR trace obligation, then connect it to a concrete generated Yul/bytecode fixture and CI gate.
Solana Pinocchio Live Equivalence Aggregate Gate
Commit: feature commit for Pinocchio live aggregate gate Summary:- Added
scripts/solana/pinocchio-live-equivalence.shas one aggregate entrypoint for the five ProofForge-vs-Pinocchio live dual-deploy gates. - Added
just solana-pinocchio-live-equivalenceso local and future profiled CI lanes can run the full live suite through one command. - The aggregate gate runs every child harness, summarizes pass/skip/fail counts,
fails on any real child failure, and returns skip code
2when prerequisites are missing unlessPROOF_FORGE_PINOCCHIO_LIVE_ALLOW_SKIP=1is explicitly set for a probe lane.
- This creates the suite entrypoint and strict skip semantics; it does not yet install the Solana SBF toolchain in GitHub Actions or make live dual-deploy mandatory in default CI.
- Add a profiled CI job that installs/checks Surfpool, Solana CLI,
cargo-build-sbf,sbpf, Node, and npm, then runs the aggregate live suite withoutPROOF_FORGE_PINOCCHIO_LIVE_ALLOW_SKIP.
Solana Pinocchio Live Harness Shared Helper
Commit: feature commit for Pinocchio live harness hardening Summary:- Added a shared
scripts/solana/pinocchio-live-common.shhelper for the five Pinocchio live dual-deploy harnesses. - Centralized Solana rustup/toolchain detection,
cargo-build-sbfinvocation, SBF repair hints, Pinocchio ELF discovery, skip/fail handling, and Surfpool cleanup. - Kept each harness-specific fixture, port, deployment, Web3.js scenario, and result comparison local to the existing live script.
- This hardens the live harness implementation path but does not make the live
dual-deploy gates mandatory in CI yet; that still depends on stable Solana
rustc/platform-tools, Surfpool, Solana CLI,
sbpf, Node, and npm availability in the runner.
- Add a CI/profiled live-equivalence lane once the Solana SBF toolchain install path is deterministic enough for GitHub Actions, then extend reference coverage toward Token-2022.
Gate G0 Closed
Commit: documentation sign-off commit Summary:- Closed Gate G0 in the gate ledger after recording the successful current
remote CI run for commit
0c52fb8. - Clarified that Gate G0 closes only the shared behavior/resource-budget slice; Gate P0 remains open for the production-grade Solana, EVM, and NEAR/Wasm completion covenant.
- Updated the target roadmap so Tier-1/new-chain advancement stays frozen on Gate P0, not the now-closed G0 slice.
- P0 is still open. Solana live dual-deploy equivalence, EVM semantic-plan migration, and NEAR/Wasm target-first local execution/deploy metadata sign-off remain the next production-hardening tracks.
- Continue P0 in implementation order: Solana live Pinocchio dual-deploy hardening first, then EVM semantic-plan migration, then NEAR/Wasm target-first deploy metadata sign-off.
Solana Pinocchio Reference Equivalence In CI Light Gate
Commit: feature commit for Solana Pinocchio reference equivalence Summary:- Added source-only target-first emission for the Solana ContractSpec CPI
fixtures (
system-cpi,system-create-account-cpi, SPL Token transfer, ops, and authority) so reference-equivalence checks can validate artifact ABI/CPI metadata without requiringsbpf. - Added
just solana-pinocchio-reference-equivalenceand included it injust solana-light, which is the default CI Solana gate. - Added a CLI mapping regression test for the new target-first
--format sroutes and the existing--format elfroutes. - Updated Pinocchio reference manifests with source fixture ids while keeping ELF fixture ids for live dual-deploy gates.
- This closes the CI-safe source/reference half of the Pinocchio track only.
Live dual-deploy equivalence still depends on Surfpool, Solana CLI,
sbpf, and stablecargo-build-sbf/Solana rustc platform tools.
- Continue Workstream 7 by hardening the live Pinocchio dual-deploy harnesses for reproducible local/CI toolchain installation.
ValueVault Solana Budget Baselines
Commit: feature commit for ValueVault Solana budget baselines Summary:- Added
--traceto the unified testkit runner so budget work can print the raw per-call harness lines already stored inCallOutcome.raw_line. - Fixed the EVM ValueVault testkit harness so the
CASTenvironment override is passed through toproof-forge emit --cast, matching the availability check that decides whether the EVM branch can run locally. - Fixed the target-first
proof-forge emit --target evm --fixture ... --format bytecodecompatibility mapper so it forwards--castto the legacy EVM bytecode flags instead of silently falling back tocast. - Pinned Counter
near_gasbaselines and all ValueVaultsolana_cu,evm_gas, andnear_gasbaselines in the testkit scenarios. - Updated the Gate G0 ledger to reflect the repaired remote CI baseline and the now-implemented budget acceptance criteria; formal closure still waits for the current commit’s remote CI/sign-off record.
- The testkit budget baselines are deterministic harness baselines; live-chain budget gates remain a separate Solana/Foundry hardening concern.
- Run the current commit through CI, then record Gate G0 sign-off or continue the non-blocking Tier-0 hardening items: Solana Pinocchio CI equivalence and EVM semantic-plan migration.
Unified Testkit Deploy Manifest Schema Checks
Commit: feature commit for unified testkit deploy manifest schema checks Summary:- Added
exists,kind, andnon_emptyassertions to nested[[artifact.json]]and[[artifact.toml]]checks, so scenario TOML can express presence, absence, type, and non-empty schema constraints without fixture-specific scripts. - Updated Counter and ValueVault scenarios to validate EVM deploy manifests as first-class artifacts, including init-code mode, absent chain profile, not-generated broadcast status, ABI/capability counts, and deploy manifest file references back to generated Yul, bytecode, and init-code artifacts.
- Added targeted type/non-empty checks for key EVM and Solana metadata/manifest paths that were previously only implicitly checked by equality or script validators.
kindandnon_emptyvalidate schema shape only; semantic relations across artifacts still use[[artifact.file]]and[[artifact.jsonArtifact]].
- Continue moving script-only artifact metadata validators into scenario TOML, then remove redundant script assertions once the unified testkit owns the same artifacts.
Unified Testkit Structured Length Checks
Commit: feature commit for unified testkit structured length checks Summary:- Added
lengthassertions to nested[[artifact.json]]and[[artifact.toml]]scenario checks for arrays, objects/tables, and strings. - Updated Counter and ValueVault scenarios to pin generated ABI entrypoint, event, capability, artifact, Solana manifest instruction, Solana metadata instruction, and IDL instruction counts declaratively.
- Extended the structured artifact unit test so JSON and TOML length checks are
covered in
proof-forge-testkit-core.
lengthasserts collection/string shape, not the semantic meaning of each item; per-entry checks still need explicitequalsorcontainsassertions.
- Keep migrating old schema validators into scenario TOML, then remove duplicate script-only assertions once the testkit owns the same generated artifacts.
Unified Testkit JSON Artifact Equality Checks
Commit: feature commit for unified testkit JSON artifact equality checks Summary:- Added nested
[[artifact.jsonArtifact]]scenario checks that compare a JSON value embedded in one artifact with another harness-produced JSON artifact. - Updated the Solana ValueVault scenario so metadata must embed the same IDL
JSON as the generated
idlartifact. - Moved ValueVault Solana IDL/client shape checks into scenario TOML through structured JSON assertions and text contains checks.
- JSON equality checks currently compare JSON values only; non-JSON artifacts
still use
matches_file,contains, structured TOML checks, or file-reference metadata checks.
- Continue migrating duplicate per-target schema checks into scenario-declared artifact expectations where the harness already exposes the generated files.
Unified Testkit Artifact File Metadata Checks
Commit: feature commit for unified testkit artifact file metadata checks Summary:- Added nested
[[artifact.file]]scenario checks that validate JSON metadata file entries against harness-produced artifacts by path, byte size, and SHA-256 hash. - Extended the EVM testkit harness to expose generated
init-codeanddeploy-manifestartifacts alongside Yul, bytecode, and metadata, so EVM metadata references can be asserted declaratively. - Updated Counter and ValueVault scenarios so EVM and Solana metadata now prove their generated artifact references through the shared testkit runner.
[[artifact.file]]currently validates JSON metadata entries; TOML file reference validation can be added if a target manifest needs the same path/bytes/hash relation.
- Use the shared metadata file-reference checks to retire more duplicated per-target artifact hash validation from fixture-specific scripts where the testkit already owns the generated artifacts.
Unified Testkit EVM ValueVault Golden
Commit: feature commit for unified testkit EVM ValueVault golden Summary:- Added
Examples/Evm/ValueVault.golden.yulas the reviewed Yul source snapshot for the portable ValueVault scenario. - Upgraded the
evmYul artifact intestkit/scenarios/value-vault.tomlto check full generated-file equality throughmatches_file, while retaining focused substring checks for the contract object, entrypoints, logs, and block context access. - ValueVault now has scenario-declared source equality for
wasm-nearWAT,evmYul, andsolana-sbpf-asmassembly/manifest.
- Local
just testkitskips the ValueVault EVM runtime branch unless Foundrycastor a compatibleCASToverride is available; CI covers that branch with Foundry installed.
- Move the remaining Workstream 26 M4 declarative coverage toward metadata hardening and retiring duplicate per-target script checks.
Unified Testkit Solana ValueVault Golden
Commit: feature commit for unified testkit Solana ValueVault golden Summary:- Added
Examples/Solana/ValueVault.golden.sandExamples/Solana/ValueVault.manifest.tomlas the reviewed Solana source/manifest snapshots for the portable ValueVault scenario. - Upgraded
testkit/scenarios/value-vault.tomlso thesolana-sbpf-asmassembly and manifest artifacts check full generated-file equality throughmatches_file, while retaining focused substring checks for event lowering, syscall usage, storage layout, instruction names, and argument encodings. - ValueVault now has scenario-declared source equality for
wasm-nearWAT andsolana-sbpf-asmassembly/manifest. At this point, EVM Yul remained the only ValueVault source artifact still using source-shape checks.
- At this point, ValueVault EVM Yul still used scenario-declared source-shape checks instead of complete golden equality.
- Local
just testkitskips the ValueVault EVM runtime branch when Foundrycastis unavailable; CI covers that branch with Foundry installed.
- Add a full ValueVault EVM Yul golden once selector hydration is available in the validation environment used to refresh the snapshot.
Unified Testkit Wasm ValueVault Golden
Commit: feature commit for unified testkit Wasm ValueVault golden Summary:- Added
Examples/WasmNear/ValueVault.golden.watas the portable ValueVault WAT golden for thewasm-nearEmitWat path. - Upgraded
testkit/scenarios/value-vault.tomlso itswasm-nearartifact checks full generated-source equality throughmatches_file, while keeping focused substring checks for important imports, exports, and event logging. - ValueVault now has scenario-declared Wasm/NEAR WAT source equality in the unified testkit; its EVM Yul and Solana sBPF/manifest artifacts still use source-shape checks until their full golden snapshots are reviewed.
- ValueVault EVM Yul and Solana sBPF/manifest comparisons were still scenario-declared source-shape checks instead of complete golden equality.
- Local
just testkitskips the ValueVault EVM runtime branch when Foundrycastis unavailable; CI covers that branch with Foundry installed.
- Add full ValueVault source goldens for EVM Yul and Solana sBPF/manifest once their emitted artifacts are stable enough to review as snapshots.
Unified Testkit Wasm Counter Golden
Commit: feature commit for unified testkit Wasm Counter golden Summary:- Added
Examples/WasmNear/Counter.golden.watas the portable IR Counter WAT golden for thewasm-nearEmitWat path. - Moved the
wasm-nearCounter WAT equality check intotestkit/scenarios/counter.tomlthrough a scenario-declared[[artifact]]matches_fileexpectation. - Counter now has target-source golden equality in the unified testkit for all
three priority targets:
wasm-nearWAT,evmYul, andsolana-sbpf-asmassembly plus manifest.
- ValueVault still uses scenario-declared WAT/Yul substring checks because it does not yet have committed portable-source goldens.
- Add source goldens for ValueVault once its cross-target emitted source shape is stable enough to review as a snapshot.
Unified Testkit EVM Counter Golden
Commit: feature commit for unified testkit EVM Counter golden Summary:- Added
Examples/Evm/Counter.golden.yulas the portable IR Counter Yul golden, separate from the older Lean SDK contract golden underExamples/Evm/Contracts/. - Moved the EVM Counter Yul equality check into
testkit/scenarios/counter.tomlthrough a scenario-declared[[artifact]]matches_fileexpectation. - Kept EVM runtime behavior in
testkit/harness-evm; the harness now only publishes the generatedyulartifact and the common scenario validator owns the source snapshot comparison.
- ValueVault still uses scenario-declared Yul substring checks because it does not yet have a committed portable-source golden.
- Add portable-source goldens for the remaining stable testkit fixtures, then decide which old golden-only shell checks can be retired or moved to scheduled chain-authentic gates.
Unified Testkit Unsupported Capability Diagnostics
Commit: feature commit for unified testkit diagnostic scenarios Summary:- Added
[[diagnostic]]scenario expectations so testkit can run diagnostic-only scenarios without pretending they have runtime steps. - Added
testkit/scenarios/unsupported-crosscall.toml, which asserts thatsolana-sbpf-asmrejects the portablecrosscall.invokecapability with the expected target/capability diagnostic. - Added
Tests/TestkitSolanaCapabilityDiagnostic.leanas the Lean-side diagnostic driver and wiredtestkit/harness-solanato execute it. - Updated runner target filtering and summary output so diagnostic-only
scenarios participate in
just testkitbut do not interfere with positive target runs.
- The diagnostic scenario surface currently has one Solana capability case. More target/compiler diagnostics can move in as each harness exposes a small target-owned diagnostic driver.
- Continue migrating deterministic artifact/source checks into scenario
declarations, then decide which existing standalone diagnostic smokes should
become additional
[[diagnostic]]scenarios.
Unified Testkit EVM Metadata Expectations
Commit: feature commit for unified testkit EVM metadata expectations Summary:- Added scenario-declared EVM metadata checks for Counter and ValueVault, covering target identity, artifact kind, fixture/source kind, declared capabilities, ABI entrypoint names, and bytecode-generation validation status.
- Removed the duplicated EVM harness metadata identity checks for
target/sourceKind;testkit/harness-evmnow reads metadata only for runtime selector dispatch.
- Local ValueVault EVM execution still skips when Foundry
castis not onPATH; CI covers the full path where Foundry is installed.
- Continue migrating the remaining shell-only golden/source checks that are deterministic into scenario declarations, while keeping live Foundry/Anvil deployment gates separate.
Unified Testkit Scenario Target Validation
Commit: feature commit for unified testkit scenario target validation Summary:- Tightened scenario discovery so
testkit/corerejects empty target ids, duplicate target ids, and artifact expectations that reference a target not declared in the scenario’stargetslist. - Added a negative unit test proving stale or mistyped artifact target
expectations fail during
discover_scenarios, before any target harness runs.
- This only validates scenario configuration. Harness availability still
depends on optional target tools such as
cast,sbpf, andsolana-keygen.
- Continue moving pure artifact assertions out of target harnesses and into scenario declarations until the remaining M4 shell-gate duplication is isolated to live/network-authentic smoke tests.
Unified Testkit Solana Harness Thinning
Commit: feature commit for Solana testkit artifact validation thinning Summary:- Removed duplicated Solana harness metadata and manifest semantic validators
after their checks were moved into scenario-declared
[[artifact.json]]/[[artifact.toml]]expectations. - Kept Solana harness parsing of
manifest.tomlinstruction tags because that is runtime dispatch data, not a review-only artifact expectation. - Dropped the direct
serde_jsondependency fromtestkit/harness-solana.
- The scenario still needs optional
sbpfandsolana-keygenbefore Solana artifact expectations execute. - Duplicated shell gates still exist; this only removes duplicated Solana harness-internal artifact semantics.
- Continue moving pure artifact assertions out of target harnesses and then
thin duplicated shell-only golden gates once
just testkitcovers them.
Unified Testkit Structured Artifact Assertions
Commit: feature commit for unified testkit structured artifact assertions Summary:- Extended
testkit/coreartifact expectations with nested[[artifact.json]]and[[artifact.toml]]checks. - Structured checks support dot paths plus array indexes, for example
validation.manifestGenerationandinstruction[1].tag. - Added scenario-declared structured checks for Solana Counter and ValueVault artifact metadata, manifest target/program fields, instruction names, tags, capabilities, and manifest-generation validation status.
- Kept the Solana harness runtime parsing in place for instruction dispatch and metadata loading while moving the reviewable expectations into scenario TOML.
- Structured checks currently support equality and containment for JSON/TOML
values. They do not yet provide unordered array matching or predicate filters
such as
instruction[name=deposit]. - Target harnesses still own runtime-critical parsing and some semantic validation until those checks can be represented safely in the scenario language.
- Migrate the remaining metadata/manifest semantic checks out of target harnesses where they are pure artifact expectations, then begin thinning duplicated shell-only golden gates.
Unified Testkit M4 Artifact Expectations
Commit: feature commit for unified testkit artifact expectations Summary:- Added top-level
[[artifact]]scenario expectations totestkit/core, withtarget,name,matches_file, andcontainschecks. - Wired all three harnesses to publish named artifacts back into the common
validator:
watforwasm-near,yul/bytecode/metadataforevm, andsbpf-asm/manifest/metadata/idl/clientforsolana-sbpf-asm. - Moved the Solana Counter golden assembly and manifest comparisons into
testkit/scenarios/counter.toml. - Moved ValueVault’s WAT/Yul/sBPF/manifest/metadata source-shape checks into
testkit/scenarios/value-vault.toml, reducing hardcoded per-fixture behavior in the harnesses.
- Artifact expectations currently cover whole-file equality and substring checks only. Structured JSON/TOML assertions still live in target harnesses and external validators.
- The local EVM ValueVault artifact checks run only when Foundry
castis available; CI covers that path.
- Add structured artifact assertions for metadata and manifest fields, then
migrate more of
scripts/portable/value-vault-smoke.shandscripts/solana/counter-smoke.shinto scenario-declared checks.
Unified Testkit ValueVault Scenario
Commit: feature commit for unified testkit ValueVault scenario Summary:- Added typed scalar scenario args to
testkit/core, so one TOML scenario can describe portableu64/u32/boolcall parameters while each target harness performs its own ABI encoding. - Extended
runtime/offline-hostwith--inputs-hex, allowing the deterministic NEAR/Wasm host to run a stateful call sequence whose calls use different Borsh input payloads. - Added
testkit/scenarios/value-vault.tomlcoveringinitialize -> deposit -> charge_fee -> release -> snapshotplus balance and net-value queries. - Wired ValueVault into
wasm-nearthroughTests/EmitWatValueVault.lean, intosolana-sbpf-asmthrough the existing ValueVault sBPF emitter plus Mollusk, and intoevmthrough the revm harness when Foundrycastis available for selector hydration.
- ValueVault’s EVM branch still depends on
castbecause the current Contract SDK EVM path hydrates ABI selectors through Foundry; whencastis absent, the harness reports a target skip instead of hiding the dependency. - Testkit validates call order and portable return values. Event payloads, account/log traces, gas/compute budgets, and live deployment remain in the existing target-specific gates.
- Start M4 by migrating more golden-source and artifact checks into scenario fixtures while keeping Foundry/Anvil, Surfpool, near-sandbox, dargo, and leo as chain-authentic gates.
Unified Testkit M3 Solana Harness
Commit: feature commit for unified testkit Solana harness Summary:- Added
testkit/harness-solana, backed bymollusk-svm, as the third RFC 0007 target harness for the portable Counter scenario. - The Solana harness emits Counter sBPF assembly, checks the tracked golden
assembly, validates
manifest.tomlandproof-forge-artifact.json, builds a standardsbpfELF project, and executes the statefulinitialize -> get -> increment -> getscenario through Mollusk. - Extended the testkit runner with explicit harness skip reporting so
optional chain toolchains such as
sbpf/solana-keygencan be absent without masking failures in always-available targets. - Extended
testkit/scenarios/counter.tomlso Counter now targetswasm-near,evm, andsolana-sbpf-asm, with normalized trace parity across all executed targets.
- The Solana testkit harness currently supports the portable IR Counter fixture only.
solana-sbpf-asmis skipped with a clear reason whensbpforsolana-keygenis unavailable.- This is a Mollusk in-process runtime gate, not a Surfpool/Web3 live deployment gate.
- Add the portable ValueVault scenario to the testkit and run it across the targets whose capability plans support the fixture.
Unified Testkit M2 Trace Parity
Commit: feature commit for unified testkit trace parity Summary:- Added a normalized observable trace comparison layer to
testkit/core. - The runner now executes every selected target for a scenario, validates each target’s declared expectations, then asserts cross-target parity for call order and portable return values.
- EVM ABI return words and NEAR typed host returns are compared through the scenario’s expected portable type, so target-specific hex encodings do not become false parity failures.
- Trace parity currently covers call order and return values only; scenario state reads, events, errors, and resource budgets are still follow-up schema work before testkit M3/M4.
solana-sbpf-asmis not yet wired into testkit; it remains the M3 harness.
- Add
harness-solanaon top of the existing Mollusk templates so the Counter scenario runs acrossevm,wasm-near, andsolana-sbpf-asm.
Unified Testkit M2 EVM Harness
Commit: feature commit for unified testkit EVM harness Summary:- Added
testkit/harness-evm, backed byrevm, as the second target harness for RFC 0007. - Extended
testkit/scenarios/counter.tomlso the same portable Counter scenario runs against bothwasm-nearandevm. - The EVM harness emits portable IR Counter runtime bytecode and artifact metadata, loads selectors from metadata, installs the runtime bytecode into an in-memory EVM account, and executes each scenario call as a committed EVM transaction with sequential nonces.
- The EVM harness currently covers the portable IR Counter fixture only.
- It validates scenario-level behavior through
revm; Foundry and Anvil remain the mature EVM runtime/deploy gates for broader contracts and live local chain behavior. - Cross-target comparison is still implicit through shared expectations; an explicit trace-diff layer should be added next.
- Add a target trace comparison report so
wasm-nearandevmoutcomes are compared directly for the shared scenario, then wire the first Solana/Mollusk or sBPF runner into the same testkit interface.
Unified Testkit M1 Skeleton
Commit: feature commit for unified testkit M1 skeleton Summary:- Added the RFC 0007
testkit/Rust workspace with core scenario parsing, NEAR harness wiring, and theproof-forge-testkitrunner. - Added
testkit/scenarios/counter.tomlas the first declarative scenario. - Wired
just testkit,just testkit-list, and the GitHub Actionsbuild-testjob.
- This is the M1
wasm-nearslice only. It wraps the existing deterministicruntime/offline-host; EVM/revm and Solana/Mollusk are not wired yet. - Cross-target equivalence assertions start in M2 after the EVM harness lands.
- Add
harness-evmon revm, load emitted runtime bytecode plus.evm-methods, and compare the Counter observable trace againstwasm-near.
2026-07-02
EVM StorageSlotPlan ToYul Slice
Commit: feature commit forStorageSlotPlan -> ToYul
Summary:
- Added
ProofForge.Backend.Evm.ToYulas the first plan-to-Yul module in the EVM semantic-plan migration. - Moved scalar storage slot expressions and map value/presence slot expressions
through
StorageSlotPlan -> ToYulwhile keeping the existingIR.leanfacade and generated Yul behavior stable. - Recorded the remaining EVM semantic-plan migration TODO in the implementation
backlog, including
Validate,Lower,ToYul,Metadata,EntrypointPlan,EventPlan,CrosscallPlan, andMetadataPlanstages.
- Array slots, struct-array field slots, expression plans, statement plans, entrypoint planning, events, crosscalls, and artifact metadata still need to move behind semantic plan boundaries.
ProofForge.Backend.Evm.IRremains the public compatibility facade until the migrated plan paths have complete validation coverage.
- Extend
StorageSlotPlan -> ToYulto array and struct-array slot plans, then begin extracting expression and statement planning out ofIR.lean.
Target-Driven EVM Module Plan
Commit: feature commit for EVM capability-aware module planning Summary:- Extended
ProofForge.Backend.Evm.Planwith a target-drivenModulePlanthat preserves the resolvedTarget.CapabilityPlanfor the EVM compiler target. - Moved EVM storage/helper planning behind
buildModulePlan, so the backend can consume target-resolved capabilities instead of rediscovering helper requirements directly during final Yul lowering. - Added
lowerModuleWithPlanin the EVM backend. The publiclowerModulepath now builds an EVM module plan first, then renders through the existing Yul AST path. - Extended
Tests/EvmPlan.leanto verify target id, supported and unsupported capabilities, helper requirements, storage layout, map assign-op helper requirements, and explicit rejection of a non-EVM target plan.
- ABI dispatch, event plans, crosscall plans, constructor metadata, and artifact
metadata still need to move behind
ModulePlan. - The generated Yul is intentionally unchanged in this slice.
- Move storage-path Yul expression construction to consume
StorageSlotPlandirectly, then promote ABI/event/crosscall metadata intoModulePlan.
Solana sBPF And SDK PR Merge
Commit: merge commit for PR #2 (Solana supprot)
Summary:
- Merged the Solana sBPF assembly backend work into the current EVM-focused mainline.
- Added Solana backend modules for sBPF assembly AST/printer, state layout, register allocation, syscalls, manifests, packages, and SDK extension artifacts.
- Added CLI modes for emitting Solana sBPF assembly, Solana ELF artifacts, Solana SDK assembly, and Solana-focused fixture artifacts.
- Added Solana examples, diagnostics, SDK tests, target-routing tests, and Solana smoke scripts.
- Resolved RFC numbering against the existing EVM semantic plan RFC: EVM keeps RFC 0004, Solana sBPF is RFC 0005, and the multi-chain Token SDK is RFC 0006.
- Solana Mollusk/Surfpool runtime smoke scripts remain gated on local external tools such as Mollusk, Surfpool, Node, and npm.
- The merge preserves EVM semantic-plan work; deeper integration between the new Solana SDK route and the portable multi-chain planning layer remains follow-up work.
- Run the available Solana smoke scripts on a machine with the Solana/sBPF toolchain installed, then decide which Solana surface should be promoted from research to CI-tracked baseline.
EVM Semantic Plan Storage Slice
Commit: feature commit for the first EVM semantic plan slice Summary:- Added
ProofForge.Backend.Evm.Planas the first explicit semantic planning layer between portable IR and target-specific Yul lowering. - Modeled storage layout entries, scalar storage slot plans, map value slot plans, nested map value slot plans, map presence slot plans, and helper requirements without changing generated Yul output.
- Added
Tests/EvmPlan.leanto lock scalar/map/nested-map slot planning against the existingEvmMapProbeandEvmTypedMapProbefixtures. - Added
just evm-planand a GitHub Actions step so the plan slice is checked independently before broader EVM smokes.
- The existing Yul generator still owns actual rendering; this slice creates the semantic structures and tests that later lowering can migrate onto.
- The first plan slice covers scalar slots and consecutive
mapKeypaths only. Arrays, structs, ABI dispatch, event/crosscall helpers, and artifact metadata planning remain follow-up work.
- Refactor the current EVM storage path lowering to consume plan nodes while preserving golden Yul output, then broaden the plan to arrays and flat storage structs.
EVM Nested Map Storage Paths
Commit: feature commit for EVM nested map storage paths Summary:- Extended EVM portable IR storage-path type checking so map-backed state
accepts one or more consecutive
mapKeysegments when every key expression matches the map key type. - Lowered nested map value slots by folding the existing Solidity-style
mapping helper, for example
keccak256(inner || keccak256(outer || slot)). - Lowered nested map write and compound assignment paths so the final key’s ProofForge-managed presence slot is marked alongside the value slot.
- Extended
EvmMapProbewith U64 nested map path lifecycle and dynamic-key coverage, and extendedEvmTypedMapProbewith U32 nested map path coverage plus dispatcher range-guard checks. - Kept mixed map/aggregate storage paths as explicit diagnostics rather than silently lowering partial paths.
- Nested map paths currently model EVM nested mapping slots over a single
declared
Map<K, V, N>state by using consecutive keys of the same key type. - Mixed map/array/struct aggregate paths and non-word or aggregate map key/value shapes remain explicit unsupported surfaces.
- Continue shrinking the remaining EVM storage surface around aggregate storage paths and broader ABI-facing storage-backed values.
EVM Nested Fixed-Array Event Aggregates
Commit: feature commit for EVM nested fixed-array event aggregates Summary:- Extended portable IR EVM event signature generation so nested fixed arrays are
rendered recursively as Solidity-style event types such as
uint64[2][2]and(uint64,uint64)[2][2]. - Extended event data-word lowering so nested fixed-array event fields flatten recursively into ABI-style words when their leaves are scalar words or flat structs.
- Added
EventProbeentrypoints forMatrixEvent(uint64[2][2]),PairMatrixEvent((uint64,uint64)[2][2]),IndexedMatrix(uint64[2][2],uint64), andIndexedPairMatrix((uint64,uint64)[2][2],uint64). - Tightened diagnostics so nested fixed arrays whose leaves are unsupported or non-flat still fail before Yul generation with explicit errors.
- Generated reproducible EventProbe Yul and runtime bytecode with
solc --strict-assembly. - Validated new selector/event ABI metadata through
scripts/evm/validate-artifact-metadata.py. - Foundry ran 24 EventProbe recorded-log tests, including nested scalar and nested flat-struct fixed-array data flattening plus indexed aggregate topic hashing.
- Aggregate event fields with unsupported leaves, non-flat struct leaves, or richer first-class event declarations remain explicit unsupported surfaces for portable IR EVM.
- Continue shrinking the EVM aggregate surface around remaining storage and ABI edge cases while keeping unsupported shapes diagnostic-first.
EVM Entrypoint ABI Artifact Metadata
Commit:feat: record EVM entrypoint ABI metadata
Summary:
- Portable IR EVM bytecode artifacts and deploy manifests now include
structured
abi.entrypointsmetadata for selector-facing entrypoints. - Entrypoint metadata records the Solidity-style selector signature, parameter ABI types, flattened calldata word types/counts, return ABI type, flattened return word types/counts, and preserves the original IR type names.
scripts/evm/validate-artifact-metadata.pynow validates entrypoint selectors withcast sig, whilescripts/evm/abi-aggregate-ir-smoke.shlocks aggregate calldata/return word layouts through--expect-entrypoint-abi.
- The metadata describes the current static ABI-word surface. Dynamic ABI values remain an explicit unsupported surface for portable IR EVM.
- Continue tightening metadata validation around deployment-facing manifests and expand first-class ABI schema coverage as the portable IR grows.
EVM Event ABI Artifact Metadata
Commit:feat: record EVM event ABI metadata
Summary:
- Portable IR EVM bytecode artifacts and deploy manifests now include
abi.eventsentries for emitted events. - Event metadata records the Solidity-style event signature,
topic0, indexed fields, non-indexed data fields, flattened ABI word types, and per-field topic/data encoding. scripts/evm/validate-artifact-metadata.pyvalidates event topics withcast keccak, andscripts/evm/event-ir-smoke.shnow locks all EventProbe event signatures through--expect-event.
- Event metadata is emitted for portable IR modules; richer first-class event declarations remain an explicit unsupported surface.
- Continue promoting ABI-facing metadata from smoke fixtures into a stable target manifest schema shared by EVM deployment tooling.
EVM Anvil Chain Profile Deploy-Run Validation
Commit:feat: validate Anvil chain profiles
Summary:
- Added
anvil-localas a lookup-only EVM chain profile for local Foundry Anvil deployments on chain id31337. scripts/evm/anvil-deploy-smoke.shnow regenerates Counter with--evm-chain-profile anvil-localby default when using the default Anvil chain id.proof-forge-deploy-run.jsonnow links the deploy manifest chain profile, andscripts/evm/validate-deploy-run.pyvalidates that the profile, deployment chain id, actual Anvil chain id, and creation transaction evidence agree.
anvil-localis intentionally a local validation profile; it does not imply public RPC broadcast support.
- Promote profile-aware deploy-run generation into a first-class deploy command that can consume any supported EVM chain profile.
EVM Creation Transaction Deploy-Run Artifact
Commit:feat: record EVM creation transactions
Summary:
- Anvil deploy smoke now records the
eth_getTransactionByHashcreation transaction JSON alongside thecast send --createreceipt. proof-forge-deploy-run.jsonlinks that creation transaction artifact with path, byte size, and SHA-256 metadata.scripts/evm/validate-deploy-run.pynow validates that the creation transaction hash, sender, nullto, block metadata, and initcodeinputmatch the deploy receipt and generated.init.bin.
- This records a local Anvil creation transaction and receipt, not a signed raw transaction artifact or public RPC broadcast workflow.
- Promote the deploy-run artifact shape into a first-class deploy/broadcast
command that consumes
proof-forge-deploy.json.
EVM ABI Method Signature Metadata
Commit:feat: record EVM method signatures
Summary:
- SDK
.evm-methodssidecars now preserve the original Solidity method signature inabi.methods[].signaturefor EVM artifact metadata and deploy manifests. - Manual
--method selector:fn:argc:view|updatespecs remain supported; those method entries usenullsignature metadata. - EVM metadata validators now check selector shape, duplicate method and entrypoint selectors, generated Yul function names, signature syntax, and signature/arg-count consistency.
- SDK example builds and the Anvil deploy smoke now require method signatures in metadata validation.
- The validators check selector format and method signature metadata, while the
selector derivation itself still comes from Foundry
cast sigduring compilation.
- Continue strengthening ABI-facing artifact checks and close remaining deploy/broadcast metadata gaps.
EVM Constructor Diagnostic Coverage
Commit:test: cover EVM constructor CLI diagnostics
Summary:
- Extended
scripts/evm/diagnostic-smoke.shbeyond portable IR diagnostics to cover EVM constructor artifact-boundary CLI diagnostics. - The gate now locks unsupported dynamic constructor ABI types, missing constructor values, duplicate typed values, mixed typed/raw constructor sources, integer overflow, and malformed address-width inputs.
- This turns the constructor value negative cases from one-off manual checks
into CI-tracked
just evm-diagnosticscoverage.
- Constructor value encoding is still intentionally limited to static one-word ABI types; dynamic constructor ABI values remain unsupported with explicit diagnostics.
- Continue closing the remaining EVM ABI/backend gaps, especially dynamic ABI surfaces and deploy/broadcast artifacts.
EVM Typed Constructor Value Encoding
Commit:feat: encode EVM constructor values
Summary:
- Added
--evm-constructor-arg <name=value>for EVM bytecode modes. - Typed constructor args are ABI-encoded from the declared
--evm-constructor-param <name:type>schema and supportuint256,uint64,uint32,bool,bytes32, andaddress. - Constructor arg metadata now records whether the ABI blob came from typed CLI
args or raw
--evm-constructor-args-hex. - Validators accept and can assert constructor arg source, and Anvil deploy
smoke now defaults to typed
initial=123input for Counter. - CLI validation rejects missing typed values, duplicate typed values, out-of-range integer values, and mixing typed values with raw constructor hex.
- Constructor value encoding is limited to static one-word ABI types; dynamic constructor ABI types are still unsupported.
- This still emits deployable initcode and local Anvil deploy-run artifacts, not signed transaction/broadcast artifacts for public RPC networks.
- Add first-class EVM deploy/broadcast commands that consume the deploy manifest, or continue closing remaining non-dynamic EVM backend gaps.
EVM Constructor ABI Schema Metadata
Commit:feat: record EVM constructor ABI schema
Summary:
- Added
--evm-constructor-param <name:type>for EVM bytecode modes. - Constructor params are recorded under
abi.constructor.paramsin bothproof-forge-artifact.jsonandproof-forge-deploy.jsonusing static 32-byte ABI-word metadata. - Validators now check constructor ABI schema shape, supported static-word types, expected parameters, and constructor-argument byte length.
- The Anvil deploy smoke now regenerates Counter with
--evm-constructor-param initial:uint256, recordsconstructorAbiinCounter.proof-forge-deploy-run.json, and validates it against the deploy manifest.
- ProofForge records and validates static constructor ABI schema, but does not yet parse typed constructor values or ABI-encode them from CLI inputs.
- Dynamic constructor ABI types remain out of scope for the current EVM schema slice.
- Add typed constructor value parsing/encoding or move to a first-class EVM deploy/broadcast command that consumes the deploy manifest.
Just-Based CI Command Entry
Commit: feature commit for just-based CI command entry Summary:- Kept target-specific implementation logic in
scripts/, but made the rootjustfilethe shared developer and CI command entrypoint. - Installed pinned
just1.48.0 in GitHub Actions and replaced duplicated CI command blocks with existing recipes such asjust build,just target-registry,just docs-check,just psy-golden-sources, andjust evm-smoke <fixture>. - Preserved separate GitHub Actions steps for EVM/Psy gates so CI failures stay easy to locate.
- Updated README, development standards, validation gates, and Chinese mirrors
to document the split between
justorchestration and underlying scripts.
- CI now requires
justinstallation before invoking common gate recipes. - Direct scripts remain supported because they are still the target-specific implementation surface.
- Consider grouping future target recipes by imported
justmodules if the rootjustfilebecomes hard to scan.
EVM Constructor Args Initcode Tail
Commit: feature commit for EVM constructor args initcode tail Summary:- Added
--evm-constructor-args-hex <hex>to EVM bytecode modes. - The CLI now normalizes ABI-encoded constructor args, appends them to
generated
.init.bincreation bytecode, and records the argument blob inproof-forge-deploy.jsonwith hex, byte size, SHA-256, and source metadata. - Updated EVM metadata, deploy-manifest, and deploy-run validators so they
parse the initcode header as
header + runtime + constructorArgsinstead of assuming the initcode ends at the runtime bytecode. - Extended
scripts/evm/anvil-deploy-smoke.shso CI deploys Counter initcode with a deterministic non-empty constructor-argument tail by default and records those args inCounter.proof-forge-deploy-run.json.
- No-argument SDK example builds still emit valid metadata and deploy manifests.
- Counter Anvil deploy smoke regenerated
Counter.init.binwith a 32-byte constructor argument blob (0x...007b), deployed it withcast send --create, and validated that the deployed runtime code still matchesCounter.bin. - The deploy-run artifact records the constructor args and the Counter
lifecycle still returned
0, then99,100, and99.
- Constructor args are accepted as an explicit ABI-encoded hex blob; ProofForge does not yet generate constructor ABI schemas or encode named constructor parameters from IR.
- This still validates on local Anvil, not a live public RPC broadcast.
- Add a first-class deployment command or broadcast artifact that consumes the deploy manifest, selected chain profile, private-key/wallet configuration, and constructor args without shell-script-specific glue.
EVM Anvil Deploy-Run Smoke
Commit:feat: validate EVM initcode deployment on Anvil
Summary:
- Added
scripts/evm/anvil-deploy-smoke.sh, which starts a local Anvil chain and deploys generatedCounter.init.binwithcast send --create. - The smoke records the creation transaction receipt, deployed address, local
Anvil network id, referenced deploy manifest, initcode, runtime bytecode, and
Counter lifecycle call results in
build/anvil-deploy-smoke/Counter.proof-forge-deploy-run.json. - Added
scripts/evm/validate-deploy-run.pyto validate deploy-run artifacts, including receipt status, transaction/deployer consistency, deployed runtime code hash/size, andget/set/increment/decrementJSON-RPC behavior. - Wired the new smoke into
just evm-anvil-deploy,just evm-all, and CI.
- Anvil chain id
31337started locally. Counter.init.bindeployed to0x5fbdb2315678afecb367f032d93f642f64180aa3with a successful creation receipt.- The on-chain deployed code matched
build/evm/Counter.bin. - Counter JSON-RPC lifecycle returned
0, then99,100, and99.
- This is a local Anvil deploy-run artifact, not a live public RPC broadcast.
- Constructor arguments remain empty.
- Explorer verification and wallet UX are still future work.
- Extend deploy-run generation toward chain-profile-aware live RPC deployment and constructor argument encoding, while keeping Anvil as the deterministic CI smoke.
EVM Chain Profile Deploy Metadata
Commit:feat: record EVM chain profile deploy metadata
Summary:
- Added
--evm-chain-profile <id>for EVM bytecode modes. - Resolved EVM chain profiles from the target registry and recorded the selected
profile in
proof-forge-deploy.json, including profile id, chain id, RPC URLs, native gas symbol, explorer, verifier, and notes. - Extended the deploy
deploymentblock with profile id, chain id, network name, RPC URLs, explorer/verifier metadata, and explicitbroadcastArtifact: null. - Strengthened EVM metadata/deploy validators so selected profiles must match
deployment fields and unselected profiles remain explicit
null/empty fields. - Updated
AbiScalarProbeEVM smoke to validaterobinhood-chain-testnetand chain id46630.
AbiScalarProbe.proof-forge-deploy.jsonrecordschainProfile.id: robinhood-chain-testnet,deployment.profileId: robinhood-chain-testnet, anddeployment.chainId: 46630.- Foundry ABI scalar smoke still ran 2 runtime tests successfully.
- The manifest is still a deployment plan only.
- Transaction signing, Foundry/Anvil broadcast JSON, deployed address recording, and explorer verification remain future work.
- Generate a Foundry script or broadcast-oriented artifact from the deploy manifest, then validate it against Anvil without relying on live RPC.
EVM Deploy Initcode Artifacts
Commit:feat: emit EVM deploy initcode artifacts
Summary:
- Extended every EVM bytecode build to emit a sibling
.init.bindeployable creation bytecode artifact in addition to the existing runtime.bin. - Updated
proof-forge-artifact.jsonandproof-forge-deploy.jsonso EVM metadata records the initcode artifact,creation.mode: init-code, andvalidation.initCodeGeneration: passed. - Strengthened both EVM metadata validators to parse the initcode
PUSH/CODECOPY/RETURNheader and prove it copies and returns the exact referenced runtime bytecode artifact. - Refreshed English/Chinese EVM metadata docs, validation gates, and backlog notes to distinguish deployable initcode from future transaction broadcast manifests.
AbiScalarProbegeneratedAbiScalarProbe.init.binand passed Foundry scalar ABI runtime checks.- SDK examples generated
.init.binartifacts for Counter, ArrayExample, SimpleToken, ERC20, Ownable, Pausable, and VerifiedVault; the validator accepted both small and multi-byte-length runtimes. - Foundry ran 5 runtime smoke tests, including deploying the generated Counter
.init.binthrough EVMcreateand then running the Counter lifecycle.
- Constructor arguments are still empty.
- Chain profile selection, signed/raw transaction generation, broadcast JSON, deployed address recording, and explorer verification remain future work.
- Most Foundry smoke coverage still installs runtime bytecode with
vm.etchfor fast runtime checks; Counter now also has a real initcodecreatepath.
- Continue toward real deployment manifests by adding chain-profile selection and a Foundry/Anvil broadcast artifact, or return to the remaining EVM IR unsupported surfaces such as dynamic ABI values.
EVM IR Hash Aggregate ABI Leaves
Commit:test: cover EVM hash aggregate ABI leaves
Summary:
- Extended
EvmAbiAggregateProbewithHashPairandHashfixed-array ABI entrypoints:echo_hash_pair((bytes32,bytes32)),make_hash_pair(bytes32,bytes32),pick_hash(bytes32[2]), andmake_hash_array(bytes32,bytes32). - Validated that
Hashleaves flatten as Soliditybytes32words inside flat structs and fixed arrays for ABI-facing calldata and return data. - Refreshed the
EvmAbiAggregateProbegolden Yul, selector metadata checks, Foundry ABI decode checks, coverage table, English/Chinese EVM target docs, validation gates, and backlog notes.
EvmAbiAggregateProbegenerated reproducible Yul and runtime bytecode throughsolc --strict-assembly.- Foundry ran 3 ABI aggregate tests, including
HashPaircalldata/return-data,bytes32[2]calldata/return-data, and shortbytes32[2]calldata rejection.
- Dynamic ABI values remain outside the portable IR EVM v0 surface.
- Rich ABI tuples beyond flat word aggregates remain explicit future work.
- Storage-backed aggregate ABI returns stay covered only by the fixed word-array and flat struct-array cases in the dedicated storage probes.
- Continue shrinking aggregate ABI/crosscall gaps, or decide whether richer dynamic ABI values require a portable IR extension first.
2026-07-01
EVM IR Typed Scalar Event Fields
Commit: feature commit for EVM IR typed scalar event fields Summary:- Extended
EventProbewith typed scalar event entrypoints:emit_typed_scalar_event(bool,uint32,bytes32)andemit_indexed_typed_scalar_event(bool,uint32,bytes32,uint256). - Validated
Bool,U32, andHashevent data fields and indexed topics, includingBool/U32calldata range guards before the event lowering runs. - Refreshed
EventProbegolden Yul, metadata selector checks, Foundry recorded-log checks, coverage, English/Chinese EVM target docs, validation gates, and implementation backlog notes.
EventProbegenerated reproducible Yul and runtime bytecode throughsolc --strict-assembly.- Foundry ran 20 EventProbe tests, including typed scalar data/topic checks and
malformed
Bool/U32calldata rejection.
- Indexed event fields remain limited to three fields after the signature topic.
- Nested fixed arrays, non-flat structs, and unsupported aggregate leaves remain explicit diagnostics for event fields.
- First-class event declarations are still not represented in the portable IR.
- Continue shrinking the EVM event gap around richer event declarations, or move to another unsupported EVM capability surface.
EVM IR Multi-Topic Indexed Events
Commit: feature commit for EVM IR multi-topic indexed events Summary:- Extended
EventProbewith two scalar indexed-event entrypoints:emit_two_indexed_event(uint256,uint256,uint256)andemit_three_indexed_event(uint256,uint256,uint256,uint256). - Validated that
eventEmitIndexedgenerateslog3for two indexed fields andlog4for three indexed fields, with ordered scalar topics and one non-indexed data word. - Refreshed
EventProbegolden Yul, metadata selector checks, Foundry recorded-log checks, coverage, English/Chinese EVM target docs, validation gates, and implementation backlog notes.
EventProbegenerated reproducible Yul and runtime bytecode throughsolc --strict-assembly.- Foundry ran 17 EventProbe tests, including
log3andlog4scalar indexed event coverage.
- Indexed event fields remain limited to three fields after the signature topic.
- Nested fixed arrays, non-flat structs, and unsupported aggregate leaves remain explicit diagnostics for event fields.
- First-class event declarations are still not represented in the portable IR.
- Continue shrinking the EVM event gap around richer event declarations, or move to another unsupported EVM capability surface.
EVM IR Storage-Backed Event Fixed Arrays
Commit: feature commit for EVM IR storage-backed event fixed arrays Summary:- Extended
EventProbewithstoredValuesandstoredPairsfixed storage arrays plus four entrypoints:emit_storage_array_event(uint256,uint256),emit_storage_pair_array_event(uint256,uint256,uint256,uint256),emit_indexed_storage_array_event(uint256,uint256,uint256), andemit_indexed_storage_pair_array_event(uint256,uint256,uint256,uint256,uint256). - Validated that storage array reads and storage array struct field reads can feed scalar fixed-array and fixed-array-of-flat-struct event aggregates.
- Refreshed
EventProbegolden Yul, metadata selector checks, Foundry recorded-log checks, coverage, English/Chinese EVM target docs, validation gates, and implementation backlog notes.
EventProbegenerated reproducible Yul and runtime bytecode throughsolc --strict-assembly.- Foundry ran 15 EventProbe tests, including storage-backed fixed-array data flattening and storage-backed fixed-array indexed topic hashing.
- Indexed event fields remain limited to three fields after the signature topic.
- Nested fixed arrays, non-flat structs, and unsupported aggregate leaves remain explicit diagnostics for event fields.
- First-class event declarations are still not represented in the portable IR.
- Continue shrinking the EVM event gap around richer event declarations, or move to another unsupported EVM capability surface.
EVM IR Storage-Backed Event Aggregates
Commit: feature commit for EVM IR storage-backed aggregate events Summary:- Extended
EventProbewith a flat scalar storage struct state and two entrypoints:emit_storage_pair_event(uint256,uint256)andemit_indexed_storage_pair_event(uint256,uint256,uint256). - Validated the existing storage-backed event lowering path where a whole flat
struct is written with
storageScalarWrite, read withstorageScalarRead, flattened into non-indexed event data words, or flattened and hashed into an indexed aggregate topic. - Refreshed
EventProbegolden Yul, metadata selector checks, Foundry recorded-log checks, coverage, English target docs, Chinese target docs, validation gates, and implementation backlog notes.
EventProbegenerated reproducible Yul and runtime bytecode throughsolc --strict-assembly.- Foundry ran 11 EventProbe tests, including
StoragePairEventdata flattening from storage reads andIndexedStoragePairtopic hashing from storage reads.
- Indexed event fields remain limited to three fields after the signature topic.
- Nested fixed arrays, non-flat structs, and unsupported aggregate leaves remain explicit diagnostics for event fields.
- First-class event declarations are still not represented in the portable IR.
- Continue shrinking the EVM event gap around richer event declarations, or move to another unsupported EVM capability surface.
EVM IR Indexed Aggregate Event Topics
Commit: feature commit for EVM IR indexed aggregate event topics Summary:- Extended
eventEmitIndexedlowering so supported aggregate indexed fields no longer pretend to be scalar topics. Flat structs and fixed arrays whose elements are flat structs now flatten to ABI-style 32-byte words and usekeccak256over those words as the indexed topic. - Preserved direct scalar indexed topics for
U32,U64,Bool, andHash. - Extended
EventProbewithemit_indexed_pair_event,emit_indexed_array_event, andemit_indexed_pair_array_event, coveringIndexedPair((uint64,uint64),uint64)andIndexedArray(uint64[2],uint64)andIndexedPairArray((uint64,uint64)[2],uint64). - Replaced the old flat-aggregate indexed diagnostic with a nested aggregate indexed diagnostic, so unsupported event shapes still fail explicitly instead of lowering partially.
- Refreshed golden Yul, artifact metadata selector checks, Foundry recorded-log checks, EVM diagnostics, coverage, English target docs, Chinese target docs, and implementation backlog notes.
EventProbegenerated reproducible Yul and runtime bytecode throughsolc --strict-assembly.- Foundry ran 9 EventProbe tests, including scalar indexed topics, flat struct indexed topic hashes, scalar fixed-array indexed topic hashes, fixed-array-of-flat-struct indexed topic hashes, aggregate data flattening, selector dispatch, and unknown-selector revert behavior.
- Indexed event fields remain limited to three fields after the signature topic.
- Nested fixed arrays, non-flat structs, and unsupported aggregate leaves remain explicit diagnostics for event fields.
- First-class event declarations are still not represented in the portable IR.
- Continue shrinking the EVM event gap around richer event declarations, or move to the next uncovered EVM capability surface.
EVM IR Nested Local Struct Arrays
Commit: feature commit for EVM IR nested local struct arrays Summary:- Extended portable IR EVM local fixed-array lowering so nested fixed arrays can
use flat struct leaves, expanding every nested element field into
deterministic Yul locals such as
grid[1][0].age. - Added static and dynamic nested struct field reads through nested local-array
getter helpers, plus nested mutable field assignment and numeric compound
assignment through bounds-checked
switchlowering. - Added nested whole-local assignment from another local array and from self-referential nested array literals, preserving RHS snapshot semantics.
- Extended
EvmStructArrayValueProbewithnested_struct_array_sum,nested_struct_array_dynamic_pick,nested_struct_array_update,nested_struct_array_whole_assign, andnested_struct_array_self_assign. - Refreshed golden Yul, artifact metadata selector checks, Foundry smoke tests, EVM coverage manifest entries, English target docs, Chinese target docs, and implementation backlog notes.
EvmStructArrayValueProbegenerated reproducible Yul and runtime bytecode throughsolc --strict-assembly.- Foundry ran 14 StructArrayValueProbe tests, including nested flat-struct field reads, nested field mutation, nested whole assignment, RHS snapshotting, dynamic out-of-bounds reverts, and unknown-selector revert behavior.
- Nested local fixed arrays are still limited to scalar word leaves or flat struct leaves. Non-flat struct leaves and other unsupported aggregate leaves remain explicit diagnostics.
- Continue shrinking the EVM aggregate gap around unsupported nested aggregate leaves, richer event schemas, or broader cross-call return data.
EVM IR Nested Struct Crosscall Fixed Arrays
Commit: feature commit for EVM IR nested struct crosscall arrays Summary:- Extended typed crosscall aggregate word-shape validation so nested fixed
arrays can use flat struct leaves such as
RemotePair[2][2], while non-flat struct leaves still fail with explicit diagnostics. - Added
EvmCrosscallProbeentrypoints forRemotePair[2][2]arguments and direct entrypoint returns across normal, value-bearing, static, and delegate typed calls. - Refreshed
EvmCrosscallProbe.golden.yul, metadata selector expectations, and the Foundry smoke harness withPair[2][2]callee helpers. - Updated the EVM coverage manifest and target/validation docs to distinguish supported flat struct leaves from unsupported non-flat struct leaves.
EvmCrosscallProbegenerated reproducible Yul and runtime bytecode throughsolc --strict-assembly.- Foundry ran 73 CrosscallProbe tests, including nested fixed-array flat-struct arguments and returns in normal, value-bearing, static, and delegate modes.
- Dynamic ABI values, nested local fixed-array mutation beyond the current local-array surface, nested crosscall fixed arrays with non-flat or unsupported leaves, and variable-length return data remain future EVM IR work.
- Continue shrinking the EVM aggregate gap around dynamic ABI data, richer cross-call return data, or unsupported nested aggregate leaves.
EVM IR Storage-Backed Aggregate ABI Returns
Commit: feature commit for EVM IR storage-backed aggregate ABI returns Summary:- Extended
EvmStorageArrayProbewithreturn_values(), which writes U64 storage-array elements, reads them back throughstorageArrayRead, and encodes those reads as a fixed-array ABI return. - Extended
EvmStorageStructProbewithreturn_points(), which writes fields in a fixed storage array of flat structs, reads them back throughstorageArrayStructFieldRead, and encodes those reads as a fixed-array-of-struct ABI return. - Refreshed both storage probe golden Yul snapshots and metadata selector expectations.
- Added Foundry ABI decoding checks for
uint256[3]andPoint[2]returns, while still validating the raw storage slots withvm.load.
EvmStorageArrayProbegenerated reproducible Yul and runtime bytecode, and Foundry ran 7 tests including the new storage-backed fixed-array return.EvmStorageStructProbegenerated reproducible Yul and runtime bytecode, and Foundry ran 12 tests including the new storage-backed fixed-array-of-struct return.
- This covers fixed-size word arrays and fixed arrays of flat structs assembled from storage reads. Dynamic ABI values, richer storage-backed aggregate shapes, and variable-length return data remain future EVM IR work.
- Continue shrinking the EVM ABI/storage gap around dynamic ABI data, richer aggregate storage shapes, or return data that cannot be represented as a static word sequence.
EVM IR Nested Crosscall Fixed Arrays
Commit:fb0828b (feat: support nested EVM crosscall arrays)
Summary:
- Extended typed crosscall aggregate lowering so nested scalar fixed arrays such
as
Array<Array<U64,2>,2>flatten to ABI words for normal, value-bearing, static, and delegate typed calls. - Added
EvmCrosscallProbeentrypoints for nested scalar fixed-array arguments and direct entrypoint returns across all four call modes. - At this milestone, kept nested fixed arrays with struct or other non-scalar leaves as explicit unsupported diagnostics; flat struct leaves were covered by a later follow-up.
- Refreshed
EvmCrosscallProbe.golden.yul, metadata selector expectations, and the Foundry smoke harness withuint64[2][2]callee helpers.
EvmCrosscallProbegenerated reproducible Yul and runtime bytecode throughsolc --strict-assembly.- Foundry ran 65 CrosscallProbe tests, including nested scalar fixed-array arguments and returns in normal, value-bearing, static, and delegate modes.
- GitHub Actions run
28514575022passed onmain.
- Dynamic ABI values, nested local fixed-array mutation beyond the current local-array surface, nested crosscall fixed arrays with non-flat or unsupported leaves, and variable-length return data remain future EVM IR work.
- Continue shrinking the EVM aggregate gap around dynamic ABI data, storage backed aggregate ABI surfaces, or richer cross-call return data.
EVM IR Nested Fixed-Array ABI
Commit: feature commit for EVM IR nested fixed-array ABI Summary:- Extended EVM ABI word flattening for entrypoint parameters and returns from
flat fixed arrays to nested scalar fixed arrays such as
Array<Array<U64,2>,2>. - Added deterministic flattened Yul local names for nested ABI array words and
static nested index reads such as
matrix[0][1]. - Extended
EvmAbiAggregateProbewithsum_matrix,make_matrix, andsum_small_matrixentrypoints covering nestedU64/U32ABI calldata, return-data encoding, and range guards. - Kept typed crosscall nested aggregate arrays explicitly unsupported with crosscall-specific diagnostics instead of silently inheriting ABI entrypoint support.
EvmAbiAggregateProbegenerated reproducible Yul and runtime bytecode throughsolc --strict-assembly.- Foundry validated nested fixed-array parameters, nested fixed-array returns,
malformed nested calldata length checks, and nested
U32range guards. - EVM diagnostics now keep zero-length arrays, non-flat struct fields, nested crosscall aggregate arrays, and malformed crosscall surfaces explicit.
- Nested fixed-array support is currently ABI-entrypoint focused.
- Dynamic ABI values, nested local fixed-array mutation, nested crosscall aggregate arrays, and variable-length return data remain future EVM IR work.
- Continue shrinking the EVM aggregate gap around nested crosscall aggregates or dynamic ABI data.
EVM IR Contract Creation
Commit: feature commit for EVM IR contract creation Summary:- Added portable IR
crosscallCreateandcrosscallCreate2expressions for EVM contract creation from fixed init-code hex. - Lowered creation expressions to deterministic Yul helpers that write init
code into memory, call
create(value, offset, length)orcreate2(value, offset, length, salt), revert on zero-address failure, and return the deployed address word. - Extended
EvmCrosscallProbewithdeploy_createanddeploy_create2entrypoints using tiny init code that deploys a runtime returning U25642. - Kept non-EVM target behavior explicit by adding Psy unsupported diagnostics for both creation expressions.
EvmCrosscallProbegenerated reproducible Yul and runtime bytecode throughsolc --strict-assembly.- Foundry ran 57 CrosscallProbe tests, including
createdeployment, deterministiccreate2address validation, and calls into the deployed runtime. - EVM diagnostics now cover bad creation value type, malformed init-code hex,
and bad
create2salt type; Psy diagnostics cover unsupported creation nodes.
- Creation init code is currently embedded as fixed hex in the IR expression.
- Dynamic constructor arguments, artifact-linked init code, creation manifests, live transaction broadcasting, and variable-length cross-call return data remain future EVM IR work.
- Continue closing EVM call-surface gaps around artifact-linked creation or variable-length ABI data.
EVM IR Struct-Array Crosscall Aggregates
Commit: feature commit for EVM IR struct-array crosscall aggregates Summary:- Extended the existing typed crosscall aggregate path to fixed arrays of flat structs.
- Added
EvmCrosscallProbeentrypoints for fixed-array-of-flat-struct typed arguments and direct aggregate returns across normal, value-bearing, static, and delegate call modes. - Reused the ABI-static flattening policy:
RemotePair[2]lowers to four ABI words, preserving Bool and U32 return guards for every decoded element field. - Refreshed golden Yul, artifact metadata entrypoint expectations, Foundry callee fixtures, and coverage/target validation docs.
EvmCrosscallProbegenerated reproducible Yul and runtime bytecode throughsolc --strict-assembly.- Foundry ran 55 CrosscallProbe tests, including fixed-array-of-flat-struct arguments and returns in normal/value/static/delegate modes.
- Metadata validation now checks all new struct-array crosscall selectors.
- Aggregate crosscall arguments and returns remain limited to ABI-static flat shapes.
- Nested dynamic arrays, variable-length return data, and artifact-linked creation remain future EVM IR work.
- Continue closing the remaining EVM call-surface gaps around artifact-linked creation or variable-length ABI data.
EVM IR Aggregate Crosscall Arguments
Commit: feature commit for EVM IR aggregate crosscall arguments Summary:- Extended typed crosscall argument lowering beyond scalar words for normal, value-bearing, static, and delegate typed calls.
- Reused the EVM ABI flattening rules for flat struct and scalar fixed-array arguments, so helper arity now reflects the ABI word count rather than the surface IR argument count.
- Made crosscall helper discovery type-env aware, allowing let-bound local structs and fixed arrays to request the correct generated helper.
- Extended
EvmCrosscallProbewith normal struct and fixed-array arguments, value-bearing struct arguments, static struct arguments, and delegate struct arguments. - Kept nested aggregate crosscall argument shapes as explicit unsupported diagnostics.
EvmCrosscallProbegenerated reproducible Yul and runtime bytecode throughsolc --strict-assembly.- Foundry ran 35 CrosscallProbe tests, including aggregate argument calldata packing for normal/value/static/delegate typed calls.
- EVM diagnostics ran 55 cases, including nested aggregate argument rejection.
- Aggregate crosscall arguments are limited to ABI-static flat structs and scalar fixed arrays.
- Value-bearing, static, and delegate typed crosscalls still return scalar words only.
- Contract creation and variable-length return data remain future work.
- Continue closing EVM call-surface gaps around aggregate returns for value/static/delegate calls or contract creation manifests.
EVM IR Aggregate Crosscall Returns
Commit: feature commit for EVM IR aggregate crosscall returns Summary:- Extended normal
crosscallInvokeTypedreturns beyond scalar words when the expression is returned directly from an ABI-facing entrypoint. - Lowered flat struct and scalar fixed-array crosscall return data through
arity- and ABI-word-shape-specific Yul helpers such as
__proof_forge_crosscall_0_abi_bool_u32, assigning multiple helper results directly to the entrypoint’s ABI return words. - Preserved scalar behavior for value-bearing, static, and delegate typed crosscalls, and kept unsupported nested aggregate return shapes as explicit diagnostics.
- Extended
EvmCrosscallProbewithcall_remote_pairandcall_remote_array, refreshed golden Yul, metadata selector checks, Foundry aggregate struct/array return tests, malformed Bool/U32 aggregate return guard tests, coverage manifests, validation gates, target docs, backlog, and Chinese docs.
- Aggregate crosscall support is limited to normal typed calls returned directly from entrypoints.
- Aggregate crosscall arguments, value/static/delegate aggregate returns, nested aggregate return data, contract creation, and variable-length return data remain future EVM IR work.
- Continue shrinking EVM cross-call gaps around aggregate arguments, value/static/delegate aggregate returns, or create/create2.
EVM IR Typed Delegatecalls
Commit: feature commit for EVM IR typed delegatecalls Summary:- Added portable IR
crosscallInvokeDelegateTypedfor EVM delegate calls that return one scalar word. - Lowered delegate calls to arity- and return-type-specific Yul helpers using
delegatecall(gas(), target, ...), sharing selector packing, scalar-word argument encoding, short-return checks, and Bool/U32 return guards with the other crosscall helper modes. - Kept delegate semantics explicit across backends: Psy IR v0 rejects delegate typed crosscalls with a stable unsupported diagnostic.
- Extended
EvmCrosscallProbewith U64/Bool/U32/Hash delegate entrypoints, refreshed golden Yul, Foundry caller-storage read/write checks, typed-return guard checks, metadata selector checks, EVM/Psy diagnostics, coverage manifests, target docs, validation gates, backlog, and Chinese docs.
- Delegate crosscalls are currently limited to scalar word arguments and one
scalar word return (
U32,U64,Bool, orHash). - Contract creation, aggregate crosscall arguments/returns, and variable-length return data remain future EVM IR work.
- Continue shrinking EVM cross-call gaps around create/create2 or aggregate calldata/return-data.
EVM IR Typed Staticcalls
Commit: feature commit for EVM IR typed staticcalls Summary:- Added portable IR
crosscallInvokeStaticTypedfor read-only EVM cross-contract calls that return one scalar word. - Lowered typed static calls to arity- and return-type-specific Yul helpers
using
staticcall(gas(), target, ...), sharing selector packing, scalar-word argument encoding, short-return checks, and Bool/U32 return guards with the existing call helpers. - Kept target semantics explicit across backends: Psy IR v0 rejects static
typed crosscalls with a stable unsupported diagnostic rather than silently
lowering them to the existing Felt-returning
__invoke_syncform. - Extended
EvmCrosscallProbewithcall_remote_staticplus Bool/U32/Hash static typed variants, refreshed golden Yul, Foundry read-only return, typed-return guard, and static-context state-write failure checks, metadata selector checks, EVM/Psy diagnostics, coverage manifests, target docs, validation gates, backlog, and Chinese docs.
- Static crosscalls are currently limited to scalar word arguments and one
scalar word return (
U32,U64,Bool, orHash). delegatecall, contract creation, aggregate crosscall arguments/returns, and variable-length return data remain future EVM IR work.
- Continue shrinking EVM cross-call gaps around
delegatecall, create/create2, aggregate calldata/return-data, or richer artifact metadata for deployment.
EVM IR Aggregate Event Data
Commit: feature commit for EVM IR aggregate event data Summary:- Extended EVM
eventEmit/eventEmitIndexedlowering so non-indexed event data fields can be scalar words, flat structs, scalar fixed arrays, or fixed arrays of flat structs. - Added canonical Solidity-style event signature generation for flat aggregate
event fields, including
PairEvent((uint64,uint64)),ArrayEvent(uint64[2]), andPairArrayEvent((uint64,uint64)[2]). - Flattened aggregate event data into ABI-style 32-byte words before
log1throughlog4, preserving scalar indexed topics foreventEmitIndexed. - At the time of this entry, aggregate indexed fields still failed with a diagnostic instead of lowering. That limitation is resolved by the later “EVM IR Indexed Aggregate Event Topics” entry for flat supported aggregates.
- Extended
EventProbewithemit_pair_event,emit_array_event, andemit_pair_array_event, refreshed golden Yul, Foundry recorded-log checks, metadata selector checks, EVM diagnostics, coverage, target docs, validation gates, backlog, and Chinese docs.
- At the time of this entry, indexed event fields were scalar-only (
U32,U64,Bool, orHash) and limited to three indexed fields after the signature topic. Flat supported aggregate indexed fields are covered by the later “EVM IR Indexed Aggregate Event Topics” entry. - Richer first-class event declarations are still not represented in the portable IR.
- Continue shrinking EVM gaps around richer cross-call return data,
staticcall/delegatecall/creation call kinds, nested aggregate lowering, or real creation/broadcast manifests.
EVM IR Indexed Event Topics
Commit: feature commit for EVM IR indexed events Summary:- Added portable IR
eventEmitIndexedfor EVM-style events with scalar indexed fields and non-indexed data fields. - Lowered indexed events to Yul
log2/log3/log4: topic0 is the Solidity-style event signature hash, indexed fields become topics, and non-indexed fields remain ABI-style 32-byte data words. - Kept indexed events explicit on non-EVM targets: Psy IR v0 rejects the new node with a diagnostic instead of silently dropping topic semantics.
- Extended
EventProbewithemit_indexed_event, refreshed golden Yul, Foundry recorded-log checks, metadata selector checks, EVM/Psy diagnostics, coverage manifests, target docs, validation gates, backlog, capability registry entries, and Chinese docs.
- Indexed event fields are limited to scalar EVM word values (
U32,U64,Bool, orHash) and at most three indexed fields after the signature topic. - Aggregate event payloads and richer event declarations remain future work.
- Continue shrinking EVM gaps around aggregate event payloads, richer cross-call return data, contract-creation call kinds, or nested aggregate lowering.
EVM IR Solidity-Style Event Signatures
Commit: feature commit for EVM IR event signature topics Summary:- Changed portable IR
eventEmittopic0 derivation from the raw event-name hash tokeccak256(Solidity-style event signature). - Added EVM ABI type names for supported event scalar fields:
U32 -> uint32,U64 -> uint64,Bool -> bool, andHash -> bytes32. - Reworked the Yul event topic preimage writer to pack arbitrary-length UTF-8 signature strings into memory before hashing, removing the old 32-byte event name packing limit.
- Updated
EventProbegolden Yul, Foundry recorded-log assertion, coverage manifest, EVM target docs, validation gates, backlog, and Chinese docs.
- Portable IR event payload fields remain limited to scalar word values:
U32,U64,Bool, orHash. - Richer event declarations are still not represented in the portable IR.
- Continue shrinking event gaps around aggregate event payloads or richer event declarations, or move to another EVM surface such as richer cross-call return data or nested aggregate lowering.
EVM IR Whole Storage Struct Read/Write
Commit: feature commit for EVM IR whole storage struct read/write Summary:- Allowed
storageScalarReadandstorageScalarWriteto operate on flat scalar storage structs by expanding the struct into declaration-ordered EVM field slots. - Added aggregate-only lowering for struct storage reads: struct local
bindings, struct field access, whole local struct assignment, and struct
returns can consume
storageScalarReadwithout treating the struct as a single EVM word. - Lowered whole scalar storage struct writes from local structs, struct literals, and storage struct reads with RHS field snapshotting before writing target slots.
- Extended
EvmStorageStructProbewith whole write/read-into-local, direct ABI struct return from storage, and self-referential storage write snapshot coverage. - Refreshed golden Yul, artifact metadata entrypoint checks, Foundry smoke tests, diagnostics, coverage manifest, target docs, validation gates, backlog, and Chinese docs.
- Whole storage struct operations are limited to flat scalar storage structs
whose fields lower to EVM words (
U32,U64,Bool, orHash). - Nested struct fields, non-flat struct storage, nested arrays, and dynamic or nested aggregate ABI values remain explicit diagnostics or documented gaps.
- Continue shrinking the EVM aggregate unsupported surface around nested local aggregate shapes, broader storage-backed aggregate ABI values, richer cross-call return data, or event schema fidelity.
EVM IR Struct Array Whole Local Assignment
Commit: feature commit for EVM IR struct-array whole local assignment Summary:- Allowed
assign (.local name) valuefor mutable local fixed arrays whose element type is a flat struct. - Lowered whole local struct-array assignment from another local struct array or a struct-array literal by snapshotting every RHS element field into temporary Yul locals before writing the expanded target fields.
- Extended
EvmStructArrayValueProbewithwhole_struct_array_assign()andself_struct_array_assign()to validate local-source assignment and self-referential literal RHS snapshot semantics. - Refreshed the golden Yul, artifact metadata entrypoint checks, Foundry smoke harness, EVM coverage manifest, target docs, validation gates, backlog, and Chinese docs.
- Struct-array whole assignment is limited to fixed arrays whose element type is
a flat struct over EVM word fields (
U32,U64,Bool, orHash). - Nested arrays, nested local structs, whole-struct storage reads/writes, and dynamic or nested aggregate ABI values remain explicit diagnostics.
- Continue shrinking the remaining EVM aggregate unsupported surface, likely around nested aggregate locals, richer cross-call return data, or event schema fidelity.
EVM IR Storage Map Contains
Commit: feature commit for EVM IR storage map contains Summary:- Lowered
storage.map.containsfor EVM portable IR through ProofForge-managed presence slots instead of treating nonzero map values as presence. - Added
__proof_forge_map_presence_slot(slot, key), rooted atkeccak256(slot || PROOF_FORGE_MAP_PRESENCE), while preserving the existing Solidity-style value slotkeccak256(key || slot). - Updated map insert/set, map statement writes, and map storage-path compound assignment helpers to mark key presence whenever ProofForge writes a map key.
- Extended
EvmMapProbewith U64 contains coverage, including a zero-valued present key, and extendedEvmTypedMapProbewith U32/Bool/Hash contains entrypoints. - Updated diagnostics so statement-position
storage.map.containsfails with an expression-only diagnostic instead of an unsupported-capability error.
- Presence tracks keys written through ProofForge-generated map helpers; raw external storage mutation outside those helpers can still bypass the presence mapping.
- Nested map paths and aggregate/non-word map key/value shapes remain explicit diagnostics.
- Continue shrinking the remaining EVM aggregate unsupported surface, likely around nested aggregate locals, richer event schemas, or broader cross-call return data.
EVM IR Whole Local Aggregate Assignment
Commit: feature commit for EVM IR whole local aggregate assignment Summary:- Allowed
assign (.local name) valuefor mutable local fixed-array and flat local struct values. - Lowered whole local fixed-array assignment from another local fixed-array or a fixed-array literal by snapshotting RHS element words into temporary Yul locals before assigning expanded target elements.
- Lowered whole local struct assignment from another local struct or a struct literal by snapshotting RHS field words into temporary Yul locals before assigning expanded target fields.
- Extended
EvmArrayValueProbewithwhole_array_assign()andEvmStructValueProbewithwhole_struct_assign()to validate local-source assignment and self-referential literal RHS snapshot semantics. - Updated EVM diagnostics, coverage manifests, target docs, validation gates, backlog, and Chinese docs to remove the stale whole-local-aggregate assignment limitation.
- Whole local aggregate assignment is limited to flat fixed-array and flat struct locals whose elements/fields lower to EVM words.
- Nested arrays, nested local structs, and whole-struct storage reads/writes remain explicit diagnostics.
- Dynamic or nested aggregate ABI values remain out of scope for the current flat ABI lowering.
- Continue shrinking the EVM aggregate unsupported surface around nested aggregate locals, richer cross-call return data, or event schema fidelity.
EVM IR Dynamic Local Fixed-Array Indexes
Commit: feature commit for EVM IR dynamic local fixed-array indexing Summary:- Threaded the EVM IR lowering environment through expression, effect, aggregate binding, return, and statement lowering so local aggregate shape is available during code generation.
- Added dynamic
arrayGetlowering for local fixed-array values and fixed-array literals using length-specific Yul getter helpers with default revert cases. - Added dynamic mutable local fixed-array element assignment and numeric
compound assignment lowering with Yul
switchblocks over expanded local elements. - Extended
EvmArrayValueProbewithdynamic_pick(uint256)anddynamic_update(uint256), refreshed golden Yul, metadata entrypoint validation, and Foundry assertions for in-bounds values and out-of-bounds reverts. - Updated EVM diagnostics, coverage manifests, target docs, validation gates, backlog, and Chinese docs to remove the stale dynamic-local-index limitation.
- Dynamic fixed-array indexing is limited to local fixed-array values and fixed-array literals whose elements lower to EVM words.
- Whole local aggregate assignment is handled by the later “EVM IR Whole Local Aggregate Assignment” entry.
- Nested arrays, nested local structs, and whole-struct storage reads/writes remain explicit diagnostics.
- Dynamic or nested aggregate ABI values remain out of scope for the current flat ABI lowering.
- Continue shrinking the EVM aggregate unsupported surface, most likely around nested aggregate locals or richer cross-call return data.
EVM Deploy Manifest Metadata
Commit: feature commit for EVM deploy manifest metadata Summary:- Extended EVM bytecode modes to emit a ProofForge EVM deploy manifest next to
each
proof-forge-artifact.jsonmetadata file. - The manifest records source kind/module, portable IR version when present,
capabilities, ABI entrypoints or SDK methods, Yul/source inputs, runtime
bytecode hash/size, and
creation.mode: runtime-bytecode. - EVM artifact metadata now records the deploy manifest artifact and requires
validation.deployManifest: passed. - Added a standalone
scripts/evm/validate-deploy-manifest.pyvalidator and extendedscripts/evm/validate-artifact-metadata.pyto validate the referenced deploy manifest against metadata. - Updated EVM target docs, validation gates, backlog, and Chinese docs to distinguish ProofForge runtime-bytecode manifests from future broadcast or creation-transaction manifests.
- The deploy manifest describes runtime bytecode deployment inputs only.
- It does not yet generate constructor initcode, Foundry broadcast JSON, chain id, deployed address, or a signed/raw transaction.
- Foundry smokes still install runtime bytecode with
vm.etch.
- Either extend EVM manifests toward creation/broadcast artifacts, or continue shrinking the remaining EVM IR unsupported surface around dynamic aggregates and richer cross-call returns.
EVM IR Mutable Local Aggregates
Commit: feature commit for EVM IR mutable local aggregate lowering Summary:- Extended EVM IR lowering for local fixed-array and flat struct values from immutable-only bindings to mutable aggregate locals.
- Added static local fixed-array element assignment and numeric compound assignment over expanded Yul locals.
- Added static local struct field assignment and numeric compound assignment over expanded Yul locals.
- Extended
EvmArrayValueProbeandEvmStructValueProbewith mutableU64/U32/Bool/Hashwrite paths, metadata entrypoint validation, refreshed golden Yul, and Foundry runtime assertions. - Updated EVM diagnostics so immutable aggregate element/field assignment still fails explicitly while mutable aggregate locals now lower successfully.
- Updated EVM coverage, target docs, validation gates, backlog, and Chinese docs to remove stale mutable-local aggregate limitations.
- Dynamic local fixed-array indexing is handled by the later “EVM IR Dynamic Local Fixed-Array Indexes” entry.
- Whole local aggregate assignment remains an explicit diagnostic; update elements or fields directly for now.
- Nested arrays, nested local structs, and whole-struct storage reads/writes remain explicit diagnostics.
- Continue shrinking the EVM aggregate unsupported surface around nested aggregate locals or richer cross-call return data.
EVM IR Scalar Expression Probe
Commit: feature commit for EVM IR scalar expression validation Summary:- Added
ProofForge.IR.Examples.EvmExpressionProbeto validate scalar expression lowering directly, separate from storage or assignment side effects. - Covered
U64andU32arithmetic (add,sub,mul,div,mod),U64exponentiation,U64/U32bitwise operators and shifts, predicates, booleanand/or/not, scalar literals, immutable local reads, supportedU32/U64/Boolcasts, one-word scalar returns, and assertion guards. - Added CLI emission modes, golden Yul, Foundry smoke coverage, artifact metadata validation, and CI.
- Updated EVM coverage, target docs, validation gates, backlog, and Chinese docs so the scalar expression family now has runtime validation evidence instead of only structural lowering notes.
- EVM arithmetic still follows raw EVM word semantics; checked overflow, signed arithmetic, and target-specific numeric policies remain future design work.
- Aggregate expression behavior remains covered by the array, struct, and ABI probes rather than this scalar expression probe.
- Continue converting remaining
loweredcoverage rows into validated probes or explicit diagnostics, especially around target-specific artifact/deploy surfaces and any residual statement/effect validation gaps.
EVM IR Typed Storage Maps
Commit: feature commit for EVM IR typed storage maps Summary:- Generalized portable EVM storage maps from
Map<U64, U64, N>to word key/value maps overU32,U64,Bool, andHash. - Reused the existing Solidity-style
keccak256(key, slot)mapping slot helper for all supported word map shapes, preserving one declared storage slot per map state. - Added
ProofForge.IR.Examples.EvmTypedMapProbe, CLI emission modes, golden Yul, Foundry smoke coverage, artifact metadata validation, and CI. - Covered ABI dispatcher guards for
U32andBoolmap parameters, expression-position previous-value returns, statement-position writes,Hash/bytes32map values, raw mapping slots, and single-segmentmapKeystorage-path read/write/compound assignment. - Updated EVM diagnostics, coverage, target docs, validation gates, and Chinese
docs so unsupported map diagnostics now target non-word map shapes while
storage.map.containsremains explicitly unsupported.
- EVM storage maps still support only single-word key/value shapes. Aggregate, nested, dynamic, or non-word map key/value shapes remain explicit diagnostics.
storage.map.containsremains unsupported because EVM mappings do not track key presence without an auxiliary bitmap.- Nested map storage paths remain unsupported;
mapKeypaths are currently single-segment only.
- Continue reducing the remaining EVM IR unsupported surface, likely around richer ABI/cross-call surfaces or target-specific deployment artifacts, with the same golden Yul, metadata, Foundry, diagnostics, and CI pattern.
EVM IR Typed Storage Words
Commit: feature commit for EVM IR typed storage word arrays Summary:- Generalized portable EVM storage arrays from
U64-only arrays to word-scalar arrays overU32,U64,Bool, andHash. - Enabled
Boolscalar storage in the portable EVM backend; scalar storage still rejects unsupported non-word shapes explicitly. - Reused the existing contiguous
__proof_forge_array_slot(base, length, index)helper for typed word arrays, preserving runtime out-of-bounds checks and deterministic slot layout. - Added
ProofForge.IR.Examples.EvmTypedStorageProbe, CLI emission modes, golden Yul, Foundry smoke coverage, artifact metadata validation, and CI. - Updated EVM diagnostics, coverage, target docs, validation gates, and Chinese
docs so
Unitstorage remains the explicit unsupported case whileBool/U32/Hashstorage arrays are validated behavior.
- Typed storage arrays are still fixed-size word arrays. Nested arrays, dynamic storage arrays, and non-word storage elements remain future work.
- Continue reducing the remaining EVM IR unsupported surface, likely either richer map shapes or the next ABI/control/cross-call gap, with the same golden Yul, metadata, Foundry, diagnostics, and CI pattern.
EVM IR Flat Storage Structs
Commit: feature commit for EVM IR flat storage struct lowering Summary:- Added EVM portable IR lowering for flat scalar storage structs and fixed
storage arrays of flat structs. Scalar storage structs reserve one slot per
field; struct arrays reserve
length * field_countslots. - Added direct lowering for
storageStructFieldRead/WriteandstorageArrayStructFieldRead/Write, plus generic storage paths using scalarfieldand arrayindex+fieldsegments. - Added the
__proof_forge_struct_array_slotYul helper with runtime out-of-bounds checks and deterministicbase + index * field_count + field_offsetslot derivation. - Added
ProofForge.IR.Examples.EvmStorageStructProbe, CLI emission modes, golden Yul, Foundry smoke coverage, artifact metadata validation, and CI. - Updated EVM diagnostics and coverage so whole-struct storage reads/writes and missing fields fail explicitly before Yul generation.
- Storage struct support is flat and field-based only. Whole-struct storage reads/writes, nested struct fields, map values shaped as structs, and dynamic storage arrays remain explicit future work.
- Continue EVM portable IR support toward richer storage element types or the next unsupported ABI/control surface, keeping the same golden Yul, metadata, Foundry, diagnostics, and CI pattern.
EVM IR Flat Aggregate ABI
Commit: feature commit for EVM IR flat aggregate ABI lowering Summary:- Added EVM portable IR ABI flattening for flat static fixed-array and struct parameters. Fixed arrays lower to one calldata word per element, and structs lower to fields in declaration order.
- Added dispatcher range guards for
U32andBoolwords inside aggregate ABI parameters. - Added multi-word return-data lowering for flat fixed-array and struct return values, including local fixed-array returns and struct literal returns.
- Added
ProofForge.IR.Examples.EvmAbiAggregateProbe, CLI emission modes, golden Yul, Foundry smoke coverage, artifact metadata validation, and CI. - Updated EVM diagnostics so Unit ABI values, zero-length ABI arrays, and nested aggregate ABI values fail explicitly before Yul generation.
- Aggregate ABI support is flat/static only. Nested aggregate ABI values, dynamic arrays, storage structs, mutable local structs, and struct arrays remain future work.
- Continue the EVM backend toward storage struct layout or richer ABI/event schemas, using the same fixture, golden, metadata, Foundry, and CI pattern.
CI ContextProbe Target Split
Commit: bugfix commit for CI fixture isolation Summary:- Split
ContextProbetarget usage so the shared Psy fixture keeps only target-portable context reads. - Added
ProofForge.IR.Examples.EvmContextProbefor EVM-onlynativeValuecoverage while preserving the existingContextProbeYul object name, selectors, golden Yul, and Foundry smoke behavior. - Updated EVM context CLI emission to use the EVM-specific fixture, while
--emit-context-ir-psycontinues to use the Psy-compatible fixture. - Fixed the GitHub Actions failure where the Psy golden source step attempted
to lower
nativeValue, which Psy IR v0 intentionally rejects. - Made
scripts/evm/build-examples.shexplicitly buildProofForge.Evmbefore compiling SDK examples so clean CI environments have the SDK.oleanneeded by the Lean frontend.
- Psy still rejects
nativeValueby design; EVM owns the currentcallvalue()lowering and runtime validation.
- Re-run GitHub Actions on
mainand continue the EVM aggregate ABI work after CI is green.
EVM IR Local Struct Values
Commit: feature commit for EVM IR local struct values Summary:- Added EVM portable IR lowering for flat immutable local struct values by expanding each supported field into an internal Yul local.
- Added direct field-access lowering for local struct values and struct
literals over
U64,U32,Bool, andHashfields. - Registered partial
data.structsupport in the EVM target profile and metadata capability flow. - Added explicit diagnostics for struct storage, mutable local structs, nested struct fields, ABI-facing structs, duplicate/empty struct declarations, and unsupported field shapes.
- Added
ProofForge.IR.Examples.EvmStructValueProbe, CLI emission modes, golden Yul, Foundry smoke coverage, artifact metadata validation, and CI.
- This feature supports flat immutable local struct values only. Mutable local structs, nested structs, storage structs, struct arrays, ABI structs, and struct assignment paths remain future work.
- Continue EVM aggregate coverage toward ABI aggregate values or storage struct layout once the target-specific EVM ABI/storage policy is specified.
EVM IR Local Fixed-Array Values
Commit: feature commit for EVM IR local fixed-array values Summary:- Added EVM portable IR lowering for immutable local fixed-array values by expanding each array element into an internal Yul local.
- Added static
arrayGetlowering for local fixed-array values and direct fixed-array literals overU64,U32,Bool, andHashelements. - Added explicit diagnostics for mutable fixed-array locals, dynamic local fixed-array indexes, and static out-of-bounds indexes.
- Added
ProofForge.IR.Examples.EvmArrayValueProbe, CLI emission modes, golden Yul, Foundry smoke coverage, artifact metadata validation, and CI.
- This feature supports immutable local fixed-array values with static indexes.
Dynamic local indexes, mutable local arrays, nested arrays, aggregate ABI
arrays, and storage arrays beyond the existing
U64path remain future work.
- Continue EVM aggregate coverage toward structs or ABI aggregate values, using the same fixture/golden/smoke/metadata pattern.
EVM IR Array Index Storage Paths
Commit: feature commit for EVM IR array index storage paths Summary:- Added EVM portable IR lowering for single-segment
StoragePathSegment.indexpaths overU64fixed storage arrays. - Reused
__proof_forge_array_slot(base, length, index)for genericstoragePathRead,storagePathWrite, andstoragePathAssignOpso direct array effects and storage paths share bounds-checking behavior. - Extended
EvmStorageArrayProbewithpath_lifecycle()andpath_assign_lifecycle(). - Extended
scripts/evm/storage-array-ir-smoke.shto validate path read, write, compound assignment, metadata selectors, and raw storage slots. - Kept nested index paths, struct paths, and non-
U64arrays explicitly rejected.
- This feature supports exactly one
indexpath segment overU64storage arrays. Nested array paths, struct fields, local fixed-array values, and aggregate ABI arrays remain future work.
- Move from storage-array paths toward local fixed-array values or flat structs, depending on which aggregate surface is needed first.
EVM IR U64 Storage Arrays
Commit: feature commit for EVM IR U64 storage array lowering Summary:- Added EVM target-profile support for
storage.arrayand partialdata.fixed_array. - Added state-slot span accounting so fixed storage arrays reserve one EVM storage slot per element and later state starts after the full array span.
- Added portable IR lowering for
storageArrayReadandstorageArrayWriteoverU64storage arrays. - Lowered array access through
__proof_forge_array_slot(base, length, index), which reverts when the runtime index is out of bounds beforesloadorsstore. - Added
ProofForge.IR.Examples.EvmStorageArrayProbe, CLI emission modes, golden Yul, Foundry smoke coverage, artifact metadata validation, and CI. - Kept local fixed-array values, aggregate ABI arrays, generic index storage
paths, structs, and non-
U64storage arrays explicitly rejected.
- This feature covers
U64storage arrays only.U32,Hash,Bool, struct arrays, local fixed-array values, ABI arrays, and generic index storage paths remain follow-up work.
- Extend EVM aggregate support toward local fixed-array values or generic index storage paths, then move into structs once the array layout is stable.
EVM IR Native Value
Commit: feature commit for EVM IR native value lowering Summary:- Added EVM portable IR lowering for expression-position
nativeValueas Yulcallvalue(). - Extended
ProofForge.IR.Examples.ContextProbewithnative_value()and selector0xf0eba40f. - Extended
scripts/evm/context-ir-smoke.shso Foundry callsnative_value()with attached value and verifies the returned word. - Updated EVM artifact metadata validation to require
value.nativeand thenative_value:f0eba40fentrypoint. - Moved
Expr.nativeValueinTests/EvmCoverage.tsvfrom unsupported to validated and removed the old unsupported diagnostic case.
nativeValueis exposed as the raw EVM call value word. Higher-level native asset accounting remains a target/runtime policy layer above this IR node.
- Continue expanding EVM portable IR coverage one small capability at a time, with fixture, smoke, coverage, docs, commit, and push for each feature.
EVM IR Map Path Compound Assignment
Commit: feature commit for EVM IR map path compound assignment Summary:- Added EVM portable IR lowering for statement-position
storagePathAssignOpon single-segmentmapKeypaths overMap<U64, U64, N>. - Lowered map path compound assignment through generated Yul helpers named
__proof_forge_map_assign_<op>. - Kept mapping slot calculation inside the helper so the key expression is
evaluated once and the computed storage slot is reused for
sloadandsstore. - Added type validation so storage path compound assignment requires matching numeric path/value types.
- Kept nested map paths, array paths, and struct paths explicitly rejected until those storage layouts are implemented.
- Extended
ProofForge.IR.Examples.EvmMapProbewithpath_assign_lifecycle(), updatedExamples/Evm/EvmMapProbe.golden.yul, and extendedscripts/evm/map-ir-smoke.sh. - Updated EVM diagnostics, coverage manifest, EVM target docs, validation gates, backlog, and Chinese docs.
- Generated EvmMapProbe Yul includes selector dispatch for
path_assign_lifecycle()and map assign helpers for allAssignOpvariants. - Foundry verifies
path_assign_lifecycle()returns58, the raw mapping slot for key3003is58, and existing map get/set/path behavior still passes. - EVM artifact metadata records and validates
storage.scalar,storage.map, andassertions.check. - Diagnostics reject expression-position
storagePathAssignOpand nested storage-path compound assignment.
- EVM IR storage path compound assignment supported only a single
mapKeyoverMap<U64, U64, N>. - Array index paths, struct field paths, nested paths, and non-
U64map shapes remained explicit diagnostics.
- Continue EVM portable IR support toward storage arrays, structs, aggregate ABI values, or checked arithmetic semantics.
EVM IR Compound Assignment
Commit: feature commit for EVM IR compound assignment Summary:- Added EVM portable IR lowering for
Statement.assignOpon mutable localU32/U64bindings. - Added EVM portable IR lowering for statement-position
storageScalarAssignOpon numeric scalar storage. - Lowered arithmetic/bitwise compound assignment to Yul
add/sub/mul/div/mod/and/or/xor, and lowered shifts with EVM operand order throughshl(shift, value)andshr(shift, value). - Added type validation so compound assignment requires matching
U32orU64operands, mutable local targets, and scalar numeric storage targets. - Kept aggregate assignment targets and storage path compound assignment
outside this local/scalar feature; the following map path entry closes the
single-segment
mapKeysubset. - Added
ProofForge.IR.Examples.EvmAssignOpProbe,--emit-evm-assign-op-ir-yul,--emit-evm-assign-op-ir-bytecode,Examples/Evm/EvmAssignOpProbe.golden.yul, andscripts/evm/assign-op-ir-smoke.sh. - Updated EVM diagnostics, coverage manifest, CI, EVM target docs, validation gates, backlog, and Chinese docs.
- Generated EvmAssignOpProbe Yul includes selector dispatch, local compound
assignment, scalar storage
sstore(slot, op(sload(slot), value)), and U32 ABI range guards. - Foundry verifies
compound_assignment(uint256)returns58, raw storage slot0is58,compound_u32(uint32)returns11, and unknown selectors revert. - EVM artifact metadata records and validates
storage.scalar. - Diagnostics reject non-local compound assignment targets, non-numeric compound operands, and expression-position scalar storage compound assignment.
- EVM IR compound assignment in this entry supports only mutable local scalars and scalar storage; aggregate locals remain out of scope.
- Operations use raw EVM word semantics and do not add checked-overflow behavior.
- Continue EVM portable IR support toward storage arrays, structs, aggregate ABI values, or storage-path compound updates.
EVM IR Bounded Loops
Commit: feature commit for EVM IR bounded loops Summary:- Added EVM target support for
control.bounded_loop. - Added EVM portable IR lowering for statement-position
boundedFor. - Lowered bounded loops to Yul
forloops with a staticletindex prelude,lt(index, stopExclusive)condition, andindex := add(index, 1)post block. - Added type validation for loop bodies with the loop index available as an
immutable
U32local. - Added explicit diagnostics for invalid loop ranges and loop-local returns.
- Added
ProofForge.IR.Examples.EvmLoopProbe,--emit-evm-loop-ir-yul,--emit-evm-loop-ir-bytecode,Examples/Evm/EvmLoopProbe.golden.yul, andscripts/evm/loop-ir-smoke.sh. - Updated EVM diagnostics, coverage manifest, CI, EVM target docs, validation gates, backlog, and Chinese docs.
- Generated EvmLoopProbe Yul includes selector dispatch and a Yul
forloop that increments scalar storage three times. - Foundry verifies the returned value and raw storage slot are both
3, plus unknown-selector revert behavior. - EVM artifact metadata records and validates
control.bounded_loop. - Diagnostics reject invalid bounded-loop ranges and loop-local returns.
- EVM IR bounded loops currently require static natural-number bounds from the portable IR node.
- Loop-local
return,break, andcontinueare not modeled yet.
- Continue expanding EVM portable IR support for aggregate values, storage arrays, structs, or compound assignment.
EVM IR Crosscalls
Commit: feature commit for EVM IR crosscalls Summary:- Added EVM portable IR lowering for expression-position
crosscallInvoke. - Defined the EVM IR v0 crosscall policy: target is an address word, method is a low-32-bit selector, arguments are 32-byte words, the call uses zero ETH value, and the result is one 32-byte return word.
- Added arity-specific Yul helpers that pack calldata, call
call(gas(), target, 0, ...), revert on failed calls or short returns, and decode the returned word. - Added type validation so crosscall target, method, and every argument must be
U64. - Added
ProofForge.IR.Examples.EvmCrosscallProbe,--emit-evm-crosscall-ir-yul,--emit-evm-crosscall-ir-bytecode,Examples/Evm/EvmCrosscallProbe.golden.yul, andscripts/evm/crosscall-ir-smoke.sh. - Updated EVM diagnostics, coverage manifest, CI, EVM target docs, validation gates, backlog, and Chinese docs.
- Generated EvmCrosscallProbe Yul includes selector dispatch, calldata size guards, zero/one/two-argument crosscall helpers, failed-call reverts, short-return reverts, and one-word return decoding.
- Foundry verifies a Solidity callee for zero/one/two argument calls, callee reverts, short returns, and unknown-selector reverts.
- EVM artifact metadata records and validates
crosscall.invoke. - Diagnostics reject malformed crosscall target, method, and argument types.
- This first crosscall slice modeled only synchronous zero-value
call. - Later slices below add typed scalar returns and value-bearing typed scalar
calls;
staticcall,delegatecall, create/create2, aggregate arguments/returns, and variable-length return data remain future IR work.
- Continue expanding the EVM portable IR surface toward typed scalar returns, aggregate ABI values, arrays, structs, or richer call semantics.
EVM IR Typed Scalar Crosscalls
Commit: feature commit for EVM IR typed scalar crosscalls Summary:- Added portable IR
crosscallInvokeTypedas a typed scalar-word crosscall expression while preserving the existingcrosscallInvokeU64 behavior and helper names. - Extended EVM lowering so typed crosscalls accept
Bool,U32,U64, andHashword arguments and returnBool,U32,U64, orHash. - Generated return-type-specific Yul helpers such as
__proof_forge_crosscall_1_bool,__proof_forge_crosscall_1_u32, and__proof_forge_crosscall_1_hash; Bool and U32 helpers reject out-of-range return words afterreturndatacopy. - Extended
EvmCrosscallProbewithcall_remote_bool,call_remote_u32, andcall_remote_hash, plus Foundry callee methods for valid typed returns and malformed Bool/U32 return words. - Added explicit EVM diagnostics for unsupported typed crosscall aggregate
arguments/returns and an explicit Psy diagnostic because Psy IR v0 still only
supports untyped Felt-returning
crosscallInvoke. - Updated golden Yul, EVM/Psy coverage manifests, validation gates, EVM target docs, backlog, and Chinese docs.
- Generated EvmCrosscallProbe Yul includes selector dispatch for the typed entrypoints, Bool/U32 calldata guards, typed crosscall helper names, and Bool/U32 return-data guards.
- Foundry verifies U64 zero/one/two-argument calls, Bool/U32/Hash typed return calls, callee reverts, short returns, invalid Bool/U32 return words, and unknown-selector reverts.
- EVM artifact metadata validates all six CrosscallProbe entrypoints and
records
crosscall.invoke. - Diagnostics reject unsupported typed crosscall aggregate arguments/returns, while Psy rejects typed crosscalls explicitly instead of silently lowering them as Felt calls.
- Portable IR EVM crosscalls still model only synchronous
call. - Aggregate arguments/returns, multi-word return data,
staticcall,delegatecall, and create/create2 remain future IR work.
- Continue closing EVM backend gaps around richer call semantics, ABI aggregate storage-backed surfaces, and unsupported-node diagnostics.
EVM IR Value-Bearing Typed Crosscalls
Commit: feature commit for EVM IR value-bearing typed crosscalls Summary:- Added portable IR
crosscallInvokeValueTypedfor synchronous EVM calls that forward an explicitU64call-value expression while returning a typed scalar word. - Extended EVM lowering with value-specific Yul helpers named like
__proof_forge_crosscall_value_0; these helpers keep the same selector and calldata packing as scalar crosscalls but passcall_valueinto the EVMcall(gas(), target, call_value, ...)value slot. - Extended
EvmCrosscallProbewithcall_remote_value, implemented using.nativeValueso the entrypoint forwards the ETH received by the probe to a payable callee. - Added Foundry coverage that calls the probe with value, asserts the payable
callee receives
msg.value, checks the callee balance, and verifies the probe does not retain the forwarded value. - Added explicit EVM diagnostics for malformed call-value type and unsupported aggregate return type, plus an explicit Psy unsupported diagnostic for value-bearing typed crosscalls.
- Updated golden Yul, coverage manifests, validation gates, EVM target docs, backlog, and Chinese docs.
EvmCrosscallProbenow has seven metadata-validated entrypoints, includingcall_remote_value:365f4a44.- Generated Yul includes
__proof_forge_crosscall_value_0(target, selector, call_value)and passes the helper value parameter to thecallopcode. - Foundry verifies 12 crosscall runtime paths, including ETH forwarding through
probe.call{value: 1234}to a payable callee. - EVM and Psy diagnostics cover the new portable IR node instead of relying on missing-pattern or silent lowering behavior.
- Value-bearing crosscalls are currently limited to synchronous EVM
calland single scalar-word return data. staticcall,delegatecall, create/create2, aggregate arguments/returns, and multi-word or variable-length return data remain future IR work.
- Continue closing EVM cross-contract gaps around richer call kinds and richer return-data encoding.
EVM IR Events
Commit: feature commit for EVM IR events Summary:- Added EVM portable IR lowering for statement-position
eventEmit. - Defined the EVM IR v0 event policy:
topic0 = keccak256(Solidity-style event signature)and log data is the sequence of 32-byte field words. - Added event name and field validation: event names must be non-empty; event
fields must be
U32,U64,Bool, orHash; event emission remains statement-only. - Added
--emit-evm-event-ir-yul,--emit-evm-event-ir-bytecode,Examples/Evm/EventProbe.golden.yul, andscripts/evm/event-ir-smoke.sh. - Updated EVM diagnostics, coverage manifest, CI, EVM target docs, validation gates, backlog, and Chinese docs.
- Generated EventProbe Yul includes selector dispatch, calldata size guards,
event signature hashing, field data writes, and
log1(0, 32, topic0). - Foundry verifies recorded logs for emitter address, topic0, decoded data, and unknown-selector reverts.
- EVM artifact metadata records and validates
events.emit. - Diagnostics reject expression-position events and malformed event names.
- Event data fields are limited to scalar word values.
- Indexed fields are now covered by
eventEmitIndexed; aggregate event payloads and richer event declarations remain future work.
- Extend aggregate event payloads or richer event declarations, or start cross-contract call lowering for the EVM portable IR backend.
EVM IR Hash Words
Commit: feature commit for EVM IR hash words Summary:- Added EVM portable IR lowering for
Hashas a one-word EVMbytes32representation across locals, ABI parameters, ABI returns, and scalar storage. - Added
hash4literal packing and dynamichashValuepacking from fourU64limbs into one 256-bit word. - Added Yul helper lowering for
hashandhash_two_to_oneusingkeccak256(0, 32)andkeccak256(0, 64). - Added lightweight EVM IR type validation for the currently supported scalar and Hash subset so Hash/U64 mismatches fail before Yul generation.
- Added
ProofForge.IR.Examples.EvmHashProbe,--emit-evm-hash-ir-yul,--emit-evm-hash-ir-bytecode,Examples/Evm/EvmHashProbe.golden.yul, andscripts/evm/hash-ir-smoke.sh. - Updated EVM diagnostics, coverage manifest, CI, EVM target docs, validation gates, backlog, and Chinese docs.
- Generated EvmHashProbe Yul includes selector dispatch, ABI calldata size
guards, Hash literal packing, dynamic Hash packing,
keccak256helpers, Hash scalar storage reads/writes, and one-word return encoding. - Foundry verifies
bytes32ABI params/returns, single-word and pair hashing, dynamic packing, Hash scalar storage, raw slot reads throughvm.load, and unknown-selector reverts. - EVM artifact metadata records and validates
crypto.hashandstorage.scalar. - Diagnostics now treat Hash as supported in the EVM scalar subset and reject malformed Hash/U64 usage with explicit type mismatch messages.
- EVM portable IR Hash currently uses a target-specific one-word
bytes32representation; Psy still uses four Felt limbs. - Hash map key/value shapes are still unsupported; EVM map support remains
limited to
Map<U64, U64, N>. - Aggregate hashing inputs, arrays, structs, and events remain future work.
- Extend EVM maps to additional scalar key/value shapes, or add event emission lowering with indexed topic/data metadata.
EVM IR Storage Maps
Commit: feature commit for EVM IR storage maps Summary:- Added EVM portable IR lowering for
Map<U64, U64, N>storage state. - Added Solidity-style mapping slot helpers:
mstore(0, key),mstore(32, slot),keccak256(0, 64). - Added EVM lowering for
storageMapGet,storageMapInsert, andstorageMapSet; expression-position set/insert return the previous value. - Added single-segment
storagePathRead/storagePathWritesupport for.mapKeypaths overMap<U64, U64, N>. - Kept
storageMapContainsexplicitly unsupported because EVM mappings do not track key presence without an auxiliary bitmap. - Added
ProofForge.IR.Examples.EvmMapProbe,--emit-evm-map-ir-yul,--emit-evm-map-ir-bytecode,Examples/Evm/EvmMapProbe.golden.yul, andscripts/evm/map-ir-smoke.sh. - Updated EVM diagnostics, coverage manifest, CI, EVM target docs, validation gates, backlog, and Chinese docs.
- Generated EvmMapProbe Yul includes selector dispatch, scalar ABI calldata
guards, map helper functions, map get/set/insert calls, assertion guards, and
keccak256(0, 64)slot hashing. - Foundry verifies lifecycle behavior, parameterized read/write behavior,
single-segment
mapKeystorage paths, unknown-selector reverts, and raw mapping slots withvm.load. - EVM artifact metadata records and validates
storage.scalar,storage.map, andassertions.check. - Diagnostics reject unsupported Hash map shapes,
storage.map.contains, and malformed map storage paths.
- EVM portable IR map support is currently limited to
Map<U64, U64, N>. storage.map.containsremains unsupported until the IR models an EVM presence bitmap or a different target-specific presence policy.- Nested map/struct/array storage paths are still rejected.
- Extend maps to more scalar key/value shapes, or add EVM
crypto.hashlowering with a clear Keccak-vs-portable-Hash semantic boundary.
EVM IR Context Reads
Commit: feature commit for EVM IR context reads Summary:- Added EVM portable IR lowering for
contextReadexpressions:userId -> caller(),contractId -> address(), andcheckpointId -> number(). - Added an EVM selector to
ContextProbewhile preserving the existing Psy context fixture. - Added
--emit-context-ir-yuland--emit-context-ir-bytecodeCLI modes. - Added
Examples/Evm/ContextProbe.golden.yulplusscripts/evm/context-ir-smoke.sh. - Updated EVM capability metadata so
ContextProbevalidatescaller.sender,account.explicit, andenv.block. - Updated EVM diagnostics, coverage manifest, CI, target docs, validation gates, backlog, and capability registry docs.
- Generated ContextProbe Yul contains selector dispatch for
sum_context(uint256,uint256), ABI calldata size guarding, and direct EVM context opcodes. - Foundry verifies
caller()viavm.prank,number()viavm.roll, andaddress()via an etched runtime address. - EVM artifact metadata records and validates the three context capabilities.
- Statement-position context reads remain rejected with an explicit diagnostic.
- The current portable
ContextFieldset covers only user id, contract id, and checkpoint id. - EVM context values are emitted as 256-bit words; address-width and narrower integer normalization are still future type-validation work.
- Add EVM
crypto.hashlowering with a clear Keccak-vs-portable-Hash semantic boundary, or start EVM storage map slot hashing.
EVM Artifact Metadata
Commit: feature commit for EVM artifact metadata Summary:- Added EVM
proof-forge-artifact.jsonemission toproof-forgebytecode-producing modes, covering both--evm-bytecodeSDK builds and portable IR EVM bytecode fixtures. - Added
--artifact-outputto override the metadata path; without an override, bytecode modes writeproof-forge-artifact.jsonnext to the bytecode output. - Added metadata fields for schema version, target id/family, artifact kind,
source kind/module, portable IR version, capability ids, selector-facing ABI,
solcpath/version, Yul/bytecode/source artifact hashes and byte sizes, and validation status. - Added
scripts/evm/validate-artifact-metadata.pyfor machine validation of EVM metadata files. - Updated EVM IR smoke scripts and
scripts/evm/build-examples.shso generated metadata is validated in CI. - Updated EVM target docs, validation gates, backlog, portable IR docs, and Chinese docs.
- SDK EVM bytecode builds emit validated metadata with source, Yul, bytecode,
method selectors, and
solcvalidation status. - Portable IR EVM bytecode builds emit validated metadata with fixture name,
source module,
irVersion: portable-ir-v0, capability ids, ABI selectors, Yul/bytecode hashes, and validation status. - Each EVM IR smoke now writes a fixture-specific metadata file to avoid parallel-run overwrite races.
scripts/evm/build-examples.shvalidates metadata for every SDK example with a sibling.evm-methodsfile.
- EVM metadata is still build metadata, not a full deploy manifest.
capabilitiesare populated for portable IR fixtures; SDK builds currently record method metadata but not inferred SDK capability ids.
- Add EVM context or hashing lowering as the next isolated capability slice, or turn metadata into a unified target manifest when more targets share the schema.
EVM IR Conditionals
Commit: feature commit for EVM IR conditionals Summary:- Added
control.conditionalto the EVM target profile. - Extended
ProofForge.Backend.Evm.IRto lower portable IRif/elseinto Yulswitch condition case 0 { else } default { then }blocks. - Kept branch-local
returnstatements explicitly rejected because EVM IRreturncurrently assigns the generated function result and does not yet emit Yulleavefor early return semantics. - Added an EVM selector to
ConditionalProbewhile preserving Psy output. - Added
--emit-conditional-ir-yuland--emit-conditional-ir-bytecodeCLI modes. - Added
Examples/Evm/ConditionalProbe.golden.yulandscripts/evm/conditional-ir-smoke.sh, then wired the smoke into CI. - Updated EVM diagnostics, coverage manifest, capability registry, validation docs, EVM target docs, and Chinese documentation.
- Generated ConditionalProbe Yul matches the checked-in golden fixture and
contains Yul
switchblocks for both then and else paths. - Psy ConditionalProbe output remains unchanged after adding target-specific selector metadata.
scripts/evm/conditional-ir-smoke.shcompiles ConditionalProbe to bytecode and passes Foundry tests for the expected conditional lifecycle result and unknown-selector revert behavior.- EVM diagnostics now cover the remaining conditional boundary: branch-local return statements.
- Conditional branch early returns are not supported until EVM IR return
lowering grows Yul
leave. - The EVM IR backend still has minimal expression type validation.
- Add EVM artifact metadata or scalar context/hash lowering as the next isolated feature slice.
EVM IR Local Assignment
Commit: feature commit for EVM IR local assignment Summary:- Treated the capability-complete EVM backend prompt as an incremental validation contract: every portable IR node must either gain a positive EVM fixture or retain a documented diagnostic.
- Extended
ProofForge.Backend.Evm.IRso mutable scalar local bindings lower to Yulletdeclarations. - Extended EVM IR assignment lowering for local targets as Yul
:=assignments, while keeping non-local assignment targets and compound assignment statements explicitly rejected. - Added
ProofForge.IR.Examples.AssignmentProbewithreassignment(uint256), covering mutableU64andBoollocals plus a bool guard that depends on assignment. - Added
--emit-assignment-ir-yuland--emit-assignment-ir-bytecodeCLI modes. - Added
Examples/Evm/AssignmentProbe.golden.yulandscripts/evm/assignment-ir-smoke.sh, then wired the smoke into CI. - Updated EVM diagnostics, coverage manifest, validation docs, and the EVM target docs.
- Generated AssignmentProbe Yul matches the checked-in golden fixture and
contains
let total := seed,total := add(total, 7), andmatched := eq(total, 12). scripts/evm/assignment-ir-smoke.shcompiles AssignmentProbe to bytecode and passes Foundry tests for the successful assignment path and the bool-guard revert path.- EVM diagnostics now cover the remaining assignment boundaries: non-local assignment targets and compound assignment statements.
- Local assignment support is scalar-only (
U32,U64,Bool). - Compound assignment, aggregate assignment paths, storage assignment paths, and artifact metadata remain separate EVM work items.
- Add EVM IR statement-level conditional lowering or EVM artifact metadata as the next isolated feature slice.
EVM IR Assertions
Commit: feature commit for EVM IR assertions Summary:- Added
assertions.checkto the EVM target profile and capability registry. - Extended
ProofForge.Backend.Evm.IRto lower portable IRassertintoif iszero(condition) { revert(0, 0) }. - Extended EVM IR
assertEqlowering intoif iszero(eq(lhs, rhs)) { revert(0, 0) }. - Added an EVM selector to
AssertProbewhile preserving Psy’s selector-ignore behavior. - Added
--emit-assert-ir-yuland--emit-assert-ir-bytecodeCLI modes. - Added
Examples/Evm/AssertProbe.golden.yulandscripts/evm/assert-ir-smoke.sh, then wired the smoke into CI. - Updated EVM diagnostics and coverage manifest to treat assertions as lowered instead of unsupported.
- Generated EVM AssertProbe Yul matches the checked-in golden fixture.
- Psy AssertProbe output remains unchanged after adding target-specific selector metadata.
scripts/evm/assert-ir-smoke.shcompiles AssertProbe to bytecode and passes Foundry tests for both successful assertion execution and assertion-failure revert behavior.- Existing EVM ABI scalar, IR Counter, SDK example build, and Foundry smoke gates still pass.
- EVM assertions currently revert with empty revert data.
- Expression type validation is still minimal in the EVM IR backend.
- Add EVM IR statement-level assignment or conditional lowering so larger portable IR fixtures can move from unsupported diagnostics to Foundry-backed positive coverage.
EVM IR Scalar ABI Parameters
Commit: feature commit for EVM IR scalar ABI parameters Summary:- Added
ProofForge.IR.Examples.AbiScalarProbewithmix(uint256,uint32,bool)andsame(uint256,uint256)portable IR entrypoints. - Extended
ProofForge.Backend.Evm.IRsoU64,U32, andBoolentrypoint parameters lower to Yul function parameters and dispatchercalldataloadarguments. - Added dispatcher ABI guards for short calldata, out-of-range
uint32values, and invalidboolencodings. - Added CLI modes:
--emit-abi-scalar-ir-yuland--emit-abi-scalar-ir-bytecode. - Added
Examples/Evm/AbiScalarProbe.golden.yulandscripts/evm/abi-scalar-ir-smoke.sh, then wired the smoke into CI. - Updated EVM diagnostics to reject only non-scalar ABI parameter types instead of rejecting every parameterized entrypoint.
- Generated Yul includes selector dispatch for
mixandsame, calldata size guards,uint32range validation, andboolencoding validation. scripts/evm/abi-scalar-ir-smoke.shcompiles the fixture to bytecode, verifies the golden Yul snapshot, and passes Foundry tests for valid calls and malformed calldata reverts.- EVM diagnostic smoke passes after replacing the obsolete all-parameter rejection with Unit/Hash ABI parameter diagnostics.
- Existing EVM SDK examples still build and the Foundry smoke suite passes all four tests.
- This only covers scalar word ABI parameters and one-word returns.
- Aggregate ABI values, dynamic data, events, and artifact metadata remain pending.
- Add the next EVM IR positive fixture for either assertions/reverts or statement-level assignment before expanding storage layout.
EVM IR Coverage And Diagnostics Baseline
Commit: feature commit for EVM IR coverage and diagnostics Summary:- Added
Tests/EvmCoverage.tsv, tracking every portable IR constructor aslowered,validated,unsupported, orstructuralfor the current EVM IR backend. - Added
scripts/evm/check-ir-coverage-manifest.pyso new portable IR nodes must be classified for EVM before CI passes. - Added
Tests/EvmDiagnostics.leanandscripts/evm/diagnostic-smoke.sh, covering explicit diagnostics for missing selectors, unsupported ABI parameters, missing returns, unsupported aggregate/control/storage/context surfaces, events, crosscalls, native value, and Hash expressions. - Fixed the EVM IR backend to reject non-Unit entrypoints that do not end with
a return statement instead of emitting an unassigned
result. - Wired the new EVM diagnostic and coverage gates into CI.
scripts/evm/diagnostic-smoke.shpasses 25 diagnostic cases.scripts/evm/check-ir-coverage-manifest.pyconfirms 91 portable IR constructor entries matchProofForge/IR/Contract.lean.- The EVM IR Counter smoke still compiles to bytecode and passes Foundry.
- The existing EVM SDK examples still build and the Foundry smoke suite passes all four tests.
- This feature does not expand EVM lowering support; unsupported surfaces remain explicit until implemented with Yul golden, solc, and Foundry coverage.
- EVM artifact metadata is still pending.
- Start replacing selected
unsupportedEVM coverage rows with Dapp-style Yul/Foundry-backed positive fixtures, one feature at a time.
Psy Fixed Array Equality
Commit: feature commit for Psy fixed-array equality Summary:- Allowed Psy IR equality validation for fixed-array value types after a Dargo
probe confirmed Psy supports
assert_eq(xs, ys),xs == ys, andxs != zsfor fixed arrays. - Extended
ArrayProbewitharray_predicates, covering fixed-arrayassert_eq, equality, and inequality over[Felt; 3]locals. - Updated
scripts/psy/array-smoke.shto compile and executearray_predicates, recordresult_vm: [1], and include it in artifact metadata validation.
- Generated ArrayProbe source includes
array_predicates, usingassert_eq(xs, ys, ...),xs == ys, andxs != zs. scripts/psy/array-smoke.shvalidatessum_literal,storage_lifecycle, andarray_predicatesthrough Dargo test, compile, execute, ABI generation, deploy manifest, and artifact metadata checks.- Dargo execution returns
result_vm: [1]forarray_predicates.
- This feature covers same-typed fixed-array equality only; mismatched element types and lengths still fail through the existing type checker.
- Commit and push this single feature before starting the next Psy surface area.
Psy Native U32 Storage Struct Paths
Commit: feature commit for Psy native U32 storage struct paths Summary:- Fixed Psy
storagePathWriteso U32 paths only cast to Felt for the validated Felt-backed U32 storage-array representation. - Allowed native U32 storage struct field paths to use Psy’s own
u32storage reference idiom for path writes, reads, and compound assignment. - Extended
StorageNestedAggregateProbewith a nativeProfile.rank: u32storage field across scalar struct and storage-array paths. - Removed the obsolete diagnostic that rejected non-array U32 storage-path compound assignment.
- Generated StorageNestedAggregateProbe source emits native
pub rank: u32, native U32 path writes such asc.person.profile.rank = 9u32, and native U32 path compound assignment such asc.person.profile.rank += 4u32. scripts/psy/diagnostic-smoke.shpasses all 48 diagnostic cases after removing the obsolete unsupported U32 path case.scripts/psy/storage-nested-aggregate-smoke.shpassesdargo test,dargo compile,dargo execute,dargo generate-abi, deploy manifest validation, and artifact metadata validation.- Dargo execution returns
result_vm: [252]forstorage_nested_lifecycle.
- Direct Psy
[u32; N]contract storage arrays remain avoided because currentpsyup0.1.0 rejects them with anArrayRef<u32, N>mismatch. - Map value compound assignment remains outside the supported storage-path surface.
- Continue shrinking storage and ABI edge cases into Dargo-backed fixtures, one committed feature at a time.
Psy U32 Storage Path Assignment
Commit: feature commit for Psy U32 storage path assignment Summary:- Extended Psy lowering for Felt-backed U32 storage arrays so
storagePathAssignOpemits typed read/update/write code instead of raw Felt compound assignment. - Covered all
AssignOpvariants inU32StorageArrayProbe: arithmetic, modulo, bitwise, and shifts. - Kept non-array U32 storage-path compound assignment rejected with an explicit ProofForge diagnostic until that storage representation is validated.
- Updated the golden Psy source, Dargo smoke expected result, coverage matrix, and validation docs.
- Generated U32StorageArrayProbe source rewrites U32 storage-path compound
assignment as
.get() as u32, typed operation, thenas Feltwriteback. scripts/psy/diagnostic-smoke.shpasses all 49 diagnostic cases, including the remaining unsupported non-array U32 storage-path assignment boundary.scripts/psy/u32-storage-array-smoke.shpassesdargo test,dargo compile,dargo execute,dargo generate-abi, deploy manifest validation, and artifact metadata validation.- Dargo execution returns
result_vm: [28]forstorage_lifecycle.
- Direct Psy
[u32; N]contract storage arrays remain avoided because currentpsyup0.1.0 rejects them with anArrayRef<u32, N>mismatch. - U32 storage-path compound assignment is supported only for the validated Felt-backed storage-array representation, not arbitrary U32 struct paths. This struct-path limitation is superseded by the native U32 storage struct path entry above.
- Continue closing one Psy storage or expression gap per feature branch, with Dargo-backed smoke coverage before each commit.
Psy Hash Storage Coverage
Commit: feature commit for Psy Hash storage coverage Summary:- Added
HashStorageProbeas a portable IR fixture for native Psy scalarHashstorage and[Hash; N]storage arrays. - Extended Psy state validation so
StateDecl.kind = .scalarwithtype = .hashlowers topub root: Hash. - Added CLI emission through
--emit-hash-storage-ir-psyplus a checked golden source fixture. - Added
scripts/psy/hash-storage-smoke.shto validatedargo test,dargo compile, twodargo executeentrypoints,dargo generate-abi, deploy manifest generation, and artifact metadata validation.
- Generated HashStorageProbe source lowers
pub root: Hash,pub roots: [Hash; 2], scalar Hash read/write, indexed Hash array read/write, and generic storage-path read/write. - Dargo execution validates
result_vm: [5, 6, 7, 8]for scalar storage andresult_vm: [55, 66, 77, 88]for storage-array access.
- This does not change U32 storage arrays, which remain Felt-backed because
Dargo v0.1.0 rejects direct
[u32; N]contract storage arrays.
- Continue replacing explicit unsupported storage diagnostics with Dargo-validated Psy storage idioms where the upstream toolchain accepts the shape.
Psy Bool Storage Array Coverage
Commit: feature commit for Psy Bool storage array coverage Summary:- Added
BoolStorageArrayProbeas a portable IR fixture for native Psy[bool; N]fixed arrays andboolstorage arrays. - Extended Psy state validation so
StateDecl.kind = .array Nwithtype = .boollowers topub flags: [bool; N]. - Added CLI emission through
--emit-bool-storage-array-ir-psyplus a checked golden source fixture. - Replaced the previous unsupported bool storage-array diagnostic with an unsupported Unit storage-array diagnostic.
- Added
scripts/psy/bool-storage-array-smoke.shto validatedargo test,dargo compile, twodargo executeentrypoints,dargo generate-abi, deploy manifest generation, and artifact metadata validation.
- Generated BoolStorageArrayProbe source lowers local
[bool; 3]arrays,pub flags: [bool; 3]storage arrays, indexed storage read/write, generic storage-path read/write, andbool as Feltreturn casts. - Dargo execution validates
result_vm: [2]for bothlocal_flags_sumandstorage_lifecycle.
- This does not change the existing U32 storage-array representation; U32
arrays remain Felt-backed because Dargo v0.1.0 rejects direct
[u32; N]contract storage arrays.
- Continue shrinking explicit unsupported diagnostics into Dargo-validated Psy support where the upstream toolchain accepts the target shape.
Psy Bool Scalar Storage Coverage
Commit: feature commit for Psy Bool scalar storage coverage Summary:- Added
BoolStorageScalarProbeas a portable IR fixture for native Psyboolscalar storage. - Added CLI emission through
--emit-bool-storage-scalar-ir-psyplus a checked golden source fixture. - Added
scripts/psy/bool-storage-scalar-smoke.shto validatedargo test,dargo compile,dargo execute,dargo generate-abi, deploy manifest generation, and artifact metadata validation. - Extended Psy coverage evidence, validation docs, and CI golden checks.
- Generated BoolStorageScalarProbe source lowers scalar storage to
pub flag: bool, native Bool reads/writes, andbool as Feltreturn casts. - Dargo execution validates
result_vm: [1].
- This entry covered native scalar
boolstorage only. The later BoolStorageArrayProbe entry supersedes the previous bool storage-array limitation.
- Continue filling the Psy scalar/aggregate storage matrix one feature at a time, with Dargo execution backing each newly enabled shape.
Psy Map Set Expression Return Coverage
Commit: feature commit for Psy map set expression returns Summary:- Added Psy lowering and type validation for
storageMapSetwhen used as an expression, matching upstreamMapRef::setreturning the previousHash. - Extended
MapProbewithset_return_lifecycleandinsert_return_lifecycleto cover absent-key zero returns, previous-value returns, and latest-value reads. - Updated the MapProbe generated test to bind side-effectful method results
before assertion, avoiding Dargo repeated-evaluation behavior for direct
calls inside
assert_eq. - Extended the MapProbe smoke to execute the new methods and validate artifact metadata against all returned results.
set_return_lifecyclereturnsresult_vm: [31, 32, 33, 34].insert_return_lifecyclereturnsresult_vm: [5, 6, 7, 8].
- Psy map support remains deliberately limited to
Map<Hash, Hash, N>until non-Hash map value semantics are modeled explicitly in the portable IR.
- Continue converting upstream Psy map/storage semantics into fixture-backed ProofForge IR coverage.
Psy Generic Test Fallback
Commit: feature commit for generic Psy fallback tests Summary:- Replaced the Psy backend’s fixture-only test generation failure with a
generic fallback test that instantiates
<Module>Ref. - Added
GenericEntrypointProbeas a valid non-whitelisted portable IR fixture to prove that arbitrary supported modules can render.psysource. - Added a Dargo-backed smoke script, golden source, CI golden check, deploy manifest generation, and artifact metadata validation for the new fixture.
- Added an explicit empty-state diagnostic because Dargo v0.1.0 rejects empty
#[derive(Storage)]contracts.
- Dargo accepts the generic generated test and executes
GenericEntrypointProbe.answerwithresult_vm: [42]. - Psy diagnostic smoke now covers 49 malformed or unsupported IR cases.
- The generic fallback only proves source/package validity and ref instantiation. Fixture-specific behavior still needs dedicated assertions and smoke scripts when a feature has semantic expectations.
- Continue closing expression and storage coverage gaps with one fixture-backed feature at a time.
Psy Identifier Diagnostics
Commit: feature commit for Psy identifier validation Summary:- Added Psy backend validation for module, struct, field, state, entrypoint, parameter, local, and loop-index identifiers before source generation.
- Added duplicate declaration checks for struct names, state ids, entrypoint names, struct field ids, and entrypoint parameter names.
- Added diagnostic fixtures for invalid module identifiers, duplicate state ids, duplicate entrypoint names, and reserved local names.
- Psy diagnostic smoke now covers 48 malformed or unsupported IR cases.
- Invalid or ambiguous names fail in ProofForge before Dargo parsing or typechecking.
- The reserved-word list covers Psy keywords and builtin names used by current generated source. If Psy adds new reserved identifiers upstream, this list should be updated with the toolchain bump.
- Continue reducing Dargo-discovered failures into ProofForge diagnostics.
Psy U32 Scalar Storage Coverage
Commit: feature commit for Psy U32 scalar storage coverage Summary:- Added
U32StorageScalarProbeas a portable IR fixture for native Psyu32scalar storage. - Added CLI emission through
--emit-u32-storage-scalar-ir-psyplus a checked golden source fixture. - Added
scripts/psy/u32-storage-scalar-smoke.shto validatedargo test,dargo compile,dargo execute,dargo generate-abi, deploy manifest generation, and artifact metadata validation. - Extended Psy coverage evidence, validation docs, and CI golden checks.
- Generated U32StorageScalarProbe source lowers scalar storage to
pub value: u32, native U32 reads/writes, and scalar+=. - Dargo execution validates
result_vm: [12].
- This covers native scalar
u32storage only. U32 storage arrays still use the existing Felt-backed representation because currentpsyup0.1.0 rejects direct[u32; N]contract storage arrays.
- Continue broadening Psy storage and ABI validation while keeping unsupported storage forms explicit.
Psy Entrypoint Selector Diagnostic
Commit: feature commit for Psy selector rejection Summary:- Added a Psy backend validation rule that rejects
Entrypoint.selector?before source generation. - Documented that Psy/DPN entrypoints are addressed by contract method name via Dargo and the generated Psy ABI, so EVM-style selectors are target-invalid rather than ignored.
- Added a
Tests/PsyDiagnostics.leancase to lock the diagnostic text.
- Malformed Psy IR modules with entrypoint selectors now fail with an explicit diagnostic instead of silently dropping selector metadata.
- This does not add a Psy-native selector concept. If Psy later exposes stable selector metadata, the backend should model it separately from EVM selectors.
- Continue expanding non-fixture-specific Psy package generation and deployment validation.
Psy Shared Dargo Package Writer
Commit: feature commit for shared Psy Dargo package generation Summary:- Added
scripts/psy/write-dargo-package.pyas the shared package writer for Dargo-backed Psy smoke fixtures. - Replaced repeated shell
rm/mkdir/cp/Dargo.tomlheredocs across all Dargo-backed smoke scripts with a single writer invocation. - Kept a smoke-directory guard in the writer so it only rewrites
dargo-*package directories.
- Both representative Dargo smokes generate packages through the shared writer,
then pass
dargo test,dargo compile,dargo execute,dargo generate-abi, deploy-manifest validation, and artifact metadata validation. - Existing metadata source/package-source parity and
Dargo.tomlmanifest validation continue to pass.
- This factors local Dargo package creation only; upstream compressed genesis deploy JSON and live node/prover smoke remain separate deployment work.
- Continue toward upstream genesis deploy JSON/local node research.
Psy Dargo Package Source Metadata
Commit: feature commit for Psy Dargo package source metadata Summary:- Extended Psy artifact metadata to record the Dargo package source copy
(
src/main.psy) used by every Dargo-backed smoke fixture. - Updated metadata validation to check the package source path, byte size,
SHA-256 hash, and hash parity with the generated
.psysource. - Updated all Dargo-backed Psy smoke scripts to pass
"$PROJECT_DIR/src/main.psy"intowrite-artifact-metadata.py.
- Counter and U32StorageArrayProbe smoke metadata now include
artifacts.packageSource. - The metadata validator accepts the updated schema and proves the package source copy has the same SHA-256 hash as the generated source file.
- This validates the generated Dargo package source copy, not upstream compressed genesis deploy JSON or live node/prover state.
- Continue toward upstream genesis deploy JSON/local node research, or factor the repeated Dargo package generation into a reusable package writer.
Psy Dargo Package Manifest Metadata
Commit: feature commit for Psy Dargo package manifest metadata Summary:- Extended Psy artifact metadata to record the generated Dargo package manifest
(
Dargo.toml) for every Dargo-backed smoke fixture. - Updated metadata validation to check the manifest path, byte size, SHA-256
hash,
[package]section,type = "bin", and[dependencies]section. - Updated all Dargo-backed Psy smoke scripts to pass the generated
"$PROJECT_DIR/Dargo.toml"intowrite-artifact-metadata.py.
- Counter smoke metadata now includes
artifacts.dargoManifestwith a checked hash and package manifest shape. - The metadata validator accepts the updated schema after Dargo
test,compile,execute,generate-abi, deploy manifest validation, and package manifest validation.
- This records the generated Dargo package manifest, not Psy upstream compressed genesis deploy JSON or live node/prover state.
- Continue toward upstream genesis deploy JSON/local node research, or factor the repeated Dargo package generation into a reusable package writer.
Psy IR Coverage Manifest Gate
Commit: feature commit for Psy IR coverage manifest validation Summary:- Added
Tests/PsyCoverage.tsvas a constructor-level coverage manifest for the portable IR surface used by the Psy backend. - Added
scripts/psy/check-ir-coverage-manifest.py, which parsesProofForge/IR/Contract.leanand fails if any tracked constructor is missing from the manifest or if the manifest contains stale/duplicate entries. - Added CI and validation docs for the new gate so future IR expansion must classify each constructor as lowered, validated, unsupported, or structural.
- The checker reports 88 constructor entries matching
ProofForge/IR/Contract.lean.
- The manifest is a structural guard, not behavioral proof. Supported rows still require fixture, golden, Dargo, and metadata validation when they describe runtime behavior.
- Continue closing behavioral Psy gaps and use the manifest as a tripwire when extending the portable IR.
Psy U32 Storage Array Lowering
Commit: feature commit for Psy U32 storage array coverage Summary:- Added
U32StorageArrayProbeas a dedicated portable IR fixture for U32 storage-array reads and writes. - Extended Psy sourcegen so portable U32 storage arrays lower to Felt-backed
Psy storage arrays. Writes use
u32 as Felt; reads use.get() as u32. - Reused the same representation for generic storage-path read/write effects over U32 array elements.
- Kept U32 storage-path compound assignment explicitly rejected, because direct
Felt storage
+=would not preserve a clear U32 storage arithmetic boundary. - Added CLI, golden source, CI golden coverage, diagnostic coverage, Dargo smoke coverage, and validation docs for the new fixture.
- Generated U32StorageArrayProbe source matches the checked-in golden fixture.
scripts/psy/diagnostic-smoke.shpasses all 43 diagnostic cases.scripts/psy/u32-storage-array-smoke.shpassesdargo test,dargo compile,dargo execute,dargo generate-abi, deploy manifest validation, and artifact metadata validation.- Dargo execution returns
result_vm: [48]forstorage_lifecycle.
- Direct Psy
[u32; N]contract storage arrays remain avoided because currentpsyup0.1.0 rejects them with anArrayRef<u32, N>mismatch. - U32 storage-path compound assignment is still unsupported; use explicit read/update/write.
- Move the Psy deployment track toward upstream compressed genesis deploy JSON and local node/prover smoke work, or continue broadening Lean-to-IR extraction into the now-supported Psy surface.
Psy Storage Compound Assignment Effects
Commit: feature commit for Psy storage-reference compound assignment effects Summary:- Added portable IR storage effects for scalar storage compound assignment and generic storage-path compound assignment.
- Extended Psy sourcegen to lower storage refs such as
c.total += 3,c.person.profile.age += 2, andc.people[1].score -= 9to native Psy assignment operators. - Kept EVM IR v0 behavior explicit by rejecting the new storage compound effects with target-specific diagnostics.
- Extended
StorageNestedAggregateProbeto validate scalar storage compound assignment, nested scalar storage paths, and storage-array scalar paths under Dargo execution. - Added Psy diagnostics for storage compound effects used as expressions and malformed storage compound assignment value types.
- Generated StorageNestedAggregateProbe source matches the checked-in golden fixture.
scripts/psy/diagnostic-smoke.shpasses all 42 diagnostic cases.scripts/psy/storage-nested-aggregate-smoke.shpassesdargo test,dargo compile,dargo execute,dargo generate-abi, deploy manifest validation, and artifact metadata validation.- Dargo execution returns
result_vm: [229]forstorage_nested_lifecycle.
- Map storage values remain excluded from compound assignment because the
current supported map shape uses
get/setoverMap<Hash, Hash, N>. - U32 storage arrays remain explicitly rejected until a stable Dargo-compatible storage idiom is identified.
- Continue with U32 storage-array research or move toward upstream genesis deploy JSON/local node smoke work.
Psy Compound Assignment Lowering
Commit: feature commit for Psy compound assignment lowering Summary:- Added first-class
AssignOpandStatement.assignOpnodes to the portable IR for+=,-=,*=,/=,%=,|=,&=,^=,<<=, and>>=. - Lowered compound assignments to native Psy assignment operators for mutable local, array-index, and field-path assignment targets.
- Kept EVM IR v0 explicit by rejecting compound assignment statements with a dedicated diagnostic.
- Extended
U32ArithmeticProbewith arithmetic compound assignment coverage andBitwiseProbewith Felt/U32 bitwise and shift compound assignment coverage. - Added Psy diagnostics for malformed compound assignment value types and immutable compound assignment targets.
- Generated U32ArithmeticProbe and BitwiseProbe sources match the checked-in golden fixtures.
scripts/psy/diagnostic-smoke.shpasses all 39 diagnostic cases.- Dargo validates the updated U32ArithmeticProbe and BitwiseProbe sources with
test,compile,execute,generate-abi, deploy manifest validation, and artifact metadata validation.
- Compound assignment currently targets mutable local/aggregate assignment paths. Storage-reference compound assignment remains a separate design item because portable storage writes are modeled as effects.
- U32 storage arrays remain explicitly rejected until a stable Dargo-compatible storage idiom is identified.
- Continue with U32 storage-array research or add storage-reference compound assignment effects if that becomes the next Psy surface to close.
Psy Map Storage Path Lowering
Commit: feature commit for Psy map storage path coverage Summary:- Added
StoragePathSegment.mapKeyto the portable IR so generic storage path effects can target supportedMap<Hash, Hash, N>state. - Extended Psy storage path type resolution, validation, and source lowering so
storagePathRead "balances" #[.mapKey key]lowers toc.balances.get(key)andstoragePathWrite "balances" #[.mapKey key] valuelowers toc.balances.set(key, value). - Added map path key validation and explicit diagnostics for malformed map paths or wrong key types.
- Extended
MapProbewithpath_lifecycle, updated its golden.psy, and updatedscripts/psy/map-smoke.shto execute both direct map effects and the generic map storage path entrypoint.
- Generated MapProbe source matches the checked-in golden fixture.
scripts/psy/diagnostic-smoke.shpasses all 37 diagnostic cases.scripts/psy/map-smoke.shpassesdargo test,dargo compile,dargo execute,dargo generate-abi, deploy manifest validation, and artifact metadata validation.- Dargo execution returns
result_vm: [55, 66, 77, 88]formap_lifecycleandresult_vm: [77, 88, 99, 111]forpath_lifecycle.
- Map storage paths currently support direct
Map<Hash, Hash, N>key access. Nested map value traversal remains unsupported because Psy IR v0 only accepts Hash map values. - U32 storage arrays remain explicitly rejected until a stable Dargo-compatible storage idiom is identified.
- Continue with U32 storage-array research or decide whether compound assignment should become IR sugar.
Psy Deploy Manifests For All Dargo Smokes
Commit: feature commit for broad Psy deploy manifest coverage Summary:- Added
scripts/psy/write-smoke-deploy-manifest.shas the shared smoke helper for deploy manifest generation and validation. - Updated every Dargo-backed Psy smoke script to write
target/proof-forge-deploy.json, validate it, and record it asdeployJsoninsidetarget/proof-forge-artifact.json. - Restored each smoke’s deploy-oriented
dargo compileartifact afterdargo executeanddargo generate-abi, so deploy manifests describe the compile method set rather than an execution trace. - Kept
scripts/psy/diagnostic-smoke.shseparate because it validates pre-codegen diagnostics and does not produce Dargo artifacts. - Updated validation docs, target notes, and backlog so the remaining deployment gap is specifically upstream compressed genesis deploy JSON plus local node/prover execution.
- All Dargo-backed Psy smokes generated DPN circuit JSON, ABI JSON, execute
logs,
proof-forge-deploy.json, andproof-forge-artifact.json. - Artifact metadata validation now checks deploy-manifest file hashes whenever
deployJsonis present. - Deploy manifests record the restored compile method set for each fixture.
scripts/psy/diagnostic-smoke.shstill passes all 35 diagnostic cases.
proof-forge-deploy.jsonremains ProofForge-owned metadata, not the upstream compressed genesis deploy JSON consumed by Psy node setup.- The local node/prover deployment smoke is still not implemented.
- Research whether to vendor or wrap Psy’s
gen_deploy_jsonpath, then add the smallest local node/prover smoke that consumes the resulting deployment package.
Psy Counter Deploy Manifest Metadata
Commit: feature commit for Psy Counter deploy manifest coverage Summary:- Added
scripts/psy/write-deploy-manifest.pyto produceproof-forge-deploy.jsonfrom the Counter.psysource, Dargo circuit JSON, and Dargo ABI JSON. - Added
scripts/psy/validate-deploy-manifest.pyto verify manifest schema, deployer format, state-tree height, source/circuit/ABI hashes, function whitelist ordering, and upstream genesis JSON status. - Updated
scripts/psy/counter-smoke.shso the Counter Dargo smoke now writes and validatestarget/proof-forge-deploy.json. - Re-runs
dargo compileafterdargo executeso deploy metadata points at the deploy-oriented compile artifact rather than the method-sequence execution trace. - Extended Psy artifact metadata to optionally record
deployJsonand requirevalidation.deployManifest = "passed"whenever that artifact is present. - Documented that this is a ProofForge deploy manifest, not Psy’s upstream
compressed genesis deploy JSON from
gen_deploy_json.
- Counter generated source still matches
Examples/Psy/Counter.golden.psy. - Dargo
test,compile,execute, andgenerate-abipassed. dargo executereturnedresult_vm: [2]after initialize plus two increments.proof-forge-deploy.jsonandproof-forge-artifact.jsonwere generated and validated.
- The manifest is ProofForge-owned metadata, not the upstream compressed genesis deploy JSON consumed by Psy node setup.
- The upstream
psy-dargo-cli/examples/gen_deploy_json.rspath still requires Rust workspace internals; current releaseddargodoes not expose it as a subcommand. - Only the Counter smoke emits deploy manifest metadata so far.
- Either extend deploy manifest generation to the broader Psy fixture set, or research the smallest stable upstream boundary for genesis deploy JSON plus a local Psy node/prover smoke.
Psy U32HashPackingProbe Dynamic Hash Construction
Commit: feature commit for Psy U32 hash packing coverage Summary:- Added portable IR
Expr.hashValuefor dynamicHashconstruction from four Felt-backed limbs. - Extended Psy type validation so each dynamic Hash part must be
U64/Felt and malformed Hash construction fails before.psygeneration. - Kept EVM IR v0 explicit by rejecting dynamic Hash value construction with a clear diagnostic.
- Added
ProofForge.IR.Examples.U32HashPackingProbe, aligned with the[u32; 8]limb packing idioms in the deposit-tree and mining-rewards precompiles. - Covered both local
[u32; 8]literals and U32 ABI parameters packed into PsyHashvalues throughlo + hi * 2^32. - Added an explicit rejection diagnostic for U32 storage arrays after Dargo
validation showed current
psyup0.1.0 rejects direct[u32; N]contract storage arrays with anArrayRef<u32, N>type mismatch. - Added CLI support:
- Added
Examples/Psy/U32HashPackingProbe.golden.psy. - Added
scripts/psy/u32-hash-packing-smoke.sh, which generates a temporary Dargo package, runsdargo test --file,dargo compile, twodargo executechecks,dargo generate-abi, and validatesproof-forge-artifact.json. - Added CI coverage for the U32HashPackingProbe Psy golden source snapshot.
- Generated U32HashPackingProbe source matches the checked-in golden fixture.
scripts/psy/u32-hash-packing-smoke.shgenerated DPN JSON, ABI JSON, execute log, andproof-forge-artifact.json.dargo executereturned the expected four-Felt Hash values for bothpack_literalandpack_params.scripts/psy/diagnostic-smoke.shpassed all 35 diagnostic cases.
- This adds Hash value construction and U32 limb packing, not Psy deploy JSON or live node/prover execution.
- U32 storage arrays are explicitly rejected until a stable Psy storage idiom is validated against Dargo.
- Compound assignment operators remain represented as explicit assignment plus expression nodes.
- Map storage paths remain rejected until a stable Psy idiom is identified.
- Decide whether to add compound assignment as IR sugar or leave it to a future source normalizer, then continue with map storage paths or deploy JSON.
Psy BitwiseProbe Native Bitwise Expressions
Commit: feature commit for Psy bitwise expression coverage Summary:- Added portable IR expression nodes for
&,|,^,<<, and>>. - Extended Psy source generation for Felt-backed
U64andU32bitwise expressions, with same-width numeric validation before.psygeneration. - Added EVM IR lowering for the same pure bitwise/shift nodes through Yul
and,or,xor,shl, andshrbuiltins. - Added explicit diagnostics for malformed bitwise and shift operands.
- Added
ProofForge.IR.Examples.BitwiseProbe, aligned with upstreampsy-compiler/tests/opcode_test.psy,tests/storage_u32_assign_ops_test.psy, and precompile Merkle path idioms. - Added CLI support:
- Added
Examples/Psy/BitwiseProbe.golden.psy. - Added
scripts/psy/bitwise-smoke.sh, which generates a temporary Dargo package, runsdargo test --file,dargo compile,dargo execute,dargo generate-abi, and validatesproof-forge-artifact.json. - Added CI coverage for the BitwiseProbe Psy golden source snapshot.
- Generated BitwiseProbe source matches the checked-in golden fixture.
scripts/psy/bitwise-smoke.shgenerated DPN JSON, ABI JSON, execute log, andproof-forge-artifact.json.dargo executereturnedresult_vm: [16]forbitwise_mix.scripts/psy/diagnostic-smoke.shpassed all 33 diagnostic cases.
- Compound assignment operators such as
|=,&=,^=,<<=, and>>=are still represented as explicit assignment plus expression nodes. - This does not yet add u32 storage arithmetic probes or map storage paths.
- Add storage-heavy U32/Hash limb packing probes from the deposit-tree and mining-rewards precompiles, then decide whether compound assignment sugar belongs in the portable IR or only in sourcegen normalization.
Psy U32ArithmeticProbe Native U32 Arithmetic
Commit: feature commit for Psy U32 arithmetic coverage Summary:- Added portable IR
ValueType.u32andLiteral.u32. - Added portable IR expression nodes for division, modulo, exponentiation, and explicit casts.
- Extended Psy source generation for
u32,Nu32literals,/,%,**, and casts such asz as boolandbb as Felt. - Updated bounded-loop typing so generated
for i in 0u32..Nu32loop indices are tracked asU32. - Extended numeric type validation so
U32arithmetic remains type-consistent and malformed mixed-width arithmetic fails before source generation. - Added EVM IR lowering for the new pure arithmetic/cast nodes through Yul builtins or no-op casts.
- Added
ProofForge.IR.Examples.U32ArithmeticProbe, mirroring the core executable shape of upstreampsy-compiler/tests/u32_test.psy. - Added CLI support:
- Added
Examples/Psy/U32ArithmeticProbe.golden.psy. - Added
scripts/psy/u32-arithmetic-smoke.sh, which generates a temporary Dargo package, runsdargo test --file,dargo compile,dargo execute --parameters 2,3,dargo generate-abi, and validatesproof-forge-artifact.json. - Added CI coverage for the U32ArithmeticProbe Psy golden source snapshot.
- Generated U32ArithmeticProbe source matches the checked-in golden fixture.
scripts/psy/u32-arithmetic-smoke.shgenerated DPN JSON, ABI JSON, execute log, andproof-forge-artifact.json.dargo execute --parameters 2,3returnedresult_vm: [1]foru32_arithmetic.scripts/psy/diagnostic-smoke.shpassed all 31 diagnostic cases.
- This does not yet add bitwise shifts, bitwise and/or, u32 storage probes, or the full cast matrix used by the token/deposit-tree precompiles.
- Cast lowering is intentionally explicit and rejects unsupported source/target
pairs before
.psysource generation.
- Add bitwise operations and u32 array/hash-packing probes, since the Psy
precompiles use
u32limbs heavily for token addresses and tree roots.
Psy ArithmeticProbe Sub/Mul Expressions
Commit: feature commit for Psy arithmetic expression coverage Summary:- Added portable IR expression nodes for subtraction and multiplication.
- Added Psy source generation for
-and*, including parentheses around nested arithmetic operands where precedence would otherwise change meaning. - Added sourcegen diagnostics for malformed subtraction and multiplication operand types.
- Added EVM IR lowering for the same pure arithmetic nodes through Yul builtins.
- Added
ProofForge.IR.Examples.ArithmeticProbe, covering subtraction, multiplication, and nested arithmetic precedence. - Added CLI support:
- Added
Examples/Psy/ArithmeticProbe.golden.psy. - Added
scripts/psy/arithmetic-smoke.sh, which generates a temporary Dargo package, runsdargo test --file,dargo compile,dargo execute,dargo generate-abi, and validatesproof-forge-artifact.json. - Added CI coverage for the ArithmeticProbe Psy golden source snapshot.
- Generated ArithmeticProbe source matches the checked-in golden fixture.
scripts/psy/arithmetic-smoke.shgenerated DPN JSON, ABI JSON, execute log, andproof-forge-artifact.json.dargo executereturnedresult_vm: [60]forarithmetic_mix.scripts/psy/diagnostic-smoke.shpassed all 29 diagnostic cases.
- This adds subtraction and multiplication, not division, modulo,
exponentiation, cast-heavy
u32arithmetic, or compound assignment operators. - The IR still represents these values as
U64mapped to PsyFelt; a dedicatedU32surface should be added before copying upstreamu32_testsemantics directly.
- Add division/modulo only after deciding whether they belong to Felt-backed
U64, a newU32value type, or target-specific checked arithmetic helpers.
Psy ConditionalProbe Statement If/Else
Commit: feature commit for Psy conditional statement coverage Summary:- Added portable IR
Statement.ifElsewith a newcontrol.conditionalcapability. - Added Psy source generation for
if condition { ... } else { ... };, aligned with upstream.psyconditional syntax. - Added sourcegen diagnostics for non-Bool if conditions and branch-local bindings escaping their branch.
- Kept EVM IR v0 explicit by rejecting statement-level if/else.
- Added
ProofForge.IR.Examples.ConditionalProbe, covering then and else branch execution over scalar storage. - Added CLI support:
- Added
Examples/Psy/ConditionalProbe.golden.psy. - Added
scripts/psy/conditional-smoke.sh, which generates a temporary Dargo package, runsdargo test --file,dargo compile,dargo execute,dargo generate-abi, and validatesproof-forge-artifact.json. - Added CI coverage for the ConditionalProbe Psy golden source snapshot.
- Generated ConditionalProbe source matches the checked-in golden fixture.
scripts/psy/conditional-smoke.shgenerated DPN JSON, ABI JSON, execute log, andproof-forge-artifact.json.dargo executereturnedresult_vm: [10]forconditional_lifecycle.scripts/psy/diagnostic-smoke.shpassed all 27 diagnostic cases.
- This adds statement-level if/else, not else-if syntax sugar.
- Non-unit entrypoints still need an explicit final top-level return statement; return coverage through both conditional branches is not analyzed yet.
- Continue broadening Psy expression/arithmetic coverage or add map storage path support once a stable upstream Psy idiom is identified.
Psy ExpressionPredicateProbe Boolean Predicates
Commit: feature commit for Psy predicate expression coverage Summary:- Added portable IR expression nodes for equality, inequality, ordering comparisons, boolean conjunction, boolean disjunction, and boolean negation.
- Added Psy lowering using upstream
.psyidioms:==,!=,<,<=,>,>=,&&,||, and!. - Added sourcegen type diagnostics for malformed equality, comparison, and boolean operator operands.
- Added EVM IR lowering for the same pure predicate nodes through Yul builtins.
- Added
ProofForge.IR.Examples.ExpressionPredicateProbe, covering predicate locals and assertion predicates. - Added CLI support:
- Added
Examples/Psy/ExpressionPredicateProbe.golden.psy. - Added
scripts/psy/expression-predicate-smoke.sh, which generates a temporary Dargo package, runsdargo test --file,dargo compile,dargo execute,dargo generate-abi, and validatesproof-forge-artifact.json. - Added CI coverage for the ExpressionPredicateProbe Psy golden source snapshot.
- Generated ExpressionPredicateProbe source matches the checked-in golden fixture.
scripts/psy/expression-predicate-smoke.shgenerated DPN JSON, ABI JSON, execute log, andproof-forge-artifact.json.dargo executereturnedresult_vm: [16]forpredicate_sum.scripts/psy/diagnostic-smoke.shpassed all 25 diagnostic cases.
- This adds expression predicates, not statement-level
if/elselowering. - Fixed-array equality was outside this original expression fixture; it is now
covered separately by the Dargo-backed
ArrayProbe.
- Add statement-level conditional lowering or broaden arithmetic expression coverage with upstream/Dargo fixtures.
Psy Sourcegen Type Diagnostics
Commit: feature commit for Psy expression and statement type diagnostics Summary:- Added a lightweight Psy backend type environment for entrypoint parameters, local bindings, mutable locals, and bounded-loop indices.
- Added sourcegen-time type inference and validation for literals, locals, fixed arrays, struct literals, field access, addition, hash operations, storage effects, context reads, assignment targets, assertions, and returns.
- Added diagnostics for unknown locals, local/array/struct/hash type mismatches, immutable assignment, missing non-unit returns, and storage write type mismatches.
- Kept existing lowering behavior unchanged for valid fixtures; this feature
blocks malformed IR before
.psysource is emitted. - Extended
Tests/PsyDiagnostics.leanfrom 12 to 22 explicit rejection cases.
scripts/psy/diagnostic-smoke.shpassed all 22 diagnostic cases.- All checked Psy golden source snapshots remain unchanged.
- All Psy Dargo smokes passed and revalidated source snapshots, DPN JSON, ABI
JSON, execute logs, and
proof-forge-artifact.json.
- This is a sourcegen validation layer, not a formal type system for every future portable IR extension.
- Assignment mutability is enforced for local/index/field paths rooted in local bindings; storage mutation continues to use explicit storage effects.
- Continue closing Psy valid-surface gaps with either Dargo-backed fixtures or explicit diagnostics before adding new IR nodes.
Psy StorageNestedAggregateProbe Storage Paths
Commit: feature commit for storage nested aggregate Psy IR coverage Summary:- Added generic storage path read/write effects to the portable IR.
- Added
StructField.isRefso the IR can explicitly model Psy#[ref]fields for nested storage references. - Added Psy lowering for storage paths such as
c.person.profile.ageandc.people[1].profile.age, plus validation for empty paths and missing nested#[ref]markers. - Kept EVM IR v0 behavior explicit by rejecting storage path effects.
- Added
ProofForge.IR.Examples.StorageNestedAggregateProbe, covering scalar struct storage and fixed storage arrays of structs. - Added CLI support:
- Added
Examples/Psy/StorageNestedAggregateProbe.golden.psy. - Added
scripts/psy/storage-nested-aggregate-smoke.sh, which generates a temporary Dargo package, runsdargo test --file,dargo compile,dargo execute,dargo generate-abi, and validatesproof-forge-artifact.json. - Extended
Tests/PsyDiagnostics.leanwith invalid storage path cases. - Added CI coverage for the StorageNestedAggregateProbe Psy golden source snapshot.
- Generated StorageNestedAggregateProbe source matches the checked-in golden fixture.
scripts/psy/storage-nested-aggregate-smoke.shgenerated DPN JSON, ABI JSON, execute log, andproof-forge-artifact.json.dargo executereturnedresult_vm: [220]forstorage_nested_lifecycle.scripts/psy/diagnostic-smoke.shpassed all 12 diagnostic cases.
- Storage path lowering intentionally rejects map storage paths until a stable Psy idiom is identified and covered by an upstream-style fixture.
- This does not yet produce deploy JSON or exercise a live Psy node/prover.
- Research deploy JSON/live node execution for Psy artifacts, or continue expanding expression/path coverage behind diagnostic gates.
Psy NestedAggregateProbe Mixed Aggregate Updates
Commit: feature commit for nested aggregate Psy IR coverage Summary:- Added portable IR statements for mutable local bindings and assignment.
- Added Psy lowering for
let mutand nested assignment targets made from local names, array indexes, and field paths. - Kept EVM IR v0 behavior explicit by rejecting mutable local bindings and assignment statements.
- Added
ProofForge.IR.Examples.NestedAggregateProbe, covering a mutable[Family; 2]value whoseFamily.childrenfield is[Member; 2]. - Added CLI support:
- Added
Examples/Psy/NestedAggregateProbe.golden.psy. - Added
scripts/psy/nested-aggregate-smoke.sh, which generates a temporary Dargo package, runsdargo test --file,dargo compile,dargo execute,dargo generate-abi, and validatesproof-forge-artifact.json. - Extended
Tests/PsyDiagnostics.leanwith an invalid assignment target case. - Added CI coverage for the NestedAggregateProbe Psy golden source snapshot.
lake buildpassed.- Generated NestedAggregateProbe source matches the checked-in golden fixture.
scripts/psy/nested-aggregate-smoke.shgenerated DPN JSON, ABI JSON, execute log, andproof-forge-artifact.json.dargo executereturnedresult_vm: [51]fornested_update_sum.scripts/psy/diagnostic-smoke.shpassed all 10 diagnostic cases.
- This feature covers local nested aggregate mutation, not storage-backed nested aggregate mutation.
- Assignment targets are intentionally limited to local/index/field paths.
- Add storage-backed nested aggregate updates or deploy JSON metadata.
Psy Unsupported Diagnostic Gate
Commit: feature commit for Psy diagnostic regression coverage Summary:- Added
Tests/PsyDiagnostics.lean, a runnable Lean diagnostic regression suite for Psy IR rejection paths. - Added
scripts/psy/diagnostic-smoke.sh. - Covered explicit diagnostics for:
- Unit entrypoint parameters
- zero-length ABI fixed arrays
- unknown ABI struct types
- unsupported map key/value shapes
- structs used in storage without
deriveStorage - empty struct declarations
- invalid bounded loop ranges
- storage writes used as expressions
- storage reads used as statements
- invalid assignment targets
- Added the diagnostic smoke to CI.
- Documented the gate in README, validation gates, and
psy-dpntarget notes.
scripts/psy/diagnostic-smoke.shpassed all 10 diagnostic cases.lake buildpassed.
- This is a regression gate for representative unsupported shapes, not an exhaustive formal proof over every impossible IR construction.
- Cross-target capability rejection matrices still need broader coverage.
- Expand diagnostics as new Psy IR nodes are added, then continue with deeper mixed aggregate update coverage or deploy JSON metadata.
Psy AbiAggregateProbe ABI Aggregates
Commit: feature commit for ABI aggregate Psy IR coverage Summary:- Added entrypoint ABI type validation for Psy IR parameters and returns.
- Rejected Unit parameters before source generation, while keeping Unit returns valid for void methods.
- Validated entrypoint fixed-array ABI types as non-empty and struct ABI types as declared.
- Added
ProofForge.IR.Examples.AbiAggregateProbe, covering a struct parameter, fixed-array parameter, and struct return value. - Added CLI support:
- Added
Examples/Psy/AbiAggregateProbe.golden.psy. - Added
scripts/psy/abi-aggregate-smoke.sh, which generates a temporary Dargo package, runsdargo test --file,dargo compile, threedargo executecalls,dargo generate-abi, and validatesproof-forge-artifact.json. - Added CI coverage for the AbiAggregateProbe Psy golden source snapshot.
lake buildpassed.- Generated AbiAggregateProbe source matches the checked-in golden fixture.
scripts/psy/abi-aggregate-smoke.shgenerated DPN JSON, ABI JSON, execute log, andproof-forge-artifact.json.dargo executereturnedresult_vm: [15]forsum_pair.dargo executereturnedresult_vm: [6]forsum_array.dargo executereturnedresult_vm: [9, 4]formake_pair.
- Dargo CLI aggregate execution is flattened to Felt vectors.
- This feature validates flat struct and one-dimensional fixed-array ABI shapes, not deeply nested mixed aggregate ABI shapes.
- Add deeper nested mixed aggregate update and ABI coverage from the upstream Psy syntax corpus, then continue toward deploy JSON metadata.
Psy StructArrayProbe Struct Arrays
Commit: feature commit for struct-array Psy IR coverage Summary:- Extended portable IR storage effects with indexed storage array struct field read/write nodes.
- Extended Psy sourcegen to lower storage arrays of structs, whole struct array
element writes, and indexed struct field reads through
.get(). - Extended Psy state validation so fixed storage arrays can use
deriveStoragestruct element types. - Kept EVM IR v0 behavior explicit by rejecting storage array struct field effects.
- Added
ProofForge.IR.Examples.StructArrayProbe, covering local[Person; 2]struct arrays plus fixed storage arrays of structs. - Added CLI support:
- Added
Examples/Psy/StructArrayProbe.golden.psy. - Added
scripts/psy/struct-array-smoke.sh, which generates a temporary Dargo package, runsdargo test --file,dargo compile, twodargo executecalls,dargo generate-abi, and validatesproof-forge-artifact.json. - Added CI coverage for the StructArrayProbe Psy golden source snapshot.
lake buildpassed.- Generated StructArrayProbe source matches the checked-in golden fixture.
scripts/psy/struct-array-smoke.shgenerated DPN JSON, ABI JSON, execute log, andproof-forge-artifact.json.dargo executereturnedresult_vm: [100]forlocal_struct_array_sum.dargo executereturnedresult_vm: [102]forstorage_struct_array_lifecycle.
- This feature covers one-dimensional arrays of flat structs.
- Deeply nested mixed aggregate updates still need dedicated coverage.
- EVM IR v0 explicitly rejects struct-array storage field effects.
- Add ABI-facing entrypoint aggregate parameters or return-shape validation, then continue toward deployment/deploy JSON metadata.
Psy StructProbe Struct Values And Storage
Commit: feature commit for struct Psy IR coverage Summary:- Extended portable IR with struct declarations, struct value types, struct literals, and field access expressions.
- Registered
data.structas a target capability for struct values and field access. - Extended portable IR storage effects with scalar storage struct field read/write nodes.
- Extended Psy sourcegen to emit
#[derive(Storage)]struct declarations,new Struct { ... }literals, local field access, scalar storage struct assignment, and storage struct field reads through.get(). - Kept EVM IR v0 behavior explicit by rejecting struct literals, field access, struct typed let bindings, struct returns, and storage struct field effects.
- Added
ProofForge.IR.Examples.StructProbe, covering local struct literals plus scalar storage struct read/write behavior. - Added CLI support:
- Added
Examples/Psy/StructProbe.golden.psy. - Added
scripts/psy/struct-smoke.sh, which generates a temporary Dargo package, runsdargo test --file,dargo compile, twodargo executecalls,dargo generate-abi, and validatesproof-forge-artifact.json. - Added CI coverage for the StructProbe Psy golden source snapshot.
lake buildpassed.- Generated StructProbe source matches the checked-in golden fixture.
scripts/psy/struct-smoke.shgenerated DPN JSON, ABI JSON, execute log, andproof-forge-artifact.json.dargo executereturnedresult_vm: [30]forlocal_sum.dargo executereturnedresult_vm: [26]forstorage_lifecycle.
- This feature covers flat struct values and scalar storage structs.
- Struct arrays, nested structs, and methods on structs still need dedicated coverage.
- EVM IR v0 explicitly rejects struct IR nodes.
- Combine structs with fixed arrays in a follow-up fixture aligned with
upstream
array_test.psyandarray_ref_struct_index_test.psy.
Psy ArrayProbe Fixed Arrays
Commit: feature commit for fixed-array Psy IR coverage Summary:- Extended portable IR types with fixed arrays, represented as
[T; N]in Psy. - Added
data.fixed_arrayfor fixed-size array values andstorage.arrayfor fixed array storage fields. - Extended portable IR expressions with fixed array literals and index reads.
- Extended portable IR storage effects with fixed array index read/write nodes.
- Extended Psy sourcegen to lower local array literals, index reads, storage
array writes, and storage array reads through
.get()when used as values. - Kept EVM IR v0 behavior explicit by rejecting fixed-array literals, index access, storage array effects, and fixed-array returns.
- Added
ProofForge.IR.Examples.ArrayProbe, covering local[Felt; 3]literals plus fixed storage array read/write behavior. - Added CLI support:
- Added
Examples/Psy/ArrayProbe.golden.psy. - Added
scripts/psy/array-smoke.sh, which generates a temporary Dargo package, runsdargo test --file,dargo compile, threedargo executecalls,dargo generate-abi, and validatesproof-forge-artifact.json. - Added CI coverage for the ArrayProbe Psy golden source snapshot.
lake buildpassed.- Generated ArrayProbe source matches the checked-in golden fixture.
scripts/psy/array-smoke.shgenerated DPN JSON, ABI JSON, execute log, andproof-forge-artifact.json.dargo executereturnedresult_vm: [60]forsum_literal.dargo executereturnedresult_vm: [31]forstorage_lifecycle.dargo executereturnedresult_vm: [1]forarray_predicates.
- This feature covers one-dimensional fixed arrays over
FeltandHashstorage elements. Struct arrays and nested arrays still need dedicated coverage. - Dynamic arrays and unbounded indexing are still unsupported.
- EVM IR v0 explicitly rejects fixed-array IR nodes.
- Add struct coverage next, then combine structs with arrays in a follow-up
fixture aligned with upstream
array_test.psy.
Psy LoopProbe Bounded Loops
Commit: feature commit for bounded-loop Psy IR coverage Summary:- Extended portable IR statements with a static
boundedFornode. - Registered
control.bounded_loopas a target capability and enabled it forpsy-dpn. - Extended Psy sourcegen to lower
boundedForto Psy fixed-rangeforloops such asfor _i in 0u32..3u32. - Kept EVM IR v0 behavior explicit by rejecting bounded loops with a diagnostic.
- Added
ProofForge.IR.Examples.LoopProbe, which resets scalar storage, runs a three-iteration loop, and returns the final count. - Added CLI support:
- Added
Examples/Psy/LoopProbe.golden.psy. - Added
scripts/psy/loop-smoke.sh, which generates a temporary Dargo package, runsdargo test --file,dargo compile,dargo execute,dargo generate-abi, and validatesproof-forge-artifact.json. - Added CI coverage for the LoopProbe Psy golden source snapshot.
lake buildpassed.- Generated LoopProbe source matches the checked-in golden fixture.
scripts/psy/loop-smoke.shgenerated DPN JSON, ABI JSON, execute log, andproof-forge-artifact.json.dargo executereturnedresult_vm: [3]forcount_to_three.
- Loop lowering is deliberately static and bounded; dynamic or unbounded loops are still unsupported.
- The portable IR still lacks array and struct coverage.
- EVM IR v0 explicitly rejects bounded loops.
- Add array coverage next, because upstream Psy tests and precompiles use fixed arrays heavily alongside bounded loops.
Psy AssertProbe IR Assertions
Commit: feature commit for dynamic nested EVM local arrays Summary:- Extended portable IR with statement-level
assertandassertEqnodes. - Registered the
assertionscapability for target profiles and artifact metadata. - Extended Psy sourcegen to lower assertion statements into method bodies as
assert(condition, "message")andassert_eq(lhs, rhs, "message"). - Added basic string escaping for generated Psy assertion messages.
- Added
ProofForge.IR.Examples.AssertProbe, which validates assertions inside a contract method body. - Added CLI support:
- Added
Examples/Psy/AssertProbe.golden.psy. - Added
scripts/psy/assert-smoke.sh, which generates a temporary Dargo package, runsdargo test --file,dargo compile,dargo execute,dargo generate-abi, and validatesproof-forge-artifact.json. - Added CI coverage for the AssertProbe Psy golden source snapshot.
lake buildpassed.- Generated AssertProbe source matches the checked-in golden fixture.
scripts/psy/assert-smoke.shgenerated DPN JSON, ABI JSON, execute log, andproof-forge-artifact.json.dargo executereturnedresult_vm: [12]forchecked_sum(5,7).
- Assertion conditions still depend on the currently narrow expression subset.
- EVM IR v0 rejects assertion statements through capability diagnostics.
- Add bounded-loop coverage next, because loops are heavily used by Psy precompiles and are required for array/tree-style contracts.
Psy MapProbe Storage Map Coverage
Commit:427a0ec feat: support dynamic nested EVM local arrays
Summary:
- Extended portable IR with fixed-capacity map state and
storage.mapeffects:contains,get,insert, andset. - Extended Psy sourcegen to lower the supported map shape to
Map<Hash, Hash, Nu32>and to reject unsupported map key/value types with an explicit diagnostic. - Added
ProofForge.IR.Examples.MapProbewith scalar fields adjacent to the map to mirror upstream Psy storage-layout regression tests. - Added CLI support:
- Added
Examples/Psy/MapProbe.golden.psy. - Added
scripts/psy/map-smoke.sh, which generates a temporary Dargo package, runsdargo test --file,dargo compile,dargo execute,dargo generate-abi, and validatesproof-forge-artifact.json. - Added CI coverage for the MapProbe Psy golden source snapshot.
lake buildpassed.- Generated MapProbe source matches the checked-in golden fixture.
scripts/psy/map-smoke.shgenerated DPN JSON, ABI JSON, execute log, andproof-forge-artifact.json.dargo executereturnedresult_vm: [55, 66, 77, 88]formap_lifecycle.
- Psy map lowering currently supports only
Map<Hash, Hash, N>. - The portable IR still lacks first-class assertions, bounded loops, arrays, and structs.
- EVM IR v0 explicitly rejects portable map storage.
- Add IR-level assertions or bounded-loop coverage next, then validate the new node through Psy golden output and Dargo smoke.
Psy HashProbe And Experimental Target Slice
Commit: test commit for EVM SDK example golden Yul fixtures Summary:- Extended portable IR with
Hash, four-Felt hash literals, typedletbindings,hash, andhash_two_to_oneexpressions. - Extended Psy sourcegen to lower hash values through upstream Psy idioms:
Hash,[a, b, c, d],hash(data), andhash_two_to_one(left, right). - Added
ProofForge.IR.Examples.HashProbewith two contract methods:poseidon_hashandposeidon_pair_hash. - Added CLI support:
- Added
Examples/Psy/HashProbe.golden.psy. - Added
scripts/psy/hash-smoke.sh, which generates a temporary Dargo package, runsdargo test --file,dargo compile, twodargo executecalls,dargo generate-abi, and writesproof-forge-artifact.json. - Added
scripts/psy/validate-artifact-metadata.py; the Counter, ContextProbe, and HashProbe smokes now validate artifact hashes, byte sizes, capability records, validation flags, and expected execution results. - Added CI coverage for Psy golden source generation without requiring Dargo on GitHub Actions.
lake buildpassed.- Generated HashProbe source matches the checked-in golden fixture.
scripts/psy/hash-smoke.shgenerated DPN JSON, ABI JSON, execute log, andproof-forge-artifact.json.- All three Psy smoke scripts validated
proof-forge-artifact.jsonagainst the generated files and expected execution output. dargo executereturned the expected four-Felt output forposeidon_hash.dargo executereturned the expected four-Felt output forposeidon_pair_hash.
- Hash support is deliberately narrow: fixed four-Felt
Hashvalues only. - Psy storage maps, bounded loops, and deploy JSON are still not implemented.
- EVM IR v0 explicitly rejects Hash values and hash expressions.
- Add map/storage-map coverage from upstream
psy-compiler/testsandpsy-precompiles, then factor the repeated Dargo package generation logic.
Psy ContextProbe Fixture And Artifact Metadata
Commit: pending Summary:- Extended portable IR with
context.readeffects foruserId,contractId, andcheckpointId. - Extended Psy sourcegen to lower entrypoint parameters and context reads.
- Added
ProofForge.IR.Examples.ContextProbe, the first non-Counter Psy IR fixture. - Added CLI support:
- Added
Examples/Psy/ContextProbe.golden.psy. - Added
scripts/psy/context-smoke.sh, which mirrors the Counter Dargo smoke:dargo test --file,dargo compile,dargo execute, anddargo generate-abi. - Added
scripts/psy/write-artifact-metadata.pyand wired both Psy smoke scripts to emitproof-forge-artifact.jsonwith hashes for source, circuit JSON, ABI JSON, and execute logs.
lake buildpassed.- ContextProbe emits reviewable Psy source with parameters and context reads.
- Generated ContextProbe source matches the checked-in golden fixture.
scripts/psy/context-smoke.shgenerated DPN JSON, ABI JSON, execute log, andproof-forge-artifact.json.dargo executereturnedresult_vm: [15]forsum_context(2,3).scripts/psy/counter-smoke.shnow also emitsproof-forge-artifact.json.
- ContextProbe uses
_proof_forge_markerstorage because Dargo v0.1.0 panics on an empty#[contract] #[derive(Storage)]struct. - The IR still lacks maps, fixed arrays, assertions, hashes, bounded loops, and reusable package generation.
- Dargo does not expose a
--versionflag, so metadata records the Dargo path and leaves the version null for now.
- Add a curated upstream syntax regression subset from
psy-compiler/tests, then expand the IR/sourcegen surface toward maps, arrays, assertions, and hashes.
2026-06-30
Psy Counter IR Sourcegen And Smoke
Commit: pending Summary:- Added
ProofForge.Backend.Psy.IR, a strict v0 source generator for the hand-written portable Counter IR fixture. - Added CLI support:
- Added
Examples/Psy/Counter.golden.psyas the reviewed source snapshot. - Added
scripts/psy/counter-smoke.sh, which:- regenerates Counter Psy source
- compares it against the golden fixture
- runs
dargo test --file - creates a temporary Dargo package
- runs
dargo compile --contract-name Counter --method-names initialize increment get - checks the Dargo JSON artifact is non-empty
- runs
dargo execute --contract-name Counter --method-names initialize increment increment get - checks the local execution log contains
result_vm: [2] - runs
dargo generate-abi --contract-name Counter --output-dir target --pretty - checks the ABI JSON artifact is non-empty
- Verified
psyup install 0.1.0as a working macOS arm64 toolchain path for this smoke. - Recorded the upstream syntax/CI corpus:
psy-precompiles,tests, andpsy-compiler’s Makefilebuild/citargets.
lake buildpassed.- Counter IR emits reviewable Psy source.
- Generated Psy source matches the checked-in golden fixture.
scripts/psy/counter-smoke.shgeneratedbuild/psy/Counter.psy, randargo test --file, randargo compile, producedbuild/psy/dargo-counter/target/proof_forge_counter.json, randargo execute, and verifiedgetreturnedresult_vm: [2]after two increments in the same local execution session.- The same smoke generated non-empty ABI output at
build/psy/dargo-counter/target/Counter.json. - Direct
cargo install --git https://github.com/PsyProtocol/psy-compiler dargofetchedpsy-compilerbut failed while Cargo updated thepsy-nodepsy-contractssubmodule URL. psyupv0.1.1 currently has only a Linux x86_64 release asset; macOS arm64 was validated by pinningpsyup install 0.1.0.
- The generator supports only the current no-argument Counter IR subset:
u64scalar state, scalar read/write,add, let-bind, and return. - No deploy JSON, artifact metadata, or live Psy node smoke exists yet.
dargo executecovers local user/contract execution, not network deployment.
- Add
proof-forge-artifact.jsonmetadata to the Psy smoke, then decide whether CI should pinpsyupv0.1.0 or wait for a newer macOS release asset.
Psy/DPN SDK Skeleton
Commit:feat: add Psy DPN SDK skeleton
Summary:
- Added
ProofForge.Psyas the first Lean SDK surface for thepsy-dpnZK target. - Added primitive types and helpers:
FeltU32HashContractMetadata
- Added context, storage, IMT map, hash, and deferred invocation externs under
the
lean_psy_*naming convention. - Added a small
Examples/Psy/Counter.leanSDK example.
- Passed.
- The example uses
initCounterinstead ofinitializebecauseinitializeis a Lean command keyword.
- The SDK is a source-generation boundary only; no Psy backend lowers these externs yet.
- There is no Dargo package generation or
.psyoutput yet.
- Add a
psy-dpnsource generator for the hand-written Counter IR fixture.
Portable IR Counter Runtime Dispatch
Commit:824f5f8 feat: add IR counter EVM runtime smoke
Summary:
- Added EVM selector metadata to the hand-written Counter IR fixture.
- Extended IR-to-Yul lowering to emit runtime selector dispatch for:
initialize()increment()get()
- Added
proof-forge --emit-counter-ir-bytecode, which compiles Counter IR through runtime Yul andsolc --strict-assembly. - Added a dedicated Foundry smoke script for the IR Counter path:
lake buildpassed.- Counter IR emits selector-dispatch Yul.
- Counter IR emits non-empty EVM bytecode.
solc --strict-assemblyaccepts the generated runtime Yul.- Foundry smoke passes for
initialize/increment/getand unknown-selector revert behavior.
- The IR fixture is still hand-written; there is no Lean-source-to-IR extractor.
- Only no-argument entrypoints are supported in the IR EVM dispatcher.
- Promote the IR Counter path into CI once external tool gating is in place, and generalize the dispatcher beyond no-argument entrypoints.
Portable IR Counter Lowering
Commit:787d437 feat: add portable IR counter lowering
Summary:
- Added the first target registry modules:
ProofForge.Target.CapabilityProofForge.Target.RegistryProofForge.Target.Check
- Added the first portable contract IR:
ValueTypeStateDeclExprEffectStatementEntrypointModule
- Added a hand-written Counter IR fixture in
ProofForge.IR.Examples.Counter. - Added an EVM/Yul lowering path for the Counter-shaped IR subset.
- Added CLI smoke command:
lake buildpassed.- Counter IR lowers to Yul.
solc --strict-assemblyaccepts the generated Yul.
- The IR-generated Yul currently contains function definitions only.
- It does not yet generate EVM calldata selector dispatch.
solcemits00for this debug object because no runtime dispatcher calls the generated functions yet.- Existing
--evm-bytecodesmoke still requires Foundrycast; it was not revalidated locally becausecastwas not onPATH.
- Generate an EVM dispatcher/runtime wrapper from IR entrypoints so the IR path can produce callable bytecode and run through Foundry smoke.
Psy DPN Target Research
Commit:ce5ab3e docs: add Psy DPN target research
Summary:
- Added
psy-dpnas a Research-stage target. - Classified Psy as a ZK circuit source-generation target.
- Documented why the first integration path should generate
.psysource and call Dargo instead of directly emitting DPN internals. - Added
zk.circuitandzk.proofcapability ids. - Added Chinese analysis for the Psy/DPN target.
- Documentation whitespace check passed before commit.
- No Psy source generator exists yet.
- No Dargo smoke exists in this repository.
- Reuse the portable Counter IR fixture once the IR-to-sourcegen path exists.
Portable IR And Target Planning Docs
Commit:9b7fce3 docs: add portable IR, capability registry, validation gates, and dev standards
Summary:
- Added the first portable IR spec.
- Added canonical capability ids.
- Added shared Counter scenario.
- Added validation gates and development standards.
- Added implementation backlog slices for target registry, IR, metadata, EVM hardening, Wasm, Solana, Move, CI, and Psy.
- Documentation whitespace check passed before commit.
- These were planning docs only; no IR code existed yet.
- Implement the Target registry and Counter-shaped IR v0 in Lean.
Multi-Chain Target Design
Commit:a5555e5 docs: add multichain target design
Summary:
- Added the first multi-chain platform RFCs and Chinese feasibility/technical analysis.
- Established the direction: Lean business logic plus target-specific adapters.
- Documented EVM, Solana, Wasm-family, Move-family, and cloud platform tracks.
- Documentation whitespace check passed before commit.
- Design-only milestone.
- Split the design into concrete target registry, IR, and validation tasks.
EVM Baseline
Commits:34b1708 Initial ProofForge EVM backendb7a5343 Add EVM examples and Foundry smoke testsa97dd21 Add CI and integrate EVM bytecode CLI
- Added the initial EVM SDK and Yul backend.
- Added EVM examples and Foundry smoke tests.
- Added bytecode compilation through
solc --strict-assembly. - Added CI around the baseline build and EVM smoke path.
- EVM remains the first working target.
- New IR work should use EVM as the first executable backend to validate semantics before adding more chains.
EVM Nested Local Fixed Arrays
Commit: pending Summary:- Extended portable IR EVM local fixed-array lowering to static nested scalar arrays.
- Added deterministic Yul locals for nested leaves such as
matrix[1][0]. - Covered static nested reads, mutable leaf assignment, numeric leaf compound assignment, nested whole-local assignment, and RHS snapshotting.
- Extended nested local scalar fixed arrays to dynamic index paths, including
nested getter helpers for reads and nested
switchblocks for mutable leaf assignment and compound assignment. - Added
nested_dynamic_pick,nested_dynamic_row_pick,nested_dynamic_update, andnested_dynamic_row_updatecoverage toEvmArrayValueProbe.
- Lean build passed.
- Array value smoke produced reproducible golden Yul, compiled bytecode with
solc --strict-assembly, validated metadata, and passed 17 Foundry tests.
- Nested local arrays with unsupported aggregate or non-flat leaves remain
explicit unsupported surfaces; flat struct leaves are covered by
EvmStructArrayValueProbe.
EVM SDK Example Golden Yul
Commit: pending Summary:- Added tracked golden Yul fixtures for SDK EVM examples:
ArrayExample,Counter,SimpleToken,ERC20,Ownable,Pausable, andVerifiedVault. - Updated
scripts/evm/build-examples.shto emit generated SDK Yul intobuild/evm, diff it against each sibling.golden.yul, compile bytecode, and validate ProofForge artifact metadata. - Updated EVM validation docs and example README files so changing an SDK example now includes updating its golden Yul fixture.
- All seven SDK examples produced reproducible Yul matching the new golden fixtures.
- All seven SDK examples compiled with
solc --strict-assemblyand validated EVM artifact/deploy metadata.
- Runtime behavior remains covered by
scripts/evm/foundry-smoke.sh.
CI Baseline Repair + Upgrade Policy Resolver
Commit: pending Summary:- Fixed the root
target/ignore rule soProofForge/Target/HostBridge.leanis no longer silently ignored on case-insensitive filesystems, while keeping Rust build output ignored in known target directories. - Replaced the missing GitHub Actions Rust setup action with
dtolnay/rust-toolchain@stable, then pinned the CosmWasm smoke job to Rust1.88.0andcosmwasm-check 2.2.9 --lockedafter latestcosmwasm-checkfailed to link against newer Rust/Wasmer probestack symbols. - Wired
ContractSpec.upgradePolicy?into target resolution so unsupported target/policy combinations fail before code generation, and supported policies emitupgrade.policy.*metadata. - Added a focused upgrade-policy smoke covering EVM, Solana, NEAR, Psy, JSON serialization, and escaping.
- Corrected the Gate G0 ledger so it no longer claims
just checkis green before CI and docs sync evidence are actually green.
- Target adapter build, upgrade-policy smoke, and target library build passed locally before the full repo validation pass.