Skip to content

Commit 1dc8d82

Browse files
authored
Merge pull request #3013 from opentensor/release/9.9.0
Release/9.9.0
2 parents 55d2611 + 245c64c commit 1dc8d82

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+993
-383
lines changed

.github/workflows/changelog-checker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v4
18-
- uses: tj-actions/changed-files@v42
18+
- uses: tj-actions/changed-files@v46
1919
id: changed
2020
- name: Ensure CHANGELOG.md updated
2121
if: contains(steps.changed.outputs.all_changed_files, 'CHANGELOG.md') == false

.github/workflows/flake8-and-mypy.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ jobs:
4242
python -m venv venv
4343
source venv/bin/activate
4444
python -m pip install --upgrade pip
45-
python -m pip install uv
45+
# needed for Python 3.9 compatibility
46+
python -m pip install uv>=0.8.8
4647
python -m uv sync --extra dev --active
4748
4849
- name: Flake8

.github/workflows/nightly-e2e-tests-subtensor-main.yml

Lines changed: 74 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -76,23 +76,29 @@ jobs:
7676
with:
7777
name: subtensor-localnet-devnet-ready
7878
path: subtensor-localnet-devnet-ready.tar
79+
7980
# Determine the day for non-fast-blocks run
80-
check-if-saturday:
81+
check-if-non-fast-blocks-run:
8182
runs-on: ubuntu-latest
8283
outputs:
83-
is-saturday: ${{ steps.check.outputs.is-saturday }}
84+
non-fast-blocks-run: ${{ steps.check.outputs.non-fast-blocks-run }}
8485
steps:
8586
- id: check
8687
run: |
87-
day=$(date -u +%u)
88-
echo "Today is weekday $day"
89-
if [ "$day" -ne 6 ]; then
90-
echo "⏭️ Skipping: not Saturday"
91-
echo "is-saturday=false" >> "$GITHUB_OUTPUT"
92-
exit 0
88+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
89+
echo "🔁 Manual trigger detected. Forcing non-fast-blocks-run=true"
90+
echo "non-fast-blocks-run=true" >> "$GITHUB_OUTPUT"
91+
else
92+
day=$(date -u +%u)
93+
echo "Today is weekday $day"
94+
if [ "$day" -ne 6 ]; then
95+
echo "⏭️ Skipping: not Saturday"
96+
echo "non-fast-blocks-run=false" >> "$GITHUB_OUTPUT"
97+
exit 0
98+
fi
99+
echo "✅ It is Saturday"
100+
echo "non-fast-blocks-run=true" >> "$GITHUB_OUTPUT"
93101
fi
94-
echo "is-saturday=true"
95-
echo "is-saturday=true" >> "$GITHUB_OUTPUT"
96102
97103
# Daily run of fast-blocks tests from `bittensor:master` based on `subtensor:main docker` image
98104
run-fast-blocks-e2e-test-master:
@@ -102,6 +108,9 @@ jobs:
102108
- pull-docker-images
103109
runs-on: ubuntu-latest
104110
timeout-minutes: 25
111+
outputs:
112+
failed: ${{ steps.test-failed.outputs.failed }}
113+
105114
strategy:
106115
fail-fast: false # Allow other matrix jobs to run even if this job fails
107116
max-parallel: 32 # Set the maximum number of parallel jobs (same as we have cores in ubuntu-latest runner)
@@ -136,22 +145,27 @@ jobs:
136145
run: docker load -i subtensor-localnet-main.tar
137146

