Skip to content

Commit

Permalink
Upgrade Substrate to monthly-11 (#1188)
Browse files Browse the repository at this point in the history
  • Loading branch information
Centril authored Feb 8, 2022
1 parent 4f1d40b commit 95328c8
Show file tree
Hide file tree
Showing 204 changed files with 16,195 additions and 9,156 deletions.
4,287 changes: 1,955 additions & 2,332 deletions Cargo.lock

Large diffs are not rendered by default.

269 changes: 140 additions & 129 deletions Cargo.toml

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions bin/bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,32 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
node-primitives = { package = "polymesh-primitives", path = "../../primitives" }
node-runtime = { package = "polymesh-runtime-testnet", path = "../../pallets/runtime/testnet" }
node-testing = { path = "../testing" }
sc-cli = { version = "0.9.0", features = ["wasmtime"] }
sc-client-api = { version = "3.0.0" }
sp-runtime = { version = "3.0.0" }
sp-state-machine = { version = "0.9.0" }
sc-cli = { version = "0.10.0-dev", features = ["wasmtime"] }
sc-client-api = { version = "4.0.0-dev" }
sp-runtime = { version = "4.0.0-dev" }
sp-state-machine = { version = "0.10.0-dev" }
log = "0.4.8"
serde = "1.0.101"
serde_json = "1.0.41"
structopt = "0.3"
derive_more = "0.99.2"
kvdb = "0.9"
kvdb-rocksdb = "0.11.1"
sp-trie = { version = "3.0.0" }
sp-core = { version = "3.0.0" }
sp-consensus = { version = "0.9.0" }
sp-transaction-pool = { version = "3.0.0" }
sc-basic-authorship = { version = "0.9.0" }
sp-inherents = { version = "3.0.0" }
sp-timestamp = { version = "3.0.0" }
sp-tracing = { version = "3.0.0" }
kvdb = "0.10"
kvdb-rocksdb = "0.14.0"
sp-trie = { version = "4.0.0-dev" }
sp-core = { version = "4.0.0-dev" }
sp-consensus = { version = "0.10.0-dev" }
sp-transaction-pool = { version = "4.0.0-dev" }
sc-basic-authorship = { version = "0.10.0-dev" }
sp-inherents = { version = "4.0.0-dev" }
sp-timestamp = { version = "4.0.0-dev" }
sp-tracing = { version = "4.0.0-dev" }
hash-db = "0.15.2"
tempfile = "3.1.0"
fs_extra = "1"
hex = "0.4.0"
rand = { version = "0.7.2", features = ["small_rng"] }
lazy_static = "1.4.0"
parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] }
parity-util-mem = { version = "0.10.0", default-features = false, features = ["primitive-types"] }
parity-db = { version = "0.2.4" }
sc-transaction-pool = { version = "3.0.0" }
sc-transaction-pool = { version = "4.0.0-dev" }
futures = { version = "0.3.4", features = ["thread-pool"] }
2 changes: 1 addition & 1 deletion bin/crypto-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ edition = "2018"

[dependencies]
polymesh-primitives = { path = "../../primitives" }
confidential_identity = { git = "https://github.com/PolymathNetwork/cryptography.git", tag = "confidential-identity-v1.1.3" }
confidential_identity = { git = "https://github.com/PolymathNetwork/cryptography.git", branch = "confidential-identity-v1" }
codec = { version = "2.0.0", package = "parity-scale-codec" }
hex = "0.4.0"
38 changes: 19 additions & 19 deletions bin/executor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,33 @@ targets = ["x86_64-unknown-linux-gnu"]
codec = { package = "parity-scale-codec", version = "2.0.0" }
node-primitives = { package = "polymesh-primitives", path = "../../primitives" }
node-runtime = { package = "polymesh-runtime-testnet", path = "../../pallets/runtime/testnet" }
sc-executor = { version = "0.9.0", features = ["wasmtime"] }
sp-core = { version = "3.0.0" }
sp-io = { version = "3.0.0" }
sp-state-machine = { version = "0.9.0" }
sp-trie = { version = "3.0.0" }
sc-executor = { version = "0.10.0-dev", features = ["wasmtime"] }
sp-core = { version = "4.0.0-dev" }
sp-io = { version = "4.0.0-dev" }
sp-state-machine = { version = "0.10.0-dev" }
sp-trie = { version = "4.0.0-dev" }
trie-root = "0.16.0"
frame-benchmarking = { version = "3.0.0" }
frame-benchmarking = { version = "4.0.0-dev" }

