From dc28e61c21d00b8f84f4b0af5116ad677470e2ad Mon Sep 17 00:00:00 2001 From: orion Date: Thu, 6 Oct 2022 10:58:20 +0200 Subject: [PATCH 1/7] Update polkadot version (Auto generated commit) --- claims/Cargo.toml | 18 +++++++++--------- parentchain/Cargo.toml | 16 ++++++++-------- primitives/claims/Cargo.toml | 6 +++--- primitives/common/Cargo.toml | 2 +- primitives/sidechain/Cargo.toml | 8 ++++---- primitives/teeracle/Cargo.toml | 2 +- primitives/teerex/Cargo.toml | 6 +++--- sidechain/Cargo.toml | 26 +++++++++++++------------- teeracle/Cargo.toml | 26 +++++++++++++------------- teerex/Cargo.toml | 26 +++++++++++++------------- teerex/ias-verify/Cargo.toml | 8 ++++---- 11 files changed, 72 insertions(+), 72 deletions(-) diff --git a/claims/Cargo.toml b/claims/Cargo.toml index a8bf8c1c..5a2e0136 100644 --- a/claims/Cargo.toml +++ b/claims/Cargo.toml @@ -13,12 +13,12 @@ serde = { version = "1.0.13", default-features = false } serde_derive = { version = "1.0.13", optional = true } # substrate dependencies -frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-std = { package = "sp-std", default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +frame-benchmarking = { optional = true, default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +sp-std = { package = "sp-std", default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } # local claims-primitives = { package = "claims-primitives", path = "../primitives/claims", default-features = false } @@ -26,10 +26,10 @@ claims-primitives = { package = "claims-primitives", path = "../primitives/claim [dev-dependencies] hex-literal = "0.3.3" libsecp256k1 = "0.7.0" -pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -pallet-vesting = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +pallet-vesting = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } serde_json = { version = "1.0" } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } [features] default = ["std"] diff --git a/parentchain/Cargo.toml b/parentchain/Cargo.toml index 5f421833..76dff75b 100644 --- a/parentchain/Cargo.toml +++ b/parentchain/Cargo.toml @@ -15,17 +15,17 @@ scale-info = { version = "2.0.1", default-features = false, features = ["derive" serde = { version = "1.0.13", features = ["derive"], optional = true } # substrate dependencies -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -frame-system = { default-features = false, package = "frame-system", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +frame-system = { default-features = false, package = "frame-system", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } [dev-dependencies] env_logger = "0.9.0" -sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } [features] default = ["std"] diff --git a/primitives/claims/Cargo.toml b/primitives/claims/Cargo.toml index 10c78da3..aa9a03d5 100644 --- a/primitives/claims/Cargo.toml +++ b/primitives/claims/Cargo.toml @@ -14,9 +14,9 @@ scale-info = { version = "2.0.1", default-features = false, features = ["derive" serde = { version = "1.0.13", default-features = false } # substrate dependencies -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.29" } [features] default = ["std"] diff --git a/primitives/common/Cargo.toml b/primitives/common/Cargo.toml index 4bc0220e..356de057 100644 --- a/primitives/common/Cargo.toml +++ b/primitives/common/Cargo.toml @@ -10,7 +10,7 @@ edition = "2021" [dependencies] # substrate deps -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } [features] default = ["std"] diff --git a/primitives/sidechain/Cargo.toml b/primitives/sidechain/Cargo.toml index 26dd6b94..fcc7f4c8 100644 --- a/primitives/sidechain/Cargo.toml +++ b/primitives/sidechain/Cargo.toml @@ -14,10 +14,10 @@ serde = { version = "1.0.13", default-features = false } # substrate dependencies -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } [features] diff --git a/primitives/teeracle/Cargo.toml b/primitives/teeracle/Cargo.toml index 3a02ad5c..c6c9bf4b 100644 --- a/primitives/teeracle/Cargo.toml +++ b/primitives/teeracle/Cargo.toml @@ -15,7 +15,7 @@ common-primitives = { path = "../common", default-features = false } substrate-fixed = { tag = "v0.5.9", default-features = false, git = "https://github.com/encointer/substrate-fixed.git" } # substrate -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } [features] diff --git a/primitives/teerex/Cargo.toml b/primitives/teerex/Cargo.toml index 294688e8..22616c1e 100644 --- a/primitives/teerex/Cargo.toml +++ b/primitives/teerex/Cargo.toml @@ -16,9 +16,9 @@ serde = { version = "1.0.13", default-features = false } ias-verify = { path = "../../teerex/ias-verify", default-features = false } # substrate dependencies -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } [features] diff --git a/sidechain/Cargo.toml b/sidechain/Cargo.toml index d4c1dd6c..eaf6319d 100644 --- a/sidechain/Cargo.toml +++ b/sidechain/Cargo.toml @@ -20,27 +20,27 @@ sidechain-primitives = { path = "../primitives/sidechain", default-features = fa teerex-primitives = { path = "../primitives/teerex", default-features = false } # substrate dependencies -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } # benchmarking -frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } hex-literal = { version = "0.3.2", optional = true } -pallet-balances = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +pallet-balances = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } test-utils = { path = "../test-utils", default-features = false, optional = true } [dev-dependencies] env_logger = "0.9.0" -externalities = { package = "sp-externalities", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +externalities = { package = "sp-externalities", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } hex-literal = "0.3.2" -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } test-utils = { path = "../test-utils" } [features] diff --git a/teeracle/Cargo.toml b/teeracle/Cargo.toml index b27cc2af..dc042bbd 100644 --- a/teeracle/Cargo.toml +++ b/teeracle/Cargo.toml @@ -21,27 +21,27 @@ teeracle-primitives = { path = "../primitives/teeracle", default-features = fals substrate-fixed = { tag = "v0.5.9", default-features = false, git = "https://github.com/encointer/substrate-fixed.git" } # substrate -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } # benchmarking -frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } hex-literal = { version = "0.3.2", optional = true } test-utils = { path = "../test-utils", optional = true, default-features = false } -timestamp = { package = "pallet-timestamp", default-features = false, optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +timestamp = { package = "pallet-timestamp", default-features = false, optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } [dev-dependencies] -externalities = { package = "sp-externalities", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +externalities = { package = "sp-externalities", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } hex-literal = "0.3.2" -sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } test-utils = { path = "../test-utils" } -timestamp = { package = "pallet-timestamp", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +timestamp = { package = "pallet-timestamp", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } [features] diff --git a/teerex/Cargo.toml b/teerex/Cargo.toml index 31b5d7b1..dbf4e173 100644 --- a/teerex/Cargo.toml +++ b/teerex/Cargo.toml @@ -19,27 +19,27 @@ ias-verify = { path = "./ias-verify", default-features = false } teerex-primitives = { path = "../primitives/teerex", default-features = false } # substrate dependencies -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -timestamp = { package = "pallet-timestamp", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +timestamp = { package = "pallet-timestamp", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } # benchmarking -frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +frame-benchmarking = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } hex-literal = { version = "0.3.2", optional = true } -pallet-balances = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +pallet-balances = { default-features = false, optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } test-utils = { path = "../test-utils", default-features = false, optional = true } [dev-dependencies] env_logger = "0.9.0" -externalities = { package = "sp-externalities", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +externalities = { package = "sp-externalities", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +frame-benchmarking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } hex-literal = "0.3.2" -pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } test-utils = { path = "../test-utils" } [features] diff --git a/teerex/ias-verify/Cargo.toml b/teerex/ias-verify/Cargo.toml index d5d5a4c7..3d6e39c5 100644 --- a/teerex/ias-verify/Cargo.toml +++ b/teerex/ias-verify/Cargo.toml @@ -17,10 +17,10 @@ serde_json = { version = "1.0", default-features = false, features = ["alloc"] } webpki = { default-features = false, git = "https://github.com/scs/webpki-nostd.git" } # substrate dependencies -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } -sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.28" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } +sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.29" } [dev-dependencies] hex-literal = "*" From 40e575d0015090d27c1eecd494404f7895d087aa Mon Sep 17 00:00:00 2001 From: orion Date: Fri, 7 Oct 2022 14:55:17 +0200 Subject: [PATCH 2/7] fixup for Weight --- Cargo.lock | 143 +++++++++++++++++++++++-------------- parentchain/src/weights.rs | 2 +- 2 files changed, 90 insertions(+), 55 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 075f126d..798129dc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -280,6 +280,15 @@ version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +[[package]] +name = "cfg-expr" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aacacf4d96c24b2ad6eb8ee6df040e4f27b0d0b39a5710c30091baa830485db" +dependencies = [ + "smallvec", +] + [[package]] name = "cfg-if" version = "1.0.0" @@ -514,25 +523,16 @@ dependencies = [ ] [[package]] -name = "ed25519" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369" -dependencies = [ - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" +name = "ed25519-zebra" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" +checksum = "403ef3e961ab98f0ba902771d29f842058578bb1ce7e3c59dad5a6a93e784c69" dependencies = [ "curve25519-dalek 3.2.0", - "ed25519", - "rand 0.7.3", - "serde", + "hex", + "rand_core 0.6.3", "sha2 0.9.9", + "thiserror", "zeroize", ] @@ -619,7 +619,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "frame-support", "frame-system", @@ -631,6 +631,7 @@ dependencies = [ "serde", "sp-api", "sp-application-crypto", + "sp-core", "sp-io", "sp-runtime", "sp-runtime-interface", @@ -653,7 +654,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "bitflags", "frame-metadata", @@ -684,10 +685,12 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "Inflector", + "cfg-expr", "frame-support-procedural-tools", + "itertools", "proc-macro2", "quote", "syn", @@ -696,7 +699,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -708,7 +711,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "proc-macro2", "quote", @@ -718,7 +721,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "frame-support", "log", @@ -1051,6 +1054,15 @@ dependencies = [ "num-traits", ] +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "0.4.8" @@ -1185,6 +1197,15 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "lru" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" +dependencies = [ + "hashbrown", +] + [[package]] name = "matchers" version = "0.0.1" @@ -1282,6 +1303,12 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + [[package]] name = "num-bigint" version = "0.2.6" @@ -1395,7 +1422,7 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "frame-benchmarking", "frame-support", @@ -1531,7 +1558,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "frame-benchmarking", "frame-support", @@ -1549,7 +1576,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "frame-support", "frame-system", @@ -2181,7 +2208,7 @@ checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "hash-db", "log", @@ -2191,6 +2218,7 @@ dependencies = [ "sp-runtime", "sp-state-machine", "sp-std", + "sp-trie", "sp-version", "thiserror", ] @@ -2198,7 +2226,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "blake2", "proc-macro-crate", @@ -2210,7 +2238,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "parity-scale-codec", "scale-info", @@ -2223,7 +2251,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "integer-sqrt", "num-traits", @@ -2238,14 +2266,14 @@ dependencies = [ [[package]] name = "sp-core" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "base58", "bitflags", "blake2-rfc", "byteorder", "dyn-clonable", - "ed25519-dalek", + "ed25519-zebra", "futures", "hash-db", "hash256-std-hasher", @@ -2284,7 +2312,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "blake2", "byteorder", @@ -2298,7 +2326,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "proc-macro2", "quote", @@ -2309,7 +2337,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "proc-macro2", "quote", @@ -2319,7 +2347,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "environmental", "parity-scale-codec", @@ -2330,7 +2358,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -2344,7 +2372,7 @@ dependencies = [ [[package]] name = "sp-io" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "bytes", "futures", @@ -2370,7 +2398,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "lazy_static", "sp-core", @@ -2381,7 +2409,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "async-trait", "futures", @@ -2397,7 +2425,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "backtrace", "lazy_static", @@ -2407,7 +2435,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "either", "hash256-std-hasher", @@ -2429,7 +2457,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -2447,7 +2475,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "Inflector", "proc-macro-crate", @@ -2459,7 +2487,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "parity-scale-codec", "scale-info", @@ -2470,7 +2498,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "hash-db", "log", @@ -2492,12 +2520,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" [[package]] name = "sp-storage" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "impl-serde", "parity-scale-codec", @@ -2510,7 +2538,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "async-trait", "futures-timer", @@ -2526,7 +2554,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "parity-scale-codec", "sp-std", @@ -2538,15 +2566,22 @@ dependencies = [ [[package]] name = "sp-trie" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ + "ahash", "hash-db", + "hashbrown", + "lazy_static", + "lru", "memory-db", + "nohash-hasher", "parity-scale-codec", + "parking_lot", "scale-info", "sp-core", "sp-std", "thiserror", + "tracing", "trie-db", "trie-root", ] @@ -2554,7 +2589,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "impl-serde", "parity-scale-codec", @@ -2571,7 +2606,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -2582,7 +2617,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a0621761c4a333cb2074ff720f7acbfb92dbb8" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.29#cc370aa61e15c18d23a2f686b812fd576a630afe" dependencies = [ "impl-trait-for-tuples", "log", @@ -2902,9 +2937,9 @@ dependencies = [ [[package]] name = "trie-db" -version = "0.23.1" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32d034c0d3db64b43c31de38e945f15b40cd4ca6d2dcfc26d4798ce8de4ab83" +checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908" dependencies = [ "hash-db", "hashbrown", diff --git a/parentchain/src/weights.rs b/parentchain/src/weights.rs index 24b4b350..7c61e19a 100644 --- a/parentchain/src/weights.rs +++ b/parentchain/src/weights.rs @@ -8,6 +8,6 @@ pub trait WeightInfo { /// Weights for pallet_parentchain using the Integritee parachain node and recommended hardware. impl WeightInfo for () { fn set_block() -> Weight { - 10_000 as Weight + Weight::from_ref_time(10_000) } } From 471f470ac718ee98458e6ddaef6a06c3998daffc Mon Sep 17 00:00:00 2001 From: orion Date: Mon, 10 Oct 2022 14:20:33 +0200 Subject: [PATCH 3/7] fixup! fixup for Weight --- claims/src/lib.rs | 10 +++++----- sidechain/src/weights.rs | 12 ++++++------ teeracle/src/weights.rs | 12 ++++++------ teerex/src/weights.rs | 40 ++++++++++++++++++++-------------------- 4 files changed, 37 insertions(+), 37 deletions(-) diff --git a/claims/src/lib.rs b/claims/src/lib.rs index fc08a394..f5d7f6dd 100644 --- a/claims/src/lib.rs +++ b/claims/src/lib.rs @@ -54,19 +54,19 @@ pub trait WeightInfo { pub struct TestWeightInfo; impl WeightInfo for TestWeightInfo { fn claim() -> Weight { - 0 + Weight::from_ref_time(0) } fn mint_claim() -> Weight { - 0 + Weight::from_ref_time(0) } fn claim_attest() -> Weight { - 0 + Weight::from_ref_time(0) } fn attest() -> Weight { - 0 + Weight::from_ref_time(0) } fn move_claim() -> Weight { - 0 + Weight::from_ref_time(0) } } diff --git a/sidechain/src/weights.rs b/sidechain/src/weights.rs index 68c8ebf4..0abc8698 100644 --- a/sidechain/src/weights.rs +++ b/sidechain/src/weights.rs @@ -30,17 +30,17 @@ pub trait WeightInfo { pub struct IntegriteeWeight(PhantomData); impl WeightInfo for IntegriteeWeight { fn confirm_imported_sidechain_block() -> Weight { - (46_200_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(46_200_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } } // For tests impl WeightInfo for () { fn confirm_imported_sidechain_block() -> Weight { - (46_200_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(46_200_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) } } diff --git a/teeracle/src/weights.rs b/teeracle/src/weights.rs index 02e78ba7..544f6462 100644 --- a/teeracle/src/weights.rs +++ b/teeracle/src/weights.rs @@ -27,24 +27,24 @@ pub trait WeightInfo { pub struct IntegriteeWeight(PhantomData); impl WeightInfo for IntegriteeWeight { fn add_to_whitelist() -> Weight { - 46_200_000 as Weight + Weight::from_ref_time(46_200_000) } fn remove_from_whitelist() -> Weight { - 46_200_000 as Weight + Weight::from_ref_time(46_200_000) } fn update_exchange_rate() -> Weight { - 46_200_000 as Weight + Weight::from_ref_time(46_200_000) } } // For tests impl WeightInfo for () { fn add_to_whitelist() -> Weight { - 46_200_000 as Weight + Weight::from_ref_time(46_200_000) } fn remove_from_whitelist() -> Weight { - 46_200_000 as Weight + Weight::from_ref_time(46_200_000) } fn update_exchange_rate() -> Weight { - 46_200_000 as Weight + Weight::from_ref_time(46_200_000) } } diff --git a/teerex/src/weights.rs b/teerex/src/weights.rs index d6f165cb..3ce50d23 100644 --- a/teerex/src/weights.rs +++ b/teerex/src/weights.rs @@ -60,43 +60,43 @@ pub trait WeightInfo { pub struct IntegriteeWeight(PhantomData); impl WeightInfo for IntegriteeWeight { fn register_enclave() -> Weight { - (1_969_500_000 as Weight) - .saturating_add(T::DbWeight::get().reads(2 as Weight)) - .saturating_add(T::DbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(1_969_500_000) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } fn unregister_enclave() -> Weight { - (53_300_000 as Weight) - .saturating_add(T::DbWeight::get().reads(3 as Weight)) - .saturating_add(T::DbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(53_300_000) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(5)) } fn call_worker() -> Weight { - (57_200_000 as Weight) + Weight::from_ref_time(57_200_000) } fn confirm_processed_parentchain_block() -> Weight { - (46_900_000 as Weight) - .saturating_add(T::DbWeight::get().reads(1 as Weight)) - .saturating_add(T::DbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(46_900_000) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(2)) } } // For tests impl WeightInfo for () { fn register_enclave() -> Weight { - (1_969_500_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(2 as Weight)) - .saturating_add(RocksDbWeight::get().writes(1 as Weight)) + Weight::from_ref_time(1_969_500_000) + .saturating_add(RocksDbWeight::get().reads(2)) + .saturating_add(RocksDbWeight::get().writes(1)) } fn unregister_enclave() -> Weight { - (53_300_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(3 as Weight)) - .saturating_add(RocksDbWeight::get().writes(5 as Weight)) + Weight::from_ref_time(53_300_000) + .saturating_add(RocksDbWeight::get().reads(3)) + .saturating_add(RocksDbWeight::get().writes(5)) } fn call_worker() -> Weight { - (57_200_000 as Weight) + Weight::from_ref_time(57_200_000) } fn confirm_processed_parentchain_block() -> Weight { - (46_900_000 as Weight) - .saturating_add(RocksDbWeight::get().reads(1 as Weight)) - .saturating_add(RocksDbWeight::get().writes(2 as Weight)) + Weight::from_ref_time(46_900_000) + .saturating_add(RocksDbWeight::get().reads(1)) + .saturating_add(RocksDbWeight::get().writes(2)) } } From fa40863651a51384b11b4b37bd74743dc28fbd0b Mon Sep 17 00:00:00 2001 From: orion Date: Mon, 10 Oct 2022 15:16:22 +0200 Subject: [PATCH 4/7] follow-up for Weight changes in scripts --- .../frame-weight-template-full-info.hbs | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/teerex/scripts/frame-weight-template-full-info.hbs b/teerex/scripts/frame-weight-template-full-info.hbs index b97f3c45..32d97a10 100644 --- a/teerex/scripts/frame-weight-template-full-info.hbs +++ b/teerex/scripts/frame-weight-template-full-info.hbs @@ -55,22 +55,22 @@ impl WeightInfo for IntegriteeWeight { {{~#each benchmark.components as |c| ~}} {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} ) -> Weight { - ({{underscore benchmark.base_weight}} as Weight) + Weight::from_ref_time({{underscore benchmark.base_weight}}) {{~#each benchmark.component_weight as |cw|}} // Standard Error: {{underscore cw.error}} - .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)) + .saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into())) {{~/each}} {{~#if (ne benchmark.base_reads "0")}} - .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as Weight)) + .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}})) {{~/if}} {{~#each benchmark.component_reads as |cr|}} - .saturating_add(T::DbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight))) + .saturating_add(T::DbWeight::get().reads(Weight::from_ref_time({{cr.slope}}).saturating_mul({{cr.name}}.into()).ref_time()))) {{~/each}} {{~#if (ne benchmark.base_writes "0")}} - .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as Weight)) + .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}})) {{~/if}} {{~#each benchmark.component_writes as |cw|}} - .saturating_add(T::DbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))) + .saturating_add(T::DbWeight::get().writes(Weight::from_ref_time({{cw.slope}}).saturating_mul({{cw.name}}.into()).ref_time()))) {{~/each}} } {{~/each}} @@ -84,22 +84,22 @@ impl WeightInfo for () { {{~#each benchmark.components as |c| ~}} {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} ) -> Weight { - ({{underscore benchmark.base_weight}} as Weight) + Weight::from_ref_time({{underscore benchmark.base_weight}}) {{~#each benchmark.component_weight as |cw|}} // Standard Error: {{underscore cw.error}} - .saturating_add(({{underscore cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight)) + .saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into())) {{~/each}} {{~#if (ne benchmark.base_reads "0")}} - .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as Weight)) + .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}})) {{~/if}} {{~#each benchmark.component_reads as |cr|}} - .saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as Weight).saturating_mul({{cr.name}} as Weight))) + .saturating_add(RocksDbWeight::get().reads(Weight::from_ref_time({{cr.slope}}).saturating_mul({{cr.name}}.into()).ref_time()))) {{~/each}} {{~#if (ne benchmark.base_writes "0")}} - .saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as Weight)) + .saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}})) {{~/if}} {{~#each benchmark.component_writes as |cw|}} - .saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as Weight).saturating_mul({{cw.name}} as Weight))) + .saturating_add(RocksDbWeight::get().writes(Weight::from_ref_time({{cw.slope}}).saturating_mul({{cw.name}}.into()).ref_time()))) {{~/each}} } {{~/each}} From f21ec5980d3ecc4814cdd1eed83eff045ec84740 Mon Sep 17 00:00:00 2001 From: orion Date: Wed, 12 Oct 2022 08:44:05 +0200 Subject: [PATCH 5/7] As `PalletString` type definitons depends on `std` / `no_std` it should String types should not be forced. --- teeracle/src/benchmarking.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/teeracle/src/benchmarking.rs b/teeracle/src/benchmarking.rs index 767e7fd4..21a8d935 100644 --- a/teeracle/src/benchmarking.rs +++ b/teeracle/src/benchmarking.rs @@ -45,9 +45,9 @@ benchmarks! { ensure_not_skipping_ra_check(); timestamp::Pallet::::set_timestamp(TEST4_SETUP.timestamp.checked_into().unwrap()); let signer: T::AccountId = get_signer(TEST4_SETUP.signer_pub); - let trading_pair: TradingPairString = "DOT/USD".to_owned(); + let trading_pair: TradingPairString = "DOT/USD".into(); let rate = U32F32::from_num(43.65); - let data_source: MarketDataSourceString = "https://api.coingecko.com".to_owned(); + let data_source: MarketDataSourceString = "https://api.coingecko.com".into(); // simply register the enclave before to make sure it already // exists when running the benchmark Teerex::::register_enclave( @@ -65,7 +65,7 @@ benchmarks! { add_to_whitelist { let mrenclave = TEST4_MRENCLAVE; - let data_source: MarketDataSourceString = "https://api.coingecko.com".to_owned(); + let data_source: MarketDataSourceString = "https://api.coingecko.com".into(); }: _(RawOrigin::Root, data_source.clone(), mrenclave) verify { @@ -74,7 +74,7 @@ benchmarks! { remove_from_whitelist { let mrenclave = TEST4_MRENCLAVE; - let data_source: MarketDataSourceString = "https://api.coingecko.com".to_owned(); + let data_source: MarketDataSourceString = "https://api.coingecko.com".into(); Exchange::::add_to_whitelist(RawOrigin::Root.into(), data_source.clone(), mrenclave).unwrap(); From b5cf8e0008fda71acfb906c0af700c46215b40f6 Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Tue, 18 Oct 2022 15:26:58 +0200 Subject: [PATCH 6/7] add feature flag to custom pallets --- claims/Cargo.toml | 2 ++ parentchain/Cargo.toml | 2 ++ sidechain/Cargo.toml | 2 ++ teeracle/Cargo.toml | 2 ++ teerex/Cargo.toml | 2 ++ 5 files changed, 10 insertions(+) diff --git a/claims/Cargo.toml b/claims/Cargo.toml index 5a2e0136..ee8a3f9b 100644 --- a/claims/Cargo.toml +++ b/claims/Cargo.toml @@ -54,3 +54,5 @@ runtime-benchmarks = [ "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", ] + +try-runtime = ["frame-support/try-runtime"] diff --git a/parentchain/Cargo.toml b/parentchain/Cargo.toml index 76dff75b..76122848 100644 --- a/parentchain/Cargo.toml +++ b/parentchain/Cargo.toml @@ -42,3 +42,5 @@ std = [ "sp-runtime/std", "sp-std/std", ] + +try-runtime = ["frame-support/try-runtime"] diff --git a/sidechain/Cargo.toml b/sidechain/Cargo.toml index eaf6319d..a7857754 100644 --- a/sidechain/Cargo.toml +++ b/sidechain/Cargo.toml @@ -73,3 +73,5 @@ runtime-benchmarks = [ # Allow workers to register without remote attestation for dev purposes. # This pallet needs the flag only to run the tests, otherwise skip-ias-check should only be set in the pallet-teerex. skip-ias-check = [] + +try-runtime = ["frame-support/try-runtime"] diff --git a/teeracle/Cargo.toml b/teeracle/Cargo.toml index dc042bbd..98042079 100644 --- a/teeracle/Cargo.toml +++ b/teeracle/Cargo.toml @@ -69,3 +69,5 @@ runtime-benchmarks = [ "test-utils", "timestamp/runtime-benchmarks", ] + +try-runtime = ["frame-support/try-runtime"] diff --git a/teerex/Cargo.toml b/teerex/Cargo.toml index dbf4e173..d4f6608a 100644 --- a/teerex/Cargo.toml +++ b/teerex/Cargo.toml @@ -70,3 +70,5 @@ runtime-benchmarks = [ ] # allow workers to register without remote attestation for dev purposes skip-ias-check = [] + +try-runtime = ["frame-support/try-runtime"] From 7ed394541f6770e72267ca6496b42d7ee3015570 Mon Sep 17 00:00:00 2001 From: orion Date: Wed, 19 Oct 2022 12:17:52 +0200 Subject: [PATCH 7/7] frame weight template: style format --- .../frame-weight-template-full-info.hbs | 94 +++++++++---------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/teerex/scripts/frame-weight-template-full-info.hbs b/teerex/scripts/frame-weight-template-full-info.hbs index 32d97a10..2521bd7c 100644 --- a/teerex/scripts/frame-weight-template-full-info.hbs +++ b/teerex/scripts/frame-weight-template-full-info.hbs @@ -1,9 +1,9 @@ /* -Copyright 2021 Integritee AG + Copyright 2021 Integritee AG -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -*/ + */ //! Autogenerated weights for {{pallet}} with reference hardware: //! * @@ -37,70 +37,70 @@ use sp_std::marker::PhantomData; /// Weight functions needed for {{pallet}}. pub trait WeightInfo { - {{~#each benchmarks as |benchmark|}} - fn {{benchmark.name~}} - ( - {{~#each benchmark.components as |c| ~}} - {{c.name}}: u32, {{/each~}} - ) -> Weight; - {{~/each}} + {{~#each benchmarks as |benchmark|}} + fn {{benchmark.name~}} + ( + {{~#each benchmark.components as |c| ~}} + {{c.name}}: u32, {{/each~}} + ) -> Weight; + {{~/each}} } /// Weights for {{pallet}} using the Integritee parachain node and recommended hardware. pub struct IntegriteeWeight(PhantomData); impl WeightInfo for IntegriteeWeight { - {{~#each benchmarks as |benchmark|}} - fn {{benchmark.name~}} - ( - {{~#each benchmark.components as |c| ~}} - {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} - ) -> Weight { - Weight::from_ref_time({{underscore benchmark.base_weight}}) - {{~#each benchmark.component_weight as |cw|}} - // Standard Error: {{underscore cw.error}} - .saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into())) - {{~/each}} - {{~#if (ne benchmark.base_reads "0")}} + {{~#each benchmarks as |benchmark|}} + fn {{benchmark.name~}} + ( + {{~#each benchmark.components as |c| ~}} + {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} + ) -> Weight { + Weight::from_ref_time({{underscore benchmark.base_weight}}) + {{~#each benchmark.component_weight as |cw|}} + // Standard Error: {{underscore cw.error}} + .saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into())) + {{~/each}} + {{~#if (ne benchmark.base_reads "0")}} .saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}})) - {{~/if}} - {{~#each benchmark.component_reads as |cr|}} + {{~/if}} + {{~#each benchmark.component_reads as |cr|}} .saturating_add(T::DbWeight::get().reads(Weight::from_ref_time({{cr.slope}}).saturating_mul({{cr.name}}.into()).ref_time()))) - {{~/each}} - {{~#if (ne benchmark.base_writes "0")}} + {{~/each}} + {{~#if (ne benchmark.base_writes "0")}} .saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}})) - {{~/if}} - {{~#each benchmark.component_writes as |cw|}} + {{~/if}} + {{~#each benchmark.component_writes as |cw|}} .saturating_add(T::DbWeight::get().writes(Weight::from_ref_time({{cw.slope}}).saturating_mul({{cw.name}}.into()).ref_time()))) - {{~/each}} - } - {{~/each}} + {{~/each}} + } + {{~/each}} } // For tests impl WeightInfo for () { -{{~#each benchmarks as |benchmark|}} - fn {{benchmark.name~}} - ( - {{~#each benchmark.components as |c| ~}} - {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} - ) -> Weight { + {{~#each benchmarks as |benchmark|}} + fn {{benchmark.name~}} + ( + {{~#each benchmark.components as |c| ~}} + {{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}} + ) -> Weight { Weight::from_ref_time({{underscore benchmark.base_weight}}) {{~#each benchmark.component_weight as |cw|}} - // Standard Error: {{underscore cw.error}} - .saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into())) + // Standard Error: {{underscore cw.error}} + .saturating_add(Weight::from_ref_time({{underscore cw.slope}}).saturating_mul({{cw.name}}.into())) {{~/each}} {{~#if (ne benchmark.base_reads "0")}} - .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}})) + .saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}})) {{~/if}} {{~#each benchmark.component_reads as |cr|}} - .saturating_add(RocksDbWeight::get().reads(Weight::from_ref_time({{cr.slope}}).saturating_mul({{cr.name}}.into()).ref_time()))) + .saturating_add(RocksDbWeight::get().reads(Weight::from_ref_time({{cr.slope}}).saturating_mul({{cr.name}}.into()).ref_time()))) {{~/each}} {{~#if (ne benchmark.base_writes "0")}} - .saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}})) + .saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}})) {{~/if}} {{~#each benchmark.component_writes as |cw|}} - .saturating_add(RocksDbWeight::get().writes(Weight::from_ref_time({{cw.slope}}).saturating_mul({{cw.name}}.into()).ref_time()))) + .saturating_add(RocksDbWeight::get().writes(Weight::from_ref_time({{cw.slope}}).saturating_mul({{cw.name}}.into()).ref_time()))) {{~/each}} - } -{{~/each}} + } + {{~/each}} }