Skip to content
This repository was archived by the owner on Jul 10, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8af655d
Fixes tests in subtensor 2569
thewhaleking May 18, 2026
03aa574
Merge pull request #3355 from latent-to/fix/thewhaleking/upsteam-test…
thewhaleking May 18, 2026
59ae06f
extend waiting time in test
basfroman May 19, 2026
caf38cc
Improves monitor_requirements_size_master workflow
thewhaleking May 22, 2026
63fc491
Merge pull request #3357 from latent-to/chore/thewhaleking/improve-re…
thewhaleking May 22, 2026
d608fe3
Adds PR Guard workflow
thewhaleking May 23, 2026
a03fc87
Bumps github script of other workflows
thewhaleking May 23, 2026
8d6a791
Merge pull request #3358 from latent-to/feat/thewhaleking/pr-guard-wo…
thewhaleking May 23, 2026
0729002
update pallets
basfroman May 26, 2026
a761f97
add extrinsics
basfroman May 26, 2026
2c717df
add LockState type
basfroman May 26, 2026
faa08e5
add extrinsic wrapper calls
basfroman May 26, 2026
d033fc6
update SubtensorApi
basfroman May 26, 2026
1d064b0
unit tests
basfroman May 26, 2026
1645b74
add e2e tests
basfroman May 26, 2026
21fac44
Merge branch 'staging' into feat/roman/conviction-lock-support
basfroman May 26, 2026
ee72535
alphabetical order
basfroman May 28, 2026
10e6723
fix after default is changed
basfroman May 28, 2026
3e87c5b
update e2e tests
basfroman May 28, 2026
8a46f7b
Merge pull request #3361 from latent-to/feat/roman/convition-lock-sup…
basfroman May 28, 2026
7cae101
CHANGELOG.md update
basfroman May 28, 2026
702ed97
bumping version
basfroman May 28, 2026
1818377
bumping btcli version
basfroman May 28, 2026
e6e47ba
Merge pull request #3363 from latent-to/changelog/10.4.0
basfroman May 28, 2026
4a5f1a0
Merge branch 'master' into release/10.4.0
basfroman May 28, 2026
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 .github/workflows/changelog-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ jobs:
id: changed
- name: Ensure CHANGELOG.md updated
if: contains(steps.changed.outputs.all_changed_files, 'CHANGELOG.md') == false
uses: actions/github-script@v8
uses: actions/github-script@v9
with:
script: core.setFailed('CHANGELOG.md must be updated.')
123 changes: 88 additions & 35 deletions .github/workflows/monitor_requirements_size_master.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# This workflow measures the disk size of a virtual environment
# after installing the Bittensor SDK across multiple Python versions.
# It runs only when a new pull request targets the master branch,
# and posts a comment with the results.
# This workflow measures the disk size of a virtual environment after
# installing the Bittensor SDK across multiple Python versions, for both
# the PR base ref and the PR head ref. It posts (or updates) a single
# sticky comment on the PR comparing Before / After / Δ per Python version.
name: Monitor SDK Requirements Size

on:
pull_request:
types: [opened, labeled]
types: [opened, labeled, synchronize]
branches: [master, staging]

permissions:
pull-requests: write
contents: read
issues: write

jobs:
read-python-versions:
Expand All @@ -28,19 +27,20 @@ jobs:

measure-venv:
needs: read-python-versions
if: github.event_name == 'pull_request' && github.base_ref == 'master' || contains( github.event.pull_request.labels.*.name, 'show-venv-size')
if: github.event_name == 'pull_request' && (github.base_ref == 'master' || contains(github.event.pull_request.labels.*.name, 'show-venv-size'))
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ${{ fromJson(needs.read-python-versions.outputs.python-versions) }}
outputs:
py310: ${{ steps.set-output.outputs.py310 }}
py311: ${{ steps.set-output.outputs.py311 }}
py312: ${{ steps.set-output.outputs.py312 }}
py313: ${{ steps.set-output.outputs.py313 }}
ref: [base, head]

steps:
- uses: actions/checkout@v6
- name: Checkout ${{ matrix.ref }}
uses: actions/checkout@v6
with:
ref: ${{ matrix.ref == 'base' && github.event.pull_request.base.sha || github.event.pull_request.head.sha }}

- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -53,46 +53,99 @@ jobs:
pip install .

- name: Measure venv size
id: set-output
run: |
SIZE=$(du -sm venv | cut -f1)
VERSION=${{ matrix.python-version }}
echo "Detected size: $SIZE MB for Python $VERSION"
case "$VERSION" in
3.10) echo "py310=$SIZE" >> $GITHUB_OUTPUT ;;
3.11) echo "py311=$SIZE" >> $GITHUB_OUTPUT ;;
3.12) echo "py312=$SIZE" >> $GITHUB_OUTPUT ;;
3.13) echo "py313=$SIZE" >> $GITHUB_OUTPUT ;;
esac
echo "Detected size: $SIZE MB for Python ${{ matrix.python-version }} (${{ matrix.ref }})"
echo "$SIZE" > size.txt