[dev-dependencies]
node-testing = { path = "../testing" }
pallet-transaction-payment = { path = "../../pallets/transaction-payment" }
pallet-balances = { path = "../../pallets/balances" }

criterion = "0.3.0"
frame-support = { version = "3.0.0" }
frame-system = { version = "3.0.0" }
#pallet-contracts = { version = "3.0.0" }
pallet-grandpa = { version = "3.0.0" }
pallet-im-online = { version = "3.0.0" }
pallet-indices = { version = "3.0.0" }
pallet-session = { version = "3.0.0" }
pallet-timestamp = { version = "3.0.0" }
pallet-treasury = { version = "3.0.0" }
sp-application-crypto = { version = "3.0.0" }
sp-runtime = { version = "3.0.0" }
sp-externalities = { version = "0.9.0" }
substrate-test-client = { git = "https://github.com/PolymathNetwork/substrate", branch = "polymath-3.0.0" }
frame-support = { version = "4.0.0-dev" }
frame-system = { version = "4.0.0-dev" }
#pallet-contracts = { version = "4.0.0-dev" }
pallet-grandpa = { version = "4.0.0-dev" }
pallet-im-online = { version = "4.0.0-dev" }
pallet-indices = { version = "4.0.0-dev" }
pallet-session = { version = "4.0.0-dev" }
pallet-timestamp = { version = "4.0.0-dev" }
pallet-treasury = { version = "4.0.0-dev" }
sp-application-crypto = { version = "4.0.0-dev" }
sp-runtime = { version = "4.0.0-dev" }
sp-externalities = { version = "0.10.0-dev" }
substrate-test-client = { git = "https://github.com/PolymathNetwork/substrate", branch = "polymesh-develop" }
wabt = "0.10.0"

[features]
Expand Down
50 changes: 25 additions & 25 deletions bin/testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,37 +23,37 @@ pallet-staking = { path = "../../pallets/staking" }
pallet-balances = { path = "../../pallets/balances" }
node-executor = { path = "../executor", features = ["wasmtime"] }

sc-service = { version = "0.9.0", features = ["test-helpers", "db", "wasmtime"] }
sc-client-db = { version = "0.9.0", features = ["kvdb-rocksdb", "parity-db"] }
sc-client-api = { version = "3.0.0" }
sc-service = { version = "0.10.0-dev", features = ["test-helpers", "db", "wasmtime"] }
sc-client-db = { version = "0.10.0-dev", features = ["kvdb-rocksdb", "parity-db"] }
sc-client-api = { version = "4.0.0-dev" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
#pallet-contracts = { version = "3.0.0" }
pallet-grandpa = { version = "3.0.0" }
pallet-indices = { version = "3.0.0" }
sp-keyring = { version = "3.0.0" }
sp-core = { version = "3.0.0" }
sp-io = { version = "3.0.0" }
frame-support = { version = "3.0.0" }
pallet-session = { version = "3.0.0" }
sp-runtime = { version = "3.0.0" }
sc-executor = { version = "0.9.0", features = ["wasmtime"] }
sp-consensus = { version = "0.9.0" }
frame-system = { version = "3.0.0" }
substrate-test-client = { git = "https://github.com/PolymathNetwork/substrate", branch = "polymath-3.0.0" }
pallet-timestamp = { version = "3.0.0" }
pallet-treasury = { version = "3.0.0" }
#pallet-contracts = { version = "4.0.0-dev" }
pallet-grandpa = { version = "4.0.0-dev" }
pallet-indices = { version = "4.0.0-dev" }
sp-keyring = { version = "4.0.0-dev" }
sp-core = { version = "4.0.0-dev" }
sp-io = { version = "4.0.0-dev" }
frame-support = { version = "4.0.0-dev" }
pallet-session = { version = "4.0.0-dev" }
sp-runtime = { version = "4.0.0-dev" }
sc-executor = { version = "0.10.0-dev", features = ["wasmtime"] }
sp-consensus = { version = "0.10.0-dev" }
frame-system = { version = "4.0.0-dev" }
substrate-test-client = { git = "https://github.com/PolymathNetwork/substrate", branch = "polymesh-develop" }
pallet-timestamp = { version = "4.0.0-dev" }
pallet-treasury = { version = "4.0.0-dev" }
wabt = "0.10.0"
sp-api = { version = "3.0.0" }
sp-timestamp = { version = "3.0.0", default-features = false }
sp-block-builder = { version = "3.0.0" }
sc-block-builder = { version = "0.9.0" }
sp-inherents = { version = "3.0.0" }
sp-blockchain = { version = "3.0.0" }
sp-api = { version = "4.0.0-dev" }
sp-timestamp = { version = "4.0.0-dev", default-features = false }
sp-block-builder = { version = "4.0.0-dev" }
sc-block-builder = { version = "0.10.0-dev" }
sp-inherents = { version = "4.0.0-dev" }
sp-blockchain = { version = "4.0.0-dev" }
log = "0.4.8"
tempfile = "3.1.0"
fs_extra = "1"
futures = "0.3.1"

[dev-dependencies]
criterion = "0.3.0"
sc-cli = { version = "0.9.0", features = ["wasmtime"] }
sc-cli = { version = "0.10.0-dev", features = ["wasmtime"] }
6 changes: 3 additions & 3 deletions contracts/CountTransferManager/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ use ink_lang as ink;

mod custom_types {
use scale::{Decode, Encode};
#[cfg(feature = "std")]
use scale_info::TypeInfo;

#[derive(Decode, Encode, PartialEq, Ord, Eq, PartialOrd, Copy, Hash, Clone, Default)]
#[cfg_attr(feature = "std", derive(TypeInfo, Debug))]
#[derive(Decode, Encode, TypeInfo)]
#[derive(PartialEq, Ord, Eq, PartialOrd, Copy, Hash, Clone, Default)]
#[cfg_attr(feature = "std", derive(Debug))]
pub struct IdentityId([u8; 32]);

impl From<u128> for IdentityId {
Expand Down
24 changes: 4 additions & 20 deletions contracts/PercentageTransferManager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,13 @@
use ink_lang as ink;

mod custom_types {
use ink_storage::traits::{PackedLayout, SpreadLayout};
use ink_storage::traits::{PackedLayout, SpreadLayout, StorageLayout};
use scale::{Decode, Encode};
#[cfg(feature = "std")]
use scale_info::TypeInfo;

#[derive(
Decode,
Encode,
PartialEq,
Ord,
Eq,
PartialOrd,
Copy,
Hash,
Clone,
Default,
SpreadLayout,
PackedLayout,
)]
#[cfg_attr(
feature = "std",
derive(TypeInfo, Debug, ink_storage::traits::StorageLayout)
)]
#[derive(Decode, Encode, TypeInfo, SpreadLayout, PackedLayout)]
#[derive(PartialEq, Ord, Eq, PartialOrd, Copy, Hash, Clone, Default)]
#[cfg_attr(feature = "std", derive(Debug, StorageLayout))]
pub struct IdentityId([u8; 32]);

