diff --git a/Dockerfile b/Dockerfile index 2dd2e2370..9edb2749b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,7 @@ COPY . /build WORKDIR /build # Build the project -RUN cargo build -p node-subtensor --profile production --features="runtime-benchmarks metadata-hash" --locked +RUN cargo build -p node-subtensor --profile production --features="metadata-hash" --locked # Verify the binary was produced RUN test -e /build/target/production/node-subtensor diff --git a/justfile b/justfile index a753f7bb2..b01ec0fcf 100644 --- a/justfile +++ b/justfile @@ -51,4 +51,4 @@ lint: production: @echo "Running cargo build with metadata-hash generation..." - cargo +{{RUSTV}} build --profile production --features="metadata-hash" + cargo +{{RUSTV}} build -p node-subtensor --profile production --features="metadata-hash" diff --git a/node/src/service.rs b/node/src/service.rs index 9a19ae354..074530dff 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -36,12 +36,12 @@ impl HostFunctions for ExecutorDispatch { } impl sc_executor::NativeExecutionDispatch for ExecutorDispatch { - // Only enable the benchmarking host functions when we actually want to benchmark. - #[cfg(feature = "runtime-benchmarks")] + // Always enable runtime benchmark host functions, the genesis state + // was built with them so we're stuck with them forever. + // + // They're just a noop, never actually get used if the runtime was not compiled with + // `runtime-benchmarks`. type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions; - // Otherwise we only use the default Substrate host functions. - #[cfg(not(feature = "runtime-benchmarks"))] - type ExtendHostFunctions = (); fn dispatch(method: &str, data: &[u8]) -> Option> { node_subtensor_runtime::api::dispatch(method, data) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 270b0a069..7061e7464 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -142,7 +142,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { // `spec_version`, and `authoring_version` are the same between Wasm and native. // This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use // the compatible custom types. - spec_version: 202, + spec_version: 203, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1, diff --git a/scripts/build.sh b/scripts/build.sh index 68bc62c68..b64c177d6 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,2 +1 @@ cargo build --profile production --features "metadata-hash" - diff --git a/scripts/localnet.sh b/scripts/localnet.sh index 850a314d8..582d0478d 100755 --- a/scripts/localnet.sh +++ b/scripts/localnet.sh @@ -3,10 +3,10 @@ # Check if `--no-purge` passed as a parameter NO_PURGE=0 for arg in "$@"; do - if [ "$arg" = "--no-purge" ]; then - NO_PURGE=1 - break - fi + if [ "$arg" = "--no-purge" ]; then + NO_PURGE=1 + break + fi done # Determine the directory this script resides in. This allows invoking it from any location. @@ -25,13 +25,13 @@ if [ "$fast_blocks" == "False" ]; then echo "fast_blocks is Off" : "${CHAIN:=local}" : "${BUILD_BINARY:=1}" - : "${FEATURES:="pow-faucet runtime-benchmarks"}" + : "${FEATURES:="pow-faucet"}" else # Block of code to execute if fast_blocks is not False echo "fast_blocks is On" : "${CHAIN:=local}" : "${BUILD_BINARY:=1}" - : "${FEATURES:="pow-faucet runtime-benchmarks fast-blocks"}" + : "${FEATURES:="pow-faucet fast-blocks"}" fi SPEC_PATH="${SCRIPT_DIR}/specs/"