mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 23:21:02 +00:00
Update Substrate/Polkadot/Cumulus references (#1353)
* cumulus: 4e95228291
polkadot: 975e780ae0d988dc033f400ba822d14b326ee5b9
substrate: 89fcb3e4f62d221d4e161a437768e77d6265889e
* fix refs
* sync changes from https://github.com/paritytech/polkadot/pull/3828
* sync changes from https://github.com/paritytech/polkadot/pull/4387
* sync changes from https://github.com/paritytech/polkadot/pull/3940
* sync with changes from https://github.com/paritytech/polkadot/pull/4493
* sync with changes from https://github.com/paritytech/polkadot/pull/4958
* sync with changes from https://github.com/paritytech/polkadot/pull/3889
* sync with changes from https://github.com/paritytech/polkadot/pull/5033
* sync with changes from https://github.com/paritytech/polkadot/pull/5065
* compilation fixes
* fixed prometheus endpoint startup (it now requires to be spawned within tokio context)
This commit is contained in:
committed by
Bastian Köcher
parent
ed2a3082ef
commit
65c2c0ccce
@@ -10,11 +10,11 @@ repository = "https://github.com/paritytech/parity-bridges-common/"
|
||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "3.0", features = ["derive"] }
|
||||
clap = { version = "3.1", features = ["derive"] }
|
||||
futures = "0.3"
|
||||
jsonrpc-core = "18.0"
|
||||
kvdb = "0.10"
|
||||
kvdb-rocksdb = "0.12"
|
||||
kvdb = "0.11"
|
||||
kvdb-rocksdb = "0.15"
|
||||
lru = "0.7"
|
||||
serde_json = "1.0.59"
|
||||
thiserror = "1.0"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
use beefy_primitives::crypto::AuthorityId as BeefyId;
|
||||
use bp_rialto::derive_account_from_millau_id;
|
||||
use polkadot_primitives::v1::{AssignmentId, ValidatorId};
|
||||
use polkadot_primitives::v2::{AssignmentId, ValidatorId};
|
||||
use rialto_runtime::{
|
||||
AccountId, BabeConfig, BalancesConfig, BeefyConfig, BridgeMillauMessagesConfig,
|
||||
ConfigurationConfig, GenesisConfig, GrandpaConfig, SessionConfig, SessionKeys, Signature,
|
||||
@@ -253,8 +253,8 @@ fn testnet_genesis(
|
||||
validation_upgrade_cooldown: 2u32,
|
||||
validation_upgrade_delay: 2,
|
||||
code_retention_period: 1200,
|
||||
max_code_size: polkadot_primitives::v1::MAX_CODE_SIZE,
|
||||
max_pov_size: polkadot_primitives::v1::MAX_POV_SIZE,
|
||||
max_code_size: polkadot_primitives::v2::MAX_CODE_SIZE,
|
||||
max_pov_size: polkadot_primitives::v2::MAX_POV_SIZE,
|
||||
max_head_data_size: 32 * 1024,
|
||||
group_rotation_frequency: 20,
|
||||
chain_availability_period: 4,
|
||||
@@ -263,7 +263,7 @@ fn testnet_genesis(
|
||||
max_upward_queue_size: 1024 * 1024,
|
||||
max_downward_message_size: 1024 * 1024,
|
||||
ump_service_total_weight: 100_000_000_000,
|
||||
max_upward_message_size: 1024 * 1024,
|
||||
max_upward_message_size: 50 * 1024,
|
||||
max_upward_message_num_per_candidate: 5,
|
||||
hrmp_sender_deposit: 0,
|
||||
hrmp_recipient_deposit: 0,
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use clap::{AppSettings, Parser};
|
||||
use clap::Parser;
|
||||
use sc_cli::RunCmd;
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
@@ -70,11 +70,11 @@ pub enum Subcommand {
|
||||
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
|
||||
|
||||
/// FOR INTERNAL USE: analog of the "prepare-worker" command of the polkadot binary.
|
||||
#[clap(name = "prepare-worker", setting = AppSettings::Hidden)]
|
||||
#[clap(name = "prepare-worker", hide = true)]
|
||||
PvfPrepareWorker(ValidationWorkerCommand),
|
||||
|
||||
/// FOR INTERNAL USE: analog of the "execute-worker" command of the polkadot binary.
|
||||
#[clap(name = "execute-worker", setting = AppSettings::Hidden)]
|
||||
#[clap(name = "execute-worker", hide = true)]
|
||||
PvfExecuteWorker(ValidationWorkerCommand),
|
||||
}
|
||||
|
||||
|
||||
@@ -192,6 +192,7 @@ pub fn run() -> sc_cli::Result<()> {
|
||||
let jaeger_agent = None;
|
||||
let telemetry_worker_handle = None;
|
||||
let program_path = None;
|
||||
let overseer_enable_anyways = false;
|
||||
|
||||
polkadot_service::new_full::<rialto_runtime::RuntimeApi, ExecutorDispatch, _>(
|
||||
config,
|
||||
@@ -201,6 +202,7 @@ pub fn run() -> sc_cli::Result<()> {
|
||||
jaeger_agent,
|
||||
telemetry_worker_handle,
|
||||
program_path,
|
||||
overseer_enable_anyways,
|
||||
overseer_gen,
|
||||
)
|
||||
.map(|full| full.task_manager)
|
||||
|
||||
@@ -8,11 +8,11 @@ repository = "https://github.com/paritytech/parity-bridges-common/"
|
||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "2.2.0", default-features = false, features = ["derive"] }
|
||||
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] }
|
||||
hex-literal = "0.3"
|
||||
libsecp256k1 = { version = "0.7", optional = true, default-features = false, features = ["hmac"] }
|
||||
log = { version = "0.4.14", default-features = false }
|
||||
scale-info = { version = "1.0", default-features = false, features = ["derive"] }
|
||||
scale-info = { version = "2.0.1", default-features = false, features = ["derive"] }
|
||||
serde = { version = "1.0", optional = true, features = ["derive"] }
|
||||
|
||||
# Bridge dependencies
|
||||
@@ -137,7 +137,7 @@ std = [
|
||||
]
|
||||
runtime-benchmarks = [
|
||||
"bridge-runtime-common/runtime-benchmarks",
|
||||
"frame-benchmarking",
|
||||
"frame-benchmarking/runtime-benchmarks",
|
||||
"frame-support/runtime-benchmarks",
|
||||
"frame-system/runtime-benchmarks",
|
||||
"libsecp256k1",
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
#![recursion_limit = "256"]
|
||||
// Runtime-generated enums
|
||||
#![allow(clippy::large_enum_variant)]
|
||||
// Runtime-generated DecodeLimit::decode_all_With_depth_limit
|
||||
#![allow(clippy::unnecessary_mut_passed)]
|
||||
// From construct_runtime macro
|
||||
#![allow(clippy::from_over_into)]
|
||||
|
||||
@@ -534,6 +532,7 @@ pub type SignedBlock = generic::SignedBlock<Block>;
|
||||
pub type BlockId = generic::BlockId<Block>;
|
||||
/// The SignedExtension to the basic transaction logic.
|
||||
pub type SignedExtra = (
|
||||
frame_system::CheckNonZeroSender<Runtime>,
|
||||
frame_system::CheckSpecVersion<Runtime>,
|
||||
frame_system::CheckTxVersion<Runtime>,
|
||||
frame_system::CheckGenesis<Runtime>,
|
||||
@@ -717,55 +716,55 @@ impl_runtime_apis! {
|
||||
}
|
||||
|
||||
impl polkadot_primitives::v2::ParachainHost<Block, Hash, BlockNumber> for Runtime {
|
||||
fn validators() -> Vec<polkadot_primitives::v1::ValidatorId> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::validators::<Runtime>()
|
||||
fn validators() -> Vec<polkadot_primitives::v2::ValidatorId> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v2::validators::<Runtime>()
|
||||
}
|
||||
|
||||
fn validator_groups() -> (Vec<Vec<polkadot_primitives::v1::ValidatorIndex>>, polkadot_primitives::v1::GroupRotationInfo<BlockNumber>) {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::validator_groups::<Runtime>()
|
||||
fn validator_groups() -> (Vec<Vec<polkadot_primitives::v2::ValidatorIndex>>, polkadot_primitives::v2::GroupRotationInfo<BlockNumber>) {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v2::validator_groups::<Runtime>()
|
||||
}
|
||||
|
||||
fn availability_cores() -> Vec<polkadot_primitives::v1::CoreState<Hash, BlockNumber>> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::availability_cores::<Runtime>()
|
||||
fn availability_cores() -> Vec<polkadot_primitives::v2::CoreState<Hash, BlockNumber>> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v2::availability_cores::<Runtime>()
|
||||
}
|
||||
|
||||
fn persisted_validation_data(para_id: polkadot_primitives::v1::Id, assumption: polkadot_primitives::v1::OccupiedCoreAssumption)
|
||||
-> Option<polkadot_primitives::v1::PersistedValidationData<Hash, BlockNumber>> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::persisted_validation_data::<Runtime>(para_id, assumption)
|
||||
fn persisted_validation_data(para_id: polkadot_primitives::v2::Id, assumption: polkadot_primitives::v2::OccupiedCoreAssumption)
|
||||
-> Option<polkadot_primitives::v2::PersistedValidationData<Hash, BlockNumber>> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v2::persisted_validation_data::<Runtime>(para_id, assumption)
|
||||
}
|
||||
|
||||
fn assumed_validation_data(
|
||||
para_id: polkadot_primitives::v1::Id,
|
||||
para_id: polkadot_primitives::v2::Id,
|
||||
expected_persisted_validation_data_hash: Hash,
|
||||
) -> Option<(polkadot_primitives::v1::PersistedValidationData<Hash, BlockNumber>, polkadot_primitives::v1::ValidationCodeHash)> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::assumed_validation_data::<Runtime>(
|
||||
) -> Option<(polkadot_primitives::v2::PersistedValidationData<Hash, BlockNumber>, polkadot_primitives::v2::ValidationCodeHash)> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v2::assumed_validation_data::<Runtime>(
|
||||
para_id,
|
||||
expected_persisted_validation_data_hash,
|
||||
)
|
||||
}
|
||||
|
||||
fn check_validation_outputs(
|
||||
para_id: polkadot_primitives::v1::Id,
|
||||
outputs: polkadot_primitives::v1::CandidateCommitments,
|
||||
para_id: polkadot_primitives::v2::Id,
|
||||
outputs: polkadot_primitives::v2::CandidateCommitments,
|
||||
) -> bool {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::check_validation_outputs::<Runtime>(para_id, outputs)
|
||||
polkadot_runtime_parachains::runtime_api_impl::v2::check_validation_outputs::<Runtime>(para_id, outputs)
|
||||
}
|
||||
|
||||
fn session_index_for_child() -> polkadot_primitives::v1::SessionIndex {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::session_index_for_child::<Runtime>()
|
||||
fn session_index_for_child() -> polkadot_primitives::v2::SessionIndex {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v2::session_index_for_child::<Runtime>()
|
||||
}
|
||||
|
||||
fn validation_code(para_id: polkadot_primitives::v1::Id, assumption: polkadot_primitives::v1::OccupiedCoreAssumption)
|
||||
-> Option<polkadot_primitives::v1::ValidationCode> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::validation_code::<Runtime>(para_id, assumption)
|
||||
fn validation_code(para_id: polkadot_primitives::v2::Id, assumption: polkadot_primitives::v2::OccupiedCoreAssumption)
|
||||
-> Option<polkadot_primitives::v2::ValidationCode> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v2::validation_code::<Runtime>(para_id, assumption)
|
||||
}
|
||||
|
||||
fn candidate_pending_availability(para_id: polkadot_primitives::v1::Id) -> Option<polkadot_primitives::v1::CommittedCandidateReceipt<Hash>> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::candidate_pending_availability::<Runtime>(para_id)
|
||||
fn candidate_pending_availability(para_id: polkadot_primitives::v2::Id) -> Option<polkadot_primitives::v2::CommittedCandidateReceipt<Hash>> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v2::candidate_pending_availability::<Runtime>(para_id)
|
||||
}
|
||||
|
||||
fn candidate_events() -> Vec<polkadot_primitives::v1::CandidateEvent<Hash>> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::candidate_events::<Runtime, _>(|ev| {
|
||||
fn candidate_events() -> Vec<polkadot_primitives::v2::CandidateEvent<Hash>> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v2::candidate_events::<Runtime, _>(|ev| {
|
||||
match ev {
|
||||
Event::Inclusion(ev) => {
|
||||
Some(ev)
|
||||
@@ -775,46 +774,46 @@ impl_runtime_apis! {
|
||||
})
|
||||
}
|
||||
|
||||
fn session_info(index: polkadot_primitives::v1::SessionIndex) -> Option<polkadot_primitives::v2::SessionInfo> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::session_info::<Runtime>(index)
|
||||
fn session_info(index: polkadot_primitives::v2::SessionIndex) -> Option<polkadot_primitives::v2::SessionInfo> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v2::session_info::<Runtime>(index)
|
||||
}
|
||||
|
||||
fn dmq_contents(recipient: polkadot_primitives::v1::Id) -> Vec<polkadot_primitives::v1::InboundDownwardMessage<BlockNumber>> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::dmq_contents::<Runtime>(recipient)
|
||||
fn dmq_contents(recipient: polkadot_primitives::v2::Id) -> Vec<polkadot_primitives::v2::InboundDownwardMessage<BlockNumber>> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v2::dmq_contents::<Runtime>(recipient)
|
||||
}
|
||||
|
||||
fn inbound_hrmp_channels_contents(
|
||||
recipient: polkadot_primitives::v1::Id
|
||||
) -> BTreeMap<polkadot_primitives::v1::Id, Vec<polkadot_primitives::v1::InboundHrmpMessage<BlockNumber>>> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::inbound_hrmp_channels_contents::<Runtime>(recipient)
|
||||
recipient: polkadot_primitives::v2::Id
|
||||
) -> BTreeMap<polkadot_primitives::v2::Id, Vec<polkadot_primitives::v2::InboundHrmpMessage<BlockNumber>>> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v2::inbound_hrmp_channels_contents::<Runtime>(recipient)
|
||||
}
|
||||
|
||||
fn validation_code_by_hash(hash: polkadot_primitives::v1::ValidationCodeHash) -> Option<polkadot_primitives::v1::ValidationCode> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::validation_code_by_hash::<Runtime>(hash)
|
||||
fn validation_code_by_hash(hash: polkadot_primitives::v2::ValidationCodeHash) -> Option<polkadot_primitives::v2::ValidationCode> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v2::validation_code_by_hash::<Runtime>(hash)
|
||||
}
|
||||
|
||||
fn on_chain_votes() -> Option<polkadot_primitives::v1::ScrapedOnChainVotes<Hash>> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::on_chain_votes::<Runtime>()
|
||||
fn on_chain_votes() -> Option<polkadot_primitives::v2::ScrapedOnChainVotes<Hash>> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v2::on_chain_votes::<Runtime>()
|
||||
}
|
||||
|
||||
fn submit_pvf_check_statement(stmt: polkadot_primitives::v2::PvfCheckStatement, signature: polkadot_primitives::v1::ValidatorSignature) {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::submit_pvf_check_statement::<Runtime>(stmt, signature)
|
||||
fn submit_pvf_check_statement(stmt: polkadot_primitives::v2::PvfCheckStatement, signature: polkadot_primitives::v2::ValidatorSignature) {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v2::submit_pvf_check_statement::<Runtime>(stmt, signature)
|
||||
}
|
||||
|
||||
fn pvfs_require_precheck() -> Vec<polkadot_primitives::v1::ValidationCodeHash> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::pvfs_require_precheck::<Runtime>()
|
||||
fn pvfs_require_precheck() -> Vec<polkadot_primitives::v2::ValidationCodeHash> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v2::pvfs_require_precheck::<Runtime>()
|
||||
}
|
||||
|
||||
fn validation_code_hash(para_id: polkadot_primitives::v1::Id, assumption: polkadot_primitives::v1::OccupiedCoreAssumption)
|
||||
-> Option<polkadot_primitives::v1::ValidationCodeHash>
|
||||
fn validation_code_hash(para_id: polkadot_primitives::v2::Id, assumption: polkadot_primitives::v2::OccupiedCoreAssumption)
|
||||
-> Option<polkadot_primitives::v2::ValidationCodeHash>
|
||||
{
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::validation_code_hash::<Runtime>(para_id, assumption)
|
||||
polkadot_runtime_parachains::runtime_api_impl::v2::validation_code_hash::<Runtime>(para_id, assumption)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_authority_discovery::AuthorityDiscoveryApi<Block> for Runtime {
|
||||
fn authorities() -> Vec<AuthorityDiscoveryId> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::relevant_authority_ids::<Runtime>()
|
||||
polkadot_runtime_parachains::runtime_api_impl::v2::relevant_authority_ids::<Runtime>()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ use crate::{
|
||||
|
||||
use frame_support::{parameter_types, weights::Weight};
|
||||
use frame_system::EnsureRoot;
|
||||
use polkadot_primitives::v1::ValidatorIndex;
|
||||
use polkadot_primitives::v2::ValidatorIndex;
|
||||
use polkadot_runtime_common::{paras_registrar, paras_sudo_wrapper, slots};
|
||||
use polkadot_runtime_parachains::{
|
||||
configuration as parachains_configuration, dmp as parachains_dmp, hrmp as parachains_hrmp,
|
||||
@@ -108,6 +108,7 @@ impl parachains_ump::Config for Runtime {
|
||||
type UmpSink = ();
|
||||
type FirstMessageFactorPercent = FirstMessageFactorPercent;
|
||||
type ExecuteOverweightOrigin = EnsureRoot<AccountId>;
|
||||
type WeightInfo = parachains_ump::TestWeightInfo;
|
||||
}
|
||||
|
||||
// required onboarding pallets. We're not going to use auctions or crowdloans, so they're missing
|
||||
|
||||
Reference in New Issue
Block a user