Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

partkey registry: Single signature onetimesig. #5825

Closed
wants to merge 7 commits into from

Conversation

winder
Copy link
Contributor

@winder winder commented Nov 9, 2023

Summary

This change locks down the participation registry such that the participationID for a requested round only includes voting secrets for that particular round.

Test Plan

New unit tests for onetimesignature changes.
All existing e2e tests hit this code and serve as regression tests.
Manual testing with FiveNodesTwoRelays.json template show the network making progress.

Comment on lines 848 to 853
// Delete all secrets except for the requested round
snap := result.ParticipationRecord.Voting.Snapshot()
otsID := basics.OneTimeIDForRound(round, result.KeyDilution)
snap.DeleteBeforeFineGrained(otsID, result.KeyDilution)
snap.DeleteAllButFineGrained(otsID)
result.ParticipationRecord.Voting = &snap
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The heart of the change is this block of code in the participation registry. Stripping out the extra stuff and seeing that the network operates properly shows that a subset of secrets may be returned without any trouble and the existing public interface doesn't require any changes.

crypto/onetimesig.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 9, 2023

Codecov Report

Merging #5825 (848c361) into master (c1207a4) will increase coverage by 0.01%.
Report is 6 commits behind head on master.
The diff coverage is 60.00%.

❗ Current head 848c361 differs from pull request most recent head 2619686. Consider uploading reports for the commit 2619686 to get more accurate results

@@            Coverage Diff             @@
##           master    #5825      +/-   ##
==========================================
+ Coverage   55.61%   55.63%   +0.01%     
==========================================
  Files         475      475              
  Lines       66909    66933      +24     
==========================================
+ Hits        37212    37236      +24     
+ Misses      27182    27181       -1     
- Partials     2515     2516       +1     
Files Coverage Δ
data/account/participationRegistry.go 78.96% <71.42%> (-0.12%) ⬇️
crypto/onetimesig.go 74.82% <55.55%> (-1.33%) ⬇️

... and 14 files with indirect coverage changes

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@winder winder closed this Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants