Fix a bug about duplicate validator key#2628
Fix a bug about duplicate validator key#2628gguoss wants to merge 2 commits intoparitytech:masterfrom
Conversation
|
what bug is this meant to fix? |
Validator (A, B ).
Validator's key will be two same AuthorityKey. |
|
please explain further. |
|
@gguoss ping |
|
Registering the authority node does not require any physical machine to run the node. Because I just need to set my authority key to the existing authority key of the running node. This way I can get dividends as usual. |
The reason for doing evil is: A duplicate authority key can be added to the aura consensus. |
| @@ -165,8 +165,11 @@ decl_module! { | |||
| /// This doesn't take effect until the next session. | |||
| fn set_key(origin, key: T::SessionKey) { | |||
| let who = ensure_signed(origin)?; | |||
There was a problem hiding this comment.
it should remove the current entry for NextKeyFor(who) in KeyFilterMap.
|
so this is to prevent two validators assigning themselves the same session key? |
yes |
|
This is superseded now. |
Thank you for your Pull Request!
Before you submitting, please check that:
Fixes #228orRelated #1337.After you've read this notice feel free to remove it.
Thank you!
✄ -----------------------------------------------------------------------------