-
Notifications
You must be signed in to change notification settings - Fork 486
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
Limit the longest validity period allowed for key registration to pre… #3181
Limit the longest validity period allowed for key registration to pre… #3181
Conversation
Codecov Report
@@ Coverage Diff @@
## feature/dilithium-scheme-integration #3181 +/- ##
========================================================================
- Coverage 47.62% 47.61% -0.01%
========================================================================
Files 381 381
Lines 61460 61466 +6
========================================================================
- Hits 29268 29265 -3
- Misses 28796 28804 +8
- Partials 3396 3397 +1
Continue to review full report at Codecov.
|
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 please merge/rebase from feature/dilithium-scheme-integration?
0df5c4f
to
be56ec4
Compare
43cd29f
to
8b4eaba
Compare
…vent merklekeystore tree from being too big
…backwards compatibility
8b4eaba
to
bd074ea
Compare
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.
Just some minor changes are needed.
|
||
for _, params := range Consensus { | ||
if params.CompactCertRounds != 0 { | ||
require.Equal(t, uint64(1<<16), (params.MaxKeyregValidPeriod+1)/params.CompactCertRounds, |
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 the "16" be replaced by an existing variable representing that value?
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.
I can use merklearray.MaxTreeDepth, but what about the consensus parameters (MaxKeyregValidPeriod for example), should it use that as well? If not there might be some inconsistency in the future.
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.
Let's postpone this parameter issue to a later PR. #3257
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.
Merge Aharonee#1 if you agree with it.
Then should be good to go.
|
@@ -117,11 +121,11 @@ func TestBuildVerify(t *testing.T) { | |||
ProvenWeight: uint64(totalWeight / 2), | |||
SigRound: currentRound, | |||
SecKQ: 128, |
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.
It is a sound design to have crypto independent of the consensus parameters.
However, the hard-coded values in the tests which are repeating the consensus values does not look right. And since the compiler-enforced link of these values to the consensus parameters is broken, this can be problematic in the event the consensus values change.
CompactCertRounds is getting its value from go-algorand/config, but SecKQ is not. They need to be uniform.
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.
Let's postpone this #3257
@@ -609,10 +609,29 @@ func TestKeyReg(t *testing.T) { | |||
` | |||
ep, ledger := makeSampleEnv() | |||
ep.Proto.EnableStateProofKeyregCheck = true | |||
ep.Proto.MaxKeyregValidPeriod = (1<<16)*128 - 1 // 2^16 StateProof keys times CompactCertRounds (interval) |
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.
Maybe not in this PR, but we need to find a way to consolidate these hard-coded values into a variable in a single location and use that.
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.
Yes that would definitely be better, we need a single source of truth for all these place to inherit from
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.
48b3cf6
to
eff1253
Compare
…vent merklekeystore tree from being too big
Summary
Test Plan