Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
86b4b19
Migrate NetworkLastRegistered storage
shamil-gadelshin Jun 4, 2025
9fb0b94
Migrate LastTxBlock
shamil-gadelshin Jun 4, 2025
8a345d2
Add TxLastBlock migration test
shamil-gadelshin Jun 5, 2025
6cac416
Migrate LastTxBlockChildKeyTake
shamil-gadelshin Jun 5, 2025
94fca57
MIgrate LastTxBlockDelegateTake
shamil-gadelshin Jun 5, 2025
f6a2f39
Merge branch 'devnet-ready' into migrate-rate-limits-v2
shamil-gadelshin Jun 5, 2025
31a9001
Fix merge conflicts
shamil-gadelshin Jun 5, 2025
0aa0cb0
Ignore zero alpha stake in `clear_small_nomination_if_required`
antlerminator Aug 14, 2025
1078243
Refactor transaction extension
shamil-gadelshin Aug 19, 2025
5be820e
auto-update benchmark weights
github-actions[bot] Aug 19, 2025
edb6f19
Merge branch 'devnet-ready' into refactor-extension2
shamil-gadelshin Aug 22, 2025
bf552a3
auto-update benchmark weights
github-actions[bot] Aug 22, 2025
b216c12
rename coinbase() to increase_issuance() to better reflect what the f…
Aug 26, 2025
a49de77
run_coinbase(): fix comments
Aug 26, 2025
03dbf4f
run_coinbase(): move fetching constants out of for loop
Aug 26, 2025
24a1334
run_coinbase(): make total_moving_prices immutable
Aug 26, 2025
3f1497e
reveal_timelocked_commitments returns weight
JohnReedV Aug 27, 2025
a271c90
auto-update benchmark weights
github-actions[bot] Aug 27, 2025
9ca9888
Merge pull request #1951 from antlerminator/no-zero-small-nomination-…
open-junius Aug 28, 2025
2c6e9cc
bump spec version to 307 to make CI happy
Aug 28, 2025
1f7ee1d
fix benchmark batch-set-weights
JohnReedV Aug 28, 2025
bc0f55d
Merge pull request #1959 from opentensor/refactor-extension2
sam0x17 Aug 28, 2025
dbae3f6
bump spec
JohnReedV Aug 28, 2025
b2a995b
Merge pull request #1980 from coldint/feat/mvds00-run-coinbase-refact…
sam0x17 Aug 28, 2025
a9aa32a
upgrade instance type for docker builds
prop-opentensor Aug 28, 2025
af1b33e
auto-update benchmark weights
github-actions[bot] Aug 28, 2025
baaa25d
chore: fix minor in log::debug
mateusfigmelo Aug 29, 2025
033e702
allow to set min burn and max burn
Aug 29, 2025
53a2d10
ckburn added
Aug 29, 2025
30edd4a
Merge pull request #1992 from opentensor/fix/docker-runner-instance
sam0x17 Aug 29, 2025
b42a765
burn take subtracts fro alpha out
Aug 29, 2025
7e06314
commit Cargo.lock
Aug 29, 2025
cdc7a22
commit Cargo.lock
Aug 29, 2025
167b1cc
commit Cargo.lock
Aug 29, 2025
505b358
cargo fmt
Aug 29, 2025
b86b779
Merge pull request #1994 from mateusfigmelo/chore/minor_log
sam0x17 Aug 29, 2025
f32849f
chore: remove unused codec in dependency list
mateusfigmelo Aug 29, 2025
75892d3
chore: remove frame-support & serde in deps
mateusfigmelo Aug 29, 2025
5255388
chore: remove unused deps in pallets_subtensor_rpc
mateusfigmelo Aug 29, 2025
bc7469b
Merge pull request #1990 from opentensor/fix/benchmark-batch-set-weights
sam0x17 Aug 29, 2025
6912434
Merge branch 'devnet-ready' into reveal-tl-commitments-weights
JohnReedV Aug 29, 2025
7b9bb25
chore: remove unused deps in pallets_subtensor
mateusfigmelo Aug 29, 2025
eef8a4d
Merge pull request #2000 from mateusfigmelo/chore/pallets_subtensor_r…
sam0x17 Aug 29, 2025
0e09b20
Merge pull request #2001 from mateusfigmelo/chore/pallets_subtensor_r…
sam0x17 Aug 29, 2025
8b1047c
Merge pull request #1997 from mateusfigmelo/chore/precompiles_unused_…
sam0x17 Aug 29, 2025
121964f
Merge pull request #1999 from mateusfigmelo/chore/pallets_subtensor_r…
sam0x17 Aug 29, 2025
d57ebd4
Remove deprecated code.
shamil-gadelshin Aug 21, 2025
53f574f
Remove tests, benchmarks and alter transaction extension.
shamil-gadelshin Aug 21, 2025
ed61114
Merge branch 'devnet-ready' into migrate-rate-limits-v2
shamil-gadelshin Sep 2, 2025
924b1f9
auto-update benchmark weights
github-actions[bot] Sep 2, 2025
032cd5e
Merge pull request #1965 from opentensor/remove-deprecated-extrinsics2
sam0x17 Sep 2, 2025
0d34e1b
auto stake feature
Sep 2, 2025
d3e26da
added tests
l0r1s Sep 2, 2025
5d27fc6
Update dispatch class and “pays::yes” for extrinsics.
shamil-gadelshin Aug 25, 2025
7ea38c7
extract min/max burn bounds as config params
l0r1s Sep 2, 2025
e7def5d
Merge branch 'devnet-ready' into reveal-tl-commitments-weights
JohnReedV Sep 2, 2025
4763b86
Fix wrong way ensure for min value
gztensor Sep 2, 2025
b10087d
fix conflict
open-junius Sep 2, 2025
17acaae
default ck burn
open-junius Sep 2, 2025
596bd6b
fix missing params to configs
l0r1s Sep 2, 2025
ae25b5f
bump version
open-junius Sep 2, 2025
1e0f8e5
cargo fmt
l0r1s Sep 2, 2025
f08bc1e
fix unit tests
open-junius Sep 2, 2025
2451f18
auto-update benchmark weights
github-actions[bot] Sep 2, 2025
47038b4
Merge pull request #1986 from opentensor/reveal-tl-commitments-weights
sam0x17 Sep 2, 2025
9e1caa5
fix failing benchmark
l0r1s Sep 2, 2025
96c70a2
Fix fee bypass issue
gztensor Sep 2, 2025
c2e5300
try to fix evm e2e failure
l0r1s Sep 2, 2025
14024fd
Merge pull request #2012 from opentensor/fix/fee-bypass
sam0x17 Sep 2, 2025
5d387f5
try to fix workflow
l0r1s Sep 2, 2025
a06670c
OptionQuery & format
JohnReedV Sep 2, 2025
44fc68a
auto-update benchmark weights
github-actions[bot] Sep 2, 2025
1e80f1c
clean up the rest
JohnReedV Sep 2, 2025
326fb26
Merge branch 'devnet-ready' into min_burn_allowed
l0r1s Sep 2, 2025
05372fe
add tests
JohnReedV Sep 2, 2025
8b25c1d
remove old key
JohnReedV Sep 2, 2025
84e2821
rebase pr
open-junius Sep 2, 2025
df5e183
bump version
open-junius Sep 3, 2025
4bed0e0
become deledate deprecated
open-junius Sep 3, 2025
01efb6b
bump version
open-junius Sep 3, 2025
76ae063
auto-update benchmark weights
github-actions[bot] Sep 3, 2025
3ae481e
Merge branch 'devnet-ready' into auto_stake
JohnReedV Sep 3, 2025
addca32
add e2e case
open-junius Sep 3, 2025
3fd2f16
check burn rate scope
open-junius Sep 3, 2025
a207d0b
Merge pull request #2008 from opentensor/auto_stake
sam0x17 Sep 3, 2025
6722dca
add unit test
open-junius Sep 3, 2025
ccb23cc
remove unused variable
open-junius Sep 3, 2025
682cb0d
unnecessary code change
open-junius Sep 3, 2025
d8ea102
rebase pr
open-junius Sep 3, 2025
bb74993
Update autostake extrinsic.
shamil-gadelshin Sep 3, 2025
967bfbb
Merge pull request #2013 from opentensor/remove-become-delegate
open-junius Sep 3, 2025
4b05d0c
rebase pr
open-junius Sep 3, 2025
5ef002b
restore some ci stuff
l0r1s Sep 3, 2025
4bae03f
Merge branch 'devnet-ready' into min_burn_allowed
l0r1s Sep 3, 2025
9e2d575
auto-update benchmark weights
github-actions[bot] Sep 3, 2025
45b7b59
Merge pull request #1995 from opentensor/min_burn_allowed
sam0x17 Sep 3, 2025
ede7a35
Merge pull request #2014 from opentensor/auto-stake-fix
JohnReedV Sep 3, 2025
8ab1673
Merge branch 'devnet-ready' into change-subnet-owner-extrinsics
shamil-gadelshin Sep 3, 2025
7b5ff1d
Merge branch 'devnet-ready' into migrate-rate-limits-v2
shamil-gadelshin Sep 3, 2025
e831393
Merge pull request #1996 from opentensor/ckburn
open-junius Sep 3, 2025
915700a
auto-update benchmark weights
github-actions[bot] Sep 3, 2025
dd28ad4
Merge pull request #1721 from opentensor/migrate-rate-limits-v2
sam0x17 Sep 4, 2025
a2d161d
Merge branch 'devnet-ready' into change-subnet-owner-extrinsics
shamil-gadelshin Sep 4, 2025
1001f9c
Apply transaction-pool patch.
shamil-gadelshin Aug 31, 2025
d6e40f3
Merge pull request #1976 from opentensor/change-subnet-owner-extrinsics
sam0x17 Sep 4, 2025
a7904e0
Merge pull request #2019 from opentensor/transaction-pool-patch
sam0x17 Sep 4, 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
2 changes: 1 addition & 1 deletion .github/workflows/docker-localnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ permissions:

