From 61ae7b34e2227ccf10d2c5227b3a987c76c64fff Mon Sep 17 00:00:00 2001 From: Steve Degosserie <723552+stiiifff@users.noreply.github.com> Date: Fri, 10 Oct 2025 14:38:23 +0200 Subject: [PATCH] fix: resolve srtool metadata hash build error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove hardcoded WASM_BUILD_STD=0 from srtool build script to fix "UnknownOpcode(252)" error during metadata hash generation. The hardcoded value prevented srtool from using the correct WASM standard library build settings for the Rust version in use. With this change, srtool will automatically determine the appropriate WASM_BUILD_STD setting based on the Rust toolchain version, ensuring compatibility with the metadata hash generation process. Also adds metadata-hash feature to node Cargo.toml to enable the CheckMetadataHash extension across all runtimes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- operator/node/Cargo.toml | 6 ++++++ operator/scripts/build-runtime-srtool.sh | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/operator/node/Cargo.toml b/operator/node/Cargo.toml index 1e24757c..b2f850e1 100644 --- a/operator/node/Cargo.toml +++ b/operator/node/Cargo.toml @@ -166,3 +166,9 @@ try-runtime = [ "datahaven-testnet-runtime/try-runtime", "sp-runtime/try-runtime", ] + +metadata-hash = [ + "datahaven-stagenet-runtime/metadata-hash", + "datahaven-mainnet-runtime/metadata-hash", + "datahaven-testnet-runtime/metadata-hash", +] diff --git a/operator/scripts/build-runtime-srtool.sh b/operator/scripts/build-runtime-srtool.sh index c8bf5a98..8f2d9331 100755 --- a/operator/scripts/build-runtime-srtool.sh +++ b/operator/scripts/build-runtime-srtool.sh @@ -16,7 +16,6 @@ CMD="docker run \ -e RUNTIME_DIR=operator/runtime/${GH_WORKFLOW_MATRIX_CHAIN} \ -e BUILD_OPTS=${RUNTIME_BUILD_OPTS} \ -e PROFILE=${RUNTIME_BUILD_PROFILE} \ - -e WASM_BUILD_STD=0 \ -v "${PWD}:/build" \ ${GH_WORKFLOW_MATRIX_SRTOOL_IMAGE}:${GH_WORKFLOW_MATRIX_SRTOOL_IMAGE_TAG} \ build --app --json -cM"