-
Notifications
You must be signed in to change notification settings - Fork 490
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
add version to coin-generator #4007
add version to coin-generator #4007
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Great!
@@ -48,7 +48,8 @@ func (cc *coinChoiceSeed) ToBeHashed() (protocol.HashID, []byte) { | |||
lnProvenWtAsBytes := make([]byte, 8) | |||
binary.LittleEndian.PutUint64(lnProvenWtAsBytes, cc.lnProvenWeight) | |||
|
|||
coinChoiceBytes := make([]byte, 0, len(cc.partCommitment)+len(lnProvenWtAsBytes)+len(cc.sigCommitment)+len(signedWtAsBytes)+len(cc.data)) | |||
coinChoiceBytes := make([]byte, 0, 1+len(cc.partCommitment)+len(lnProvenWtAsBytes)+len(cc.sigCommitment)+len(signedWtAsBytes)+len(cc.data)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use len(cc.version)
instead of 1+
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately , len(cc.version)
does not compile
Can you please add a comment in the PR description? |
Codecov Report
@@ Coverage Diff @@
## feature/stateproofs #4007 +/- ##
=======================================================
- Coverage 49.93% 49.91% -0.03%
=======================================================
Files 412 412
Lines 69231 69233 +2
=======================================================
- Hits 34572 34558 -14
- Misses 30932 30940 +8
- Partials 3727 3735 +8
Continue to review full report at Codecov.
|
Summary
In order to support changes in the stateproof verifier, we need to add a version number to the coinChoiceSeed structure so that Fiat-Shamir could be used safely in the future.
Test Plan