Skip to content

Trim randomization elements to ChainLen and add verifyOrRevert#2

Open
parsaaba wants to merge 1 commit into
QuipNetwork:mainfrom
parsaaba:trim-randomization-elements
Open

Trim randomization elements to ChainLen and add verifyOrRevert#2
parsaaba wants to merge 1 commit into
QuipNetwork:mainfrom
parsaaba:trim-randomization-elements

Conversation

@parsaaba

Copy link
Copy Markdown

No description provided.

@parsaaba

Copy link
Copy Markdown
Author

Hey @rcarback
really like the WOTS+ work here.
noticed generateRandomizationElements derives all 67 elements, but chain only ever uses the first ChainLen (16), so 51 were wasted keccak calls. Trimming the loop saves ~6.5% gas on verify with identical behavior.
Also tucked in a few small things, verifyOrRevert so a false return can't be ignored, pinned the pragma to 0.8.34, made sign/generateKeyPair internal (offchain reference only), and added some negative/fuzz tests.
Happy to split this up or drop anything you'd rather not take. Thanks!

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