Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Nodes Syncing #828

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
10 changes: 5 additions & 5 deletions node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Vec<u8>> {
node_subtensor_runtime::api::dispatch(method, data)
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a runtime change, so I don't think we need to change this

impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down
1 change: 0 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cargo build --profile production --features "metadata-hash"

12 changes: 6 additions & 6 deletions scripts/localnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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/"
Expand Down
Loading