Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/liquid alpha #503

Closed
wants to merge 150 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
6efd94b
add check-labels action
sam0x17 May 10, 2024
cada696
add label-triggers action
sam0x17 May 10, 2024
135c809
bump CI
sam0x17 May 10, 2024
9253416
split devnet and testnet label checking into their own actions
sam0x17 May 10, 2024
f261b89
typo
sam0x17 May 10, 2024
9a2a776
spec-version sub-crate scaffold
sam0x17 May 10, 2024
36409e2
remove from workspace to avoid version conflicts for now
sam0x17 May 10, 2024
1ab3f47
never mind
sam0x17 May 10, 2024
ebcda57
WIP
sam0x17 May 10, 2024
7b3347e
try fake deploy
sam0x17 May 10, 2024
7c12332
force it to show up
sam0x17 May 10, 2024
ce23465
blah blah specify toolchain yes yes
sam0x17 May 10, 2024
39d4520
use new output style
sam0x17 May 10, 2024
b7baa91
try single line
sam0x17 May 10, 2024
25f5f71
fix
sam0x17 May 10, 2024
6f464e3
try again
sam0x17 May 13, 2024
2f2df2e
tweak again
sam0x17 May 13, 2024
9eaebf9
remove trigger
sam0x17 May 13, 2024
de29985
another
sam0x17 May 13, 2024
c3a0448
try on ubuntu-latest
sam0x17 May 13, 2024
36ab313
never mind
sam0x17 May 13, 2024
e6b95cc
show ping pong
sam0x17 May 13, 2024
b97eb5b
wait 30 seconds
sam0x17 May 13, 2024
66acdda
try test.chain.opentensor.ai instead
sam0x17 May 13, 2024
8dbdd71
try with subxt
sam0x17 May 15, 2024
f832c68
fix
sam0x17 May 15, 2024
7c258e7
try with new substrate-spec-version crate
sam0x17 May 15, 2024
af1bc4e
live spec version working :tada: :tada:
sam0x17 May 15, 2024
71525d9
perform full build / make use of spec version
sam0x17 May 15, 2024
c92def2
simplified rust toolchain setup
sam0x17 May 15, 2024
0f50a7f
remove concurrency settings
sam0x17 May 17, 2024
1fbbcf6
Merge remote-tracking branch 'origin/main' into sam-revamp-deployment
sam0x17 May 23, 2024
8cf0126
fix using outdated version of checkout action
sam0x17 May 23, 2024
664b1be
real spec version check
sam0x17 May 23, 2024
df27f60
clear out old migrations
sam0x17 May 23, 2024
e7c479d
fix warnings
sam0x17 May 23, 2024
d307066
proper spec version check
sam0x17 May 23, 2024
5a02594
fix
sam0x17 May 23, 2024
1e8ad85
whoops
sam0x17 May 23, 2024
ed611e3
formatting correct now
sam0x17 May 23, 2024
2ce1333
use not-greater-than symbol
sam0x17 May 23, 2024
bff1f63
fix labels
sam0x17 May 23, 2024
753064a
add check-testnet
sam0x17 May 23, 2024
7bcfe49
add finney check
sam0x17 May 23, 2024
cc60878
tweaks
sam0x17 May 23, 2024
0faea6d
WIP
sam0x17 May 23, 2024
749ce24
labels and pull request lifecycle
sam0x17 May 23, 2024
05c297e
tweak
sam0x17 May 23, 2024
3c0c885
done
sam0x17 May 23, 2024
3415696
Merge remote-tracking branch 'origin/main' into sam-revamp-deployment
sam0x17 May 23, 2024
a9bbc88
tweak branches
sam0x17 May 23, 2024
e294b20
fix typos
sam0x17 May 23, 2024
fc61185
fix: skip_children only available in nightly
May 27, 2024
e5708f0
test: turn reg on , gets emissions
May 27, 2024
848a6ee
chore: turn reg off for netuid that was on and assert no new emissions
May 27, 2024
40a8321
Merge pull request #474 from opentensor/hotfix/no_registration_no_emi…
distributedstatemachine May 27, 2024
5e061dd
update SOP period for testnet
sam0x17 May 28, 2024
4e319c5
Merge remote-tracking branch 'origin/main' into sam-revamp-deployment
sam0x17 May 28, 2024
686e6fb
Merge pull request #346 from opentensor/sam-revamp-deployment
sam0x17 May 28, 2024
920834b
feat: docker ci , update compose
May 30, 2024
168a5e1
chore: update compose
May 30, 2024
f84b277
Update .github/workflows/docker.yml
distributedstatemachine May 30, 2024
cbd42df
Merge pull request #496 from opentensor/hotfix/docker
distributedstatemachine May 31, 2024
9b144ed
fix: write permissions for ci packages
May 31, 2024
fb3c041
chore: trigger on pull
May 31, 2024
92ecda5
chore: only on prs , not pushes to main
May 31, 2024
81c6dce
chore: tag latest
May 31, 2024
3b549b6
fix: build on pushes to main
May 31, 2024
0c77062
Merge pull request #499 from opentensor/hotfix/docker
distributedstatemachine Jun 3, 2024
ca8391d
feat: initial impl , set liquidalphaOn to false
Jun 4, 2024
d93f1cf
feat: add alph high/low
Jun 10, 2024
3445fea
feat: updated alpha for epoch
Jun 10, 2024
58363a8
feat: saturating maths
Jun 11, 2024
658bf43
Merge branch 'main' into finney_deployment_11062024
Jun 11, 2024
bfbfde6
chore: bump spec
Jun 11, 2024
de68e52
chore: install pytest , add bt.snap to gitignore
Jun 11, 2024
81888af
chore: install pytest
Jun 11, 2024
4819b33
chore: update repo path
Jun 11, 2024
b82a57e
chore: update repo path
Jun 11, 2024
309e715
feat: add fallback conditions
Jun 11, 2024
703bdbd
Merge pull request #519 from opentensor/finney_deployment_11062024
distributedstatemachine Jun 11, 2024
b97e49d
chore: stash
Jun 12, 2024
48d7d97
add missing definitions
JohnReedV Jun 12, 2024
e9837f9
equals => less than equal to
JohnReedV Jun 12, 2024
940e64c
fix warning
JohnReedV Jun 12, 2024
dd94af8
remove reimport from num-traits
JohnReedV Jun 12, 2024
37a4d4b
add more definitions
JohnReedV Jun 12, 2024
a8c705a
fix error using num_traits rounding
JohnReedV Jun 12, 2024
ab21417
fix hyperparameter tests
JohnReedV Jun 12, 2024
37784f0
use cmp to avoid unwrap
JohnReedV Jun 12, 2024
d83b60c
fix epoch tests
JohnReedV Jun 12, 2024
6186d29
less than or equal to
JohnReedV Jun 12, 2024
9ba5e6d
add set_liquid_alpha_enabled
JohnReedV Jun 12, 2024
af091af
add liquid_alpha_enabled hyperparam
JohnReedV Jun 12, 2024
201c15e
fix
JohnReedV Jun 13, 2024
7113573
fix priority
JohnReedV Jun 13, 2024
64c4ab7
chore: fix maths tests
Jun 13, 2024
2ddb926
stash
Jun 13, 2024
7408aca
root weight dipatch test
Jun 13, 2024
e8b03cb
chore: bump spec version
Jun 13, 2024
7cec2b6
chore: fmt
Jun 13, 2024
dbca2e9
chore: bump spec version
Jun 13, 2024
b52e2e5
update localnet script
Jun 13, 2024
0a5368a
chore: run ci on every push
Jun 13, 2024
a2464b8
fix : ci rust
Jun 13, 2024
dd78f0e
chore: uncomment push conditions
Jun 13, 2024
7682875
chore: lint
Jun 13, 2024
d237974
chore: silence clippy in tests
Jun 13, 2024
f9ff8d1
chore: fmt
Jun 13, 2024
6fb1e1a
Merge branch 'testnet' into spiigot/liquid_alpha
JohnReedV Jun 13, 2024
398b8f5
chore: use stable in ci
Jun 13, 2024
2bf5a35
chore: comment out clippy
Jun 13, 2024
0a7efd4
proper merge changes
JohnReedV Jun 13, 2024
49cee21
fix duplicate pallet indexes
JohnReedV Jun 13, 2024
fc2bf27
add test for root weights transaction validation
camfairchild Jun 14, 2024
07cf0e0
also test commit/reveal transaction validity check
camfairchild Jun 14, 2024
e42c10a
uncomment ci
Jun 14, 2024
c638e59
chore: clippy
Jun 14, 2024
b32729c
chore: add docs
Jun 14, 2024
52ca2f2
Merge pull request #523 from opentensor/spiigot/liquid_alpha
distributedstatemachine Jun 14, 2024
98ed152
fix clippy
open-junius Jun 14, 2024
673d619
fix clippy
open-junius Jun 14, 2024
3656126
fix clippy
open-junius Jun 14, 2024
530b05d
fix clippy
open-junius Jun 14, 2024
7173614
fix clippy
open-junius Jun 14, 2024
8445ab7
fix clippy
open-junius Jun 14, 2024
cecdf02
fix clippy
open-junius Jun 14, 2024
edce0dd
fix clippy
open-junius Jun 14, 2024
2b07546
fix clippy
open-junius Jun 14, 2024
6cccfb5
fix clippy
open-junius Jun 14, 2024
f6b3c21
test: liquid alpha epoch
Jun 14, 2024
ef4b241
fix: fast blocks false
Jun 14, 2024
eba20c2
chore: remove hard coded false
Jun 14, 2024
d16970a
Update pallets/subtensor/tests/block_step.rs
distributedstatemachine Jun 14, 2024
5a40b75
Update pallets/subtensor/tests/block_step.rs
distributedstatemachine Jun 14, 2024
87e47c5
clippy: just block
camfairchild Jun 14, 2024
101c76f
fix: clamped values , exponents
Jun 14, 2024
a143f64
lints
Jun 14, 2024
b4ca34b
Merge pull request #527 from opentensor/hotfix/set-root-weights
distributedstatemachine Jun 14, 2024
3735f09
Merge branch 'main' into feat/liquid_alpha
Jun 15, 2024
4aa155c
fix: check rust
Jun 15, 2024
3df26ff
fix test_bonds_with_extreme_alpha_values
JohnReedV Jun 18, 2024
15f678a
add liquid_alpha_enabled to subnetinfo
JohnReedV Jun 18, 2024
4f69176
LiquidAlphaDisabled error and tests
JohnReedV Jun 19, 2024
80c1a46
refactor: extract bond calculation from epoch, add utlity functions
Jun 19, 2024
5badf32
feat: extract bond caluculation in epoch
Jun 19, 2024
d3727bb
refactor: quantile
Jun 19, 2024
fcdfd63
chore: comment quantile function , remove unwrap
Jun 19, 2024
25692f7
chore: adds comments to methods , fix clamp calculation
Jun 19, 2024
0491d8c
feat: liquid alpha tests
Jun 19, 2024
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
39 changes: 39 additions & 0 deletions .github/workflows/check-devnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Devnet Deploy Check

