-
Notifications
You must be signed in to change notification settings - Fork 518
Added Participation Key Expiration Check #2924
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
Added Participation Key Expiration Check #2924
Conversation
|
Please update the PR's Summary and Test Plan. |
Codecov Report
@@ Coverage Diff @@
## master #2924 +/- ##
==========================================
- Coverage 47.63% 47.55% -0.08%
==========================================
Files 359 359
Lines 57964 58406 +442
==========================================
+ Hits 27611 27775 +164
- Misses 27231 27458 +227
- Partials 3122 3173 +51
Continue to review full report at Codecov.
|
tsachiherman
left a comment
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.
Overall looks good - I've had few requests, some are just code-style, some are more around compatibility with other PRs.
tsachiherman
left a comment
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.
given that you've modified the encoding of the block header, you'll need to regenerate the msgp in order to make it persistent; use make msgp to regenerate all the auto-gen msgp encoders/decoders.
tsachiherman
left a comment
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.
The test you've added at TestExpiredAccountGeneration is good - but we would need more extensive unit testing. In practice, you change would affect the GenerateBlock(), eval() and EvalForIndexer. For each one of these, we need to make sure that the code changes produce their expected output;
as a generic guideline, each of the if-statements that you've included in your PR need to be tested for both success and failure.
Resolves #2738 Adds the following: - consensus.go: Adds the default MaxExpiredAccountsToProcess value for the new consensus protocol - block.go: Adds necessary block header entries - eval.go: Scans for expired accounts, modifies them to be offline and adds validation for this use case - eval_test.go: Basic unit tests - participationExpiration_test.go: Added e2e tests that verify that different consensus protocols behave differently
The evaluator shouldn't ask the ledger who is the creator of an asset multiple times. This PR adds a cache for ledger's responses in cow base.
## Summary Resolves algorand#2738 Adds the following: - consensus.go: Adds the default MaxExpiredAccountsToProcess value for the new consensus protocol - block.go: Adds necessary block header entries - eval.go: Scans for expired accounts, modifies them to be offline and adds validation for this use case - eval_test.go: Basic unit tests - participationExpiration_test.go: Added e2e tests that verify that different consensus protocols behave differently ## Test Plan Unit test and e2e tests added
## Summary Clear out AccountData.StateProofID when ClearOnlineState() is called, by resetExpiredOnlineAccountsParticipationKeys (as part of #2924) ## Test Plan Updated TestExpiredAccountGeneration to generate random online account data, so that it fails without this change.
Summary
Resolves #2738
Adds the following:
the new consensus protocol
validation for this use case
different consensus protocols behave differently
Test Plan
Unit test and e2e tests added