From 3404a5bcbae21fdf89942f83f521b8adae3c6220 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 27 Aug 2024 12:35:58 -0400 Subject: [PATCH 01/36] fix benchmark_dissolve_network --- pallets/subtensor/src/benchmarks.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pallets/subtensor/src/benchmarks.rs b/pallets/subtensor/src/benchmarks.rs index 4af039ad6..160474e79 100644 --- a/pallets/subtensor/src/benchmarks.rs +++ b/pallets/subtensor/src/benchmarks.rs @@ -312,7 +312,8 @@ benchmarks! { let amount_to_be_staked = 100_000_000_000_000u64; Subtensor::::add_balance_to_coldkey_account(&coldkey.clone(), amount_to_be_staked); assert_ok!(Subtensor::::register_network(RawOrigin::Signed(coldkey.clone()).into(), None)); - }: dissolve_network(RawOrigin::Signed(coldkey), 1) + let c1 = coldkey.clone(); + }: dissolve_network(RawOrigin::Signed(c1), coldkey, 1) // swap_hotkey { From 26bb8f6bac9e4e02908dc0ecd139a12466437134 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 27 Aug 2024 12:54:41 -0400 Subject: [PATCH 02/36] fix test_user_ad_network_with_identify_fields_ok() --- pallets/subtensor/tests/root.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pallets/subtensor/tests/root.rs b/pallets/subtensor/tests/root.rs index 0c621739b..e7e948ddc 100644 --- a/pallets/subtensor/tests/root.rs +++ b/pallets/subtensor/tests/root.rs @@ -1052,10 +1052,7 @@ fn test_user_add_network_with_identity_fields_ok() { assert_eq!(stored_identity_2.subnet_contact, subnet_contact_2); // Now remove the first network. - assert_ok!(SubtensorModule::user_remove_network( - RuntimeOrigin::signed(coldkey_1), - 1 - )); + assert_ok!(SubtensorModule::user_remove_network(coldkey_1, 1)); // Verify that the first network and identity have been removed. assert!(SubnetIdentities::::get(1).is_none()); From 8176f57f70ffbadd97b0a895cd9c2ecebd5034aa Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 27 Aug 2024 14:31:31 -0400 Subject: [PATCH 03/36] simplify cargo test CI step, always check benchmarks + other feats --- .github/workflows/check-rust.yml | 53 ++------------------------------ 1 file changed, 2 insertions(+), 51 deletions(-) diff --git a/.github/workflows/check-rust.yml b/.github/workflows/check-rust.yml index 797ad4df4..b088744cb 100644 --- a/.github/workflows/check-rust.yml +++ b/.github/workflows/check-rust.yml @@ -254,57 +254,8 @@ jobs: with: key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }} - - name: cargo test --workspace - run: cargo test --workspace - - # runs cargo test --workspace --features=runtime-benchmarks - cargo-test-benchmarks: - name: cargo test w/benchmarks - runs-on: SubtensorCI - strategy: - matrix: - rust-branch: - - stable - rust-target: - - x86_64-unknown-linux-gnu - # - x86_64-apple-darwin - os: - - ubuntu-latest - # - macos-latest - include: - - os: ubuntu-latest - # - os: macos-latest - env: - RELEASE_NAME: development - # RUSTFLAGS: -A warnings - RUSTV: ${{ matrix.rust-branch }} - RUST_BACKTRACE: full - RUST_BIN_DIR: target/${{ matrix.rust-target }} - SKIP_WASM_BUILD: 1 - TARGET: ${{ matrix.rust-target }} - steps: - - name: Check-out repository under $GITHUB_WORKSPACE - uses: actions/checkout@v4 - - - name: Install dependencies - run: | - sudo apt-get update && - sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler - - - name: Install Rust ${{ matrix.rust-branch }} - uses: actions-rs/toolchain@v1.0.6 - with: - toolchain: ${{ matrix.rust-branch }} - components: rustfmt, clippy - profile: minimal - - - name: Utilize Rust shared cached - uses: Swatinem/rust-cache@v2.2.1 - with: - key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }} - - - name: cargo test --workspace --features=runtime-benchmarks - run: cargo test --workspace --features=runtime-benchmarks + - name: cargo test --workspace --all-features + run: cargo test --workspace --all-features # ensures cargo fix has no trivial changes that can be applied cargo-fix: From ffc762bf93a3bcb3da759073058579a2e3391a3a Mon Sep 17 00:00:00 2001 From: Cameron Fairchild Date: Tue, 27 Aug 2024 17:38:17 -0400 Subject: [PATCH 04/36] add root weights proxy --- runtime/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 9ad0624d0..8603ce6eb 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -629,6 +629,7 @@ pub enum ProxyType { Registration, Transfer, SmallTransfer, + RootWeights, } // Transfers below SMALL_TRANSFER_LIMIT are considered small transfers pub const SMALL_TRANSFER_LIMIT: Balance = 500_000_000; // 0.5 TAO @@ -673,6 +674,7 @@ impl InstanceFilter for ProxyType { | RuntimeCall::SubtensorModule(pallet_subtensor::Call::root_register { .. }) | RuntimeCall::SubtensorModule(pallet_subtensor::Call::burned_register { .. }) | RuntimeCall::Triumvirate(..) + | RuntimeCall::RootWeights(..) ), ProxyType::Triumvirate => matches!( c, @@ -695,6 +697,10 @@ impl InstanceFilter for ProxyType { RuntimeCall::SubtensorModule(pallet_subtensor::Call::burned_register { .. }) | RuntimeCall::SubtensorModule(pallet_subtensor::Call::register { .. }) ), + ProxyType::RootWeights => matches!( + c, + RuntimeCall::SubtensorModule(pallet_subtensor::Call::set_root_weights { .. }) + ), } } fn is_superset(&self, o: &Self) -> bool { From 78f1d941b86340e90fa4d4cd3f3a6a3ff45967aa Mon Sep 17 00:00:00 2001 From: Cameron Fairchild Date: Tue, 27 Aug 2024 17:38:26 -0400 Subject: [PATCH 05/36] fmt --- runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 8603ce6eb..1f2c8a4eb 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -674,7 +674,7 @@ impl InstanceFilter for ProxyType { | RuntimeCall::SubtensorModule(pallet_subtensor::Call::root_register { .. }) | RuntimeCall::SubtensorModule(pallet_subtensor::Call::burned_register { .. }) | RuntimeCall::Triumvirate(..) - | RuntimeCall::RootWeights(..) + | RuntimeCall::RootWeights(..) ), ProxyType::Triumvirate => matches!( c, From a23860c87dcfd9be8a33a2089c200bfa74e13bc4 Mon Sep 17 00:00:00 2001 From: Cameron Fairchild Date: Tue, 27 Aug 2024 17:45:11 -0400 Subject: [PATCH 06/36] fix typo --- runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 1f2c8a4eb..77b9111f8 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -674,7 +674,7 @@ impl InstanceFilter for ProxyType { | RuntimeCall::SubtensorModule(pallet_subtensor::Call::root_register { .. }) | RuntimeCall::SubtensorModule(pallet_subtensor::Call::burned_register { .. }) | RuntimeCall::Triumvirate(..) - | RuntimeCall::RootWeights(..) + | RuntimeCall::SubtensorModule(pallet_subtensor::Call::set_root_weights { .. }) ), ProxyType::Triumvirate => matches!( c, From 52d3c46a0e08dfadc38d5c65a42aeb41a9ef4951 Mon Sep 17 00:00:00 2001 From: Keith Date: Wed, 28 Aug 2024 21:23:15 -0400 Subject: [PATCH 07/36] Add token argument to the publish script --- scripts/publish.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/publish.sh b/scripts/publish.sh index 3eb0fc6a5..8b2671787 100644 --- a/scripts/publish.sh +++ b/scripts/publish.sh @@ -1,28 +1,28 @@ #!/bin/bash set -ex cd support/macros -cargo publish +cargo publish --token $1 cd ../.. cd pallets/commitments -cargo publish +cargo publish --token $1 cd .. cd collective -cargo publish +cargo publish --token $1 cd .. cd registry -cargo publish +cargo publish --token $1 cd .. cd subtensor -cargo publish +cargo publish --token $1 cd runtime-api -cargo publish +cargo publish --token $1 cd ../.. cd admin-utils -cargo publish +cargo publish --token $1 cd ../.. cd runtime -cargo publish +cargo publish --token $1 cd .. cd node -cargo publish +cargo publish --token $1 echo "published successfully." From ab0a240530a4ba7396119ddd80896bb3a3ae8c9d Mon Sep 17 00:00:00 2001 From: Samuel Dare Date: Mon, 2 Sep 2024 15:05:59 +0400 Subject: [PATCH 08/36] chore: bump spec version --- runtime/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 77b9111f8..bc815f57b 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: 194, + spec_version: 196, impl_version: 1, apis: RUNTIME_API_VERSIONS, transaction_version: 1, From e84da1546f2f83c6d4900264ae5b48517c156f41 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Mon, 9 Sep 2024 10:01:26 -0400 Subject: [PATCH 09/36] import original script --- scripts/merged_script.sh | 102 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 scripts/merged_script.sh diff --git a/scripts/merged_script.sh b/scripts/merged_script.sh new file mode 100644 index 000000000..030fd8efa --- /dev/null +++ b/scripts/merged_script.sh @@ -0,0 +1,102 @@ +#!/bin/bash + + +usage() { + echo "Usage: $0 -v " + exit 1 +} + +while getopts ":v:" opt; do + case ${opt} in + v) + version=${OPTARG} + ;; + \?) + usage + ;; + esac +done + + +if [ -z "$version" ]; then + usage +fi + +echo "[INFO] Starting the process for version $version" + + +echo "[INFO] Building the project with wasm-pack" + +# Build command +wasm-pack build --release + +# Wasm Blob file path +artifact_path="pkg/my_wasm_project_bg.wasm" + + +if [ ! -f "$artifact_path" ]; then + echo "[ERROR] Artifact not found: $artifact_path" + exit 1 +fi + +echo "[INFO] Artifact found at $artifact_path" + +git checkout main + +git fetch origin --tags + +latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1)) + +if [ -z "$latest_tag" ]; then + echo "No tags found in the repository." + exit 1 +fi + +commits=$(git log ${latest_tag}..main --pretty=format:"%H %ci %s" --reverse) + +# List PRs merged since the last release +pr_list=() +while read -r hash date time timezone message; do + if [[ $message =~ Merge\ pull\ request\ \#([0-9]+) ]]; then + pr_number=${BASH_REMATCH[1]} + pr_list+=("$pr_number") + fi +done <<< "$commits" + + +if [ ${#pr_list[@]} -eq 0 ]; then + echo "[ERROR] No PRs found since the last release" + exit 1 +fi + +echo -e "[INFO] PRs found: ${pr_list[*]}" + + +get_pr_title() { + local pr_number=$1 + gh pr view "$pr_number" --json title --jq '.title' +} + + +formatted_pr_list="PR numbers and their titles merged into main since the last tag ($latest_tag):\n\n" + +for pr_number in "${pr_list[@]}"; do + pr_title=$(get_pr_title "$pr_number") + formatted_pr_list+="* PR #${pr_number} - ${pr_title}\n" +done + + +formatted_pr_list=$(printf "%b" "$formatted_pr_list") + +echo -e "$formatted_pr_list" + + +echo "[INFO] Creating a new release with version $version and uploading the artifact" +if gh release create "$version" "$artifact_path" --title "$version" --notes "$formatted_pr_list"; then + echo "[INFO] Release created successfully" +else + echo "[ERROR] Failed to create the release" + exit 1 +fi + +echo "[INFO] Release $version created and tagged successfully." From 5810aa40325ef0f6bfbce2da86241dfdd6b71988 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Mon, 9 Sep 2024 10:09:58 -0400 Subject: [PATCH 10/36] scaffold --- scripts/release_notes.rs | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 scripts/release_notes.rs diff --git a/scripts/release_notes.rs b/scripts/release_notes.rs new file mode 100755 index 000000000..c9cb6e7b9 --- /dev/null +++ b/scripts/release_notes.rs @@ -0,0 +1,6 @@ +#!/usr/bin/env rust-script +// ^ `cargo install rust-script` to be able to run this script + +fn main() { + println!("hello world"); +} From e8562384af195f7bda880c7bcf4fa1dadc21314b Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Mon, 9 Sep 2024 10:19:30 -0400 Subject: [PATCH 11/36] parsing of previous tag --- scripts/release_notes.rs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/scripts/release_notes.rs b/scripts/release_notes.rs index c9cb6e7b9..7277a1cb7 100755 --- a/scripts/release_notes.rs +++ b/scripts/release_notes.rs @@ -1,6 +1,24 @@ #!/usr/bin/env rust-script // ^ `cargo install rust-script` to be able to run this script +use core::fmt::Display; +use std::{env, process::Command}; + +fn eval(cmd: impl Display) -> String { + let output = Command::new("sh") + .arg("-c") + .arg(cmd.to_string()) + .output() + .expect("failed to execute process"); + String::from_utf8(output.stdout).unwrap().trim().to_string() +} + fn main() { - println!("hello world"); + let previous_tag = env::var("PREVIOUS_TAG").unwrap_or_else(|_| { + eval("git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1)") + }); + if previous_tag.is_empty() { + panic!("PREVIOUS_TAG is not specified or invalid"); + } + println!("Previous tag: {}", previous_tag); } From d8b566b27e1515974262f2342c49b73487e65107 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Mon, 9 Sep 2024 15:26:02 -0400 Subject: [PATCH 12/36] parse network and all tags --- scripts/release_notes.rs | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/scripts/release_notes.rs b/scripts/release_notes.rs index 7277a1cb7..d3b42665c 100755 --- a/scripts/release_notes.rs +++ b/scripts/release_notes.rs @@ -1,7 +1,7 @@ #!/usr/bin/env rust-script // ^ `cargo install rust-script` to be able to run this script -use core::fmt::Display; +use core::{fmt::Display, str::FromStr}; use std::{env, process::Command}; fn eval(cmd: impl Display) -> String { @@ -13,12 +13,34 @@ fn eval(cmd: impl Display) -> String { String::from_utf8(output.stdout).unwrap().trim().to_string() } -fn main() { - let previous_tag = env::var("PREVIOUS_TAG").unwrap_or_else(|_| { - eval("git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1)") - }); - if previous_tag.is_empty() { - panic!("PREVIOUS_TAG is not specified or invalid"); +#[derive(Copy, Clone, PartialEq, Eq, Debug)] +enum Network { + Mainnet, + Testnet, +} + +impl FromStr for Network { + type Err = (); + + fn from_str(s: &str) -> Result { + match s { + "mainnet" => Ok(Network::Mainnet), + "testnet" => Ok(Network::Testnet), + _ => Err(()), + } } - println!("Previous tag: {}", previous_tag); +} + +fn main() { + let network = env::var("NETWORK") + .unwrap_or_else(|_| "mainnet".to_string()) + .parse::() + .unwrap_or_else(|_| panic!("Invalid NETWORK value")); + println!("Network: {:?}", network); + + let all_tags = env::var("PREVIOUS_TAG") + .unwrap_or_else(|_| eval("git tag --sort=-creatordate")) + .split("\n") + .map(|s| s.trim().to_string()) + .collect::>(); } From 65b107eb372b3ba09aa072791d612136a0212780 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Mon, 9 Sep 2024 16:03:41 -0400 Subject: [PATCH 13/36] resolve previous tag --- scripts/release_notes.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/release_notes.rs b/scripts/release_notes.rs index d3b42665c..28279807e 100755 --- a/scripts/release_notes.rs +++ b/scripts/release_notes.rs @@ -43,4 +43,17 @@ fn main() { .split("\n") .map(|s| s.trim().to_string()) .collect::>(); + + let previous_tag = match network { + Network::Mainnet => all_tags + .iter() + .find(|tag| tag.starts_with("v") && !tag.ends_with("-pre-release")) + .expect("could not find a valid mainnet tag!"), + Network::Testnet => all_tags + .iter() + .find(|tag| tag.starts_with("v") && tag.ends_with("-pre-release")) + .expect("could not find a valid testnet tag!"), + }; + + println!("Previous Release Tag: {}", previous_tag); } From e4efa4f81f4a5931b50397cf38d997ec13d58172 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Mon, 9 Sep 2024 16:50:00 -0400 Subject: [PATCH 14/36] narrow down to filtered merges --- scripts/release_notes.rs | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/scripts/release_notes.rs b/scripts/release_notes.rs index 28279807e..99f94a7c7 100755 --- a/scripts/release_notes.rs +++ b/scripts/release_notes.rs @@ -54,6 +54,32 @@ fn main() { .find(|tag| tag.starts_with("v") && tag.ends_with("-pre-release")) .expect("could not find a valid testnet tag!"), }; + println!("Previous release tag: {}", previous_tag); - println!("Previous Release Tag: {}", previous_tag); + println!(""); + println!( + "Generating release notes for all merges since {}...", + previous_tag, + ); + + let merges = eval(format!( + "git log --merges --pretty=format:'%s' {}..HEAD", + previous_tag + )) + .split("\n") + .map(|s| s.trim().to_string()) + .filter(|s| { + !s.is_empty() + && s.starts_with("Merge pull request #") + && !s.ends_with("from opentensor/devnet-ready") + && !s.ends_with("from opentensor/testnet-ready") + && !s.ends_with("from opentensor/devnet") + && !s.ends_with("from opentensor/testnet") + }) + .collect::>(); + + println!(""); + println!("Filtered merges:\n{}", merges.join("\n")); + + println!(""); } From 67e50b8980c6ba683d85c5bd9480447fccec6405 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Mon, 9 Sep 2024 17:48:42 -0400 Subject: [PATCH 15/36] branch selection, fallible eval method --- scripts/release_notes.rs | 39 +++++++++++++++++++++++++++++++-------- 1 file changed, 31 insertions(+), 8 deletions(-) diff --git a/scripts/release_notes.rs b/scripts/release_notes.rs index 99f94a7c7..54b5b3dec 100755 --- a/scripts/release_notes.rs +++ b/scripts/release_notes.rs @@ -4,13 +4,23 @@ use core::{fmt::Display, str::FromStr}; use std::{env, process::Command}; -fn eval(cmd: impl Display) -> String { +fn eval(cmd: impl Display, print: bool) -> Result { + if print { + println!("$ {}", cmd); + } let output = Command::new("sh") .arg("-c") .arg(cmd.to_string()) .output() .expect("failed to execute process"); - String::from_utf8(output.stdout).unwrap().trim().to_string() + if print { + println!("{}", String::from_utf8(output.stdout.clone()).unwrap()); + eprintln!("{}", String::from_utf8(output.stderr.clone()).unwrap()); + } + if !output.status.success() { + return Err(String::from_utf8(output.stderr).unwrap()); + } + Ok(String::from_utf8(output.stdout).unwrap().trim().to_string()) } #[derive(Copy, Clone, PartialEq, Eq, Debug)] @@ -39,7 +49,7 @@ fn main() { println!("Network: {:?}", network); let all_tags = env::var("PREVIOUS_TAG") - .unwrap_or_else(|_| eval("git tag --sort=-creatordate")) + .unwrap_or_else(|_| eval("git tag --sort=-creatordate", false).unwrap()) .split("\n") .map(|s| s.trim().to_string()) .collect::>(); @@ -56,16 +66,29 @@ fn main() { }; println!("Previous release tag: {}", previous_tag); + let branch = env::var("BRANCH").unwrap_or( + match network { + Network::Mainnet => "main", + Network::Testnet => "testnet", + } + .to_string(), + ); + println!("Branch: {}", branch); + eval(format!("git checkout {}", branch), true).unwrap(); + println!(""); println!( "Generating release notes for all merges since {}...", previous_tag, ); - - let merges = eval(format!( - "git log --merges --pretty=format:'%s' {}..HEAD", - previous_tag - )) + let merges = eval( + format!( + "git log --merges --pretty=format:'%s' {}..HEAD", + previous_tag + ), + false, + ) + .unwrap() .split("\n") .map(|s| s.trim().to_string()) .filter(|s| { From b7a46e62372ff16367bee2f668f8fe6436a8b16c Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Mon, 9 Sep 2024 17:51:12 -0400 Subject: [PATCH 16/36] tweak --- scripts/release_notes.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/release_notes.rs b/scripts/release_notes.rs index 54b5b3dec..c990c9db4 100755 --- a/scripts/release_notes.rs +++ b/scripts/release_notes.rs @@ -76,7 +76,6 @@ fn main() { println!("Branch: {}", branch); eval(format!("git checkout {}", branch), true).unwrap(); - println!(""); println!( "Generating release notes for all merges since {}...", previous_tag, From 2d746cec73629e47763a1b3d7f8a3c44fc779a7c Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Mon, 9 Sep 2024 18:47:09 -0400 Subject: [PATCH 17/36] WIP --- scripts/release_notes.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/release_notes.rs b/scripts/release_notes.rs index c990c9db4..3192a7e27 100755 --- a/scripts/release_notes.rs +++ b/scripts/release_notes.rs @@ -68,13 +68,12 @@ fn main() { let branch = env::var("BRANCH").unwrap_or( match network { - Network::Mainnet => "main", - Network::Testnet => "testnet", + Network::Mainnet => "testnet", + Network::Testnet => "devnet", } .to_string(), ); println!("Branch: {}", branch); - eval(format!("git checkout {}", branch), true).unwrap(); println!( "Generating release notes for all merges since {}...", @@ -82,8 +81,9 @@ fn main() { ); let merges = eval( format!( - "git log --merges --pretty=format:'%s' {}..HEAD", - previous_tag + "git log --merges --pretty=format:'%s' {}..{}", + previous_tag, + branch // Replace HEAD with branch variable ), false, ) From d442ebd6c366316cfa4bf00b8fcfd85caef095e1 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 10 Sep 2024 09:52:56 -0400 Subject: [PATCH 18/36] get PR titles --- scripts/release_notes.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scripts/release_notes.rs b/scripts/release_notes.rs index 3192a7e27..fec8c88df 100755 --- a/scripts/release_notes.rs +++ b/scripts/release_notes.rs @@ -104,4 +104,21 @@ fn main() { println!("Filtered merges:\n{}", merges.join("\n")); println!(""); + let pr_numbers = merges + .iter() + .map(|s| s.split(" ").collect::>()[3].trim_start_matches("#")) + .collect::>(); + println!("PR numbers:\n{}", pr_numbers.join("\n")); + + println!(""); + let pr_titles = pr_numbers + .iter() + .map(|pr_number| { + eval(format!("gh pr view {} --json title", pr_number), false) + .unwrap() + .trim() + .to_string() + }) + .collect::>(); + println!("PR titles:\n{}", pr_titles.join("\n")); } From 70a433039e127d335609bfd0fdd09522103b0392 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 10 Sep 2024 10:35:15 -0400 Subject: [PATCH 19/36] resolve PR titles properly --- scripts/release_notes.rs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/scripts/release_notes.rs b/scripts/release_notes.rs index fec8c88df..02d391593 100755 --- a/scripts/release_notes.rs +++ b/scripts/release_notes.rs @@ -108,17 +108,28 @@ fn main() { .iter() .map(|s| s.split(" ").collect::>()[3].trim_start_matches("#")) .collect::>(); - println!("PR numbers:\n{}", pr_numbers.join("\n")); + println!("PR numbers:\n{:?}", pr_numbers); println!(""); + println!("Fetching PR titles..."); let pr_titles = pr_numbers .iter() .map(|pr_number| { - eval(format!("gh pr view {} --json title", pr_number), false) + print!("#{}: ", pr_number); + let title = eval(format!("gh pr view {} --json title", pr_number), false) .unwrap() .trim() - .to_string() + .to_string(); + if !title.starts_with("{\"title\":\"") { + panic!("Malformed PR title: {}", title); + } + let title = title + .trim_start_matches("{\"title\":\"") + .trim_end_matches("\"}") + .trim() + .to_string(); + println!("{}", title); + title }) .collect::>(); - println!("PR titles:\n{}", pr_titles.join("\n")); } From 66cb0f5150cff8626214d2d297670349876f0332 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 10 Sep 2024 11:25:37 -0400 Subject: [PATCH 20/36] authors working :tada: --- scripts/release_notes.rs | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/scripts/release_notes.rs b/scripts/release_notes.rs index 02d391593..72ca53ada 100755 --- a/scripts/release_notes.rs +++ b/scripts/release_notes.rs @@ -132,4 +132,38 @@ fn main() { title }) .collect::>(); + + println!(""); + println!("Fetching PR authors..."); + let pr_authors = pr_numbers + .iter() + .map(|pr_number| { + print!("#{}: ", pr_number); + let author = eval( + format!("gh pr view {} --json author | jq .author.login", pr_number), + false, + ) + .unwrap() + .trim() + .trim_start_matches("\"") + .trim_end_matches("\"") + .to_string(); + println!("{}", author); + author + }) + .collect::>(); + + println!(""); + println!("generated release notes:"); + let release_notes = "\n## What's Changed\n".to_string(); + let release_notes = release_notes + + &pr_numbers + .iter() + .zip(pr_titles.iter()) + .zip(pr_authors.iter()) + .map(|((pr_number, pr_title), pr_author)| { + format!("- {} in #{} by @{}\n", pr_title, pr_number, pr_author) + }) + .collect::(); + println!("{}", release_notes); } From ebdd014feebd28233f956549b33a6e6d323fdaa9 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 10 Sep 2024 11:37:19 -0400 Subject: [PATCH 21/36] working --- scripts/release_notes.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/release_notes.rs b/scripts/release_notes.rs index 72ca53ada..90ef17868 100755 --- a/scripts/release_notes.rs +++ b/scripts/release_notes.rs @@ -82,8 +82,7 @@ fn main() { let merges = eval( format!( "git log --merges --pretty=format:'%s' {}..{}", - previous_tag, - branch // Replace HEAD with branch variable + branch, previous_tag, ), false, ) From 51bc0a6abd1aabe2499c0371b6ac04b460bb06e1 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 10 Sep 2024 11:58:36 -0400 Subject: [PATCH 22/36] write release notes to /tmp/release_notes.md --- scripts/release_notes.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/release_notes.rs b/scripts/release_notes.rs index 90ef17868..73cbde4d9 100755 --- a/scripts/release_notes.rs +++ b/scripts/release_notes.rs @@ -154,7 +154,7 @@ fn main() { println!(""); println!("generated release notes:"); - let release_notes = "\n## What's Changed\n".to_string(); + let release_notes = "## What's Changed\n".to_string(); let release_notes = release_notes + &pr_numbers .iter() @@ -165,4 +165,9 @@ fn main() { }) .collect::(); println!("{}", release_notes); + + println!(""); + println!("writing release notes to /tmp/release_notes.md"); + std::fs::write("/tmp/release_notes.md", release_notes).unwrap(); + println!("done!"); } From da11c43e9d59b0580f83e6cd246f58c10e1c15aa Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 10 Sep 2024 12:13:06 -0400 Subject: [PATCH 23/36] automatically re-run deployment check when labels changed --- .github/workflows/check-devnet.yml | 2 ++ .github/workflows/check-finney.yml | 4 +++- .github/workflows/check-testnet.yml | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-devnet.yml b/.github/workflows/check-devnet.yml index 3d7f17723..1a7ae4aa3 100644 --- a/.github/workflows/check-devnet.yml +++ b/.github/workflows/check-devnet.yml @@ -3,6 +3,8 @@ name: Devnet Deploy Check on: pull_request: branches: [devnet, devnet-ready] + pull_request_target: + types: [labeled, unlabeled] env: CARGO_TERM_COLOR: always diff --git a/.github/workflows/check-finney.yml b/.github/workflows/check-finney.yml index 3e9fb5994..52600806d 100644 --- a/.github/workflows/check-finney.yml +++ b/.github/workflows/check-finney.yml @@ -3,6 +3,8 @@ name: Finney Deploy Check on: pull_request: branches: [finney, main] + pull_request_target: + types: [labeled, unlabeled] env: CARGO_TERM_COLOR: always @@ -51,4 +53,4 @@ jobs: runtime-package: "node-subtensor-runtime" node-uri: "wss://entrypoint-finney.opentensor.ai:443" checks: "pre-and-post" - extra-args: "--disable-spec-version-check --no-weight-warnings" \ No newline at end of file + extra-args: "--disable-spec-version-check --no-weight-warnings" diff --git a/.github/workflows/check-testnet.yml b/.github/workflows/check-testnet.yml index c18b45ac2..6c3ebcfdf 100644 --- a/.github/workflows/check-testnet.yml +++ b/.github/workflows/check-testnet.yml @@ -3,6 +3,8 @@ name: Testnet Deploy Check on: pull_request: branches: [testnet, testnet-ready] + pull_request_target: + types: [labeled, unlabeled] env: CARGO_TERM_COLOR: always From 6cfc5c2c513212d11203a0a2aa5883bb80ee84d0 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 10 Sep 2024 12:20:48 -0400 Subject: [PATCH 24/36] tweak --- .github/workflows/check-testnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-testnet.yml b/.github/workflows/check-testnet.yml index 6c3ebcfdf..39847767b 100644 --- a/.github/workflows/check-testnet.yml +++ b/.github/workflows/check-testnet.yml @@ -13,7 +13,7 @@ jobs: check-spec-version: name: Check spec_version bump runs-on: SubtensorCI - if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-spec-version-bump') }} + if: ${{ github.event.pull_request.labels | contains('no-spec-version-bump') == false }} steps: - name: Dependencies run: | From 5b3390a792d55596d3df05a34259ee60e80d56c8 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 10 Sep 2024 12:33:10 -0400 Subject: [PATCH 25/36] debug --- .github/workflows/check-testnet.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/check-testnet.yml b/.github/workflows/check-testnet.yml index 39847767b..09963b152 100644 --- a/.github/workflows/check-testnet.yml +++ b/.github/workflows/check-testnet.yml @@ -10,6 +10,13 @@ env: CARGO_TERM_COLOR: always jobs: + debug-labels: + name: Debug Labels + runs-on: SubtensorCI + steps: + - name: Debug Labels + run: | + echo "Labels: ${{ toJson(github.event.pull_request.labels) }}" check-spec-version: name: Check spec_version bump runs-on: SubtensorCI From 4ecbdcd74dcdc04ddbfd5e52f5374b7c15938a3e Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 10 Sep 2024 12:36:15 -0400 Subject: [PATCH 26/36] bump CI From ccfb417dfe6b84f6b7744b573281cb1f8827e1fd Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 10 Sep 2024 12:37:56 -0400 Subject: [PATCH 27/36] whoops --- .github/workflows/check-devnet.yml | 7 +++++++ .github/workflows/check-testnet.yml | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check-devnet.yml b/.github/workflows/check-devnet.yml index 1a7ae4aa3..65a4c88dc 100644 --- a/.github/workflows/check-devnet.yml +++ b/.github/workflows/check-devnet.yml @@ -10,6 +10,13 @@ env: CARGO_TERM_COLOR: always jobs: + debug-labels: + name: Debug Labels + runs-on: SubtensorCI + steps: + - name: Debug Labels + run: | + echo "Labels: ${{ toJson(github.event.pull_request.labels) }}" check-spec-version: name: Check spec_version bump runs-on: SubtensorCI diff --git a/.github/workflows/check-testnet.yml b/.github/workflows/check-testnet.yml index 09963b152..39847767b 100644 --- a/.github/workflows/check-testnet.yml +++ b/.github/workflows/check-testnet.yml @@ -10,13 +10,6 @@ env: CARGO_TERM_COLOR: always jobs: - debug-labels: - name: Debug Labels - runs-on: SubtensorCI - steps: - - name: Debug Labels - run: | - echo "Labels: ${{ toJson(github.event.pull_request.labels) }}" check-spec-version: name: Check spec_version bump runs-on: SubtensorCI From 72454a64b220f51d25e8df3143aaf7ddf01961ff Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 10 Sep 2024 12:39:27 -0400 Subject: [PATCH 28/36] fix conditional --- .github/workflows/check-testnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-testnet.yml b/.github/workflows/check-testnet.yml index 39847767b..6c3ebcfdf 100644 --- a/.github/workflows/check-testnet.yml +++ b/.github/workflows/check-testnet.yml @@ -13,7 +13,7 @@ jobs: check-spec-version: name: Check spec_version bump runs-on: SubtensorCI - if: ${{ github.event.pull_request.labels | contains('no-spec-version-bump') == false }} + if: ${{ !contains(github.event.pull_request.labels.*.name, 'no-spec-version-bump') }} steps: - name: Dependencies run: | From 2ca5ce5dd06492e3fe4559b596e35cbe031ff31b Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 10 Sep 2024 12:39:45 -0400 Subject: [PATCH 29/36] remove label debug step --- .github/workflows/check-devnet.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/check-devnet.yml b/.github/workflows/check-devnet.yml index 65a4c88dc..1a7ae4aa3 100644 --- a/.github/workflows/check-devnet.yml +++ b/.github/workflows/check-devnet.yml @@ -10,13 +10,6 @@ env: CARGO_TERM_COLOR: always jobs: - debug-labels: - name: Debug Labels - runs-on: SubtensorCI - steps: - - name: Debug Labels - run: | - echo "Labels: ${{ toJson(github.event.pull_request.labels) }}" check-spec-version: name: Check spec_version bump runs-on: SubtensorCI From 6210795d43573ca1c223a097f76956cffa33c038 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 10 Sep 2024 12:43:28 -0400 Subject: [PATCH 30/36] tweak triggers --- .github/workflows/check-devnet.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-devnet.yml b/.github/workflows/check-devnet.yml index 1a7ae4aa3..b27542d94 100644 --- a/.github/workflows/check-devnet.yml +++ b/.github/workflows/check-devnet.yml @@ -3,8 +3,9 @@ name: Devnet Deploy Check on: pull_request: branches: [devnet, devnet-ready] - pull_request_target: types: [labeled, unlabeled] + push: + branches: [devnet, devnet-ready] env: CARGO_TERM_COLOR: always From b61646fa50d7484f9f0db78dac5068513b5eedba Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 10 Sep 2024 12:46:53 -0400 Subject: [PATCH 31/36] check on-push From dfbd6de262f20a923543d46fe88c7c9158d5a407 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 10 Sep 2024 12:48:45 -0400 Subject: [PATCH 32/36] fix --- .github/workflows/check-devnet.yml | 4 +--- .github/workflows/check-finney.yml | 3 +-- .github/workflows/check-testnet.yml | 3 +-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check-devnet.yml b/.github/workflows/check-devnet.yml index b27542d94..2cb586348 100644 --- a/.github/workflows/check-devnet.yml +++ b/.github/workflows/check-devnet.yml @@ -3,9 +3,7 @@ name: Devnet Deploy Check on: pull_request: branches: [devnet, devnet-ready] - types: [labeled, unlabeled] - push: - branches: [devnet, devnet-ready] + types: [labeled, unlabeled, synchronize] env: CARGO_TERM_COLOR: always diff --git a/.github/workflows/check-finney.yml b/.github/workflows/check-finney.yml index 52600806d..665c9c8a9 100644 --- a/.github/workflows/check-finney.yml +++ b/.github/workflows/check-finney.yml @@ -3,8 +3,7 @@ name: Finney Deploy Check on: pull_request: branches: [finney, main] - pull_request_target: - types: [labeled, unlabeled] + types: [labeled, unlabeled, synchronize] env: CARGO_TERM_COLOR: always diff --git a/.github/workflows/check-testnet.yml b/.github/workflows/check-testnet.yml index 6c3ebcfdf..95277c94a 100644 --- a/.github/workflows/check-testnet.yml +++ b/.github/workflows/check-testnet.yml @@ -3,8 +3,7 @@ name: Testnet Deploy Check on: pull_request: branches: [testnet, testnet-ready] - pull_request_target: - types: [labeled, unlabeled] + types: [labeled, unlabeled, synchronize] env: CARGO_TERM_COLOR: always From 51935edf63fc589b4e3055ad4d1e4cb179e06909 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 10 Sep 2024 12:49:43 -0400 Subject: [PATCH 33/36] remove merged_script.sh --- scripts/merged_script.sh | 102 --------------------------------------- 1 file changed, 102 deletions(-) delete mode 100644 scripts/merged_script.sh diff --git a/scripts/merged_script.sh b/scripts/merged_script.sh deleted file mode 100644 index 030fd8efa..000000000 --- a/scripts/merged_script.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/bash - - -usage() { - echo "Usage: $0 -v " - exit 1 -} - -while getopts ":v:" opt; do - case ${opt} in - v) - version=${OPTARG} - ;; - \?) - usage - ;; - esac -done - - -if [ -z "$version" ]; then - usage -fi - -echo "[INFO] Starting the process for version $version" - - -echo "[INFO] Building the project with wasm-pack" - -# Build command -wasm-pack build --release - -# Wasm Blob file path -artifact_path="pkg/my_wasm_project_bg.wasm" - - -if [ ! -f "$artifact_path" ]; then - echo "[ERROR] Artifact not found: $artifact_path" - exit 1 -fi - -echo "[INFO] Artifact found at $artifact_path" - -git checkout main - -git fetch origin --tags - -latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1)) - -if [ -z "$latest_tag" ]; then - echo "No tags found in the repository." - exit 1 -fi - -commits=$(git log ${latest_tag}..main --pretty=format:"%H %ci %s" --reverse) - -# List PRs merged since the last release -pr_list=() -while read -r hash date time timezone message; do - if [[ $message =~ Merge\ pull\ request\ \#([0-9]+) ]]; then - pr_number=${BASH_REMATCH[1]} - pr_list+=("$pr_number") - fi -done <<< "$commits" - - -if [ ${#pr_list[@]} -eq 0 ]; then - echo "[ERROR] No PRs found since the last release" - exit 1 -fi - -echo -e "[INFO] PRs found: ${pr_list[*]}" - - -get_pr_title() { - local pr_number=$1 - gh pr view "$pr_number" --json title --jq '.title' -} - - -formatted_pr_list="PR numbers and their titles merged into main since the last tag ($latest_tag):\n\n" - -for pr_number in "${pr_list[@]}"; do - pr_title=$(get_pr_title "$pr_number") - formatted_pr_list+="* PR #${pr_number} - ${pr_title}\n" -done - - -formatted_pr_list=$(printf "%b" "$formatted_pr_list") - -echo -e "$formatted_pr_list" - - -echo "[INFO] Creating a new release with version $version and uploading the artifact" -if gh release create "$version" "$artifact_path" --title "$version" --notes "$formatted_pr_list"; then - echo "[INFO] Release created successfully" -else - echo "[ERROR] Failed to create the release" - exit 1 -fi - -echo "[INFO] Release $version created and tagged successfully." From 85e8443c7e2c57739d02eca9b77cfaf3d52a8b48 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 10 Sep 2024 17:40:47 -0400 Subject: [PATCH 34/36] ignore manual_inspect clippy error --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index f9a7968b9..4f162ca6b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,6 +41,7 @@ indexing-slicing = "deny" arithmetic-side-effects = "deny" type_complexity = "allow" unwrap-used = "deny" +manual_inspect = "allow" [workspace.dependencies] cargo-husky = { version = "1", default-features = false } From 90ba835222708d5829bb9541e401754678976566 Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Tue, 10 Sep 2024 17:43:14 -0400 Subject: [PATCH 35/36] fix workspace lint error --- build.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 10cac0ea7..4739a8aca 100644 --- a/build.rs +++ b/build.rs @@ -75,7 +75,9 @@ fn collect_rust_files(dir: &Path) -> Vec { let mut rust_files = Vec::new(); for entry in WalkDir::new(dir) { - let entry = entry.unwrap(); + let Ok(entry) = entry else { + continue; + }; let path = entry.path(); // Skip any path that contains "target" directory From f37d9c1ba89937cdc06754b035c17c7b856924eb Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 11 Sep 2024 11:30:06 +0200 Subject: [PATCH 36/36] fix node dep on runtime-benchmarks --- Dockerfile | 2 +- justfile | 2 +- node/src/service.rs | 10 +++++----- scripts/build.sh | 3 +-- scripts/localnet.sh | 12 ++++++------ 5 files changed, 14 insertions(+), 15 deletions(-) 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 f99f3913a..a753f7bb2 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="runtime-benchmarks metadata-hash" + cargo +{{RUSTV}} build --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/scripts/build.sh b/scripts/build.sh index 3f588a1cc..b64c177d6 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,2 +1 @@ -cargo build --profile production --features "runtime-benchmarks metadata-hash" - +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/"