- name: Upload size artifact
uses: actions/upload-artifact@v4
with:
name: size-${{ matrix.ref }}-py${{ matrix.python-version }}
path: size.txt
retention-days: 1

comment-on-pr:
needs: measure-venv
if: always() && needs.measure-venv.result != 'skipped'
runs-on: ubuntu-latest
steps:
- name: Download size artifacts
uses: actions/download-artifact@v4
with:
path: sizes
pattern: size-*

- name: Post venv size summary to PR
uses: actions/github-script@v8
uses: actions/github-script@v9
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const sizes = {
"3.10": "${{ needs.measure-venv.outputs.py310 || 'N/A' }}",
"3.11": "${{ needs.measure-venv.outputs.py311 || 'N/A' }}",
"3.12": "${{ needs.measure-venv.outputs.py312 || 'N/A' }}",
"3.13": "${{ needs.measure-venv.outputs.py313 || 'N/A' }}",
const fs = require('fs');
const path = require('path');

const rows = {};
for (const entry of fs.readdirSync('sizes')) {
const m = entry.match(/^size-(base|head)-py(.+)$/);
if (!m) continue;
const [, ref, version] = m;
const size = parseInt(
fs.readFileSync(path.join('sizes', entry, 'size.txt'), 'utf8').trim(),
10,
);
rows[version] ??= {};
rows[version][ref] = Number.isFinite(size) ? size : null;
}

const versions = Object.keys(rows).sort((a, b) =>
a.localeCompare(b, undefined, { numeric: true }),
);

const fmt = (n) => (n == null ? 'N/A' : `${n} MB`);
const fmtDelta = (before, after) => {
if (before == null || after == null) return 'N/A';
const d = after - before;
if (d === 0) return '0 MB';
return `${d > 0 ? '+' : ''}${d} MB`;
};

const lines = versions.map((v) => {
const { base, head } = rows[v];
return `| ${v} | ${fmt(base)} | ${fmt(head)} | ${fmtDelta(base, head)} |`;
});

const marker = '<!-- venv-size-comment -->';
const body = [
marker,
'**Bittensor SDK virtual environment sizes by Python version:**',
'',
'```'
]
.concat(Object.entries(sizes).map(([v, s]) => `Python ${v}: ${s} MB`))
.concat(['```'])
.join('\n');
`Comparing \`${context.payload.pull_request.base.sha.slice(0, 7)}\` (before) → \`${context.payload.pull_request.head.sha.slice(0, 7)}\` (after).`,
'',
'| Python | Before | After | Δ |',
'|---|---|---|---|',
...lines,
].join('\n');

github.rest.issues.createComment({
const { data: comments } = await github.rest.issues.listComments({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body
per_page: 100,
});
const existing = comments.find((c) => c.body && c.body.includes(marker));

if (existing) {
await github.rest.issues.updateComment({
comment_id: existing.id,
owner: context.repo.owner,
repo: context.repo.repo,
body,
});
} else {
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body,
});
}
56 changes: 56 additions & 0 deletions .github/workflows/pr-guard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: PR guard

permissions:
contents: read
pull-requests: write

on:
pull_request:
types: [opened, edited, synchronize, reopened]

jobs:
target-branch:
if: github.base_ref == 'master' && !startsWith(github.head_ref, 'release')
runs-on: ubuntu-latest
steps:
- name: Comment and fail when targeting master from a non-release branch
uses: actions/github-script@v9
with:
script: |
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: 'PRs need to be open against staging.',
});
core.setFailed('PRs need to be open against the 'staging' branch.');

signed-commits:
runs-on: ubuntu-latest
steps:
- name: Check that all commits in the PR are signed
uses: actions/github-script@v9
with:
script: |
const commits = await github.paginate(
github.rest.pulls.listCommits,
{
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
per_page: 100,
}
);

const unsigned = commits.filter(c => !c.commit.verification || !c.commit.verification.verified);

if (unsigned.length > 0) {
const list = unsigned.map(c => `- ${c.sha.substring(0, 7)} ${c.commit.message.split('\n')[0]}`).join('\n');
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: `PRs must use signed commits.\n\nUnsigned commits:\n${list}`,
});
core.setFailed("PRs must use signed commits.");
}
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 10.4.0 /2026-05-28

## What's Changed
* Fixes tests in subtensor 2569 by @thewhaleking in https://github.com/latent-to/bittensor/pull/3355
* Improves monitor_requirements_size_master workflow by @thewhaleking in https://github.com/latent-to/bittensor/pull/3357
* PR guard workflow by @thewhaleking in https://github.com/latent-to/bittensor/pull/3358
* Support `Conviction v2` by @basfroman in https://github.com/latent-to/bittensor/pull/3361

**Full Changelog**: https://github.com/latent-to/bittensor/compare/v10.3.2...v10.4.0

## 10.3.2 /2026-05-15

## What's Changed
Expand Down
Loading
Loading