-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: Add SEDA Keys #320
feat: Add SEDA Keys #320
Conversation
@@ -206,20 +206,15 @@ func LoadVRFKey(keyFilePath string) (*VRFKey, error) { | |||
// If loadPath is specified, it loads the VRF key file at the specified | |||
// path. Otherwise, it generates a new VRF key, whose entropy is randomly | |||
// generated or obtained from the mnemonic, if provided. | |||
func LoadOrGenVRFKey(config *cfg.Config, loadPath, mnemonic string) (vrfPubKey sdkcrypto.PubKey, err error) { | |||
func LoadOrGenVRFKey(config *cfg.Config, loadPath string) (vrfPubKey sdkcrypto.PubKey, err error) { |
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.
I'm not 100% sure how the dependency between the PKR and other modules is going to look. I thought the pubkeys was going to generate all required keys and the modules that utilise them 'just' send data to the module to have it signed with the correct key.
if err := m.Keeper.PubKeys.Set(ctx, collections.Join(valAddr, indPubKey.Index), pubKey); err != nil { | ||
return nil, err | ||
} |
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.
For a different PR: move the knowledge of the store/collections out of the message server?
Thanks for the reviews.. I will address them after fixing the JSON unmarshalling issue I found while adding CLI tests. |
Done but there is a gas estimation issue to be addressed in a separate PR (See Issue #341) |
64465c9
to
7931d46
Compare
7931d46
to
7bb630d
Compare
Explanation of Changes
This PR adds the last component of the pubkey module, the SEDA keys. This implements a CLI command for generating a set of SEDA keys and publishing their public keys on chain. Each of the SEDA keys are generated from a random seed, and they are stored in a single key file
seda_keys.json
under the same directory where the consensus private key is saved to. This means that, if any of the keys is lost, the user must re-generate and rotate all of his or her SEDA keys.To generate the SEDA keys and register their public keys on chain, run:
To query the validator's list of SEDA public keys:
When the SEDA Protocol requires a new key to be registered on chain, the
add-key
command would be updated to generate the new key at some unused index.Related PRs and Issues
TODO
x/pkr
tox/pubkey
Closes #162