138147
- name: Run tests with retry
148+
id: test-failed
139149
env:
140150
FAST_BLOCKS: "1"
141151
LOCALNET_IMAGE_NAME: "ghcr.io/opentensor/subtensor-localnet:main"
142152
run: |
143153
set +e
144154
for i in 1 2 3; do
145-
echo "🔁 Attempt $i: Running tests"
155+
echo "::group::🔁 Test attempt $i"
146156
uv run pytest ${{ matrix.test-file }} -s
147157
status=$?
148158
if [ $status -eq 0 ]; then
149159
echo "✅ Tests passed on attempt $i"
160+
echo "::endgroup::"
161+
echo "failed=false" >> "$GITHUB_OUTPUT"
150162
break
151163
else
152164
echo "❌ Tests failed on attempt $i"
165+
echo "::endgroup::"
153166
if [ $i -eq 3 ]; then
154167
echo "Tests failed after 3 attempts"
168+
echo "failed=true" >> "$GITHUB_OUTPUT"
155169
exit 1
156170
fi
157171
echo "Retrying..."
@@ -167,6 +181,9 @@ jobs:
167181
- pull-docker-images
168182
runs-on: ubuntu-latest
169183
timeout-minutes: 25
184+
outputs:
185+
failed: ${{ steps.test-failed.outputs.failed }}
186+
170187
strategy:
171188
fail-fast: false # Allow other matrix jobs to run even if this job fails
172189
max-parallel: 32 # Set the maximum number of parallel jobs (same as we have cores in ubuntu-latest runner)
@@ -201,22 +218,27 @@ jobs:
201218
run: docker load -i subtensor-localnet-devnet-ready.tar
202219

203220
- name: Run tests with retry
221+
id: test-failed
204222
env:
205223
FAST_BLOCKS: "1"
206224
LOCALNET_IMAGE_NAME: "ghcr.io/opentensor/subtensor-localnet:devnet-ready"
207225
run: |
208226
set +e
209227
for i in 1 2 3; do
210-
echo "🔁 Attempt $i: Running tests"
228+
echo "::group::🔁 Test attempt $i"
211229
uv run pytest ${{ matrix.test-file }} -s
212230
status=$?
213231
if [ $status -eq 0 ]; then
214232
echo "✅ Tests passed on attempt $i"
233+
echo "::endgroup::"
234+
echo "failed=false" >> "$GITHUB_OUTPUT"
215235
break
216236
else
217237
echo "❌ Tests failed on attempt $i"
238+
echo "::endgroup::"
218239
if [ $i -eq 3 ]; then
219240
echo "Tests failed after 3 attempts"
241+
echo "failed=true" >> "$GITHUB_OUTPUT"
220242
exit 1
221243
fi
222244
echo "Retrying..."
@@ -226,14 +248,16 @@ jobs:
226248
227249
# Saturday run of non-fast-blocks tests from `bittensor:master` based on `subtensor:main` docker image
228250
run-non-fast-blocks-e2e-test-master:
229-
if: needs.check-if-saturday.outputs.is-saturday == 'true'
251+
if: needs.check-if-non-fast-blocks-run.outputs.non-fast-blocks-run == 'true'
230252
name: "NFB master: ${{ matrix.test-file }} / Python ${{ matrix.python-version }}"
231253
needs:
232-
- check-if-saturday
254+
- check-if-non-fast-blocks-run
233255
- find-tests
234256
- pull-docker-images
235257
runs-on: ubuntu-latest
236258
timeout-minutes: 1440
259+
outputs:
260+
failed: ${{ steps.test-failed.outputs.failed }}
237261

238262
strategy:
239263
fail-fast: false # Allow other matrix jobs to run even if this job fails
@@ -270,22 +294,27 @@ jobs:
270294
run: docker load -i subtensor-localnet-main.tar
271295

272296
- name: Run patched E2E tests
297+
id: test-failed
273298
env:
274299
FAST_BLOCKS: "0"
275300
LOCALNET_IMAGE_NAME: "ghcr.io/opentensor/subtensor-localnet:main"
276301
run: |
277302
set +e
278303
for i in 1 2 3; do
279-
echo "🔁 Attempt $i: Running tests"
304+
echo "::group::🔁 Test attempt $i"
280305
uv run pytest ${{ matrix.test-file }} -s
281306
status=$?
282307
if [ $status -eq 0 ]; then
283308
echo "✅ Tests passed on attempt $i"
309+
echo "::endgroup::"
310+
echo "failed=false" >> "$GITHUB_OUTPUT"
284311
break
285312
else
286313
echo "❌ Tests failed on attempt $i"
314+
echo "::endgroup::"
287315
if [ $i -eq 3 ]; then
288316
echo "Tests failed after 3 attempts"
317+
echo "failed=true" >> "$GITHUB_OUTPUT"
289318
exit 1
290319
fi
291320
echo "Retrying..."
@@ -295,14 +324,16 @@ jobs:
295324
296325
# Saturday run of non-fast-blocks tests from `bittensor:staging` based on `subtensor:devnet-ready` docker image
297326
run-non-fast-blocks-e2e-test-staging:
298-
if: needs.check-if-saturday.outputs.is-saturday == 'true'
327+
if: needs.check-if-non-fast-blocks-run.outputs.non-fast-blocks-run == 'true'
299328
name: "NFB staging: ${{ matrix.test-file }} / Python ${{ matrix.python-version }}"
300329
needs:
301-
- check-if-saturday
330+
- check-if-non-fast-blocks-run
302331
- find-tests
303332
- pull-docker-images
304333
runs-on: ubuntu-latest
305334
timeout-minutes: 1440
335+
outputs:
336+
failed: ${{ steps.test-failed.outputs.failed }}
306337

