Skip to content

Commit 5fca942

Browse files
add --no-start-call-limit flag to localnet.sh + related changes
1 parent 22aefdd commit 5fca942

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

Dockerfile-localnet

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ RUN rustup toolchain install
2929
RUN rustup target add wasm32-unknown-unknown
3030

3131
## Build fast-blocks node
32-
RUN ./scripts/localnet.sh --build-only
32+
RUN ./scripts/localnet.sh --build-only --no-start-call-limit
3333
# Build non-fast-blocks
3434
RUN ./scripts/localnet.sh False --build-only
3535

runtime/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ substrate-wasm-builder = { workspace = true, optional = true }
133133
[features]
134134
default = ["std"]
135135
pow-faucet = ["pallet-subtensor/pow-faucet"]
136+
no-start-call-limit = []
136137
fast-blocks = [
137138
"pallet-subtensor/fast-blocks",
138139
"subtensor-runtime-common/fast-blocks",

runtime/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1044,8 +1044,8 @@ parameter_types! {
10441044
pub const InitialDissolveNetworkScheduleDuration: BlockNumber = 5 * 24 * 60 * 60 / 12; // 5 days
10451045
pub const SubtensorInitialTaoWeight: u64 = 971_718_665_099_567_868; // 0.05267697438728329% tao weight.
10461046
pub const InitialEmaPriceHalvingPeriod: u64 = 201_600_u64; // 4 weeks
1047-
pub const DurationOfStartCall: u64 = if cfg!(feature = "fast-blocks") {
1048-
10 // Only 10 blocks for fast blocks
1047+
pub const DurationOfStartCall: u64 = if cfg!(feature = "no-start-call-limit") {
1048+
10 // Only 10 blocks for localnet.sh run
10491049
} else {
10501050
7 * 24 * 60 * 60 / 12 // 7 days
10511051
};

scripts/localnet.sh

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
#!/bin/bash
22

3-
# Check if `--no-purge` passed as a parameter
3+
# Check if `--no-purge` flag passed as a parameter
44
NO_PURGE=0
55

6-
# Check if `--build-only` passed as parameter
6+
# Check if `--build-only` flag passed as parameter
77
BUILD_ONLY=0
88

9+
# Check if `--start-call-limit` flag wasn't passed as parameter
10+
NO_START_CALL_LIMIT=1
11+
912
for arg in "$@"; do
1013
if [ "$arg" = "--no-purge" ]; then
1114
NO_PURGE=1
1215
elif [ "$arg" = "--build-only" ]; then
1316
BUILD_ONLY=1
17+
elif [ "$arg" = "--start-call-limit" ]; then
18+
NO_START_CALL_LIMIT=0
1419
fi
1520
done
1621

@@ -40,6 +45,12 @@ else
4045
BUILD_DIR="$BASE_DIR/target/fast-blocks"
4146
fi
4247

48+
if [ "$NO_START_CALL_LIMIT" == "1" ]; then
49+
FEATURES="$FEATURES no-start-call-limit"
50+
echo "Chain starts without START CALL time limit."
51+
echo $FEATURES
52+
fi
53+
4354
# Ensure the build directory exists
4455
mkdir -p "$BUILD_DIR"
4556

0 commit comments

Comments
 (0)