Unverified Commit c113764b authored by Igor Matuszewski's avatar Igor Matuszewski Committed by GitHub
Browse files

Use MaxEncodedLen trait from new parity-scale-codec v2.2 (#3412)

* Use MaxEncodedLen trait from new parity-scale-codec v2.2

* update Substrate

Co-authored-by: parity-processbot <>
parent 0347e253
Pipeline #145588 passed with stages
in 35 minutes and 26 seconds
This diff is collapsed.
......@@ -14,7 +14,7 @@ bp-messages = { path = "../messages", default-features = false }
bp-runtime = { path = "../runtime", default-features = false }
fixed-hash = { version = "0.7.0", default-features = false }
hash256-std-hasher = { version = "0.15.2", default-features = false }
impl-codec = { version = "0.5.0", default-features = false }
impl-codec = { version = "0.5.1", default-features = false }
impl-serde = { version = "0.3.1", optional = true }
parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] }
serde = { version = "1.0.101", optional = true, features = ["derive"] }
......@@ -23,7 +23,6 @@ serde = { version = "1.0.101", optional = true, features = ["derive"] }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false }
max-encoded-len = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false, features = ["derive"] }
sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false }
sp-io = { git = "https://github.com/paritytech/substrate", branch = "master" , default-features = false }
......@@ -42,7 +41,6 @@ std = [
"hash256-std-hasher/std",
"impl-codec/std",
"impl-serde",
"max-encoded-len/std",
"parity-util-mem/std",
"serde",
"sp-api/std",
......
......@@ -14,7 +14,6 @@
// 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 frame_support::traits::MaxEncodedLen;
use parity_util_mem::MallocSizeOf;
use sp_runtime::traits::CheckEqual;
......@@ -23,7 +22,7 @@ use sp_runtime::traits::CheckEqual;
fixed_hash::construct_fixed_hash! {
/// Hash type used in Millau chain.
#[derive(MallocSizeOf, MaxEncodedLen)]
#[derive(MallocSizeOf)]
pub struct MillauHash(64);
}
......
......@@ -7,7 +7,7 @@ build = "build.rs"
[dependencies]
bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] }
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "2.2.0", default-features = false, features = ["derive", "max-encoded-len"] }
log = { version = "0.4.14", default-features = false }
rustc-hex = { version = "2.1.0", default-features = false }
serde = { version = "1.0.123", default-features = false }
......@@ -88,8 +88,6 @@ xcm = { package = "xcm", path = "../../xcm", 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 }
max-encoded-len = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
[dev-dependencies]
hex-literal = "0.3.1"
libsecp256k1 = "0.3.5"
......@@ -174,7 +172,6 @@ std = [
"xcm/std",
"xcm-executor/std",
"xcm-builder/std",
"max-encoded-len/std",
"frame-election-provider-support/std",
]
runtime-benchmarks = [
......
......@@ -24,7 +24,7 @@ use pallet_transaction_payment::CurrencyAdapter;
use sp_std::prelude::*;
use sp_std::collections::btree_map::BTreeMap;
use sp_core::u32_trait::{_1, _2, _3, _5};
use parity_scale_codec::{Encode, Decode};
use parity_scale_codec::{Encode, Decode, MaxEncodedLen};
use primitives::v1::{
AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CommittedCandidateReceipt,
CoreState, GroupRotationInfo, Hash, Id as ParaId, Moment, Nonce, OccupiedCoreAssumption,
......@@ -83,7 +83,7 @@ use sp_core::OpaqueMetadata;
use sp_staking::SessionIndex;
use frame_support::{
parameter_types, construct_runtime, RuntimeDebug, PalletId,
traits::{KeyOwnerProofSystem, LockIdentifier, Filter, InstanceFilter, All, MaxEncodedLen},
traits::{KeyOwnerProofSystem, LockIdentifier, Filter, InstanceFilter, All},
weights::Weight,
};
use frame_system::{EnsureRoot, EnsureOneOf};
......
......@@ -7,7 +7,7 @@ build = "build.rs"
[dependencies]
bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] }
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "2.2.0", default-features = false, features = ["derive", "max-encoded-len"] }
log = { version = "0.4.14", default-features = false }
rustc-hex = { version = "2.1.0", default-features = false }
serde = { version = "1.0.123", default-features = false }
......@@ -78,8 +78,6 @@ hex-literal = { version = "0.3.1", optional = true }
runtime-common = { package = "polkadot-runtime-common", path = "../common", 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]
hex-literal = "0.3.1"
libsecp256k1 = "0.3.5"
......@@ -155,7 +153,6 @@ std = [
"sp-npos-elections/std",
"beefy-primitives/std",
"pallet-mmr-primitives/std",
"max-encoded-len/std",
"frame-election-provider-support/std",
]
runtime-benchmarks = [
......
......@@ -33,7 +33,7 @@ use runtime_common::{
use sp_std::prelude::*;
use sp_std::collections::btree_map::BTreeMap;
use sp_core::u32_trait::{_1, _2, _3, _4, _5};
use parity_scale_codec::{Encode, Decode};
use parity_scale_codec::{Encode, Decode, MaxEncodedLen};
use primitives::v1::{
AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CommittedCandidateReceipt,
CoreState, GroupRotationInfo, Hash, Id, Moment, Nonce, OccupiedCoreAssumption,
......@@ -59,7 +59,7 @@ use sp_core::OpaqueMetadata;
use sp_staking::SessionIndex;
use frame_support::{
parameter_types, construct_runtime, RuntimeDebug, PalletId,
traits::{KeyOwnerProofSystem, LockIdentifier, Filter, MaxEncodedLen},
traits::{KeyOwnerProofSystem, LockIdentifier, Filter},
weights::Weight,
};
use frame_system::{EnsureRoot, EnsureOneOf};
......
......@@ -6,7 +6,7 @@ edition = "2018"
build = "build.rs"
[dependencies]
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "2.2.0", default-features = false, features = ["derive", "max-encoded-len"] }
serde = { version = "1.0.123", default-features = false }
serde_derive = { version = "1.0.117", optional = true }
smallvec = "1.6.1"
......@@ -73,8 +73,6 @@ bp-rococo = { path = "../../bridges/primitives/chain-rococo", default-features =
bp-wococo = { path = "../../bridges/primitives/chain-wococo", 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]
substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" }
......@@ -135,7 +133,6 @@ std = [
"xcm-builder/std",
"pallet-xcm/std",
"log/std",
"max-encoded-len/std",
]
# When enabled, the runtime api will not be build.
#
......
......@@ -23,7 +23,7 @@
use pallet_transaction_payment::CurrencyAdapter;
use sp_std::prelude::*;
use sp_std::collections::btree_map::BTreeMap;
use parity_scale_codec::{Encode, Decode};
use parity_scale_codec::{Encode, Decode, MaxEncodedLen};
use primitives::v1::{
AccountId, AccountIndex, Balance, BlockNumber, Hash, Nonce, Signature, Moment,
GroupRotationInfo, CoreState, Id, ValidationCode, ValidationCodeHash, CandidateEvent,
......@@ -41,7 +41,7 @@ use runtime_parachains::{
};
use frame_support::{
construct_runtime, parameter_types,
traits::{Filter, KeyOwnerProofSystem, Randomness, All, IsInVec, MaxEncodedLen},
traits::{Filter, KeyOwnerProofSystem, Randomness, All, IsInVec},
weights::Weight,
PalletId
};
......
......@@ -7,7 +7,7 @@ build = "build.rs"
[dependencies]
bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] }
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "2.2.0", default-features = false, features = ["derive", "max-encoded-len"] }
log = { version = "0.4.14", default-features = false }
rustc-hex = { version = "2.1.0", default-features = false }
serde = { version = "1.0.123", default-features = false }
......@@ -86,8 +86,6 @@ xcm = { package = "xcm", path = "../../xcm", 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 }
max-encoded-len = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
[dev-dependencies]
hex-literal = "0.3.1"
libsecp256k1 = "0.3.5"
......@@ -169,7 +167,6 @@ std = [
"xcm/std",
"xcm-executor/std",
"xcm-builder/std",
"max-encoded-len/std",
"frame-election-provider-support/std",
]
runtime-benchmarks = [
......
......@@ -23,7 +23,7 @@
use pallet_transaction_payment::CurrencyAdapter;
use sp_std::prelude::*;
use sp_std::collections::btree_map::BTreeMap;
use parity_scale_codec::{Encode, Decode};
use parity_scale_codec::{Encode, Decode, MaxEncodedLen};
use primitives::v1::{
AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CommittedCandidateReceipt,
CoreState, GroupRotationInfo, Hash, Id as ParaId, Moment, Nonce, OccupiedCoreAssumption,
......@@ -83,7 +83,7 @@ use sp_core::OpaqueMetadata;
use sp_staking::SessionIndex;
use frame_support::{
parameter_types, construct_runtime, RuntimeDebug, PalletId,
traits::{KeyOwnerProofSystem, Filter, InstanceFilter, All, MaxEncodedLen},
traits::{KeyOwnerProofSystem, Filter, InstanceFilter, All},
weights::Weight,
};
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment