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

Fix multiple cores assignments 1.7 #3469

Merged
merged 5 commits into from
Feb 26, 2024

Conversation

eskimor
Copy link
Member

@eskimor eskimor commented Feb 23, 2024

First step into elastic scaling: Having a para be on multiple cores, will not get it more throughput yet, but it will no longer brick it.

This is a backport PR, as this would benefit the Coretime launch on Kusama.

sandreim and others added 2 commits February 23, 2024 17:41
…3229)

First step in implementing
#3144

- switch statement `Table` candidate mapping from `ParaId` to
`CoreIndex`
- introduce experimental `InjectCoreIndex`  node feature.
- determine and assume a `CoreIndex` for a candidate based on statement
validator index. If the signature is valid it means validator controls
the validator that index and we can easily map it to a validator
group/core.
- introduce a temporary provisioner fix until we fully enable elastic
scaling in the subystem. The fix ensures we don't fetch the same
backable candidate when calling `get_backable_candidate` for each core.

TODO:
- [x] fix backing tests
- [x] fix statement table tests
- [x] add new test

---------

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: alindima <alin@parity.io>
Co-authored-by: alindima <alin@parity.io>
…rent cores (#3231)

Fixes #3144

Builds on top of #3229

Some preparations for Runtime to support elastic scaling, guarded by
config node features bit `FeatureIndex::ElasticScalingMVP`. This PR
introduces a per-candidate `CoreIndex` but does it in a hacky way to
avoid changing `CandidateCommitments`, `CandidateReceipts` primitives
and networking protocols.

If the `ElasticScalingMVP` feature bit is enabled then
`BackedCandidate::validator_indices` is extended by 8 bits.
The value stored in these bits represents the assumed core index for the
candidate.

It is temporary solution which works by creating a mapping from
`BackedCandidate` to `CoreIndex` by assuming the `CoreIndex` can be
discovered by checking in which validator group the validator that
signed the statement is.

TODO:
- [x] fix tests
- [x] add new tests
- [x] Bump runtime API for Kusama, so we have that node features thing!
-> polkadot-fellows/runtimes#194

---------

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: alindima <alin@parity.io>
Co-authored-by: alindima <alin@parity.io>
@eskimor eskimor requested review from a team as code owners February 23, 2024 17:30
@eskimor eskimor changed the base branch from master to release-polkadot-v1.7.1 February 23, 2024 17:30
@eskimor eskimor added the A3-backport Pull request is already reviewed well in another branch. label Feb 23, 2024
@paritytech-cicd-pr
Copy link

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

@eskimor eskimor changed the title Fix multiple cores assignments Fix multiple cores assignments 1.7 Feb 26, 2024
@eskimor
Copy link
Member Author

eskimor commented Feb 26, 2024

Original PRs:

#3229
#3231

@EgorPopelyaev EgorPopelyaev merged commit 2a91d5a into release-polkadot-v1.7.1 Feb 26, 2024
126 of 127 checks passed
@EgorPopelyaev EgorPopelyaev deleted the rk-fix-multiple-cores branch February 26, 2024 09:16
bkontur pushed a commit that referenced this pull request Feb 27, 2024
First step into elastic scaling: Having a para be on multiple cores,
will not get it more throughput yet, but it will no longer brick it.

This is a backport PR, as this would benefit the Coretime launch on
Kusama.

---------

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: alindima <alin@parity.io>
Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com>
Co-authored-by: alindima <alin@parity.io>
Co-authored-by: eskimor <eskimor@no-such-url.com>
acatangiu pushed a commit that referenced this pull request Feb 28, 2024
Backport from `release-polkadot-v1.7.2`.

Expected patches for (1.7.0):

- polkadot-node-core-backing `8.0.1`
- polkadot-node-core-provisioner `8.0.1`
- polkadot-statement-table `8.0.1`
- polkadot-primitives `8.0.1`
- polkadot-runtime-parachains `8.0.1`

---------

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: alindima <alin@parity.io>
Co-authored-by: eskimor <eskimor@users.noreply.github.com>
Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com>
Co-authored-by: alindima <alin@parity.io>
Co-authored-by: eskimor <eskimor@no-such-url.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A3-backport Pull request is already reviewed well in another branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants