-
Notifications
You must be signed in to change notification settings - Fork 115
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
go/consensus/genesis: Add a public key blacklist #2959
Conversation
Yawning
commented
May 29, 2020
•
edited
Loading
edited
- Basic changes to crypto/signature to support such a thing
- Alter the genesis document format
- Make the registry genesis checks blacklist aware
- Figure out wtf to do for the staking ledger (Resolved: Ignore it till the address format changes)
This is mostly done, but I need to figure out how we want to handle genesis documents that contain staking ledger entries corresponding to blacklisted public keys. As far as I know we want to allow this (a public key being invalid shouldn't obliterate the corresponding account state, just the ability to do transactions), but this might be a moot point based on how #2940 ends up being implemented. |
@@ -85,3 +85,18 @@ func TestContext(t *testing.T) { | |||
_, err = PrepareSignerMessage(unregCtx, []byte("message")) | |||
require.NoError(err, "PrepareSignerMessage should work with unregisered context (bypassed)") | |||
} | |||
|
|||
func TestBlacklist(t *testing.T) { |
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.
Testing whether you cannot submit transactions (and that transaction is not accepted by other nodes) with blacklisted key would be useful.
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.
You could do that by using show_tx
(as long as the blacklist is part of the genesis document), you only would need to load the blacklist there as well (similar to how we set the chain domain separation context from the genesis doc to verify signatures).
Codecov Report
@@ Coverage Diff @@
## master #2959 +/- ##
==========================================
- Coverage 68.38% 68.25% -0.14%
==========================================
Files 361 361
Lines 35191 35216 +25
==========================================
- Hits 24067 24035 -32
- Misses 8018 8075 +57
Partials 3106 3106
Continue to review full report at Codecov.
|
Add a method for checking if a public key is blacklisted, and for easily blacklisting public keys on the fly.
fe9eec5
to
14e21be
Compare