Files
pezkuwi-subxt/polkadot/zombienet_tests/functional/0012-elastic-scaling-mvp.zndsl
T
Andrei Sandu 2431001ec0 Runtime: allow backing multiple candidates of same parachain on different cores (#3231)
Fixes https://github.com/paritytech/polkadot-sdk/issues/3144

Builds on top of https://github.com/paritytech/polkadot-sdk/pull/3229

### Summary
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.

#### Including `CoreIndex` in `BackedCandidate`
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!
-> https://github.com/polkadot-fellows/runtimes/pull/194

---------

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Signed-off-by: alindima <alin@parity.io>
Co-authored-by: alindima <alin@parity.io>
2024-02-23 16:35:48 +00:00

29 lines
1.1 KiB
Plaintext

Description: Test that a paraid acquiring multiple cores does not brick itself if ElasticScalingMVP feature is enabled
Network: ./0012-elastic-scaling-mvp.toml
Creds: config
# Check authority status.
validator: reports node_roles is 4
validator: reports substrate_block_height{status="finalized"} is at least 10 within 100 seconds
# Ensure parachain was able to make progress.
validator: parachain 2000 block height is at least 10 within 200 seconds
# Register the second core assigned to this parachain.
alice: js-script ./0012-register-para.js return is 0 within 600 seconds
validator: reports substrate_block_height{status="finalized"} is at least 35 within 100 seconds
# Parachain will now be stalled
validator: parachain 2000 block height is lower than 20 within 300 seconds
# Enable the ElasticScalingMVP node feature.
alice: js-script ./0012-enable-node-feature.js with "1" return is 0 within 600 seconds
# Wait two sessions for the config to be updated.
sleep 120 seconds
# Ensure parachain is now making progress.
validator: parachain 2000 block height is at least 30 within 200 seconds