fix: resolve srtool metadata hash build error

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 <noreply@anthropic.com>
This commit is contained in:
Steve Degosserie 2025-10-10 14:38:23 +02:00
parent 514a16ac1f
commit 61ae7b34e2
No known key found for this signature in database
GPG key ID: 9455A9F1AD80CE80
2 changed files with 6 additions and 1 deletions

View file

@ -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",
]

View file

@ -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"