fix: serialize signatures to fixed bytes#435
Merged
tcoratger merged 1 commit intoleanEthereum:mainfrom Mar 6, 2026
Merged
Conversation
tcoratger
approved these changes
Mar 6, 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.
🗒️ Description
This PR aligns leanSpec signature encoding (as SSZ container with subfields) with how the client implementations are doing (fixed bytes).
Because leanSpec has flags for different signature scheme (test and prod currently), I've updated the
Signaturecontainer to calculate its length dynamically withTARGET_CONFIG.SIGNATURE_LEN_BYTESso it aligns with the --scheme flag used. However, in the cross client signature test, it's hardcoded to usePROD_CONFIG.SIGNATURE_LEN_BYTESfor consistent test result.The
_empty_signature()function also has to be updated to reflect this change, but instead I replace it withconsensus_testing.keys import create_dummy_signature()so there's one less place to maintain the logic.This PR is a spec change but it aligns the specs with how the clients are doing, so no changes would be needed on the clients.
🔗 Related Issues or PRs
✅ Checklist
toxchecks to avoid unnecessary CI fails:uvx tox