Elastic scaling: use an assumed `CoreIndex` in `candidate-backing` (#3229)
First step in implementing https://github.com/paritytech/polkadot-sdk/issues/3144 ### Summary of changes - 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>
Showing
- Cargo.lock 3 additions, 0 deletionsCargo.lock
- polkadot/node/core/backing/Cargo.toml 1 addition, 0 deletionspolkadot/node/core/backing/Cargo.toml
- polkadot/node/core/backing/src/error.rs 3 additions, 0 deletionspolkadot/node/core/backing/src/error.rs
- polkadot/node/core/backing/src/lib.rs 233 additions, 52 deletionspolkadot/node/core/backing/src/lib.rs
- polkadot/node/core/backing/src/tests/mod.rs 123 additions, 5 deletionspolkadot/node/core/backing/src/tests/mod.rs
- polkadot/node/core/backing/src/tests/prospective_parachains.rs 29 additions, 5 deletions...dot/node/core/backing/src/tests/prospective_parachains.rs
- polkadot/node/core/provisioner/src/lib.rs 10 additions, 2 deletionspolkadot/node/core/provisioner/src/lib.rs
- polkadot/primitives/Cargo.toml 2 additions, 0 deletionspolkadot/primitives/Cargo.toml
- polkadot/primitives/src/v6/mod.rs 26 additions, 1 deletionpolkadot/primitives/src/v6/mod.rs
- polkadot/primitives/src/vstaging/mod.rs 5 additions, 1 deletionpolkadot/primitives/src/vstaging/mod.rs
- polkadot/statement-table/Cargo.toml 1 addition, 0 deletionspolkadot/statement-table/Cargo.toml
- polkadot/statement-table/src/generic.rs 23 additions, 27 deletionspolkadot/statement-table/src/generic.rs
- polkadot/statement-table/src/lib.rs 3 additions, 3 deletionspolkadot/statement-table/src/lib.rs
Please register or sign in to comment