on:
pull_request:
branches: [devnet]

env:
CARGO_TERM_COLOR: always

jobs:
check-spec-version:
name: Check spec_version bump
runs-on: SubtensorCI
steps:
- name: Dependencies
run: |
sudo apt-get update &&
sudo apt-get install -y curl clang curl libssl-dev llvm \
libudev-dev protobuf-compiler

- name: Set up Rust Toolchain
run: curl https://sh.rustup.rs -sSf | sh -s -- -y

- name: Install substrate-spec-version
run: cargo install substrate-spec-version

- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4

- name: Check that spec_version has been bumped
run: |
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://dev.chain.opentensor.ai:443 | tr -d '\n')
echo "network spec_version: $spec_version"
: ${spec_version:?bad spec version}
local_spec_version=$(cargo run -p node-subtensor-runtime --bin spec_version | tr -d '\n')
echo "local spec_version: $local_spec_version"
echo "network spec_version: $spec_version"
if (( $(echo "$local_spec_version <= $spec_version" | bc -l) )); then echo "$local_spec_version ≯ $spec_version ❌"; exit 1; fi
echo "$local_spec_version > $spec_version ✅"
39 changes: 39 additions & 0 deletions .github/workflows/check-finney.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Finney Deploy Check

on:
pull_request:
branches: [finney]

