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

Elastic scaling: introduce new candidate receipt primitive #5322

Merged
merged 43 commits into from
Sep 2, 2024

Conversation

sandreim
Copy link
Contributor

@sandreim sandreim commented Aug 12, 2024

closes #5044

This PR switches the runtime to the new receipts format (vstaging primitives). I've implemented From to convert from new primitives to v7 primitives and used them in the node runtime api client implementation. Until we implement the support in the node, it will continue e to use the v7 primitives but the runtime apis already use the new primitives.

An expected downside of RFC103 is decoding V2 receipts shows garbage values if the input is V1:
ima_9ce77de

TODO:

  • fix tests
  • A few more tests for the new primitives
  • PRDoc

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
@alindima alindima self-requested a review August 12, 2024 15:04
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
@sandreim sandreim changed the title Elastic scaling: introduce new candidate receipts Elastic scaling: introduce new candidate receipt primitive Aug 12, 2024
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
polkadot/primitives/src/vstaging/mod.rs Show resolved Hide resolved
polkadot/primitives/src/vstaging/mod.rs Outdated Show resolved Hide resolved
polkadot/primitives/src/vstaging/mod.rs Outdated Show resolved Hide resolved
polkadot/primitives/src/vstaging/mod.rs Show resolved Hide resolved
polkadot/primitives/src/vstaging/mod.rs Outdated Show resolved Hide resolved
polkadot/primitives/src/vstaging/mod.rs Outdated Show resolved Hide resolved
polkadot/primitives/src/vstaging/mod.rs Outdated Show resolved Hide resolved
polkadot/primitives/src/vstaging/mod.rs Show resolved Hide resolved
polkadot/primitives/src/vstaging/mod.rs Show resolved Hide resolved
polkadot/runtime/parachains/Cargo.toml Outdated Show resolved Hide resolved
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
@sandreim sandreim added T4-runtime_API This PR/Issue is related to runtime APIs. T8-polkadot This PR/Issue is related to/affects the Polkadot network. labels Aug 13, 2024
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
@sandreim sandreim marked this pull request as ready for review August 21, 2024 14:05
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
On top of #5322

This is an additional check to prevent nodes from passing the v2
candidate descriptors in the runtime until it is enabled via the node
feature.

TODO:
- [ ] PRDoc

---------

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
polkadot/primitives/src/v7/mod.rs Outdated Show resolved Hide resolved
polkadot/primitives/src/vstaging/mod.rs Outdated Show resolved Hide resolved
polkadot/primitives/src/vstaging/mod.rs Show resolved Hide resolved
polkadot/primitives/src/vstaging/mod.rs Outdated Show resolved Hide resolved
polkadot/primitives/src/vstaging/mod.rs Show resolved Hide resolved
polkadot/runtime/westend/src/lib.rs Show resolved Hide resolved
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
…reim/rfc103-primitives

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
@paritytech-cicd-pr
Copy link

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

@paritytech-cicd-pr
Copy link

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

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
@sandreim sandreim added this pull request to the merge queue Sep 2, 2024
Merged via the queue into master with commit ad2ac0d Sep 2, 2024
184 of 185 checks passed
@sandreim sandreim deleted the sandreim/rfc103-primitives branch September 2, 2024 17:46
x3c41a pushed a commit that referenced this pull request Sep 4, 2024
closes #5044

This PR switches the runtime to the new receipts format (vstaging
primitives). I've implemented `From` to convert from new primitives to
`v7` primitives and used them in the node runtime api client
implementation. Until we implement the support in the node, it will
continue e to use the v7 primitives but the runtime apis already use the
new primitives.

An expected downside of RFC103 is decoding V2 receipts shows garbage
values if the input is V1:

_![ima_9ce77de](https://github.com/user-attachments/assets/71d80e78-e238-4518-8cd1-548ae0d74b70)_

TODO:
- [x] fix tests
- [x] A few more tests for the new primitives
- [x] PRDoc

---------

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T4-runtime_API This PR/Issue is related to runtime APIs. T8-polkadot This PR/Issue is related to/affects the Polkadot network.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Elastic scaling: introduce new CandidateDescriptor and related primitives
5 participants