jobs:
publish:
runs-on: [self-hosted, type-ccx33]
runs-on: [self-hosted, type-ccx53, type-ccx43, type-ccx33]

steps:
- name: Determine Docker tag and ref
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ permissions:

jobs:
publish:
runs-on: [self-hosted, type-ccx33]
runs-on: [self-hosted, type-ccx53, type-ccx43, type-ccx33]

steps:
- name: Determine Docker tag and ref
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/evm-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
uses: Swatinem/rust-cache@v2

- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: "22"

Expand Down
96 changes: 1 addition & 95 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ pow-faucet = []

[patch."https://github.com/paritytech/polkadot-sdk.git"]
sc-consensus-grandpa = { git = "https://github.com/opentensor/grandpa.git", rev = "67ff75e915bd44586b8f8443e457b5b101920da8" }
sc-transaction-pool = { git = "https://github.com/opentensor/transaction-pool.git", rev = "5cc8837d4c237d02c013c50b0a0eb70fdcba75bf" }

[patch.crates-io]
w3f-bls = { git = "https://github.com/opentensor/bls", branch = "fix-no-std" }
2 changes: 1 addition & 1 deletion common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ pub enum ProxyType {
Registration,
Transfer,
SmallTransfer,
RootWeights,
RootWeights, // deprecated
ChildKeys,
SudoUncheckedSetCode,
SwapHotkey,
Expand Down
15 changes: 8 additions & 7 deletions evm-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,28 @@
"license": "ISC",
"dependencies": {
"@polkadot-api/descriptors": "file:.papi/descriptors",
"@polkadot-labs/hdkd": "^0.0.10",
"@polkadot-labs/hdkd-helpers": "^0.0.11",
"@polkadot/api": "15.1.1",
"@polkadot-labs/hdkd": "^0.0.23",
"@polkadot-labs/hdkd-helpers": "^0.0.23",
"@polkadot/api": "^16.4.6",
"@types/mocha": "^10.0.10",
"crypto": "^1.0.1",
"dotenv": "16.4.7",
"dotenv": "17.2.1",
"ethers": "^6.13.5",
"mocha": "^11.1.0",
"polkadot-api": "^1.9.5",
"rxjs": "^7.8.2",
"scale-ts": "^1.6.1",
"viem": "2.23.4",
"ws": "^8.18.2"
},
"devDependencies": {
"@types/bun": "^1.1.13",
"@types/chai": "^5.0.1",
"@types/node": "^22.18.0",
"assert": "^2.1.0",
"chai": "^5.2.0",
"chai": "^6.0.1",
"prettier": "^3.3.3",
"ts-node": "^10.9.2",
"typescript": "^5.7.2",
"vite": "^5.4.8"
"vite": "^7.1.4"
}
}
13 changes: 13 additions & 0 deletions evm-tests/src/contracts/alpha.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,5 +315,18 @@ export const IAlphaABI = [
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getCKBurn",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
]
9 changes: 0 additions & 9 deletions evm-tests/src/subtensor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,15 +268,6 @@ export async function setMinDelegateTake(api: TypedApi<typeof devnet>, minDelega
assert.equal(minDelegateTake, await api.query.SubtensorModule.MinDelegateTake.getValue())
}