307338
strategy:
308339
fail-fast: false # Allow other matrix jobs to run even if this job fails
@@ -339,25 +370,50 @@ jobs:
339370
run: docker load -i subtensor-localnet-devnet-ready.tar
340371

341372
- name: Run patched E2E tests
373+
id: test-failed
342374
env:
343375
FAST_BLOCKS: "0"
344376
LOCALNET_IMAGE_NAME: "ghcr.io/opentensor/subtensor-localnet:devnet-ready"
345377
run: |
346378
set +e
347379
for i in 1 2 3; do
348-
echo "🔁 Attempt $i: Running tests"
380+
echo "::group::🔁 Test attempt $i"
349381
uv run pytest ${{ matrix.test-file }} -s
350382
status=$?
351383
if [ $status -eq 0 ]; then
352384
echo "✅ Tests passed on attempt $i"
385+
echo "::endgroup::"
386+
echo "failed=false" >> "$GITHUB_OUTPUT"
353387
break
354388
else
355389
echo "❌ Tests failed on attempt $i"
390+
echo "::endgroup::"
356391
if [ $i -eq 3 ]; then
357392
echo "Tests failed after 3 attempts"
393+
echo "failed=true" >> "$GITHUB_OUTPUT"
358394
exit 1
359395
fi
360396
echo "Retrying..."
361397
sleep 5
362398
fi
363399
done
400+
401+
# Send centralized Discord failure notification
402+
notify-on-failure:
403+
needs:
404+
- run-fast-blocks-e2e-test-master
405+
- run-fast-blocks-e2e-test-staging
406+
- run-non-fast-blocks-e2e-test-master
407+
- run-non-fast-blocks-e2e-test-staging
408+
if: |
409+
needs.run-fast-blocks-e2e-test-master.outputs.failed == 'true' ||
410+
needs.run-fast-blocks-e2e-test-staging.outputs.failed == 'true' ||
411+
needs.run-non-fast-blocks-e2e-test-master.outputs.failed == 'true' ||
412+
needs.run-non-fast-blocks-e2e-test-staging.outputs.failed == 'true'
413+
runs-on: ubuntu-latest
414+
steps:
415+
- name: Send centralized Discord failure notification
416+
run: |
417+
curl -X POST -H "Content-Type: application/json" \
418+
-d "{\"username\": \"Nightly CI\", \"content\": \"❌ Nightly E2E tests failed. Check run: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>\"}" \
419+
"${{ secrets.NIGHTLY_WEBHOOK_URL }}"

.github/workflows/unit-and-integration-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
python -m venv venv
4040
source venv/bin/activate
4141
python -m pip install --upgrade pip
42-
python -m pip install uv
42+
# needed for Python 3.9 compatibility
43+
python -m pip install uv>=0.8.8
4344
python -m uv sync --extra dev --active
4445
4546
- name: Unit tests

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
# Changelog
22

3+
## 9.9.0 /2025-08-11
4+
5+
## What's Changed
6+
* Fix crv3 tests after devnet-ready get `CRV3WeightCommitsV2` by @basfroman in https://github.com/opentensor/bittensor/pull/2978
7+
* Add webhook for failed nightly tests by @basfroman in https://github.com/opentensor/bittensor/pull/2987
8+
* Fix liquidity test (non-fast-blocks node) by @basfroman in https://github.com/opentensor/bittensor/pull/2988
9+
* improve nightly logic by @basfroman in https://github.com/opentensor/bittensor/pull/2989
10+
* improve nightly 2 by @basfroman in https://github.com/opentensor/bittensor/pull/2990
11+
* Add `get_stake_weight` methods by @basfroman in https://github.com/opentensor/bittensor/pull/2985
12+
* Handles both exceptions for Swap pallet fetching by @thewhaleking in https://github.com/opentensor/bittensor/pull/2991
13+
* chore: fix typo by @socialsister in https://github.com/opentensor/bittensor/pull/2969
14+
* optimisations mostly related to liquidity_list by @thewhaleking in https://github.com/opentensor/bittensor/pull/2980
15+
* Transfers improvements by @thewhaleking in https://github.com/opentensor/bittensor/pull/2993
16+
* Remove ownership check in `transfer_stake_extrinsic` and `swap_stake_extrinsic` by @basfroman in https://github.com/opentensor/bittensor/pull/2996
17+
* Missed await by @thewhaleking in https://github.com/opentensor/bittensor/pull/3002
18+
* chore: fix typo by @lechpzn in https://github.com/opentensor/bittensor/pull/3001
19+
* Adds note for installing on macOS by @thewhaleking in https://github.com/opentensor/bittensor/pull/3004
20+
* Bump bittensor-wallet version by @thewhaleking in https://github.com/opentensor/bittensor/pull/3005
21+
* Format Error with string docs by @thewhaleking in https://github.com/opentensor/bittensor/pull/3006
22+
* `LoggingMachine` initialization updated to explicitly call both parent constructors by @basfroman in https://github.com/opentensor/bittensor/pull/3008
23+
* Fixed `moving_price` conversion from `I96F32` to float by @mcjkula in https://github.com/opentensor/bittensor/pull/3010
24+
* Add new CRv4 logic by @basfroman in https://github.com/opentensor/bittensor/pull/2999
25+
* UV Fix by @thewhaleking in https://github.com/opentensor/bittensor/pull/3011
26+
27+
## New Contributors
28+
* @socialsister made their first contribution in https://github.com/opentensor/bittensor/pull/2969
29+
* @lechpzn made their first contribution in https://github.com/opentensor/bittensor/pull/3001
30+
* @mcjkula made their first contribution in https://github.com/opentensor/bittensor/pull/3010
31+
32+
**Full Changelog**: https://github.com/opentensor/bittensor/compare/v9.8.3...v9.9.0
33+
334
## 9.8.3 /2025-07-18
435
* improve make file by @basfroman in https://github.com/opentensor/bittensor/pull/2965
536
* Move all workflows from `app.circleci.com` to `GH actions` by @basfroman in https://github.com/opentensor/bittensor/pull/2970

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ python3 -m pip install --upgrade bittensor
9494

9595
## Install on macOS and Linux
9696

97+
### Note for macOS users
98+
The macOS preinstalled CPython installation is compiled with LibreSSL instead of OpenSSL. There are a number
99+
of issues with LibreSSL, and as such is not fully supported by the libraries used by bittensor. Thus we highly recommend, if
100+
you are using a Mac, to first install Python from [Homebrew](https://brew.sh/). Additionally, the Rust FFI bindings
101+
[if installing from precompiled wheels (default)] require the Homebrew-installed OpenSSL pacakge. If you choose to use
102+
the preinstalled Python version from macOS, things may not work completely.
103+
104+
### Installation
97105
You can install Bittensor SDK on your local machine in either of the following ways. **Make sure you verify your installation after you install**:
98106
- [Install using a Bash command](#install-using-a-bash-command).
99107
- [Install using `pip3 install`](#install-using-pip3-install)
@@ -158,6 +166,13 @@ You can install using any of the below options:
158166
1. Install `cubit` first. See the [Install](https://github.com/opentensor/cubit?tab=readme-ov-file#install) section. **Only Python 3.9 and 3.10 versions are supported**.
159167
2. Then install SDK with `pip install bittensor`.
160168

169+
170+
### Troubleshooting
171+
#### SSL: CERTIFICATE_VERIFY_FAILED
172+
173+
If you are encountering a `[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate`
174+
error, use the command `python -m bittensor certifi` which will update your local SSL certificates.
175+
161176
---
162177

163178
## Install on Windows

0 commit comments

Comments
 (0)