impl From<u128> for IdentityId {
Expand Down
4 changes: 2 additions & 2 deletions contracts/examples/custom-ink-env-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ edition = "2018"
[dependencies]
ink_core = { git = "https://github.com/paritytech/ink", tag = "v2.1.0", package = "ink_core", default-features = false }
ink_prelude = { git = "https://github.com/paritytech/ink", tag = "v2.1.0", package = "ink_prelude", default-features = false }
sp-runtime = { version = "3.0.0", default-features = false }
sp-runtime = { version = "4.0.0-dev", default-features = false }
scale = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.104", optional = true, features = ["derive"] }
scale-info = { version = "0.3", default-features = false, features = ["derive"], optional = true }
derive_more = { version = "0.99", default-features = false, features = ["from", "display"] }
sp-io = { version = "3.0.0", default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] }
sp-io = { version = "4.0.0-dev", default-features = false, features = ["disable_panic_handler", "disable_oom", "disable_allocator"] }

[dependencies.type-metadata]
git = "https://github.com/type-metadata/type-metadata.git"
Expand Down
19 changes: 10 additions & 9 deletions contracts/examples/custom-ink-env-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ pub type BlockNumber = u64;
///
/// This is a mirror of the `AccountId` type used in the default configuration
/// of PALLET contracts.
#[derive(
Debug, Copy, Clone, PartialEq, Eq, Ord, PartialOrd, Hash, Encode, Decode, From, Default,
)]
#[derive(Encode, Decode, From)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Ord, PartialOrd, Hash, Default)]
#[cfg_attr(feature = "std", derive(TypeInfo))]
pub struct AccountId([u8; 32]);

Expand All @@ -54,9 +53,8 @@ impl<'a> TryFrom<&'a [u8]> for AccountId {
///
/// This is a mirror of the `Hash` type used in the default configuration
/// of PALLET contracts.
#[derive(
Debug, Copy, Clone, PartialEq, Eq, Ord, PartialOrd, Hash, Encode, Decode, From, Default,
)]
#[derive(Encode, Decode, From)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Ord, PartialOrd, Hash, Default)]
#[cfg_attr(feature = "std", derive(TypeInfo))]
pub struct Hash([u8; 32]);