env:
CARGO_TERM_COLOR: always

jobs:
check-spec-version:
name: Check spec_version bump
runs-on: SubtensorCI
steps:
- name: Dependencies
run: |
sudo apt-get update &&
sudo apt-get install -y curl clang curl libssl-dev llvm \
libudev-dev protobuf-compiler

- name: Set up Rust Toolchain
run: curl https://sh.rustup.rs -sSf | sh -s -- -y

- name: Install substrate-spec-version
run: cargo install substrate-spec-version

- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4

- name: Check that spec_version has been bumped
run: |
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://entrypoint-finney.opentensor.ai:443 | tr -d '\n')
echo "network spec_version: $spec_version"
: ${spec_version:?bad spec version}
local_spec_version=$(cargo run -p node-subtensor-runtime --bin spec_version | tr -d '\n')
echo "local spec_version: $local_spec_version"
echo "network spec_version: $spec_version"
if (( $(echo "$local_spec_version <= $spec_version" | bc -l) )); then echo "$local_spec_version ≯ $spec_version ❌"; exit 1; fi
echo "$local_spec_version > $spec_version ✅"
35 changes: 14 additions & 21 deletions .github/workflows/check-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@ concurrency:
cancel-in-progress: true

on:
## Run automatically for all PRs against main, regardless of what the changes are
## to be safe and so we can more easily force re-run the CI when github is being
## weird by using a blank commit
push:
branches: [main, development, staging]
branches: [main, devnet-ready, devnet, testnet, finney]

