revert(forks): drop SigScheme capability and @requires marker (#715)#787
Merged
tcoratger merged 1 commit intoMay 28, 2026
Merged
Conversation
…hereum#715) Reverts the fork-level capability Protocol and pytest marker introduced in leanEthereum#715. The abstraction is not needed at this stage; signature verification reads TARGET_SIGNATURE_SCHEME directly. - Delete forks/capabilities.py (SigScheme Protocol) - Drop sig_scheme ClassVar from LstarSpec; on_gossip_attestation now references TARGET_SIGNATURE_SCHEME directly - Delete framework/markers.py (requires_capability helper) - Strip requires marker registration, spec-instance cache, and capability-check branch from the filler plugin - Drop valid_from / valid_at / requires entries from pyproject markers - Remove the two test files that exercised the capability and marker verify_signatures and on_block already lost their scheme-threading in \leanEthereum#717 (TypeTwoMultiSignature rewrite), so the old scheme= parameters and the LEAN_ENV_TO_SCHEMES filler overrides are not reintroduced. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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
Reverts the fork-level capability Protocol and pytest marker introduced in #715. The abstraction is cool but not needed at this stage — signature verification reads
TARGET_SIGNATURE_SCHEMEdirectly, and the spec stays simpler.forks/capabilities.py(theSigSchemeProtocol) and its re-exports inforks/__init__.pysig_schemeClassVar fromLstarSpec; the one real call site (on_gossip_attestation) now referencesTARGET_SIGNATURE_SCHEMEdirectlyframework/markers.py(therequires_capabilityhelper) and its re-exportrequiresmarker registration, the_spec_instance_forcache, and the capability-check branch from the filler pluginvalid_from/valid_at/requiresmarker entries that feat(forks): add SigScheme capability and @requires marker (Stage 7 of #686) #715 added topyproject.tomltests/lean_spec/forks/test_capabilities.py,tests/consensus/lstar/test_capability_gating.py)Note on the spec method signatures
PR #717 (aggregated block proof) had already rewritten
verify_signaturesandon_blockto useTypeTwoMultiSignature, removing the scheme-threading entirely. So this revert does not reintroduce the oldscheme: GeneralizedXmssScheme = TARGET_SIGNATURE_SCHEMEparameters or thescheme=LEAN_ENV_TO_SCHEMES[...]filler overrides — re-adding them would work against the goal of simplifying.Test plan
just check— green (ruff, format, ty, codespell, mdformat)uv run pytest --no-cov— 3066 passeduv run fill --fork=lstar --clean tests/consensus/lstar/verify_signatures tests/consensus/lstar/fc— 98 passed (exerciseson_blockandon_gossip_attestation, the two methods touched by this revert)🤖 Generated with Claude Code