diff --git a/Cargo.lock b/Cargo.lock index a116996..a56d19f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4288,7 +4288,7 @@ dependencies = [ [[package]] name = "integritee-collator" -version = "1.10.0" +version = "1.13.0" dependencies = [ "assert_cmd", "async-trait", @@ -4395,7 +4395,7 @@ dependencies = [ [[package]] name = "integritee-runtime" -version = "1.10.520" +version = "1.13.530" dependencies = [ "assets-common", "cumulus-pallet-aura-ext", @@ -4411,6 +4411,7 @@ dependencies = [ "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", + "frame-metadata-hash-extension", "frame-support", "frame-system", "frame-system-benchmarking", @@ -5624,6 +5625,20 @@ dependencies = [ "hash-db", ] +[[package]] +name = "merkleized-metadata" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f313fcff1d2a4bcaa2deeaa00bf7530d77d5f7bd0467a117dde2e29a75a7a17a" +dependencies = [ + "array-bytes", + "blake3", + "frame-metadata", + "parity-scale-codec", + "scale-decode", + "scale-info", +] + [[package]] name = "merlin" version = "3.0.0" @@ -11961,6 +11976,29 @@ dependencies = [ "sp-arithmetic", ] +[[package]] +name = "scale-bits" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57b1e7f6b65ed1f04e79a85a57d755ad56d76fdf1e9bddcc9ae14f71fcdcf54" +dependencies = [ + "parity-scale-codec", + "scale-type-resolver", +] + +[[package]] +name = "scale-decode" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e98f3262c250d90e700bb802eb704e1f841e03331c2eb815e46516c4edbf5b27" +dependencies = [ + "derive_more", + "parity-scale-codec", + "scale-bits", + "scale-type-resolver", + "smallvec", +] + [[package]] name = "scale-info" version = "2.11.3" @@ -11987,6 +12025,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "scale-type-resolver" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0cded6518aa0bd6c1be2b88ac81bf7044992f0f154bfbabd5ad34f43512abcb" + [[package]] name = "schannel" version = "0.1.22" @@ -12351,7 +12395,7 @@ dependencies = [ [[package]] name = "shell-runtime" -version = "1.10.17" +version = "1.13.18" dependencies = [ "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", @@ -12364,6 +12408,7 @@ dependencies = [ "cumulus-primitives-utility", "frame-benchmarking", "frame-executive", + "frame-metadata-hash-extension", "frame-support", "frame-system", "frame-system-rpc-runtime-api", @@ -13848,13 +13893,22 @@ version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dc993ad871b63fbba60362f3ea86583f5e7e1256e8fdcb3b5b249c9ead354bf" dependencies = [ + "array-bytes", "build-helper", "cargo_metadata", "console", "filetime", + "frame-metadata", + "merkleized-metadata", + "parity-scale-codec", "parity-wasm", "polkavm-linker", + "sc-executor", + "sp-core", + "sp-io", "sp-maybe-compressed-blob", + "sp-tracing", + "sp-version", "strum 0.26.2", "tempfile", "toml 0.8.12", diff --git a/Cargo.toml b/Cargo.toml index eb2c36f..079693f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,6 +50,7 @@ cumulus-primitives-timestamp = { version = "0.14.0", default-features = false } cumulus-primitives-utility = { version = "0.14.0", default-features = false } frame-benchmarking = { version = "35.0.0", default-features = false } frame-executive = { version = "35.0.0", default-features = false } +frame-metadata-hash-extension = { version = "0.3.0", default-features = false } frame-support = { version = "35.0.0", default-features = false } frame-system = { version = "35.0.0", default-features = false } frame-system-benchmarking = { version = "35.0.0", default-features = false } diff --git a/polkadot-parachains/Cargo.toml b/polkadot-parachains/Cargo.toml index 6879680..5e8040f 100644 --- a/polkadot-parachains/Cargo.toml +++ b/polkadot-parachains/Cargo.toml @@ -2,7 +2,7 @@ name = "integritee-collator" description = "The Integritee parachain collator binary" # align major.minor revision with polkadot SDK. bump patch revision ad lib. make this the github release tag -version = "1.10.0" +version = "1.13.0" authors = ["Integritee AG "] homepage = "https://integritee.network/" repository = "https://github.com/integritee-network/parachain" diff --git a/polkadot-parachains/integritee-runtime/Cargo.toml b/polkadot-parachains/integritee-runtime/Cargo.toml index d958073..035b79e 100644 --- a/polkadot-parachains/integritee-runtime/Cargo.toml +++ b/polkadot-parachains/integritee-runtime/Cargo.toml @@ -2,7 +2,7 @@ name = "integritee-runtime" description = "The Integritee parachain runtime" # align major.minor revision with polkadot SDK. patch revision must match runtime spec_version -version = "1.10.520" +version = "1.13.530" authors = ["Integritee AG "] homepage = "https://integritee.network/" repository = "https://github.com/integritee-network/parachain" @@ -31,6 +31,7 @@ cumulus-primitives-core = { workspace = true } cumulus-primitives-timestamp = { workspace = true } cumulus-primitives-utility = { workspace = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-rpc-runtime-api = { workspace = true } @@ -105,7 +106,7 @@ polkadot-primitives = { workspace = true, features = ["std"] } polkadot-runtime-parachains = { workspace = true, features = ["std"] } [build-dependencies] -substrate-wasm-builder = { workspace = true, optional = true } +substrate-wasm-builder = { workspace = true, optional = true, features = ["metadata-hash"] } [features] default = ["std"] @@ -123,6 +124,7 @@ std = [ "cumulus-primitives-utility/std", "frame-benchmarking?/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-benchmarking?/std", "frame-system-rpc-runtime-api/std", diff --git a/polkadot-parachains/integritee-runtime/build.rs b/polkadot-parachains/integritee-runtime/build.rs index 9faf420..9d66e46 100644 --- a/polkadot-parachains/integritee-runtime/build.rs +++ b/polkadot-parachains/integritee-runtime/build.rs @@ -16,14 +16,10 @@ #[cfg(feature = "std")] fn main() { - substrate_wasm_builder::WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("TEER", 12) .build() } -/// The wasm builder is deactivated when compiling -/// this crate for wasm to speed up the compilation. #[cfg(not(feature = "std"))] fn main() {} diff --git a/polkadot-parachains/integritee-runtime/src/lib.rs b/polkadot-parachains/integritee-runtime/src/lib.rs index 5c9c794..4a43c81 100644 --- a/polkadot-parachains/integritee-runtime/src/lib.rs +++ b/polkadot-parachains/integritee-runtime/src/lib.rs @@ -119,10 +119,10 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("integritee-parachain"), impl_name: create_runtime_str!("integritee-full"), authoring_version: 2, - spec_version: 520, + spec_version: 530, impl_version: 1, apis: RUNTIME_API_VERSIONS, - transaction_version: 7, + transaction_version: 8, state_version: 0, }; @@ -1071,6 +1071,7 @@ pub type SignedExtra = ( frame_system::CheckNonce, frame_system::CheckWeight, pallet_transaction_payment::ChargeTransactionPayment, + frame_metadata_hash_extension::CheckMetadataHash, ); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic = diff --git a/polkadot-parachains/shell-runtime/Cargo.toml b/polkadot-parachains/shell-runtime/Cargo.toml index b99acca..133f644 100644 --- a/polkadot-parachains/shell-runtime/Cargo.toml +++ b/polkadot-parachains/shell-runtime/Cargo.toml @@ -2,7 +2,7 @@ name = "shell-runtime" description = "The Integritee shell parachain runtime" # align major.minor revision with polkadot SDK. patch should match spec_version -version = "1.10.17" +version = "1.13.18" authors = ["Integritee AG "] homepage = "https://integritee.network/" repository = "https://github.com/integritee-network/parachain" @@ -27,6 +27,7 @@ cumulus-primitives-timestamp = { workspace = true } cumulus-primitives-utility = { workspace = true } frame-benchmarking = { workspace = true, optional = true } frame-executive = { workspace = true } +frame-metadata-hash-extension = { workspace = true } frame-support = { workspace = true } frame-system = { workspace = true } frame-system-rpc-runtime-api = { workspace = true } @@ -68,7 +69,7 @@ hex = { workspace = true } hex-literal = { workspace = true } [build-dependencies] -substrate-wasm-builder = { workspace = true } +substrate-wasm-builder = { workspace = true, optional = true, features = ["metadata-hash"] } [features] default = ["std"] @@ -83,6 +84,7 @@ std = [ "cumulus-primitives-timestamp/std", "cumulus-primitives-utility/std", "frame-executive/std", + "frame-metadata-hash-extension/std", "frame-support/std", "frame-system-rpc-runtime-api/std", "frame-system/std", @@ -120,6 +122,7 @@ std = [ "staging-xcm-builder/std", "staging-xcm-executor/std", "staging-xcm/std", + "substrate-wasm-builder", "xcm-transactor-primitives/std", ] # Weird cargo behaviour: We have to feature gate the `runtime-benchmarks` behind diff --git a/polkadot-parachains/shell-runtime/build.rs b/polkadot-parachains/shell-runtime/build.rs index 9faf420..9d66e46 100644 --- a/polkadot-parachains/shell-runtime/build.rs +++ b/polkadot-parachains/shell-runtime/build.rs @@ -16,14 +16,10 @@ #[cfg(feature = "std")] fn main() { - substrate_wasm_builder::WasmBuilder::new() - .with_current_project() - .export_heap_base() - .import_memory() + substrate_wasm_builder::WasmBuilder::init_with_defaults() + .enable_metadata_hash("TEER", 12) .build() } -/// The wasm builder is deactivated when compiling -/// this crate for wasm to speed up the compilation. #[cfg(not(feature = "std"))] fn main() {} diff --git a/polkadot-parachains/shell-runtime/src/lib.rs b/polkadot-parachains/shell-runtime/src/lib.rs index 33cd080..914254e 100644 --- a/polkadot-parachains/shell-runtime/src/lib.rs +++ b/polkadot-parachains/shell-runtime/src/lib.rs @@ -96,7 +96,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("integritee-parachain"), impl_name: create_runtime_str!("integritee-shell"), authoring_version: 0, - spec_version: 17, + spec_version: 18, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -358,6 +358,7 @@ pub type SignedExtra = ( frame_system::CheckNonce, frame_system::CheckWeight, pallet_transaction_payment::ChargeTransactionPayment, + frame_metadata_hash_extension::CheckMetadataHash, ); /// Unchecked extrinsic type as expected by this runtime. pub type UncheckedExtrinsic =