##
# Run automatically for PRs against default/main branch if Rust files change
pull_request:
branches: [main, development, staging]

## Allow running workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -56,7 +50,7 @@ jobs:
TARGET: ${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential
Expand All @@ -77,7 +71,7 @@ jobs:
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
Expand All @@ -97,7 +91,7 @@ jobs:
TARGET: ${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand Down Expand Up @@ -125,7 +119,7 @@ jobs:
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
Expand Down Expand Up @@ -166,15 +160,14 @@ jobs:

- name: cargo clippy --workspace --all-targets --all-features -- -D warnings
run: cargo clippy --workspace --all-targets --all-features -- -D warnings

# runs cargo test --workspace
cargo-test:
name: cargo test
runs-on: SubtensorCI
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
Expand All @@ -194,7 +187,7 @@ jobs:
TARGET: ${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand Down Expand Up @@ -223,7 +216,7 @@ jobs:
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
Expand All @@ -243,7 +236,7 @@ jobs:
TARGET: ${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand Down Expand Up @@ -272,7 +265,7 @@ jobs:
strategy:
matrix:
rust-branch:
- nightly-2024-03-05
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
Expand All @@ -292,7 +285,7 @@ jobs:
TARGET: ${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand Down Expand Up @@ -339,7 +332,7 @@ jobs:
run: cargo install --locked -q zepter && zepter --version

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # Dont clone historic commits.

Expand All @@ -351,7 +344,7 @@ jobs:
runs-on: SubtensorCI
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run Try Runtime Checks
uses: "paritytech/try-runtime-gha@v0.1.0"
Expand Down Expand Up @@ -389,4 +382,4 @@ jobs:
runtime-package: "node-subtensor-runtime"
node-uri: "wss://test.chain.opentensor.ai:443"
checks: "pre-and-post"
extra-args: "--disable-spec-version-check --no-weight-warnings"
extra-args: "--disable-spec-version-check --no-weight-warnings"
39 changes: 39 additions & 0 deletions .github/workflows/check-testnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Testnet Deploy Check

on:
pull_request:
branches: [testnet]

env:
CARGO_TERM_COLOR: always

jobs:
check-spec-version:
name: Check spec_version bump
runs-on: SubtensorCI
steps:
- name: Dependencies
run: |
sudo apt-get update &&
sudo apt-get install -y curl clang curl libssl-dev llvm \
libudev-dev protobuf-compiler

- name: Set up Rust Toolchain
run: curl https://sh.rustup.rs -sSf | sh -s -- -y

- name: Install substrate-spec-version
run: cargo install substrate-spec-version

- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4

- name: Check that spec_version has been bumped
run: |
spec_version=$(PATH=$PATH:$HOME/.cargo/.bin substrate-spec-version wss://test.finney.opentensor.ai:443 | tr -d '\n')
echo "network spec_version: $spec_version"
: ${spec_version:?bad spec version}
local_spec_version=$(cargo run -p node-subtensor-runtime --bin spec_version | tr -d '\n')
echo "local spec_version: $local_spec_version"
echo "network spec_version: $spec_version"
if (( $(echo "$local_spec_version <= $spec_version" | bc -l) )); then echo "$local_spec_version ≯ $spec_version ❌"; exit 1; fi
echo "$local_spec_version > $spec_version ✅"
18 changes: 18 additions & 0 deletions .github/workflows/devnet-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Tested on Devnet
on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]
jobs:
check-labels:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: mheap/github-action-required-labels@v5
with:
mode: minimum
count: 1
labels: |
devnet-pass
devnet-skip
55 changes: 55 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Publish Docker Image

on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main
workflow_dispatch:

permissions:
contents: read
packages: write
actions: read
security-events: write

jobs:
publish:
runs-on: SubtensorCI

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
${{ steps.meta.outputs.tags }}
ghcr.io/${{ github.repository }}:latest
labels: ${{ steps.meta.outputs.labels }}
3 changes: 2 additions & 1 deletion .github/workflows/e2e-bittensor-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@ jobs:
git checkout staging
python3 -m pip install -e .
python3 -m pip install torch
python3 -m pip install pytest

- name: Run tests
working-directory: ${{ github.workspace }}/bittensor
run: |
pwd
ls
LOCALNET_SH_PATH="../scripts/localnet.sh" pytest tests/e2e_tests/ -s
LOCALNET_SH_PATH="${{ github.workspace }}/scripts/localnet.sh" pytest tests/e2e_tests/ -s
25 changes: 25 additions & 0 deletions .github/workflows/label-triggers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Label Triggers
on:
pull_request:
types:
- labeled

permissions:
issues: write
pull-requests: write

jobs:
comment_on_breaking_change:
runs-on: ubuntu-latest
steps:
- name: Check if 'breaking change' label is added
if: github.event.label.name == 'breaking-change'
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '@opentensor/cerebrum / @opentensor/gyrus / @opentensor/cortex breaking change detected! Please prepare accordingly!'
})
18 changes: 18 additions & 0 deletions .github/workflows/testnet-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Tested on Testnet
on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]
jobs:
check-labels:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: mheap/github-action-required-labels@v5
with:
mode: minimum
count: 1
labels: |
testnet-pass
testnet-skip
Loading
Loading