Skip to content

Commit

Permalink
mainnet deploy 2/15/2025 (post dtao + hotfixes) (#1295)
Browse files Browse the repository at this point in the history
* fix compile

* Remove pallet-dynamic-fee and associated inherent data

* Add tests, fix bugs

* Cleanup

* Add subnet volume migration to fix try-runtime

* Revert endpoint change in try-runtime script

* Use resulting average price formula for add-remove limit stake

* commit Cargo.lock

* cargo clippy

* cargo fix

* safe math usage

* upgrade openssl

* fix clippy

* address freeze_struct

* rename commit_reveal_period

* apply criticial openssl update to fix RUSTSEC-2025-0004 (openssl)

* remove subnet_info_v3

* address lint

* update register_network with identity precompile

* fix merge commit

* bump spec

* remove SubnetInfov3 struct

* rename emission_values => emission_value

* bump spec

* safe math

* remove duplicated function

* use saturating math

* add cleaned coinbase

* noclaim

* remove complexity

* non scaled tao emission

* bump

* fix test

* clean coinbase

* pre merge

* no tao in for non registration

* move to moving prices rather than tao reserves

* price

* moving alpha

* bump spec

* Fix tests

* add moving price tests

* add alpha in tests

* Fix all tests

* Format

* Fix unsafe math

* alpha tests

* set tao weight

* reset default staking fee

* fix names

* add mainnet names

* cargo clippy

* cargo fmt

* add a global min burn and migration

* add more tests for root pending etc

* alpha divs

* fix test for root

* new test root tao

* fix wrong parse function

* fix test

* add toggle off for transfers

* delete unused workflow file

* Fix validation for transfer toggle

* remove duplicate tests

* fix subnet creation logic

* cargo fmt

* add new test

* bump spec version to 228

* Add test test_drain_alpha_childkey_parentkey

* spec bump

* fix audit

* fix audit

* fix contract

* commit Cargo.lock

* cargo clippy

* cargo fmt

* fix min lock

* fmt

* fix migration test

* cargo fmt

* fix root

* cargo fmt

* add moving price to metagraph

* use correct min burn init (#1265)

* use correct min brun init

* fmt

* no into

* no into 2

* bump spec

* cargo update to fix cargo audit vulnerabilities

* bump spec version

* moving price init from emission

* cargo fmt

* bump spec version

* commit Cargo.lock

* cargo clippy

* cargo fmt

* DefaultMinimumPoolLiquidity and tempos in rao migration

* update readme of support of M series macs

* bump runtime version

* add tao_emission to stakeinfo runtime

* remove call from coinbase. already in block_step

* add negation for pow-reg-allowed

* only root can set min pow diff

* oops

* dont let ck-in-swap-sched move any stake/register

* add tests for validation filter

* add transfer stake to call nontransfer proxy filter

* also add proxy filters for new calls

* update staking priority

* bump spec

* use get_priority_staking for all stake operations

* bump spec

* clippy

* Remove ownership check from transition stake validation

* max the price for EMA calc at 1.0

* uncommitted lockfile change

* bump spec version

* fix merge conflicts

* add CI action that requires clean merges between all named branches

* fix

* fixes

* try again

* fix again

* fix

* fix

* stop needless wasting of CI hours with on push triggers we don't need

* provide an identity for github action to prevent failure

* Add serve_axon extrinsic validation

* Bump spec version

* Check IP validity in serve_axon validation first

* make set diff only root

* add test for set diff no owner

* add migration for min diff

* bump spec

* only allow top-stake SN owner hk to stay immune

* add tests

* only allow replace non-top-stake owner hk

* bump spec

* add tests using SubnetOwnerHotkey

* add impl for replace neuron

* add swap test

* add neuron prune impl

* add swap hotkey impl

* clippy

* clippy

* mistake in test

---------

Co-authored-by: open-junius <zhou@opentensor.dev>
Co-authored-by: Aliaksandr Tsurko <ales@opentensor.dev>
Co-authored-by: Greg Zaitsev <gregz@opentensor.dev>
Co-authored-by: Roman <167799377+roman-opentensor@users.noreply.github.com>
Co-authored-by: JohnReedV <87283488+JohnReedV@users.noreply.github.com>
Co-authored-by: Cameron Fairchild <cameron@opentensor.ai>
Co-authored-by: unconst <jake@bittensor.com>
Co-authored-by: Unconst <32490803+unconst@users.noreply.github.com>
Co-authored-by: camfairchild <cameron@opentensor.dev>
Co-authored-by: Prakash <qxprakash@gmail.com>
Co-authored-by: ibraheem-opentensor <ibraheem@opentensor.dev>
  • Loading branch information
12 people authored Feb 16, 2025
1 parent f95810a commit f9254ea
Show file tree
Hide file tree
Showing 32 changed files with 4,850 additions and 935 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/check-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ concurrency:
cancel-in-progress: true

on:
push:
branches: [main, devnet-ready, devnet, testnet, finney]

pull_request:

## Allow running workflow manually from the Actions tab
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/e2e-bittensor-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ concurrency:
cancel-in-progress: true

on:
push:
branches: [main, devnet-ready, devnet, testnet, finney]

pull_request:

## Allow running workflow manually from the Actions tab
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/require-clean-merges.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Require Clean Merges

on:
pull_request:
branches:
- devnet-ready
- devnet
- testnet

jobs:
assert-clean-merges:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Ensures we get all branches for merging

- name: Determine Target Branch and Set Merge List
id: set-merge-branches
run: |
TARGET_BRANCH="${{ github.event.pull_request.base.ref }}"
PR_BRANCH="${{ github.event.pull_request.head.ref }}"
echo "PR_BRANCH=$PR_BRANCH" >> $GITHUB_ENV
if [[ "$TARGET_BRANCH" == "devnet-ready" ]]; then
echo "MERGE_BRANCHES=devnet testnet main" >> $GITHUB_ENV
elif [[ "$TARGET_BRANCH" == "devnet" ]]; then
echo "MERGE_BRANCHES=testnet main" >> $GITHUB_ENV
elif [[ "$TARGET_BRANCH" == "testnet" ]]; then
echo "MERGE_BRANCHES=main" >> $GITHUB_ENV
elif [[ "$TARGET_BRANCH" == "main" ]]; then
echo "MERGE_BRANCHES=" >> $GITHUB_ENV # No need to merge anything into main
else
echo "MERGE_BRANCHES=devnet-ready devnet testnet main" >> $GITHUB_ENV
fi
- name: Check Merge Cleanliness
run: |
TARGET_BRANCH="${{ github.event.pull_request.base.ref }}"
PR_BRANCH="${{ github.event.pull_request.head.ref }}"
echo "Fetching all branches..."
git fetch --all --prune
echo "Checking out PR branch: $PR_BRANCH"
git checkout $PR_BRANCH
git reset --hard origin/$PR_BRANCH
# Configure a temporary Git identity to allow merging
git config --local user.email "github-actions@github.com"
git config --local user.name "GitHub Actions"
for branch in $MERGE_BRANCHES; do
echo "Checking merge from $branch into $PR_BRANCH..."
# Ensure PR branch is up to date
git reset --hard origin/$PR_BRANCH
# Merge without committing to check for conflicts
if git merge --no-commit --no-ff origin/$branch; then
echo "✅ Merge from $branch into $PR_BRANCH is clean."
else
echo "❌ Merge conflict detected when merging $branch into $PR_BRANCH"
exit 1
fi
# Abort merge if one was started, suppressing errors if no merge happened
git merge --abort 2>/dev/null || true
done
Loading

0 comments on commit f9254ea

Please sign in to comment.