Repository navigation
fix(ethclspecs): compare containers by their fields where the pyspec does - #155
Open
IvanAnishchuk wants to merge 1 commit into
Open
IvanAnishchuk wants to merge 1 commit into
IvanAnishchuk wants to merge 1 commit into
Conversation
…does At v1.7.0-beta.4 the pyspec runs on eth-ssz-specs. Its containers compare field by field (pydantic `__eq__`). remerkleable compared hash tree roots. Three fork-body checks still compared roots: - `is_slashable_attestation_data`: `data_1 != data_2` - `process_proposer_slashing`: `header_1 != header_2` - `process_parent_execution_payload` on the EMPTY edge: `requests == ExecutionRequests.empty()` The two forms differ only when two different containers share a root. Each check now uses the derived `BEq` of the container. The FULL edge of `process_parent_execution_payload` compares `hash_tree_root(requests)` in the spec as well, so it stays.
This was referenced Nov 21, 2026
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.
Summary
At v1.7.0-beta.4 the pyspec runs on eth-ssz-specs, and its containers compare field by field (pydantic
__eq__). remerkleable compared hash tree roots. Three fork-body checks still compared roots. Each now uses the derivedBEqof the container. The two forms differ only when two different containers share a root.The proof stack from #113 up sits on this PR.
What changed
EthCLSpecs
Fulu/Operations.lean:isSlashableAttestationDatatestsd1 != d2(the pyspec'sdata_1 != data_2), andprocessProposerSlashingassertsh1 != h2(header_1 != header_2). Gloas and Heze inherit both.Gloas/Operations.lean: on the EMPTY edge,processParentExecutionPayloadassertsrequests == default(requests == ExecutionRequests.empty()). The FULL edge compareshash_tree_root(requests)in the spec too, so it keeps the root.Docs
PROOF_LEDGER.md: fourFulu/Operations.leanspans move by one or two lines.Test plan
lake build(full monorepo, on the pinned toolchain) is green.lake build LeanSha256Testslake build SizzLeanTestsjust ethcl-testjust ethcl-pyspecis green.before/after
lake exe ssz_benchTSV (or relevant rows) inthe PR description.
native_decideorproperty test that exercises them.
Risk / trust footprint
None.
Notes for reviewers
lake buildandjust ethcl-pyspecran at the top of the stack.just ethcl-pyspeccovered the smoke subset for all three forks and the full Fulu and Gloas operations vectors at minimal, with no failures.just ethcl-testpassed on every commit of the stack. The first of them only addsProofs/Heze/Run.lean.LICENSE (LGPL version 3)