Skip to content

revert(forks): drop SigScheme capability and @requires marker (#715)#787

Merged
tcoratger merged 1 commit into
leanEthereum:mainfrom
tcoratger:revert-sigscheme-capability
May 28, 2026
Merged

revert(forks): drop SigScheme capability and @requires marker (#715)#787
tcoratger merged 1 commit into
leanEthereum:mainfrom
tcoratger:revert-sigscheme-capability

Conversation

@tcoratger
Copy link
Copy Markdown
Collaborator

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_SCHEME directly, and the spec stays simpler.

  • Delete forks/capabilities.py (the SigScheme Protocol) and its re-exports in forks/__init__.py
  • Drop the sig_scheme ClassVar from LstarSpec; the one real call site (on_gossip_attestation) now references TARGET_SIGNATURE_SCHEME directly
  • Delete framework/markers.py (the requires_capability helper) and its re-export
  • Strip the requires marker registration, the _spec_instance_for cache, and the capability-check branch from the filler plugin
  • Drop the valid_from / valid_at / requires marker entries that feat(forks): add SigScheme capability and @requires marker (Stage 7 of #686) #715 added to pyproject.toml
  • Remove the two test files that exercised the capability and marker (tests/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_signatures and on_block to use TypeTwoMultiSignature, removing the scheme-threading entirely. So this revert does not reintroduce the old scheme: GeneralizedXmssScheme = TARGET_SIGNATURE_SCHEME parameters or the scheme=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 passed
  • uv run fill --fork=lstar --clean tests/consensus/lstar/verify_signatures tests/consensus/lstar/fc — 98 passed (exercises on_block and on_gossip_attestation, the two methods touched by this revert)

🤖 Generated with Claude Code

…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>
@tcoratger tcoratger merged commit d866322 into leanEthereum:main May 28, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant