Repository navigation
Conversation
Lay down the Progress module skeleton for the caller-side state transition work: fixed-region layout, the 40-instruction epoch-record rotation program (eth1 reset, slashings reset, randao mix rotation, participation rotation), its internal contract, and partial bounded-triple proofs. Register and loop specs are not wired into any executable yet; this branch is a work-in-progress base for the remaining transition logic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status: work in progress (draft)
This branch carries the in-progress state-transition work; it is opened as a draft at the user's request so the partial state is visible while development continues. It is not ready for review-based merge. Before this PR is marked ready: the remaining Lean proofs land, the generated ELF is wired into the build/runners, official-reference differential tests are added, the full CI validation sequence covers the new modules, and the mandatory
implementation_donereview gate runs on the complete diff.What this branch adds
ClAsm/Progress/— a new module family for the record-rotation core ofprocess_epoch(the pinned altair semantics at consensus-specs530cf56), which the caller-side state transition needs:Layout.lean: fixed-region internal ABI (participation arrays reused from the aggregate layout, randao mixes / slashings / eth1 vote-count regions at sub-0x80000000bases soluisign-extension stays non-negative), region-disjointness and capacity theorems.Program.lean: the 40-instructionprogram= eth1 vote-record reset (conditional,(epoch+1) % 64 = 0), slashings reset (slashings[(epoch+1) % 8192] := 0), randao mix rotation (mixes[(epoch+1) % 65536] := mixes[epoch % 65536]), participation rotation loop (previous[i] := current[i]; current[i] := 0), with the guarded-loop addresses and thestepBound n = 8 * n + 33bound.State.lean:Addresses/Registers/Input,ValidAddresses(concrete pinned regions, alignment, no-wrap, pairwise disjoint),ValidInput(count bound, the two offset-coincidence exclusions: randao self-overwrite epoch and the slashings-target-equals-base epoch),precondition,postcondition.Correctness.lean: per-segment bounded triples fully proved for the eth1 (conditional branch store), slashings (single-cell zeroing) and randao (mask, shift, load-store rotation) segments — 13-instruction composition withseqFramechains, closed viasimpa [sepConj_assoc'].LoopProof.lean: loop-guard fall-through and taken specs, back-jump return spec,ofProgcode-membership lemmas; the one-iteration and loop-induction theorems are next.Proof-status detail
eth1Reset_speccpsTripleWithin_mono_nStepson the taken path)slashingsReset_specx18runst18 → LUI-raw → 8191; two memory cells + untouched registers carried through every piece)randaoReset_specg1→g2join (under investigation; atoms match by inspection)rotBody_spec/rotIter/induction)Known-good proof recipes (documented after debugging): per-piece
extendBlockwith literalbase + 4 * kentries andha = (by simp)/rfl,seqFramechains closed withrw [hcode]; exact ...+simpa [sepConj_assoc'], mem-cell atoms kept in one written form everywhere (memIsdisplays as(ptr + signExtend12 0) mem v), LUI-value literals proved byrfl/bv_decide.Trust boundaries (unchanged rule)
Lean proves the modeled instruction sequences only. ELF emission, assembly, linking, loading, interpreter conversion, and agreement with the official pinned Python functions are test responsibilities, as for
weighandaggregate. The modules are not yet wired intoClAsm.lean/targets, so this draft does not change any generated artifact; CI exercises the same pipeline asmain.Validation on this commit
lake --no-cache --wfail build: pass (147 jobs, 0 warnings).lake env lean scripts/CheckAxioms.lean: pass, 4,848 declarations, onlyClassical.choice,Quot.sound,propext..lake/build/bin/cl-asm build/cl-asm-test buildandpython -m unittest discover -s tests: pass;weigh4,796 official differential cases (the existing regression is untouched).Remaining for ready (tracked continuation)
rotBody_spec,rotIter, the loop induction androtLoop_empty.Proof.leancomposing prologue/segments/loop/return withinstepBound.ClAsm.lean/targets/axiom-audit updates.