mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 21:01:02 +00:00
Bump Substrate/Polkadot/Cumulus refs (#1295)
Substrate: 31d90c202d6df9ce3837ee55587b604619a912ba
Polkadot: 60df3c55c711c2872872d6220f98b2611340e051
Cumulus: a9630551c2
This commit is contained in:
committed by
Bastian Köcher
parent
fe34a526bb
commit
ea2d6f898d
@@ -10,12 +10,12 @@ 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"] }
|
||||
futures = "0.3"
|
||||
jsonrpc-core = "18.0"
|
||||
kvdb = "0.10"
|
||||
kvdb-rocksdb = "0.12"
|
||||
lru = "0.7"
|
||||
structopt = "0.3.21"
|
||||
serde_json = "1.0.59"
|
||||
thiserror = "1.0"
|
||||
|
||||
|
||||
@@ -104,6 +104,7 @@ impl Alternative {
|
||||
vec![],
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
properties,
|
||||
Default::default(),
|
||||
),
|
||||
@@ -128,6 +129,7 @@ impl Alternative {
|
||||
vec![],
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
properties,
|
||||
Default::default(),
|
||||
),
|
||||
@@ -222,7 +224,7 @@ fn testnet_genesis(
|
||||
},
|
||||
beefy: BeefyConfig { authorities: Vec::new() },
|
||||
grandpa: GrandpaConfig { authorities: Vec::new() },
|
||||
sudo: SudoConfig { key: root_key },
|
||||
sudo: SudoConfig { key: Some(root_key) },
|
||||
session: SessionConfig {
|
||||
keys: initial_authorities
|
||||
.iter()
|
||||
@@ -248,8 +250,8 @@ fn testnet_genesis(
|
||||
// (see /node/service/src/chain_spec.rs:default_parachains_host_configuration)
|
||||
configuration: ConfigurationConfig {
|
||||
config: polkadot_runtime_parachains::configuration::HostConfiguration {
|
||||
validation_upgrade_frequency: 1u32,
|
||||
validation_upgrade_delay: 1,
|
||||
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,
|
||||
@@ -259,13 +261,8 @@ fn testnet_genesis(
|
||||
thread_availability_period: 4,
|
||||
max_upward_queue_count: 8,
|
||||
max_upward_queue_size: 1024 * 1024,
|
||||
max_downward_message_size: 1024,
|
||||
// this is approximatelly 4ms.
|
||||
//
|
||||
// Same as `4 * frame_support::weights::WEIGHT_PER_MILLIS`. We don't bother with
|
||||
// an import since that's a made up number and should be replaced with a constant
|
||||
// obtained by benchmarking anyway.
|
||||
ump_service_total_weight: 4 * 1_000_000_000,
|
||||
max_downward_message_size: 1024 * 1024,
|
||||
ump_service_total_weight: 100_000_000_000,
|
||||
max_upward_message_size: 1024 * 1024,
|
||||
max_upward_message_num_per_candidate: 5,
|
||||
hrmp_sender_deposit: 0,
|
||||
@@ -284,6 +281,7 @@ fn testnet_genesis(
|
||||
needed_approvals: 2,
|
||||
relay_vrf_modulo_samples: 2,
|
||||
zeroth_delay_tranche_width: 0,
|
||||
minimum_validation_upgrade_delay: 5,
|
||||
..Default::default()
|
||||
},
|
||||
},
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
// 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 sc_cli::RunCmd;
|
||||
use structopt::StructOpt;
|
||||
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, Parser)]
|
||||
pub struct Cli {
|
||||
#[structopt(subcommand)]
|
||||
pub subcommand: Option<Subcommand>,
|
||||
@@ -27,9 +27,10 @@ pub struct Cli {
|
||||
}
|
||||
|
||||
/// Possible subcommands of the main binary.
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, Parser)]
|
||||
pub enum Subcommand {
|
||||
/// Key management CLI utilities
|
||||
#[clap(subcommand)]
|
||||
Key(sc_cli::KeySubcommand),
|
||||
|
||||
/// Verify a signature for a message, provided on `STDIN`, with a given (public or secret) key.
|
||||
@@ -69,16 +70,16 @@ pub enum Subcommand {
|
||||
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
|
||||
|
||||
/// FOR INTERNAL USE: analog of the "prepare-worker" command of the polkadot binary.
|
||||
#[structopt(name = "prepare-worker", setting = structopt::clap::AppSettings::Hidden)]
|
||||
#[clap(name = "prepare-worker", setting = AppSettings::Hidden)]
|
||||
PvfPrepareWorker(ValidationWorkerCommand),
|
||||
|
||||
/// FOR INTERNAL USE: analog of the "execute-worker" command of the polkadot binary.
|
||||
#[structopt(name = "execute-worker", setting = structopt::clap::AppSettings::Hidden)]
|
||||
#[clap(name = "execute-worker", setting = AppSettings::Hidden)]
|
||||
PvfExecuteWorker(ValidationWorkerCommand),
|
||||
}
|
||||
|
||||
/// Validation worker command.
|
||||
#[derive(Debug, StructOpt)]
|
||||
#[derive(Debug, Parser)]
|
||||
pub struct ValidationWorkerCommand {
|
||||
/// The path to the validation host's socket.
|
||||
pub socket_path: String,
|
||||
|
||||
@@ -142,6 +142,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
impl_version: 1,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
transaction_version: 1,
|
||||
state_version: 1,
|
||||
};
|
||||
|
||||
/// The version information used to identify this runtime when compiled natively.
|
||||
@@ -208,6 +209,7 @@ impl frame_system::Config for Runtime {
|
||||
type SS58Prefix = SS58Prefix;
|
||||
/// The set code logic, just the default since we're not a parachain.
|
||||
type OnSetCode = ();
|
||||
type MaxConsumers = frame_support::traits::ConstU32<16>;
|
||||
}
|
||||
|
||||
/// The BABE epoch configuration at genesis.
|
||||
@@ -553,7 +555,7 @@ pub type Executive = frame_executive::Executive<
|
||||
Block,
|
||||
frame_system::ChainContext<Runtime>,
|
||||
Runtime,
|
||||
AllPallets,
|
||||
AllPalletsWithSystem,
|
||||
>;
|
||||
|
||||
impl_runtime_apis! {
|
||||
@@ -605,7 +607,7 @@ impl_runtime_apis! {
|
||||
}
|
||||
|
||||
impl beefy_primitives::BeefyApi<Block> for Runtime {
|
||||
fn validator_set() -> ValidatorSet<BeefyId> {
|
||||
fn validator_set() -> Option<ValidatorSet<BeefyId>> {
|
||||
Beefy::validator_set()
|
||||
}
|
||||
}
|
||||
@@ -715,15 +717,12 @@ impl_runtime_apis! {
|
||||
}
|
||||
}
|
||||
|
||||
impl polkadot_primitives::v1::ParachainHost<Block, Hash, BlockNumber> for Runtime {
|
||||
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 validator_groups() -> (
|
||||
Vec<Vec<polkadot_primitives::v1::ValidatorIndex>>,
|
||||
polkadot_primitives::v1::GroupRotationInfo<BlockNumber>,
|
||||
) {
|
||||
fn validator_groups() -> (Vec<Vec<polkadot_primitives::v1::ValidatorIndex>>, polkadot_primitives::v1::GroupRotationInfo<BlockNumber>) {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::validator_groups::<Runtime>()
|
||||
}
|
||||
|
||||
@@ -731,10 +730,7 @@ impl_runtime_apis! {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::availability_cores::<Runtime>()
|
||||
}
|
||||
|
||||
fn persisted_validation_data(
|
||||
para_id: polkadot_primitives::v1::Id,
|
||||
assumption: polkadot_primitives::v1::OccupiedCoreAssumption,
|
||||
)
|
||||
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)
|
||||
}
|
||||
@@ -743,7 +739,10 @@ impl_runtime_apis! {
|
||||
para_id: polkadot_primitives::v1::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>(para_id, expected_persisted_validation_data_hash)
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::assumed_validation_data::<Runtime>(
|
||||
para_id,
|
||||
expected_persisted_validation_data_hash,
|
||||
)
|
||||
}
|
||||
|
||||
fn check_validation_outputs(
|
||||
@@ -757,17 +756,12 @@ impl_runtime_apis! {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::session_index_for_child::<Runtime>()
|
||||
}
|
||||
|
||||
fn validation_code(
|
||||
para_id: polkadot_primitives::v1::Id,
|
||||
assumption: polkadot_primitives::v1::OccupiedCoreAssumption,
|
||||
)
|
||||
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 candidate_pending_availability(
|
||||
para_id: polkadot_primitives::v1::Id,
|
||||
) -> Option<polkadot_primitives::v1::CommittedCandidateReceipt<Hash>> {
|
||||
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)
|
||||
}
|
||||
|
||||
@@ -782,13 +776,11 @@ impl_runtime_apis! {
|
||||
})
|
||||
}
|
||||
|
||||
fn session_info(index: polkadot_primitives::v1::SessionIndex) -> Option<polkadot_primitives::v1::SessionInfo> {
|
||||
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 dmq_contents(
|
||||
recipient: polkadot_primitives::v1::Id,
|
||||
) -> Vec<polkadot_primitives::v1::InboundDownwardMessage<BlockNumber>> {
|
||||
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)
|
||||
}
|
||||
|
||||
@@ -798,15 +790,27 @@ impl_runtime_apis! {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::inbound_hrmp_channels_contents::<Runtime>(recipient)
|
||||
}
|
||||
|
||||
fn validation_code_by_hash(
|
||||
hash: polkadot_primitives::v1::ValidationCodeHash,
|
||||
) -> Option<polkadot_primitives::v1::ValidationCode> {
|
||||
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 on_chain_votes() -> Option<polkadot_primitives::v1::ScrapedOnChainVotes<Hash>> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::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 pvfs_require_precheck() -> Vec<polkadot_primitives::v1::ValidationCodeHash> {
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::pvfs_require_precheck::<Runtime>()
|
||||
}
|
||||
|
||||
fn validation_code_hash(para_id: polkadot_primitives::v1::Id, assumption: polkadot_primitives::v1::OccupiedCoreAssumption)
|
||||
-> Option<polkadot_primitives::v1::ValidationCodeHash>
|
||||
{
|
||||
polkadot_runtime_parachains::runtime_api_impl::v1::validation_code_hash::<Runtime>(para_id, assumption)
|
||||
}
|
||||
}
|
||||
|
||||
impl sp_authority_discovery::AuthorityDiscoveryApi<Block> for Runtime {
|
||||
|
||||
@@ -316,7 +316,7 @@ mod tests {
|
||||
SystemConfig::default().build_storage::<Runtime>().unwrap().into();
|
||||
ext.execute_with(|| {
|
||||
let bridge = MILLAU_CHAIN_ID;
|
||||
let call: Call = SystemCall::remark { remark: vec![] }.into();
|
||||
let call: Call = SystemCall::set_heap_pages { pages: 64 }.into();
|
||||
let dispatch_weight = call.get_dispatch_info().weight;
|
||||
let dispatch_fee = <Runtime as pallet_transaction_payment::Config>::WeightToFee::calc(
|
||||
&dispatch_weight,
|
||||
|
||||
@@ -16,7 +16,10 @@
|
||||
|
||||
//! Parachains support in Rialto runtime.
|
||||
|
||||
use crate::{AccountId, Balance, Balances, BlockNumber, Event, Origin, Registrar, Runtime, Slots};
|
||||
use crate::{
|
||||
AccountId, Babe, Balance, Balances, BlockNumber, Call, Event, Origin, Registrar, Runtime,
|
||||
Slots, UncheckedExtrinsic,
|
||||
};
|
||||
|
||||
use frame_support::{parameter_types, weights::Weight};
|
||||
use frame_system::EnsureRoot;
|
||||
@@ -29,6 +32,15 @@ use polkadot_runtime_parachains::{
|
||||
paras_inherent as parachains_paras_inherent, scheduler as parachains_scheduler,
|
||||
session_info as parachains_session_info, shared as parachains_shared, ump as parachains_ump,
|
||||
};
|
||||
use sp_runtime::transaction_validity::TransactionPriority;
|
||||
|
||||
impl<C> frame_system::offchain::SendTransactionTypes<C> for Runtime
|
||||
where
|
||||
Call: From<C>,
|
||||
{
|
||||
type Extrinsic = UncheckedExtrinsic;
|
||||
type OverarchingCall = Call;
|
||||
}
|
||||
|
||||
/// Special `RewardValidators` that does nothing ;)
|
||||
pub struct RewardValidators;
|
||||
@@ -49,6 +61,7 @@ impl parachains_hrmp::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Origin = Origin;
|
||||
type Currency = Balances;
|
||||
type WeightInfo = parachains_hrmp::TestWeightInfo;
|
||||
}
|
||||
|
||||
impl parachains_inclusion::Config for Runtime {
|
||||
@@ -65,10 +78,15 @@ impl parachains_initializer::Config for Runtime {
|
||||
|
||||
impl parachains_origin::Config for Runtime {}
|
||||
|
||||
parameter_types! {
|
||||
pub const ParasUnsignedPriority: TransactionPriority = TransactionPriority::max_value();
|
||||
}
|
||||
|
||||
impl parachains_paras::Config for Runtime {
|
||||
type Origin = Origin;
|
||||
type Event = Event;
|
||||
type WeightInfo = parachains_paras::TestWeightInfo;
|
||||
type UnsignedPriority = ParasUnsignedPriority;
|
||||
type NextSessionRotation = Babe;
|
||||
}
|
||||
|
||||
impl parachains_paras_inherent::Config for Runtime {
|
||||
@@ -120,6 +138,7 @@ impl slots::Config for Runtime {
|
||||
type LeasePeriod = LeasePeriod;
|
||||
type WeightInfo = slots::TestWeightInfo;
|
||||
type LeaseOffset = ();
|
||||
type ForceOrigin = EnsureRoot<AccountId>;
|
||||
}
|
||||
|
||||
impl paras_sudo_wrapper::Config for Runtime {}
|
||||
|
||||
Reference in New Issue
Block a user