Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4e30439
added leasing precompile
l0r1s Jul 23, 2025
546bafa
added solidity + abi for leasing precompile
l0r1s Jul 23, 2025
2f90e8f
fix abi
l0r1s Jul 23, 2025
bca6d00
change precompile index
l0r1s Jul 23, 2025
b7b1451
make crowdloan precompile flexible for end block
l0r1s Jul 23, 2025
3bfe80c
add test for leasing precompile for retrieval/creation
l0r1s Jul 23, 2025
5fb44ce
add precompile view assertions
l0r1s Jul 23, 2025
06db80f
added terminateLease test
l0r1s Jul 23, 2025
3420f1f
refacto crypto helpers
l0r1s Jul 23, 2025
a382cc8
fix flaky test due to lock cost increase
l0r1s Jul 24, 2025
8110422
Merge branch 'devnet-ready' into feat/leasing-precompiles
l0r1s Jul 24, 2025
b4fa1ef
change leasing precompile index + update abi/sol
l0r1s Jul 24, 2025
1f9e35e
cargo fmt
l0r1s Jul 24, 2025
6f08a52
bump spec version to 298
l0r1s Jul 24, 2025
52dc392
fix clippy warning
l0r1s Jul 24, 2025
918fb41
more explicit failure
l0r1s Jul 24, 2025
078020c
make rust cache much cachier
sam0x17 Jul 24, 2025
e368a49
save-if: true
sam0x17 Jul 24, 2025
6842594
bump spec version to 298
sam0x17 Jul 24, 2025
df1b927
Merge pull request #1882 from opentensor/sam-make-ci-cachier
sam0x17 Jul 24, 2025
56dbe70
Fix insufficient liquidity issue
gztensor Jul 28, 2025
c3bad30
Merge pull request #1888 from opentensor/fix/insufficient-liquidity-s…
sam0x17 Jul 29, 2025
86b66e6
Merge pull request #1881 from opentensor/feat/leasing-precompile
sam0x17 Jul 29, 2025
c329448
Fix v3 emissions on low prices + tests
gztensor Jul 29, 2025
3d6b0a6
Merge pull request #1892 from opentensor/fix/v3_emission_devnet_ready
sam0x17 Jul 29, 2025
f5fd22e
Merge remote-tracking branch 'origin/devnet-ready' into devnet
sam0x17 Jul 29, 2025
09306a6
Merge remote-tracking branch 'origin/devnet' into testnet
sam0x17 Jul 29, 2025
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
3 changes: 2 additions & 1 deletion .github/workflows/cargo-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ jobs:
- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: "cargo-audit"
key: cargo-audit
cache-on-failure: true

- name: Install cargo-audit
run: cargo install --force cargo-audit
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/check-devnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ jobs:
- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: "spec-version"
key: try-runtime
cache-on-failure: true
save-if: true

- name: Install substrate-spec-version
run: cargo install substrate-spec-version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-finney.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: "spec-version"
key: try-runtime

- name: Install substrate-spec-version
run: cargo install substrate-spec-version
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/check-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ jobs:

- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: cargo-fmt
cache-on-failure: true

- name: cargo fmt
run: cargo +nightly fmt --check --all
Expand All @@ -61,6 +64,9 @@ jobs:

- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: clippy-default-features
cache-on-failure: true

- name: cargo clippy --workspace --all-targets -- -D warnings
run: cargo clippy --workspace --all-targets -- -D warnings
Expand All @@ -83,6 +89,9 @@ jobs:

- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: lints
cache-on-failure: true

- name: check lints
run: |
Expand All @@ -107,6 +116,9 @@ jobs:

- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: clippy-all-features
cache-on-failure: true

- name: cargo clippy --workspace --all-targets --all-features -- -D warnings
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
Expand All @@ -129,6 +141,9 @@ jobs:

- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: cargo-test
cache-on-failure: true

- name: cargo test --workspace --all-features
run: cargo test --workspace --all-features
Expand All @@ -151,6 +166,9 @@ jobs:

- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: cargo-fix
cache-on-failure: true

- name: cargo fix --workspace
run: |
Expand All @@ -177,6 +195,9 @@ jobs:

- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: zepter
cache-on-failure: true

- name: Install Zepter
run: cargo install --locked -q zepter && zepter --version
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/check-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ jobs:
- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: "spec-version"
key: try-runtime
cache-on-failure: true

- name: Install substrate-spec-version
run: cargo install substrate-spec-version
Expand Down
237 changes: 119 additions & 118 deletions .github/workflows/run-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,123 +19,124 @@ jobs:
runs-on: Benchmarking

env:
SKIP_BENCHMARKS: '0'
AUTO_COMMIT_WEIGHTS: '1'
SKIP_BENCHMARKS: "0"
AUTO_COMMIT_WEIGHTS: "1"

steps:
# ──────────────────────────────────────────────────────────────────
- name: Check out PR branch
if: ${{ env.SKIP_BENCHMARKS != '1' }}
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0

- name: Install GitHub CLI
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
sudo apt-get update
sudo apt-get install -y gh
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token

# (1) — first skip‑label check
- name: Check skip label
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
labels=$(gh pr view ${{ github.event.pull_request.number }} \
--repo "${{ github.repository }}" \
--json labels --jq '.labels[].name')
if echo "$labels" | grep -q "skip-validate-benchmarks"; then
echo "skip-validate-benchmarks label found — skipping benchmarks."
echo "SKIP_BENCHMARKS=1" >> "$GITHUB_ENV"
fi

- name: Install system dependencies
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
sudo apt-get update
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler

# (2)
- name: Check skip label
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
labels=$(gh pr view ${{ github.event.pull_request.number }} \
--repo "${{ github.repository }}" \
--json labels --jq '.labels[].name')
if echo "$labels" | grep -q "skip-validate-benchmarks"; then
echo "skip-validate-benchmarks label found — skipping benchmarks."
echo "SKIP_BENCHMARKS=1" >> "$GITHUB_ENV"
fi

