diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d2a9d76..ebb92c8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -141,11 +141,11 @@ jobs: - uses: Swatinem/rust-cache@v2 with: - key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}-${{ matrix.binary }}-skip-ias-check + key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}-${{ matrix.binary }}-with-ias - name: Release if: ${{ matrix.binary == 'release' }} - run: cargo build --release --locked --features skip-ias-check,skip-extrinsic-filtering + run: cargo build --release --locked --features skip-extrinsic-filtering # Upload artifacts - name: Upload integritee-node-dev @@ -257,7 +257,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: - key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}-${{ matrix.binary }}-skip-ias-check + key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}-${{ matrix.binary }}-with-ias - name: Build benchmarking binary if: ${{ matrix.binary == 'release' }} diff --git a/Cargo.lock b/Cargo.lock index 8d3bf1a..85b0aca 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -859,7 +859,7 @@ dependencies = [ [[package]] name = "claims-primitives" version = "0.1.0" -source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#be26e6b85f14896860ef919488e6bb4cf4b7aa29" +source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662" dependencies = [ "parity-scale-codec", "rustc-hex", @@ -941,8 +941,13 @@ dependencies = [ [[package]] name = "common-primitives" version = "0.1.0" -source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#be26e6b85f14896860ef919488e6bb4cf4b7aa29" +source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662" dependencies = [ + "derive_more", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", "sp-std", ] @@ -967,6 +972,12 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" +[[package]] +name = "convert_case" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + [[package]] name = "core-foundation" version = "0.9.3" @@ -1511,8 +1522,10 @@ version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ + "convert_case", "proc-macro2", "quote", + "rustc_version 0.4.0", "syn 1.0.109", ] @@ -1759,6 +1772,22 @@ dependencies = [ "zeroize", ] +[[package]] +name = "enclave-bridge-primitives" +version = "0.1.0" +source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662" +dependencies = [ + "common-primitives", + "log", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "enum-as-inner" version = "0.5.1" @@ -2926,7 +2955,7 @@ dependencies = [ [[package]] name = "integritee-node" -version = "1.0.36" +version = "1.1.0" dependencies = [ "clap", "frame-benchmarking", @@ -2971,7 +3000,7 @@ dependencies = [ [[package]] name = "integritee-node-runtime" -version = "1.0.33" +version = "1.1.34" dependencies = [ "frame-benchmarking", "frame-executive", @@ -2983,6 +3012,7 @@ dependencies = [ "pallet-aura", "pallet-balances", "pallet-claims", + "pallet-enclave-bridge", "pallet-grandpa", "pallet-insecure-randomness-collective-flip", "pallet-multisig", @@ -4589,7 +4619,7 @@ dependencies = [ [[package]] name = "pallet-claims" version = "0.9.12" -source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#be26e6b85f14896860ef919488e6bb4cf4b7aa29" +source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662" dependencies = [ "claims-primitives", "frame-benchmarking", @@ -4606,6 +4636,31 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-enclave-bridge" +version = "0.10.0" +source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662" +dependencies = [ + "enclave-bridge-primitives", + "frame-benchmarking", + "frame-support", + "frame-system", + "hex-literal", + "log", + "pallet-balances", + "pallet-teerex", + "pallet-timestamp", + "parity-scale-codec", + "scale-info", + "serde", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "teerex-primitives", + "test-utils", +] + [[package]] name = "pallet-grandpa" version = "4.0.0-dev" @@ -4730,15 +4785,17 @@ dependencies = [ [[package]] name = "pallet-sidechain" -version = "0.9.0" -source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#be26e6b85f14896860ef919488e6bb4cf4b7aa29" +version = "0.10.0" +source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662" dependencies = [ + "enclave-bridge-primitives", "frame-benchmarking", "frame-support", "frame-system", "hex-literal", "log", "pallet-balances", + "pallet-enclave-bridge", "pallet-teerex", "pallet-timestamp", "parity-scale-codec", @@ -4770,7 +4827,7 @@ dependencies = [ [[package]] name = "pallet-teeracle" version = "0.1.0" -source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#be26e6b85f14896860ef919488e6bb4cf4b7aa29" +source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662" dependencies = [ "frame-benchmarking", "frame-support", @@ -4787,13 +4844,14 @@ dependencies = [ "sp-std", "substrate-fixed", "teeracle-primitives", + "teerex-primitives", "test-utils", ] [[package]] name = "pallet-teerex" -version = "0.9.0" -source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#be26e6b85f14896860ef919488e6bb4cf4b7aa29" +version = "0.10.0" +source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662" dependencies = [ "frame-benchmarking", "frame-support", @@ -7349,7 +7407,7 @@ dependencies = [ [[package]] name = "sgx-verify" version = "0.1.4" -source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#be26e6b85f14896860ef919488e6bb4cf4b7aa29" +source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662" dependencies = [ "base64 0.13.1", "chrono", @@ -7357,6 +7415,7 @@ dependencies = [ "frame-support", "hex", "hex-literal", + "log", "parity-scale-codec", "ring 0.16.20 (git+https://github.com/Niederb/ring-xous.git?branch=0.16.20-cleanup)", "scale-info", @@ -7458,7 +7517,7 @@ checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" [[package]] name = "sidechain-primitives" version = "0.1.0" -source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#be26e6b85f14896860ef919488e6bb4cf4b7aa29" +source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662" dependencies = [ "parity-scale-codec", "scale-info", @@ -8499,7 +8558,7 @@ checksum = "8ae9980cab1db3fceee2f6c6f643d5d8de2997c58ee8d25fb0cc8a9e9e7348e5" [[package]] name = "teeracle-primitives" version = "0.1.0" -source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#be26e6b85f14896860ef919488e6bb4cf4b7aa29" +source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662" dependencies = [ "common-primitives", "sp-std", @@ -8509,14 +8568,16 @@ dependencies = [ [[package]] name = "teerex-primitives" version = "0.1.0" -source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#be26e6b85f14896860ef919488e6bb4cf4b7aa29" +source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662" dependencies = [ "common-primitives", + "derive_more", + "log", "parity-scale-codec", "scale-info", "serde", "sp-core", - "sp-io", + "sp-runtime", "sp-std", ] @@ -8551,7 +8612,7 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "test-utils" version = "0.1.0" -source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#be26e6b85f14896860ef919488e6bb4cf4b7aa29" +source = "git+https://github.com/integritee-network/pallets.git?branch=polkadot-v0.9.42#5c52182eb3a5156e8d9f69c10ca1441214ee6662" dependencies = [ "log", "sgx-verify", diff --git a/Cargo.toml b/Cargo.toml index fdcc99c..c493107 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,5 +9,14 @@ members = [ #[patch."https://github.com/integritee-network/pallets.git"] #pallet-claims = { path = '../pallets/claims' } +#pallet-enclave-bridge = { path = '../pallets/enclave-bridge' } #pallet-teerex = { path = '../pallets/teerex' } +#pallet-sidechain = { path = '../pallets/sidechain' } +#sgx-verify = { path = '../pallets/teerex/sgx-verify' } #pallet-teeracle = { path = '../pallets/teeracle' } +#test-utils = { path = '../pallets/test-utils' } +#claims-primitives = { path = '../pallets/primitives/claims' } +#enclave-bridge-primitives = { path = '../pallets/primitives/enclave-bridge' } +#teerex-primitives = { path = '../pallets/primitives/teerex' } +#teeracle-primitives = { path = '../pallets/primitives/teeracle' } +#common-primitives = { path = '../pallets/primitives/common' } diff --git a/node/Cargo.toml b/node/Cargo.toml index a9dd115..68bbf81 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -8,7 +8,7 @@ license = 'Apache-2.0' name = 'integritee-node' repository = 'https://github.com/integritee-network/integritee-node' # Align major.minor revision with the runtimes, bump patch revision ad lib. Make this the github release tag. -version = '1.0.36' +version = '1.1.0' [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] @@ -71,7 +71,5 @@ runtime-benchmarks = [ "integritee-node-runtime/runtime-benchmarks", "sc-service/runtime-benchmarks", ] -# allow workers to register without remote attestation for dev purposes -skip-ias-check = ["integritee-node-runtime/skip-ias-check"] # lift filters for development binaries skip-extrinsic-filtering = ["integritee-node-runtime/skip-extrinsic-filtering"] diff --git a/node/src/chain_spec.rs b/node/src/chain_spec.rs index 1dce457..75c79fd 100644 --- a/node/src/chain_spec.rs +++ b/node/src/chain_spec.rs @@ -369,7 +369,7 @@ fn genesis_config( // Assign network admin rights. key: Some(root_key), }, - teerex: TeerexConfig { allow_sgx_debug_mode: true }, + teerex: TeerexConfig { allow_sgx_debug_mode: true, allow_skipping_attestation: true }, claims: Default::default(), treasury: Default::default(), vesting: Default::default(), diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 5f294f6..69b7643 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -6,7 +6,7 @@ license = 'Apache-2.0' name = 'integritee-node-runtime' repository = 'https://github.com/integritee-network/integritee-node' # keep patch revision with spec_version of runtime -version = '1.0.33' +version = '1.1.34' [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] @@ -31,6 +31,7 @@ pallet-utility = { default-features = false, git = "https://github.com/paritytec pallet-vesting = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.42" } pallet-claims = { default-features = false, git = "https://github.com/integritee-network/pallets.git", branch = "polkadot-v0.9.42" } +pallet-enclave-bridge = { default-features = false, git = "https://github.com/integritee-network/pallets.git", branch = "polkadot-v0.9.42" } pallet-sidechain = { default-features = false, git = "https://github.com/integritee-network/pallets.git", branch = "polkadot-v0.9.42" } pallet-teeracle = { default-features = false, git = "https://github.com/integritee-network/pallets.git", branch = "polkadot-v0.9.42" } pallet-teerex = { default-features = false, git = "https://github.com/integritee-network/pallets.git", branch = "polkadot-v0.9.42" } @@ -67,7 +68,6 @@ substrate-wasm-builder = { git = "https://github.com/paritytech/substrate.git", [features] default = ["std"] -skip-ias-check = ["pallet-teerex/skip-ias-check"] skip-extrinsic-filtering = [] std = [ "codec/std", @@ -102,6 +102,7 @@ std = [ "sp-version/std", "pallet-teerex/std", "pallet-claims/std", + "pallet-enclave-bridge/std", "pallet-proxy/std", "pallet-utility/std", "pallet-teeracle/std", @@ -122,6 +123,7 @@ runtime-benchmarks = [ "pallet-scheduler/runtime-benchmarks", "pallet-teerex/runtime-benchmarks", "pallet-claims/runtime-benchmarks", + "pallet-enclave-bridge/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-treasury/runtime-benchmarks", "pallet-vesting/runtime-benchmarks", diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index b76c4de..c0b824e 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -65,11 +65,14 @@ pub use pallet_balances::Call as BalancesCall; /// added by Integritee pub use pallet_claims; /// added by Integritee +pub use pallet_enclave_bridge; +/// added by Integritee pub use pallet_sidechain; /// added by Integritee pub use pallet_teeracle; /// added by Integritee pub use pallet_teerex; + pub use pallet_timestamp::Call as TimestampCall; use pallet_transaction_payment::CurrencyAdapter; use scale_info::TypeInfo; @@ -138,7 +141,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { /// Version of the runtime specification. A full-node will not attempt to use its native /// runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`, /// `spec_version` and `authoring_version` are the same between Wasm and native. - spec_version: 33, + spec_version: 34, /// Version of the implementation of the specification. Nodes are free to ignore this; it /// serves only as an indication that the code is different; as long as the other two versions @@ -159,7 +162,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { /// index. /// /// It need *not* change when a new module is added or when a dispatchable is added. - transaction_version: 5, + transaction_version: 6, state_version: 0, }; @@ -248,6 +251,7 @@ impl Contains<RuntimeCall> for BaseFilter { RuntimeCall::Proxy(_) | RuntimeCall::Teeracle(_) | RuntimeCall::Teerex(_) | + RuntimeCall::EnclaveBridge(_) | RuntimeCall::Treasury(..) | RuntimeCall::Scheduler(_) | RuntimeCall::Utility(_) | @@ -351,9 +355,9 @@ impl pallet_timestamp::Config for Runtime { // Aura doesn't like when we mess with the timestamps in the benchmarks. #[cfg(feature = "runtime-benchmarks")] - type OnTimestampSet = Teerex; + type OnTimestampSet = (); #[cfg(not(feature = "runtime-benchmarks"))] - type OnTimestampSet = (Aura, Teerex); + type OnTimestampSet = Aura; type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; type WeightInfo = weights::pallet_timestamp::WeightInfo<Runtime>; } @@ -402,18 +406,23 @@ impl pallet_sudo::Config for Runtime { parameter_types! { pub const MomentsPerDay: Moment = 86_400_000; // [ms/d] - pub const MaxSilenceTime: Moment =172_800_000; // 48h + pub const MaxAttestationRenewalPeriod: Moment =172_800_000; // 48h } /// added by Integritee impl pallet_teerex::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type Currency = pallet_balances::Pallet<Runtime>; + type MaxAttestationRenewalPeriod = MaxAttestationRenewalPeriod; type MomentsPerDay = MomentsPerDay; - type MaxSilenceTime = MaxSilenceTime; type WeightInfo = weights::pallet_teerex::WeightInfo<Runtime>; } +impl pallet_enclave_bridge::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type Currency = pallet_balances::Pallet<Runtime>; + type WeightInfo = weights::pallet_enclave_bridge::WeightInfo<Runtime>; +} + parameter_types! { pub Prefix: &'static [u8] = b"Pay TEERs to the integriTEE account:"; } @@ -679,6 +688,7 @@ construct_runtime!( Claims: pallet_claims::{Pallet, Call, Storage, Config<T>, Event<T>, ValidateUnsigned} = 51, Teeracle: pallet_teeracle::{Pallet, Call, Storage, Event<T>} = 52, Sidechain: pallet_sidechain::{Pallet, Call, Storage, Event<T>} = 53, + EnclaveBridge: pallet_enclave_bridge::{Pallet, Call, Storage, Event<T>} = 54, } ); @@ -723,6 +733,7 @@ mod benches { [pallet_proxy, Proxy] [pallet_scheduler, Scheduler] [pallet_teerex, Teerex] + [pallet_enclave_bridge, EnclaveBridge] [pallet_claims, Claims] [pallet_timestamp, Timestamp] [pallet_treasury, Treasury] diff --git a/runtime/src/weights/mod.rs b/runtime/src/weights/mod.rs index 32120da..0f80a82 100644 --- a/runtime/src/weights/mod.rs +++ b/runtime/src/weights/mod.rs @@ -16,6 +16,7 @@ pub mod frame_system; pub mod pallet_balances; pub mod pallet_claims; +pub mod pallet_enclave_bridge; pub mod pallet_multisig; pub mod pallet_preimage; pub mod pallet_proxy; diff --git a/runtime/src/weights/pallet_enclave_bridge.rs b/runtime/src/weights/pallet_enclave_bridge.rs new file mode 100644 index 0000000..dfe4d77 --- /dev/null +++ b/runtime/src/weights/pallet_enclave_bridge.rs @@ -0,0 +1,130 @@ + +//! Autogenerated weights for `pallet_enclave_bridge` +//! +//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev +//! DATE: 2023-07-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("integritee-solo-fresh"), DB CACHE: 1024 + +// Executed Command: +// target/release/integritee-node +// benchmark +// pallet +// --chain=integritee-solo-fresh +// --steps=50 +// --repeat=20 +// --pallet=pallet_enclave_bridge +// --extrinsic=* +// --execution=wasm +// --wasm-execution=compiled +// --heap-pages=4096 +// --output=runtime/src/weights/pallet_enclave_bridge.rs + +#![cfg_attr(rustfmt, rustfmt_skip)] +#![allow(unused_parens)] +#![allow(unused_imports)] +#![allow(missing_docs)] + +use frame_support::{traits::Get, weights::Weight}; +use core::marker::PhantomData; + +/// Weight functions for `pallet_enclave_bridge`. +pub struct WeightInfo<T>(PhantomData<T>); +impl<T: frame_system::Config> pallet_enclave_bridge::WeightInfo for WeightInfo<T> { + fn invoke() -> Weight { + // Proof Size summary in bytes: + // Measured: `0` + // Estimated: `0` + // Minimum execution time: 7_991_000 picoseconds. + Weight::from_parts(8_577_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + } + /// Storage: Teerex SovereignEnclaves (r:1 w:0) + /// Proof Skipped: Teerex SovereignEnclaves (max_values: None, max_size: None, mode: Measured) + /// Storage: EnclaveBridge ShardConfigRegistry (r:1 w:0) + /// Proof Skipped: EnclaveBridge ShardConfigRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EnclaveBridge ShardStatus (r:1 w:1) + /// Proof Skipped: EnclaveBridge ShardStatus (max_values: None, max_size: None, mode: Measured) + fn confirm_processed_parentchain_block() -> Weight { + // Proof Size summary in bytes: + // Measured: `350` + // Estimated: `3815` + // Minimum execution time: 17_900_000 picoseconds. + Weight::from_parts(18_510_000, 0) + .saturating_add(Weight::from_parts(0, 3815)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: System Account (r:1 w:1) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + fn shield_funds() -> Weight { + // Proof Size summary in bytes: + // Measured: `52` + // Estimated: `3593` + // Minimum execution time: 48_927_000 picoseconds. + Weight::from_parts(49_346_000, 0) + .saturating_add(Weight::from_parts(0, 3593)) + .saturating_add(T::DbWeight::get().reads(1)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Teerex SovereignEnclaves (r:1 w:0) + /// Proof Skipped: Teerex SovereignEnclaves (max_values: None, max_size: None, mode: Measured) + /// Storage: EnclaveBridge ShardConfigRegistry (r:1 w:0) + /// Proof Skipped: EnclaveBridge ShardConfigRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EnclaveBridge ShardStatus (r:1 w:1) + /// Proof Skipped: EnclaveBridge ShardStatus (max_values: None, max_size: None, mode: Measured) + /// Storage: EnclaveBridge ExecutedUnshieldCalls (r:1 w:1) + /// Proof Skipped: EnclaveBridge ExecutedUnshieldCalls (max_values: None, max_size: None, mode: Measured) + /// Storage: System Account (r:2 w:2) + /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen) + fn unshield_funds() -> Weight { + // Proof Size summary in bytes: + // Measured: `490` + // Estimated: `6196` + // Minimum execution time: 79_834_000 picoseconds. + Weight::from_parts(81_535_000, 0) + .saturating_add(Weight::from_parts(0, 6196)) + .saturating_add(T::DbWeight::get().reads(6)) + .saturating_add(T::DbWeight::get().writes(4)) + } + /// Storage: Teerex SovereignEnclaves (r:1 w:0) + /// Proof Skipped: Teerex SovereignEnclaves (max_values: None, max_size: None, mode: Measured) + /// Storage: EnclaveBridge ShardStatus (r:1 w:1) + /// Proof Skipped: EnclaveBridge ShardStatus (max_values: None, max_size: None, mode: Measured) + /// Storage: System EventTopics (r:6 w:6) + /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) + /// The range of component `l` is `[0, 100]`. + /// The range of component `t` is `[1, 5]`. + fn publish_hash(_l: u32, t: u32, ) -> Weight { + // Proof Size summary in bytes: + // Measured: `350` + // Estimated: `3815 + t * (2475 ±0)` + // Minimum execution time: 21_138_000 picoseconds. + Weight::from_parts(22_148_005, 0) + .saturating_add(Weight::from_parts(0, 3815)) + // Standard Error: 68_089 + .saturating_add(Weight::from_parts(2_376_164, 0).saturating_mul(t.into())) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) + .saturating_add(T::DbWeight::get().writes(2)) + .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(t.into()))) + .saturating_add(Weight::from_parts(0, 2475).saturating_mul(t.into())) + } + /// Storage: Teerex SovereignEnclaves (r:1 w:0) + /// Proof Skipped: Teerex SovereignEnclaves (max_values: None, max_size: None, mode: Measured) + /// Storage: EnclaveBridge ShardConfigRegistry (r:1 w:1) + /// Proof Skipped: EnclaveBridge ShardConfigRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EnclaveBridge ShardStatus (r:1 w:1) + /// Proof Skipped: EnclaveBridge ShardStatus (max_values: None, max_size: None, mode: Measured) + fn update_shard_config() -> Weight { + // Proof Size summary in bytes: + // Measured: `463` + // Estimated: `3928` + // Minimum execution time: 29_961_000 picoseconds. + Weight::from_parts(31_830_000, 0) + .saturating_add(Weight::from_parts(0, 3928)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(2)) + } +} diff --git a/runtime/src/weights/pallet_sidechain.rs b/runtime/src/weights/pallet_sidechain.rs index 2e843fe..44bfb8f 100644 --- a/runtime/src/weights/pallet_sidechain.rs +++ b/runtime/src/weights/pallet_sidechain.rs @@ -1,39 +1,55 @@ -//! Autogenerated weights for `pallet_teerex` + +//! Autogenerated weights for `pallet_sidechain` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2021-11-11, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("integritee-solo-fresh"), DB CACHE: 128 +//! DATE: 2023-07-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("integritee-solo-fresh"), DB CACHE: 1024 // Executed Command: // target/release/integritee-node // benchmark +// pallet // --chain=integritee-solo-fresh // --steps=50 // --repeat=20 -// --pallet=pallet_teerex +// --pallet=pallet_sidechain // --extrinsic=* // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=runtime/src/weights/pallet_teerex.rs - +// --output=runtime/src/weights/pallet_sidechain.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; -/// Weight functions for pallet_sidechain. +/// Weight functions for `pallet_sidechain`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_sidechain::WeightInfo for WeightInfo<T> { - // Storage: Teerex EnclaveIndex (r:1 w:0) - // Storage: Teerex EnclaveRegistry (r:1 w:0) - // Storage: Teerex WorkerForShard (r:0 w:1) + /// Storage: Teerex SovereignEnclaves (r:1 w:0) + /// Proof Skipped: Teerex SovereignEnclaves (max_values: None, max_size: None, mode: Measured) + /// Storage: EnclaveBridge ShardConfigRegistry (r:1 w:0) + /// Proof Skipped: EnclaveBridge ShardConfigRegistry (max_values: None, max_size: None, mode: Measured) + /// Storage: EnclaveBridge ShardStatus (r:1 w:1) + /// Proof Skipped: EnclaveBridge ShardStatus (max_values: None, max_size: None, mode: Measured) + /// Storage: Sidechain SidechainBlockFinalizationCandidate (r:1 w:1) + /// Proof Skipped: Sidechain SidechainBlockFinalizationCandidate (max_values: None, max_size: None, mode: Measured) + /// Storage: Sidechain LatestSidechainBlockConfirmation (r:0 w:1) + /// Proof Skipped: Sidechain LatestSidechainBlockConfirmation (max_values: None, max_size: None, mode: Measured) fn confirm_imported_sidechain_block() -> Weight { - Weight::from_parts(70_298_000, 0u64) - .saturating_add(T::DbWeight::get().reads(2)) - .saturating_add(T::DbWeight::get().writes(1)) + // Proof Size summary in bytes: + // Measured: `354` + // Estimated: `3819` + // Minimum execution time: 23_043_000 picoseconds. + Weight::from_parts(23_511_000, 0) + .saturating_add(Weight::from_parts(0, 3819)) + .saturating_add(T::DbWeight::get().reads(4)) + .saturating_add(T::DbWeight::get().writes(3)) } } diff --git a/runtime/src/weights/pallet_teeracle.rs b/runtime/src/weights/pallet_teeracle.rs index 5c0481f..bcf13e1 100644 --- a/runtime/src/weights/pallet_teeracle.rs +++ b/runtime/src/weights/pallet_teeracle.rs @@ -2,12 +2,15 @@ //! Autogenerated weights for `pallet_teeracle` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2021-12-22, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` -//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("integritee-solo-fresh"), DB CACHE: 128 +//! DATE: 2023-07-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! WORST CASE MAP SIZE: `1000000` +//! HOSTNAME: `caribe`, CPU: `12th Gen Intel(R) Core(TM) i7-1260P` +//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("integritee-solo-fresh"), DB CACHE: 1024 // Executed Command: -// /home/ubuntu/bin/integritee-node +// target/release/integritee-node // benchmark +// pallet // --chain=integritee-solo-fresh // --steps=50 // --repeat=20 @@ -21,41 +24,68 @@ #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_teeracle`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_teeracle::WeightInfo for WeightInfo<T> { - // Storage: Teerex EnclaveIndex (r:1 w:0) - // Storage: Teerex EnclaveRegistry (r:1 w:0) - // Storage: Teeracle Whitelists (r:1 w:0) - // Storage: Teeracle ExchangeRates (r:1 w:1) + /// Storage: Teerex SovereignEnclaves (r:1 w:0) + /// Proof Skipped: Teerex SovereignEnclaves (max_values: None, max_size: None, mode: Measured) + /// Storage: Teeracle Whitelists (r:1 w:0) + /// Proof Skipped: Teeracle Whitelists (max_values: None, max_size: None, mode: Measured) + /// Storage: Teeracle ExchangeRates (r:1 w:1) + /// Proof Skipped: Teeracle ExchangeRates (max_values: None, max_size: None, mode: Measured) fn update_exchange_rate() -> Weight { - Weight::from_parts(77_556_000, 0u64) - .saturating_add(T::DbWeight::get().reads(4)) + // Proof Size summary in bytes: + // Measured: `433` + // Estimated: `3898` + // Minimum execution time: 19_736_000 picoseconds. + Weight::from_parts(20_994_000, 0) + .saturating_add(Weight::from_parts(0, 3898)) + .saturating_add(T::DbWeight::get().reads(3)) + .saturating_add(T::DbWeight::get().writes(1)) + } + /// Storage: Teerex SovereignEnclaves (r:1 w:0) + /// Proof Skipped: Teerex SovereignEnclaves (max_values: None, max_size: None, mode: Measured) + /// Storage: Teeracle Whitelists (r:1 w:0) + /// Proof Skipped: Teeracle Whitelists (max_values: None, max_size: None, mode: Measured) + /// Storage: Teeracle OracleData (r:0 w:1) + /// Proof Skipped: Teeracle OracleData (max_values: None, max_size: None, mode: Measured) + fn update_oracle() -> Weight { + // Proof Size summary in bytes: + // Measured: `424` + // Estimated: `3889` + // Minimum execution time: 17_220_000 picoseconds. + Weight::from_parts(17_956_000, 0) + .saturating_add(Weight::from_parts(0, 3889)) + .saturating_add(T::DbWeight::get().reads(2)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Teeracle Whitelists (r:1 w:1) + /// Storage: Teeracle Whitelists (r:1 w:1) + /// Proof Skipped: Teeracle Whitelists (max_values: None, max_size: None, mode: Measured) fn add_to_whitelist() -> Weight { - Weight::from_parts(35_065_000, 0u64) + // Proof Size summary in bytes: + // Measured: `6` + // Estimated: `3471` + // Minimum execution time: 10_557_000 picoseconds. + Weight::from_parts(10_955_000, 0) + .saturating_add(Weight::from_parts(0, 3471)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Teeracle Whitelists (r:1 w:1) + /// Storage: Teeracle Whitelists (r:1 w:1) + /// Proof Skipped: Teeracle Whitelists (max_values: None, max_size: None, mode: Measured) fn remove_from_whitelist() -> Weight { - Weight::from_parts(37_631_000, 0u64) + // Proof Size summary in bytes: + // Measured: `107` + // Estimated: `3572` + // Minimum execution time: 12_074_000 picoseconds. + Weight::from_parts(12_535_000, 0) + .saturating_add(Weight::from_parts(0, 3572)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } - // Storage: Teerex EnclaveIndex (r:1 w:0) - // Storage: Teerex EnclaveRegistry (r:1 w:0) - // Storage: Teeracle Whitelists (r:1 w:0) - // Storage: Teeracle OracleData (r:0 w:1) - fn update_oracle() -> Weight { - Weight::from_parts(77_556_000, 0u64) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(1)) - } } diff --git a/runtime/src/weights/pallet_teerex.rs b/runtime/src/weights/pallet_teerex.rs index f4510fb..28ea0eb 100644 --- a/runtime/src/weights/pallet_teerex.rs +++ b/runtime/src/weights/pallet_teerex.rs @@ -2,13 +2,13 @@ //! Autogenerated weights for `pallet_teerex` //! //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev -//! DATE: 2023-05-14, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` +//! DATE: 2023-07-15, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]` //! WORST CASE MAP SIZE: `1000000` -//! HOSTNAME: `DESKTOP-0F6V7QQ`, CPU: `Intel(R) Core(TM) i7-10875H CPU @ 2.30GHz` +//! HOSTNAME: `zeetee`, CPU: `Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz` //! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("integritee-solo-fresh"), DB CACHE: 1024 // Executed Command: -// ./target/release/integritee-node +// target/release/integritee-node // benchmark // pallet // --chain=integritee-solo-fresh @@ -19,146 +19,106 @@ // --execution=wasm // --wasm-execution=compiled // --heap-pages=4096 -// --output=./runtime/src/weights/pallet_teerex.rs +// --output=runtime/src/weights/pallet_teerex.rs #![cfg_attr(rustfmt, rustfmt_skip)] #![allow(unused_parens)] #![allow(unused_imports)] +#![allow(missing_docs)] use frame_support::{traits::Get, weights::Weight}; -use sp_std::marker::PhantomData; +use core::marker::PhantomData; /// Weight functions for `pallet_teerex`. pub struct WeightInfo<T>(PhantomData<T>); impl<T: frame_system::Config> pallet_teerex::WeightInfo for WeightInfo<T> { /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Teerex AllowSGXDebugMode (r:1 w:0) - /// Proof Skipped: Teerex AllowSGXDebugMode (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Teerex EnclaveIndex (r:1 w:0) - /// Proof Skipped: Teerex EnclaveIndex (max_values: None, max_size: None, mode: Measured) - /// Storage: Teerex EnclaveRegistry (r:0 w:1) - /// Proof Skipped: Teerex EnclaveRegistry (max_values: None, max_size: None, mode: Measured) - fn register_ias_enclave() -> Weight { + /// Storage: Teerex SgxQuotingEnclaveRegistry (r:1 w:0) + /// Proof Skipped: Teerex SgxQuotingEnclaveRegistry (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Teerex SgxTcbInfo (r:1 w:0) + /// Proof Skipped: Teerex SgxTcbInfo (max_values: None, max_size: None, mode: Measured) + /// Storage: Teerex SgxAllowDebugMode (r:1 w:0) + /// Proof Skipped: Teerex SgxAllowDebugMode (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Teerex SovereignEnclaves (r:0 w:1) + /// Proof Skipped: Teerex SovereignEnclaves (max_values: None, max_size: None, mode: Measured) + fn register_sgx_enclave() -> Weight { // Proof Size summary in bytes: - // Measured: `299` - // Estimated: `4370` - // Minimum execution time: 1_512_300 nanoseconds. - Weight::from_parts(2_591_400_000, 0u64) - .saturating_add(Weight::from_parts(0u64, 4370)) - .saturating_add(T::DbWeight::get().reads(3)) + // Measured: `394` + // Estimated: `3859` + // Minimum execution time: 2_019_887_000 picoseconds. + Weight::from_parts(2_047_667_000, 0) + .saturating_add(Weight::from_parts(0, 3859)) + .saturating_add(T::DbWeight::get().reads(4)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Teerex QuotingEnclaveRegistry (r:0 w:1) - /// Proof Skipped: Teerex QuotingEnclaveRegistry (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Teerex SgxQuotingEnclaveRegistry (r:0 w:1) + /// Proof Skipped: Teerex SgxQuotingEnclaveRegistry (max_values: Some(1), max_size: None, mode: Measured) fn register_quoting_enclave() -> Weight { // Proof Size summary in bytes: - // Measured: `57` - // Estimated: `560` - // Minimum execution time: 1_562_200 nanoseconds. - Weight::from_parts(1_847_900_000, 0u64) - .saturating_add(Weight::from_parts(0u64, 560)) + // Measured: `95` + // Estimated: `1493` + // Minimum execution time: 1_013_747_000 picoseconds. + Weight::from_parts(1_025_189_000, 0) + .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Teerex TcbInfo (r:0 w:1) - /// Proof Skipped: Teerex TcbInfo (max_values: None, max_size: None, mode: Measured) + /// Storage: Teerex SgxTcbInfo (r:0 w:1) + /// Proof Skipped: Teerex SgxTcbInfo (max_values: None, max_size: None, mode: Measured) fn register_tcb_info() -> Weight { // Proof Size summary in bytes: - // Measured: `57` - // Estimated: `560` - // Minimum execution time: 1_816_099 nanoseconds. - Weight::from_parts(3_147_800_000, 0u64) - .saturating_add(Weight::from_parts(0u64, 560)) + // Measured: `95` + // Estimated: `1493` + // Minimum execution time: 1_115_609_000 picoseconds. + Weight::from_parts(1_125_246_000, 0) + .saturating_add(Weight::from_parts(0, 1493)) .saturating_add(T::DbWeight::get().reads(1)) .saturating_add(T::DbWeight::get().writes(1)) } + /// Storage: Teerex SovereignEnclaves (r:1 w:1) + /// Proof Skipped: Teerex SovereignEnclaves (max_values: None, max_size: None, mode: Measured) /// Storage: Timestamp Now (r:1 w:0) /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) - /// Storage: Teerex QuotingEnclaveRegistry (r:1 w:0) - /// Proof Skipped: Teerex QuotingEnclaveRegistry (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Teerex TcbInfo (r:1 w:0) - /// Proof Skipped: Teerex TcbInfo (max_values: None, max_size: None, mode: Measured) - /// Storage: Teerex AllowSGXDebugMode (r:1 w:0) - /// Proof Skipped: Teerex AllowSGXDebugMode (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Teerex EnclaveIndex (r:1 w:1) - /// Proof Skipped: Teerex EnclaveIndex (max_values: None, max_size: None, mode: Measured) - /// Storage: Teerex EnclaveCount (r:1 w:1) - /// Proof Skipped: Teerex EnclaveCount (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Teerex EnclaveRegistry (r:0 w:1) - /// Proof Skipped: Teerex EnclaveRegistry (max_values: None, max_size: None, mode: Measured) - fn register_dcap_enclave() -> Weight { + fn unregister_sovereign_enclave() -> Weight { // Proof Size summary in bytes: - // Measured: `420` - // Estimated: `9458` - // Minimum execution time: 3_071_800 nanoseconds. - Weight::from_parts(4_260_200_000, 0u64) - .saturating_add(Weight::from_parts(0u64, 9458)) - .saturating_add(T::DbWeight::get().reads(6)) - .saturating_add(T::DbWeight::get().writes(3)) + // Measured: `473` + // Estimated: `3938` + // Minimum execution time: 15_427_000 picoseconds. + Weight::from_parts(15_999_000, 0) + .saturating_add(Weight::from_parts(0, 3938)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - /// Storage: Teerex EnclaveIndex (r:1 w:2) - /// Proof Skipped: Teerex EnclaveIndex (max_values: None, max_size: None, mode: Measured) - /// Storage: Teerex EnclaveCount (r:1 w:1) - /// Proof Skipped: Teerex EnclaveCount (max_values: Some(1), max_size: None, mode: Measured) - /// Storage: Teerex EnclaveRegistry (r:1 w:2) - /// Proof Skipped: Teerex EnclaveRegistry (max_values: None, max_size: None, mode: Measured) - fn unregister_enclave() -> Weight { + /// Storage: Teerex ProxiedEnclaves (r:1 w:1) + /// Proof Skipped: Teerex ProxiedEnclaves (max_values: None, max_size: None, mode: Measured) + /// Storage: Timestamp Now (r:1 w:0) + /// Proof: Timestamp Now (max_values: Some(1), max_size: Some(8), added: 503, mode: MaxEncodedLen) + fn unregister_proxied_enclave() -> Weight { // Proof Size summary in bytes: - // Measured: `504` - // Estimated: `6957` - // Minimum execution time: 50_600 nanoseconds. - Weight::from_parts(51_200_000, 0u64) - .saturating_add(Weight::from_parts(0u64, 6957)) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().writes(5)) + // Measured: `575` + // Estimated: `4040` + // Minimum execution time: 20_070_000 picoseconds. + Weight::from_parts(20_971_000, 0) + .saturating_add(Weight::from_parts(0, 4040)) + .saturating_add(T::DbWeight::get().reads(2)) + .saturating_add(T::DbWeight::get().writes(1)) } - fn call_worker() -> Weight { + /// Storage: Teerex SgxAllowDebugMode (r:0 w:1) + /// Proof Skipped: Teerex SgxAllowDebugMode (max_values: Some(1), max_size: None, mode: Measured) + /// Storage: Teerex AllowSkippingAttestation (r:0 w:1) + /// Proof Skipped: Teerex AllowSkippingAttestation (max_values: Some(1), max_size: None, mode: Measured) + fn set_security_flags() -> Weight { // Proof Size summary in bytes: // Measured: `0` // Estimated: `0` - // Minimum execution time: 21_800 nanoseconds. - Weight::from_parts(26_600_000, 0u64) - .saturating_add(Weight::from_parts(0u64, 0)) - } - /// Storage: Teerex EnclaveIndex (r:1 w:0) - /// Proof Skipped: Teerex EnclaveIndex (max_values: None, max_size: None, mode: Measured) - fn confirm_processed_parentchain_block() -> Weight { - // Proof Size summary in bytes: - // Measured: `242` - // Estimated: `2717` - // Minimum execution time: 27_800 nanoseconds. - Weight::from_parts(28_700_000, 0u64) - .saturating_add(Weight::from_parts(0u64, 2717)) - .saturating_add(T::DbWeight::get().reads(1)) - } - /// Storage: Teerex EnclaveIndex (r:1 w:0) - /// Proof Skipped: Teerex EnclaveIndex (max_values: None, max_size: None, mode: Measured) - /// Storage: Teerex EnclaveRegistry (r:1 w:0) - /// Proof Skipped: Teerex EnclaveRegistry (max_values: None, max_size: None, mode: Measured) - /// Storage: System EventTopics (r:6 w:6) - /// Proof Skipped: System EventTopics (max_values: None, max_size: None, mode: Measured) - /// The range of component `l` is `[0, 100]`. - /// The range of component `t` is `[1, 5]`. - fn publish_hash(l: u32, t: u32, ) -> Weight { - // Proof Size summary in bytes: - // Measured: `362` - // Estimated: `8511 + t * (2475 ±0)` - // Minimum execution time: 41_400 nanoseconds. - Weight::from_parts(28_179_644, 0u64) - .saturating_add(Weight::from_parts(0u64, 8511)) - // Standard Error: 21_336 - .saturating_add(Weight::from_parts(318_271, 0u64).saturating_mul(l.into())) - // Standard Error: 467_546 - .saturating_add(Weight::from_parts(7_329_090, 0u64).saturating_mul(t.into())) - .saturating_add(T::DbWeight::get().reads(3)) - .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(t.into()))) - .saturating_add(T::DbWeight::get().writes(1)) - .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(t.into()))) - .saturating_add(Weight::from_parts(0u64, 2475).saturating_mul(t.into())) + // Minimum execution time: 20_413_000 picoseconds. + Weight::from_parts(21_148_000, 0) + .saturating_add(Weight::from_parts(0, 0)) + .saturating_add(T::DbWeight::get().writes(2)) } } diff --git a/scripts/benchmark_all_pallets.sh b/scripts/benchmark_all_pallets.sh index 3aad793..3be08ac 100755 --- a/scripts/benchmark_all_pallets.sh +++ b/scripts/benchmark_all_pallets.sh @@ -14,18 +14,20 @@ echo "WEIGHT_OUTPUT_DIR: ${WEIGHT_OUTPUT_DIR}" mkdir -p "$WEIGHT_OUTPUT_DIR" pallets=( - "frame_system" \ - "pallet_balances" \ - "pallet_multisig" \ - "pallet_preimage" \ - "pallet_proxy" \ - "pallet_scheduler" \ + #"frame_system" \ + #"pallet_balances" \ + #"pallet_multisig" \ + #"pallet_preimage" \ + #"pallet_proxy" \ + #"pallet_scheduler" \ "pallet_teerex" \ - "pallet_claims" \ - "pallet_timestamp" \ - "pallet_treasury" \ - "pallet_vesting" \ - "pallet_utility" \ + "pallet_sidechain" \ + "pallet_enclave_bridge" \ + #"pallet_claims" \ + #"pallet_timestamp" \ + #"pallet_treasury" \ + #"pallet_vesting" \ + #"pallet_utility" \ "pallet_teeracle" \ )