Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

sudo/sessionKeys: Implement sudo_sessionKeys_unstable_generate #1682

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

lexnv
Copy link
Contributor

@lexnv lexnv commented Sep 22, 2023

This PR implements the sudo_sessionKeys_unstable_generate method.

This is basically an equivalent for the rotate_keys API in the RPC-Spec-V2 with extended ability to provide a user-defined seed.

The RPC method calls into SessionKeys_generate_session_keys runtime function.
Then, the SessionKeys_generate_session_keys runtime function generates a series of keys,
inserts those keys into the keystore, and returns all the public keys concatenated.

Added a test to validate that keys are propagated to the keystone.

This PR does not expose the sudo_sessionKeys_unstable_generate to the RPC layer yet, since there might be changes wrt the naming convention.

Part of #1516.

@paritytech/subxt-team

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
@lexnv lexnv self-assigned this Sep 22, 2023
@lexnv lexnv added A1-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). R0-silent Changes should not be mentioned in any release notes I5-enhancement An additional feature request. T3-RPC_API This PR/Issue is related to RPC APIs. D1-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase. labels Sep 22, 2023
Copy link
Contributor

@tadeohepperle tadeohepperle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Looks good to me :)

@bkchr
Copy link
Member

bkchr commented Jul 17, 2024

@lexnv what is the status here?

@lexnv
Copy link
Contributor Author

lexnv commented Jul 17, 2024

I believe I put this on hold for the new SessionKeys::generate_session_keys(owner: Vec<u8>, seed: Option<Vec<u8>>) method introduced in:

Since this PR is already spec-ed out and will add it as _unstable, we can easily modify it later.

If that sounds like a plan, I'll polish this up a bit and ask for some reviews soon 🙏

@bkchr
Copy link
Member

bkchr commented Jul 24, 2024

Okay 👍 Yeah I will finish the mentioned pr soon.

lexnv added 5 commits August 1, 2024 13:45
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-clippy
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6881158

lexnv added 2 commits August 5, 2024 13:46
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A1-insubstantial Pull request requires no code review (e.g., a sub-repository hash update). D1-medium Can be fixed by a coder with good Rust knowledge but little knowledge of the codebase. I5-enhancement An additional feature request. R0-silent Changes should not be mentioned in any release notes T3-RPC_API This PR/Issue is related to RPC APIs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants