-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Fix a bug about duplicate validator key #2628
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. |
| /// Sets the session key of a validator (function caller) to `key`. | ||
| /// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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!
✄ -----------------------------------------------------------------------------