Expand Down Expand Up @@ -102,7 +100,8 @@ impl ink_core::env::EnvTypes for PolymeshRuntimeTypes {

const TICKER_LEN: usize = 12;

#[derive(Decode, Encode, PartialEq, Ord, Eq, PartialOrd, Copy, Hash, Clone, Default, Debug)]
#[derive(Decode, Encode)]
#[derive(PartialEq, Ord, Eq, PartialOrd, Copy, Hash, Clone, Default, Debug)]
#[cfg_attr(feature = "ink-generate-abi", derive(type_metadata::Metadata))]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
pub struct IdentityId([u8; 32]);
Expand All @@ -111,7 +110,8 @@ impl Flush for IdentityId {}

#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "ink-generate-abi", derive(type_metadata::Metadata))]
#[derive(Decode, Encode, Clone, Debug, Default, Hash, PartialEq, Eq, PartialOrd, Ord)]
#[derive(Decode, Encode)]
#[derive(Clone, Debug, Default, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct JurisdictionName(pub Vec<u8>);

/// Scope: Almost all claim needs a valid scope identity.
Expand Down Expand Up @@ -198,7 +198,8 @@ pub struct AssetCompliance {
/// received by a Substrate module call method has to be converted to canonical uppercase
/// representation using [`Ticker::canonize`].
#[cfg_attr(feature = "ink-generate-abi", derive(type_metadata::Metadata))]
#[derive(Encode, Decode, Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord, Debug)]
#[derive(Decode, Encode)]
#[derive(Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord, Debug)]
pub struct Ticker([u8; TICKER_LEN]);

impl Default for Ticker {
Expand Down
4 changes: 2 additions & 2 deletions migration-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ sp-state-machine-old = { package = "sp-state-machine", git = "https://github.com

# New migration helpers
remote-externalities = { path = "remote-externalities" }
frame-support = { version = "3.0.0" }
sp-core = { version = "3.0.0" }
frame-support = { version = "4.0.0-dev" }
sp-core = { version = "4.0.0-dev" }

# Old pallets
polymesh-runtime-old = { package = "polymesh-runtime-testnet", git = "https://github.com/PolymathNetwork/Polymesh", rev = "14951c75b778d5ee75c8ecdc02b70b6eb6d7b172" }
Expand Down
8 changes: 4 additions & 4 deletions migration-tests/remote-externalities/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ edition = "2018"

[dependencies]
jsonrpc-core-client = { version = "15.1.0", features = ["http"] }
sc-rpc-api = { version = "0.9.0" }
sc-rpc = { version = "3.0.0" }
sc-rpc-api = { version = "0.10.0-dev" }
sc-rpc = { version = "4.0.0-dev" }
futures = "0.1.29"

hex-literal = "0.3.1"
Expand All @@ -16,8 +16,8 @@ log = "0.4.11"
bincode = "1.3.1"
tokio = "0.1.22"

sp-io = { version = "3.0.0" }
sp-core = { version = "3.0.0" }
sp-io = { version = "4.0.0-dev" }
sp-core = { version = "4.0.0-dev" }

[dev-dependencies]
async-std = { version = "1.6.5", features = ["attributes"] }
Expand Down
44 changes: 22 additions & 22 deletions node-rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,33 @@ targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
polymesh-primitives = { path = "../primitives", default-features = false }
#pallet-contracts-rpc = { version = "3.0.0" }
#pallet-contracts-rpc = { version = "4.0.0-dev" }
pallet-group-rpc = { path = "../pallets/group/rpc" }
pallet-staking-rpc = { path = "../pallets/staking/rpc" }
pallet-protocol-fee-rpc = { path = "../pallets/protocol-fee/rpc" }
node-rpc = { path = "../rpc" }

jsonrpc-core = { version = "15.0", features = ["arbitrary_precision"] }
jsonrpc-core = { version = "18.0.0", features = ["arbitrary_precision"] }

codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
sp-blockchain = { version = "3.0.0" }
sp-runtime = { version = "3.0.0" }
sp-api = { version = "3.0.0" }
sc-client-api = { version = "3.0.0" }
sp-consensus = { version = "0.9.0" }
sp-consensus-babe = { version = "0.9.0" }
sp-block-builder = { version = "3.0.0" }
sp-keystore = { version = "0.9.0" }
sp-blockchain = { version = "4.0.0-dev" }
sp-runtime = { version = "4.0.0-dev" }
sp-api = { version = "4.0.0-dev" }
sc-client-api = { version = "4.0.0-dev" }
sp-consensus = { version = "0.10.0-dev" }
sp-consensus-babe = { version = "0.10.0-dev" }
sp-block-builder = { version = "4.0.0-dev" }
sp-keystore = { version = "0.10.0-dev" }

sc-rpc = { version = "3.0.0" }
sc-rpc-api = { version = "0.9.0" }
sc-chain-spec = { version = "3.0.0" }
sc-consensus-babe = { version = "0.9.0" }
sc-consensus-babe-rpc = { version = "0.9.0" }
sc-consensus-epochs = { version = "0.9.0" }
sc-finality-grandpa = { version = "0.9.0" }
sc-finality-grandpa-rpc = { version = "0.9.0" }
sc-keystore = { version = "3.0.0" }
sc-sync-state-rpc = { version = "0.9.0" }
sp-transaction-pool = { version = "3.0.0" }
substrate-frame-rpc-system = { version = "3.0.0" }
sc-rpc = { version = "4.0.0-dev" }
sc-rpc-api = { version = "0.10.0-dev" }
sc-chain-spec = { version = "4.0.0-dev" }
sc-consensus-babe = { version = "0.10.0-dev" }
sc-consensus-babe-rpc = { version = "0.10.0-dev" }
sc-consensus-epochs = { version = "0.10.0-dev" }
sc-finality-grandpa = { version = "0.10.0-dev" }
sc-finality-grandpa-rpc = { version = "0.10.0-dev" }
sc-keystore = { version = "4.0.0-dev" }
sc-sync-state-rpc = { version = "0.10.0-dev" }
sc-transaction-pool-api = { version = "4.0.0-dev" }
substrate-frame-rpc-system = { version = "4.0.0-dev" }
Loading

0 comments on commit 95328c8

Please sign in to comment.