Companion for #8793 (Simple MaxEncodedLen) (#3118)

* ProxyType MaxEncodedLen

* import

* import

* fix dep and bump substrate

* Update Cargo.lock
This commit is contained in:
Shawn Tabrizi
2021-05-28 16:50:16 -04:00
committed by GitHub
parent cc0457423c
commit b7c2cfc1e4
9 changed files with 230 additions and 179 deletions
+210 -171
View File
File diff suppressed because it is too large Load Diff
+3
View File
@@ -88,6 +88,8 @@ xcm = { package = "xcm", path = "../../xcm", default-features = false }
xcm-executor = { package = "xcm-executor", path = "../../xcm/xcm-executor", default-features = false } xcm-executor = { package = "xcm-executor", path = "../../xcm/xcm-executor", default-features = false }
xcm-builder = { package = "xcm-builder", path = "../../xcm/xcm-builder", default-features = false } xcm-builder = { package = "xcm-builder", path = "../../xcm/xcm-builder", default-features = false }
max-encoded-len = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
[dev-dependencies] [dev-dependencies]
hex-literal = "0.3.1" hex-literal = "0.3.1"
libsecp256k1 = "0.3.5" libsecp256k1 = "0.3.5"
@@ -173,6 +175,7 @@ std = [
"xcm/std", "xcm/std",
"xcm-executor/std", "xcm-executor/std",
"xcm-builder/std", "xcm-builder/std",
"max-encoded-len/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"runtime-common/runtime-benchmarks", "runtime-common/runtime-benchmarks",
+2 -2
View File
@@ -82,7 +82,7 @@ use sp_core::OpaqueMetadata;
use sp_staking::SessionIndex; use sp_staking::SessionIndex;
use frame_support::{ use frame_support::{
parameter_types, construct_runtime, RuntimeDebug, PalletId, parameter_types, construct_runtime, RuntimeDebug, PalletId,
traits::{KeyOwnerProofSystem, LockIdentifier, Filter, InstanceFilter, All}, traits::{KeyOwnerProofSystem, LockIdentifier, Filter, InstanceFilter, All, MaxEncodedLen},
weights::Weight, weights::Weight,
}; };
use frame_system::{EnsureRoot, EnsureOneOf}; use frame_system::{EnsureRoot, EnsureOneOf};
@@ -931,7 +931,7 @@ parameter_types! {
} }
/// The type used to represent the kinds of proxying allowed. /// The type used to represent the kinds of proxying allowed.
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug)] #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug, MaxEncodedLen)]
pub enum ProxyType { pub enum ProxyType {
Any, Any,
NonTransfer, NonTransfer,
+3
View File
@@ -78,6 +78,8 @@ hex-literal = { version = "0.3.1", optional = true }
runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false } runtime-common = { package = "polkadot-runtime-common", path = "../common", default-features = false }
primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false } primitives = { package = "polkadot-primitives", path = "../../primitives", default-features = false }
max-encoded-len = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
[dev-dependencies] [dev-dependencies]
hex-literal = "0.3.1" hex-literal = "0.3.1"
libsecp256k1 = "0.3.5" libsecp256k1 = "0.3.5"
@@ -154,6 +156,7 @@ std = [
"sp-npos-elections/std", "sp-npos-elections/std",
"beefy-primitives/std", "beefy-primitives/std",
"pallet-mmr-primitives/std", "pallet-mmr-primitives/std",
"max-encoded-len/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"runtime-common/runtime-benchmarks", "runtime-common/runtime-benchmarks",
+2 -2
View File
@@ -58,7 +58,7 @@ use sp_core::OpaqueMetadata;
use sp_staking::SessionIndex; use sp_staking::SessionIndex;
use frame_support::{ use frame_support::{
parameter_types, construct_runtime, RuntimeDebug, PalletId, parameter_types, construct_runtime, RuntimeDebug, PalletId,
traits::{KeyOwnerProofSystem, LockIdentifier, Filter}, traits::{KeyOwnerProofSystem, LockIdentifier, Filter, MaxEncodedLen},
weights::Weight, weights::Weight,
}; };
use frame_system::{EnsureRoot, EnsureOneOf}; use frame_system::{EnsureRoot, EnsureOneOf};
@@ -838,7 +838,7 @@ parameter_types! {
} }
/// The type used to represent the kinds of proxying allowed. /// The type used to represent the kinds of proxying allowed.
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug)] #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug, MaxEncodedLen)]
pub enum ProxyType { pub enum ProxyType {
Any = 0, Any = 0,
NonTransfer = 1, NonTransfer = 1,
+3
View File
@@ -73,6 +73,8 @@ bp-rococo = { path = "../../bridges/primitives/chain-rococo", default-features =
bp-wococo = { path = "../../bridges/primitives/chain-wococo", default-features = false } bp-wococo = { path = "../../bridges/primitives/chain-wococo", default-features = false }
pallet-bridge-grandpa = { path = "../../bridges/modules/grandpa", default-features = false } pallet-bridge-grandpa = { path = "../../bridges/modules/grandpa", default-features = false }
max-encoded-len = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
[build-dependencies] [build-dependencies]
substrate-wasm-builder = "3.0.0" substrate-wasm-builder = "3.0.0"
@@ -133,6 +135,7 @@ std = [
"xcm-builder/std", "xcm-builder/std",
"pallet-xcm/std", "pallet-xcm/std",
"log/std", "log/std",
"max-encoded-len/std",
] ]
# When enabled, the runtime api will not be build. # When enabled, the runtime api will not be build.
# #
+2 -2
View File
@@ -41,7 +41,7 @@ use runtime_parachains::{
}; };
use frame_support::{ use frame_support::{
construct_runtime, parameter_types, construct_runtime, parameter_types,
traits::{Filter, KeyOwnerProofSystem, Randomness, All, IsInVec}, traits::{Filter, KeyOwnerProofSystem, Randomness, All, IsInVec, MaxEncodedLen},
weights::Weight, weights::Weight,
PalletId PalletId
}; };
@@ -943,7 +943,7 @@ parameter_types! {
} }
/// The type used to represent the kinds of proxying allowed. /// The type used to represent the kinds of proxying allowed.
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug)] #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug, MaxEncodedLen)]
pub enum ProxyType { pub enum ProxyType {
Any, Any,
CancelProxy, CancelProxy,
+3
View File
@@ -86,6 +86,8 @@ xcm = { package = "xcm", path = "../../xcm", default-features = false }
xcm-executor = { package = "xcm-executor", path = "../../xcm/xcm-executor", default-features = false } xcm-executor = { package = "xcm-executor", path = "../../xcm/xcm-executor", default-features = false }
xcm-builder = { package = "xcm-builder", path = "../../xcm/xcm-builder", default-features = false } xcm-builder = { package = "xcm-builder", path = "../../xcm/xcm-builder", default-features = false }
max-encoded-len = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
[dev-dependencies] [dev-dependencies]
hex-literal = "0.3.1" hex-literal = "0.3.1"
libsecp256k1 = "0.3.5" libsecp256k1 = "0.3.5"
@@ -168,6 +170,7 @@ std = [
"xcm/std", "xcm/std",
"xcm-executor/std", "xcm-executor/std",
"xcm-builder/std", "xcm-builder/std",
"max-encoded-len/std",
] ]
runtime-benchmarks = [ runtime-benchmarks = [
"runtime-common/runtime-benchmarks", "runtime-common/runtime-benchmarks",
+2 -2
View File
@@ -81,7 +81,7 @@ use sp_core::OpaqueMetadata;
use sp_staking::SessionIndex; use sp_staking::SessionIndex;
use frame_support::{ use frame_support::{
parameter_types, construct_runtime, RuntimeDebug, PalletId, parameter_types, construct_runtime, RuntimeDebug, PalletId,
traits::{KeyOwnerProofSystem, Filter, InstanceFilter, All}, traits::{KeyOwnerProofSystem, Filter, InstanceFilter, All, MaxEncodedLen},
weights::Weight, weights::Weight,
}; };
use pallet_im_online::sr25519::AuthorityId as ImOnlineId; use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
@@ -624,7 +624,7 @@ parameter_types! {
} }
/// The type used to represent the kinds of proxying allowed. /// The type used to represent the kinds of proxying allowed.
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug)] #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug, MaxEncodedLen)]
pub enum ProxyType { pub enum ProxyType {
Any, Any,
NonTransfer, NonTransfer,