export async function becomeDelegate(api: TypedApi<typeof devnet>, ss58Address: string, keypair: KeyPair) {
const signer = getSignerFromKeypair(keypair)

const tx = api.tx.SubtensorModule.become_delegate({
hotkey: ss58Address
})
await waitForTransactionWithRetry(api, tx, signer)
}

export async function addStake(api: TypedApi<typeof devnet>, netuid: number, ss58Address: string, amount_staked: bigint, keypair: KeyPair) {
const signer = getSignerFromKeypair(keypair)
let tx = api.tx.SubtensorModule.add_stake({
Expand Down
19 changes: 19 additions & 0 deletions evm-tests/test/alpha.precompile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { PublicClient } from "viem";
import { PolkadotSigner, TypedApi } from "polkadot-api";
import { toViemAddress, convertPublicKeyToSs58 } from "../src/address-utils"
import { IAlphaABI, IALPHA_ADDRESS } from "../src/contracts/alpha"
import { u64 } from "@polkadot-api/substrate-bindings";

describe("Test Alpha Precompile", () => {
// init substrate part
Expand Down Expand Up @@ -209,6 +210,24 @@ describe("Test Alpha Precompile", () => {
assert.ok(typeof alphaIssuance === 'bigint', "Alpha issuance should be a bigint");
assert.ok(alphaIssuance >= BigInt(0), "Alpha issuance should be non-negative");
});

it("getCKBurn returns valid CK burn rate", async () => {
const ckBurn = await publicClient.readContract({
abi: IAlphaABI,
address: toViemAddress(IALPHA_ADDRESS),
functionName: "getCKBurn",
args: []
})

const ckBurnOnChain = await api.query.SubtensorModule.CKBurn.getValue()

assert.strictEqual(ckBurn, ckBurnOnChain, "CK burn should match on chain");
assert.ok(ckBurn !== undefined, "CK burn should be defined");
const ckBurnPercentage = BigInt(ckBurn) * BigInt(100) / BigInt(2 ** 64 - 1)
assert.ok(ckBurnPercentage >= BigInt(0), "CK burn percentage should be non-negative");
assert.ok(ckBurnPercentage <= BigInt(100), "CK burn percentage should be less than or equal to 100");
assert.ok(typeof ckBurn === 'bigint', "CK burn should be a bigint");
});
});

describe("Global Functions", () => {
Expand Down
4 changes: 1 addition & 3 deletions evm-tests/test/staking.precompile.reward.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { tao } from "../src/balance-math"
import {
forceSetBalanceToSs58Address, addNewSubnetwork, burnedRegister,
setTxRateLimit, setTempo, setWeightsSetRateLimit, setSubnetOwnerCut, setMaxAllowedUids,
setMinDelegateTake, becomeDelegate, setActivityCutoff, addStake, setWeight, rootRegister,
setMinDelegateTake, setActivityCutoff, addStake, setWeight, rootRegister,
startCall
} from "../src/subtensor"

Expand Down Expand Up @@ -52,8 +52,6 @@ describe("Test neuron precompile reward", () => {
await setActivityCutoff(api, netuid, 65535)
await setMaxAllowedUids(api, netuid, 65535)
await setMinDelegateTake(api, 0)
await becomeDelegate(api, convertPublicKeyToSs58(validator.publicKey), coldkey)
await becomeDelegate(api, convertPublicKeyToSs58(miner.publicKey), coldkey)
})

it("Staker receives rewards", async () => {
Expand Down
Loading
Loading