Fixes for Polkadot Integration (#586)

* Add AccountIdConverter impl to Kusama and Polkadot primitives

* Add missing message lane config constants

* Add more consts

* Add another missing const

* Move consts in primitives so that they're consistent across files

* Move types and consts to more intuitive locations

* Downgrade hyper from v0.13.8 to v0.13.6

This conflicts with a requirement on the Polkadot side
which requires that hyper is =v0.13.6

* Update hyper to v0.13.9

* Update async-io to v1.3.1

* Update socket2 from v0.3.15 to v0.3.18

* Update message weight/size constants

* Make BlockWeights/Length parameter types

Allows us to re-use these types from both the runtime and
the message lane config files without creating a new instance
of them.

* Remove uneccesary weight constants

These can be found in the `runtime-common` crate used
by Polkadot/Kusama. The constants there will also be
the most up-to-date versions.
This commit is contained in:
Hernando Castano
2020-12-23 03:53:47 -05:00
committed by Bastian Köcher
parent 5cafbaa0ad
commit a6c3de51d3
8 changed files with 218 additions and 200 deletions
+2 -6
View File
@@ -37,7 +37,6 @@ pub mod millau_messages;
pub mod rialto_poa;
use codec::Decode;
use frame_system::limits;
use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList};
use sp_api::impl_runtime_apis;
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
@@ -163,9 +162,6 @@ parameter_types! {
read: 60_000_000, // ~0.06 ms = ~60 µs
write: 200_000_000, // ~0.2 ms = 200 µs
};
pub RuntimeBlockLength: limits::BlockLength = bp_rialto::runtime_block_length();
pub RuntimeBlockWeights: limits::BlockWeights = bp_rialto::runtime_block_weights();
}
impl frame_system::Config for Runtime {
@@ -207,9 +203,9 @@ impl frame_system::Config for Runtime {
/// Weight information for the extrinsics of this pallet.
type SystemWeightInfo = ();
/// Block and extrinsics weights: base values and limits.
type BlockWeights = RuntimeBlockWeights;
type BlockWeights = bp_rialto::BlockWeights;
/// The maximum length of a block (in bytes).
type BlockLength = RuntimeBlockLength;
type BlockLength = bp_rialto::BlockLength;
/// The weight of database operations that the runtime can invoke.
type DbWeight = DbWeight;
}