Skip to content
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

frame-session: Introduce a proper proof of key ownership #1739

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

Conversation

bkchr
Copy link
Member

@bkchr bkchr commented Sep 28, 2023

frame_session::set_keys supports providing a proof as second parameter. This proof was not yet checked. This pull request introduces a verification of this proof and also a way of generating this proof. The proof in FRAME are concatenated Signatures. These Signatures are in the same order as the public keys in the SessionKeys struct. Each signature is signing the owner, proofing that the generating party has access over the private key associated to the public session key. The owner in FRAME is the account id of the account that will call set_keys, aka the account of the validator.

This pull request is changing the SessionKeys runtime api. This still requires a RFC, as this is a public interface of the Polkadot runtime.

@jacogr polkadot-js should provide a way to use the runtime api directly to generate the sessions keys.
@paritytech/docs-audit this will require updates of the validator documentation to tell them what to pass for owner and that they need to pass proof to set_keys.

@bkchr bkchr requested review from a team September 28, 2023 11:09
@bkchr bkchr added T1-FRAME This PR/Issue is related to core FRAME, the framework. T8-polkadot This PR/Issue is related to/affects the Polkadot network. labels Sep 28, 2023
@paritytech-ci paritytech-ci requested a review from a team September 28, 2023 11:10
@bkchr
Copy link
Member Author

bkchr commented Sep 28, 2023

bot fmt

@command-bot
Copy link

command-bot bot commented Sep 28, 2023

@bkchr https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3833889 was started for your command "$PIPELINE_SCRIPTS_DIR/commands/fmt/fmt.sh". Check out https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/pipelines?page=1&scope=all&username=group_605_bot to know what else is being executed currently.

Comment bot cancel 21-2be17067-a4d6-4111-9ee5-f00880c1886f to cancel this command or bot cancel to cancel all commands in this pull request.

@command-bot
Copy link

command-bot bot commented Sep 28, 2023

@bkchr Command "$PIPELINE_SCRIPTS_DIR/commands/fmt/fmt.sh" has finished. Result: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3833889 has finished. If any artifacts were generated, you can download them from https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3833889/artifacts/download.

@bkchr
Copy link
Member Author

bkchr commented Sep 29, 2023

@jacogr polkadot-js should provide a way to use the runtime api directly to generate the sessions keys.

Scrape that, we need a new RPC for this.

@kianenigma
Copy link
Contributor

https://github.com/orgs/paritytech/teams/docs-audit this will require updates of the validator documentation to tell them what to pass for owner and that they need to pass proof to set_keys.

This is mostly in the Polkadot wiki, I will ping the w3f folks and also setup a system where they can listen to mentioned of this docs-audit team. But all in all, you should do your best to update the docs around this in the rust docs of pallet session at first.

@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable 3/3
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/3943056

serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Mar 26, 2024
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Mar 27, 2024
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 8, 2024
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 9, 2024
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 10, 2024
serban300 added a commit to serban300/polkadot-sdk that referenced this pull request Apr 10, 2024
bkchr pushed a commit that referenced this pull request Apr 10, 2024
TomaszWaszczyk pushed a commit to TomaszWaszczyk/polkadot-sdk that referenced this pull request May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T1-FRAME This PR/Issue is related to core FRAME, the framework. T8-polkadot This PR/Issue is related to/affects the Polkadot network.
Projects
Status: Audited
Development

Successfully merging this pull request may close these issues.

None yet

4 participants