Finish migration to v2 primitives (#5037)

* remove v0 primitives from polkadot-primitives

* first pass: remove v0

* fix fallout in erasure-coding

* remove v1 primitives, consolidate to v2

* the great import update

* update runtime_api_impl_v1 to v2 as well

* guide: add `Version` request for runtime API

* add version query to runtime API

* reintroduce OldV1SessionInfo in a limited way
This commit is contained in:
Robert Habermeier
2022-03-09 14:01:13 -06:00
committed by GitHub
parent 3394cbb142
commit 49f7e5cce4
215 changed files with 2312 additions and 3123 deletions
@@ -17,10 +17,7 @@
use super::*;
use frame_support::{assert_err, assert_ok, assert_storage_noop};
use keyring::Sr25519Keyring;
use primitives::{
v0::PARACHAIN_KEY_TYPE_ID,
v1::{BlockNumber, ValidatorId},
};
use primitives::v2::{BlockNumber, ValidatorId, PARACHAIN_KEY_TYPE_ID};
use sc_keystore::LocalKeystore;
use sp_keystore::{SyncCryptoStore, SyncCryptoStorePtr};
use std::sync::Arc;
@@ -116,7 +113,7 @@ fn check_code_is_not_stored(validation_code: &ValidationCode) {
/// An utility for checking that certain events were deposited.
struct EventValidator {
events:
Vec<frame_system::EventRecord<<Test as frame_system::Config>::Event, primitives::v1::Hash>>,
Vec<frame_system::EventRecord<<Test as frame_system::Config>::Event, primitives::v2::Hash>>,
}
impl EventValidator {
@@ -1545,7 +1542,7 @@ fn add_trusted_validation_code_enacts_existing_pvf_vote() {
#[test]
fn verify_upgrade_go_ahead_signal_is_externally_accessible() {
use primitives::v1::well_known_keys;
use primitives::v2::well_known_keys;
let a = ParaId::from(2020);
@@ -1561,7 +1558,7 @@ fn verify_upgrade_go_ahead_signal_is_externally_accessible() {
#[test]
fn verify_upgrade_restriction_signal_is_externally_accessible() {
use primitives::v1::well_known_keys;
use primitives::v2::well_known_keys;
let a = ParaId::from(2020);