-
Notifications
You must be signed in to change notification settings - Fork 491
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
Enhancement: Detect when valid partkeys represent an offline or closed account #4030
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4030 +/- ##
==========================================
+ Coverage 54.46% 54.58% +0.11%
==========================================
Files 391 391
Lines 48665 48674 +9
==========================================
+ Hits 26506 26569 +63
+ Misses 19930 19881 -49
+ Partials 2229 2224 -5
|
abf8a9f
to
8b16a78
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 good, just a couple small comments.
Resolves #2060 Puts in booleans to deduct account status from online account data and uses that to upgrade log messages to info from warnings if necessary
013b1ff
to
4e7cca4
Compare
Updated PR to include all scenario warnings. |
Since there are no tests, was there manual testing to identify the messages work as desired for S1/S2/S3? Or maybe you could add a test if it's not too tricky? |
@cce Could you look at the updated PR? |
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.
Need to rename test, would be nice to consolidate duplication
Resolves #2060
Resolves all scenarios described below:
Scenario 1 (S1): Address is closed, but has a participation key that is still registered and valid given the current round number.
Scenario 2 (S2): Address is offline. Could imply no registration txn or an expired one.
Scenario 3 (S3): Address is online, with a valid participation key.
The breakdown of the scenarios by count is as follows:
S1: 7 addresses
S2: 43 addresses
S3: 2 addresses
The following actions are recommended for each scenario:
S1
Check that account is closed for the on-chain data. If account is closed, silently ignore since this account has been officially closed.
S2
Check that account is offline. If account is offline, return error indicating that no registration transaction has been issued or that previous registration transaction is expired.
S3
Recommend that error message indicates that user should regenerate participation key for the node.