- name: Install Rust toolchain
if: ${{ env.SKIP_BENCHMARKS != '1' }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

# (3)
- name: Check skip label
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
labels=$(gh pr view ${{ github.event.pull_request.number }} \
--repo "${{ github.repository }}" \
--json labels --jq '.labels[].name')
if echo "$labels" | grep -q "skip-validate-benchmarks"; then
echo "skip-validate-benchmarks label found — skipping benchmarks."
echo "SKIP_BENCHMARKS=1" >> "$GITHUB_ENV"
fi

- name: Cache Rust build
if: ${{ env.SKIP_BENCHMARKS != '1' }}
uses: Swatinem/rust-cache@v2
with:
key: bench-${{ hashFiles('**/Cargo.lock') }}

# (4)
- name: Check skip label
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
labels=$(gh pr view ${{ github.event.pull_request.number }} \
--repo "${{ github.repository }}" \
--json labels --jq '.labels[].name')
if echo "$labels" | grep -q "skip-validate-benchmarks"; then
echo "skip-validate-benchmarks label found — skipping benchmarks."
echo "SKIP_BENCHMARKS=1" >> "$GITHUB_ENV"
fi

- name: Build node with benchmarks
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
cargo build --profile production -p node-subtensor --features runtime-benchmarks

# (5)
- name: Check skip label
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
labels=$(gh pr view ${{ github.event.pull_request.number }} \
--repo "${{ github.repository }}" \
--json labels --jq '.labels[].name')
if echo "$labels" | grep -q "skip-validate-benchmarks"; then
echo "skip-validate-benchmarks label found — skipping benchmarks."
echo "SKIP_BENCHMARKS=1" >> "$GITHUB_ENV"
fi

- name: Run & validate benchmarks
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
chmod +x scripts/benchmark_action.sh
scripts/benchmark_action.sh

# (6) — final check after run
- name: Check skip label after run
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
labels=$(gh pr view ${{ github.event.pull_request.number }} \
--repo "${{ github.repository }}" \
--json labels --jq '.labels[].name')
if echo "$labels" | grep -q "skip-validate-benchmarks"; then
echo "skip-validate-benchmarks label was found — but benchmarks already ran."
fi
# ──────────────────────────────────────────────────────────────────
- name: Check out PR branch
if: ${{ env.SKIP_BENCHMARKS != '1' }}
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0

- name: Install GitHub CLI
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
sudo apt-get update
sudo apt-get install -y gh
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token

# (1) — first skip‑label check
- name: Check skip label
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
labels=$(gh pr view ${{ github.event.pull_request.number }} \
--repo "${{ github.repository }}" \
--json labels --jq '.labels[].name')
if echo "$labels" | grep -q "skip-validate-benchmarks"; then
echo "skip-validate-benchmarks label found — skipping benchmarks."
echo "SKIP_BENCHMARKS=1" >> "$GITHUB_ENV"
fi

- name: Install system dependencies
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
sudo apt-get update
sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler

# (2)
- name: Check skip label
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
labels=$(gh pr view ${{ github.event.pull_request.number }} \
--repo "${{ github.repository }}" \
--json labels --jq '.labels[].name')
if echo "$labels" | grep -q "skip-validate-benchmarks"; then
echo "skip-validate-benchmarks label found — skipping benchmarks."
echo "SKIP_BENCHMARKS=1" >> "$GITHUB_ENV"
fi

- name: Install Rust toolchain
if: ${{ env.SKIP_BENCHMARKS != '1' }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

# (3)
- name: Check skip label
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
labels=$(gh pr view ${{ github.event.pull_request.number }} \
--repo "${{ github.repository }}" \
--json labels --jq '.labels[].name')
if echo "$labels" | grep -q "skip-validate-benchmarks"; then
echo "skip-validate-benchmarks label found — skipping benchmarks."
echo "SKIP_BENCHMARKS=1" >> "$GITHUB_ENV"
fi

- name: Cache Rust build
if: ${{ env.SKIP_BENCHMARKS != '1' }}
uses: Swatinem/rust-cache@v2
with:
key: bench-${{ hashFiles('**/Cargo.lock') }}
cache-on-failure: true

# (4)
- name: Check skip label
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
labels=$(gh pr view ${{ github.event.pull_request.number }} \
--repo "${{ github.repository }}" \
--json labels --jq '.labels[].name')
if echo "$labels" | grep -q "skip-validate-benchmarks"; then
echo "skip-validate-benchmarks label found — skipping benchmarks."
echo "SKIP_BENCHMARKS=1" >> "$GITHUB_ENV"
fi

- name: Build node with benchmarks
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
cargo build --profile production -p node-subtensor --features runtime-benchmarks

# (5)
- name: Check skip label
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
labels=$(gh pr view ${{ github.event.pull_request.number }} \
--repo "${{ github.repository }}" \
--json labels --jq '.labels[].name')
if echo "$labels" | grep -q "skip-validate-benchmarks"; then
echo "skip-validate-benchmarks label found — skipping benchmarks."
echo "SKIP_BENCHMARKS=1" >> "$GITHUB_ENV"
fi

- name: Run & validate benchmarks
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
chmod +x scripts/benchmark_action.sh
scripts/benchmark_action.sh

# (6) — final check after run
- name: Check skip label after run
if: ${{ env.SKIP_BENCHMARKS != '1' }}
run: |
labels=$(gh pr view ${{ github.event.pull_request.number }} \
--repo "${{ github.repository }}" \
--json labels --jq '.labels[].name')
if echo "$labels" | grep -q "skip-validate-benchmarks"; then
echo "skip-validate-benchmarks label was found — but benchmarks already ran."
fi
3 changes: 2 additions & 1 deletion .github/workflows/try-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ jobs:
- name: Utilize Shared Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: "try-runtime"
key: try-runtime
cache-on-failure: true

- name: Run Try Runtime Checks
uses: "paritytech/try-runtime-gha@v0.1.0"
Expand Down
Loading
Loading