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

devnet deploy 1/9/2025 (rao) #1144

Merged
merged 204 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
204 commits
Select commit Hold shift + click to select a range
22bbb5c
Apply rao changes initially
gztensor Jan 5, 2025
5d17f46
Configure evm chain id for localnet in genesis
ales-otf Jan 6, 2025
521fa9a
Rao updates 2025-01-06
gztensor Jan 6, 2025
613956d
add identities
Jan 6, 2025
cbf78a6
add back in dynamic info
Jan 6, 2025
7370882
up the spec version
Jan 6, 2025
d646cc8
changes
Jan 6, 2025
79cdfe1
spec
Jan 6, 2025
bae7cb1
spec
Jan 6, 2025
0f50a0a
spec
Jan 6, 2025
53974aa
increase alpha out automatically
Jan 6, 2025
f03af46
divs;
Jan 7, 2025
fd1c034
Add precision tests for share pool
gztensor Jan 7, 2025
d89946f
root prop is full issuance based
Jan 7, 2025
b9e3085
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
Jan 7, 2025
5291a9e
add coinbase dynamic mechanism tests
Jan 7, 2025
ce9a733
unstake all alpha
Jan 7, 2025
68f47c7
fix
Jan 7, 2025
c61186a
fix dynamic function
Jan 7, 2025
8e2019b
tao weight
Jan 7, 2025
32b64f3
add term to see divs
Jan 7, 2025
7e068e6
Merge pull request #1128 from opentensor/chore/localnet-evm-chain-id
sam0x17 Jan 7, 2025
125d8a6
make tao weight global
Jan 7, 2025
e460cbe
Add more share pool precision tests
gztensor Jan 7, 2025
d2e2b5c
Use share pool primitive in staking utils
gztensor Jan 7, 2025
f9b381c
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
gztensor Jan 7, 2025
d54e929
Cleanup stake utils
gztensor Jan 7, 2025
f96edc1
clean
Jan 7, 2025
44d8a50
half the childkey tests
Jan 7, 2025
7b40bac
Fix clippy
gztensor Jan 7, 2025
3773edb
fix 90% childkey tests
Jan 7, 2025
fe9399c
fix and remove emission tests
Jan 7, 2025
18b78fb
add test for staking pool precision
camfairchild Jan 7, 2025
a41ff21
Fix test_add_stake_dispatch_info_ok, make test_add_stake_ok_no_emissi…
gztensor Jan 7, 2025
49d1748
Fix test_dividends_with_run_to_block
gztensor Jan 7, 2025
2786f3e
Fix test_add_stake_err_signature
gztensor Jan 7, 2025
d57d2f3
Fix test_add_stake_not_registered_key_pair
gztensor Jan 7, 2025
3d3c82d
Fix test_add_stake_ok_neuron_does_not_belong_to_coldkey
gztensor Jan 7, 2025
13e24f2
weights
Jan 7, 2025
f3dae7b
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
Jan 7, 2025
a818aff
Fix test_add_stake_err_not_enough_belance and cleanup
gztensor Jan 7, 2025
3407e87
weights
Jan 7, 2025
7d160af
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
Jan 7, 2025
ed090d8
Make test_add_stake_total_balance_no_change build
gztensor Jan 7, 2025
840aa24
Make test_add_stake_total_issuance_no_change build
gztensor Jan 7, 2025
42f5967
Remove test_staking_rate_limit
gztensor Jan 7, 2025
83da243
Fix test_remove_stake_dispatch_info_ok
gztensor Jan 7, 2025
61d54cc
Fix test_remove_stake_ok_no_emission
gztensor Jan 7, 2025
3782ccf
add back crv3 reveal to coinbase
JohnReedV Jan 8, 2025
7a5bfbd
fix test_commit_weights_validate
JohnReedV Jan 8, 2025
8733f72
fix weight validate tests
JohnReedV Jan 8, 2025
52ab7df
fix test_set_stake_threshold_failed
JohnReedV Jan 8, 2025
fb350d9
fix test_senate_join_works
open-junius Jan 8, 2025
c2303b0
fix test_senate_vote_works
open-junius Jan 8, 2025
78ebc58
fix test_senate_leave_works and test_senate_leave_vote_removal
open-junius Jan 8, 2025
ca55cef
fix test_senate_not_leave_when_stake_removed and test_adjust_senate_e…
open-junius Jan 8, 2025
faf9f2d
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
Jan 8, 2025
da9e978
Fix test_remove_stake_amount_zero
gztensor Jan 8, 2025
120ba25
Fix test_remove_stake_err_signature
gztensor Jan 8, 2025
8a3c86d
Fix test_remove_stake_ok_hotkey_does_not_belong_to_coldkey
gztensor Jan 8, 2025
b8fd8e2
Fix test_remove_stake_no_enough_stake
gztensor Jan 8, 2025
f9ae31c
Fix test_remove_stake_total_balance_no_change
gztensor Jan 8, 2025
155131f
test-coldkey-delegations and add total-ck-stake helper
camfairchild Jan 8, 2025
94827f0
test_coldkey_swap_total
camfairchild Jan 8, 2025
a412c05
fix log statement
Jan 8, 2025
fc1ab54
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
Jan 8, 2025
c9f2083
test_do_swap_coldkey_success
camfairchild Jan 8, 2025
59062ab
Fix and unignore test_remove_stake_total_issuance_no_change
gztensor Jan 8, 2025
5a6eb4e
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
gztensor Jan 8, 2025
130f8d7
Fix test_bonds
keithtensor Jan 8, 2025
72b5326
Uncomment test_10_graph
keithtensor Jan 8, 2025
7e8908b
Comment out failing tests
keithtensor Jan 8, 2025
d269785
Fixes
keithtensor Jan 8, 2025
a99269b
Fix test_add_stake_to_hotkey_account_ok
gztensor Jan 8, 2025
3aaa3f6
Fix test_remove_stake_from_hotkey_account
gztensor Jan 8, 2025
b5de57e
Make initial pool TAO min(lock_cost, 100 TAO)
gztensor Jan 8, 2025
c0bba6c
Fix test_remove_stake_from_hotkey_account_registered_in_various_networks
gztensor Jan 8, 2025
0960565
Fix test_has_enough_stake_yes, remove deprecated getters for has enou…
gztensor Jan 8, 2025
8f02483
Fix test_has_enough_stake_no
gztensor Jan 8, 2025
6e748e1
Fix test_non_existent_account
gztensor Jan 8, 2025
84a43ae
Fix test_clear_small_nominations, fix test warnings
gztensor Jan 8, 2025
5f25de2
remove TotalColdkeyStake migration tests
JohnReedV Jan 8, 2025
d9a3842
Remove test_add_stake_below_minimum_threshold
gztensor Jan 8, 2025
4627dd1
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
JohnReedV Jan 8, 2025
3a0af53
Remove test_remove_stake_below_minimum_threshold
gztensor Jan 8, 2025
4ff48e1
symbols up to 444
Jan 8, 2025
c6bcf8e
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
Jan 8, 2025
d5e49e5
deprecate test_migrate_fix_pending_emissions
JohnReedV Jan 8, 2025
cab22e5
push
Jan 8, 2025
03a48f2
Fix test_get_total_delegated_stake_after_unstaking
gztensor Jan 8, 2025
200f2ba
deprecate test_migrate_total_issuance
JohnReedV Jan 8, 2025
d3fd3ba
deprecate test_total_issuance_global
JohnReedV Jan 8, 2025
3a7fe86
deprecate test_migration_fix_total_stake_maps
JohnReedV Jan 8, 2025
d5e8275
swap and burn
Jan 8, 2025
d237a56
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
JohnReedV Jan 8, 2025
f26abe6
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
gztensor Jan 8, 2025
72e368a
Fix test_get_total_delegated_stake_single_delegator
gztensor Jan 8, 2025
4efb2a9
Remove do_become_delegate and make become_delegate extrinsic a noop
gztensor Jan 8, 2025
c26aaa1
fix test_sudo_get_set_alpha
JohnReedV Jan 8, 2025
bacc933
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
JohnReedV Jan 8, 2025
ddf31e6
Fix test_rate_limits_enforced_on_increase_take
gztensor Jan 8, 2025
8ddab9b
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
gztensor Jan 8, 2025
f2a3188
fix clears_staker_nominations_below_min
JohnReedV Jan 8, 2025
d0f7eba
Fix test_share_based_staking_denominator_precision and add more test …
gztensor Jan 8, 2025
e1cc4b2
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
JohnReedV Jan 8, 2025
0038d05
fix benchmark_remove_stake
JohnReedV Jan 8, 2025
a6810d1
Remove mining_emission_drain staking tests group
ales-otf Jan 8, 2025
830b041
Merge pull request #1139 from opentensor/fix/staking-tests-3
gztensor Jan 8, 2025
449043f
tests::swap_coldkey::test_schedule_swap_coldkey_execution
camfairchild Jan 8, 2025
cf1d1c1
test_swap_idempotency
camfairchild Jan 8, 2025
bbc6945
Fix set_alpha_disabled test
ales-otf Jan 8, 2025
c9fc5e3
test_swap_stake_for_coldkey
camfairchild Jan 8, 2025
1c56723
test_swap_concurrent_modifications
camfairchild Jan 8, 2025
6f1a3bd
test_swap_staking_hotkeys_for_coldkey
camfairchild Jan 8, 2025
f1b794d
test_swap_concurrent_modifications
camfairchild Jan 8, 2025
c61ff6f
deprecate test_replace_neuron_multiple_subnets_unstake_all
JohnReedV Jan 8, 2025
73c352c
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
JohnReedV Jan 8, 2025
4c38d68
Merge pull request #1140 from opentensor/fix/set-alpha-disabled-test
JohnReedV Jan 8, 2025
d305a8c
Merge branch 'feat/rao-2025-01' into fix-epoch-tests
JohnReedV Jan 8, 2025
d97a606
Update test epoch::test_active_stake
ales-otf Jan 8, 2025
c457b69
Merge pull request #1136 from opentensor/fix-epoch-tests
JohnReedV Jan 8, 2025
180e6a9
Fix test_share_based_staking
gztensor Jan 8, 2025
bdb211e
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
gztensor Jan 8, 2025
9775c20
Fix test_add_stake_ok_no_emission
gztensor Jan 8, 2025
e93bd8f
staking::test_mining_emission_distribution_validator_valiminer_miner
orriin Jan 8, 2025
af8903d
fix staking::test_mining_emission_distribution_validator_valiminer_miner
orriin Jan 8, 2025
fb8640e
fix formatting
sam0x17 Jan 8, 2025
e79a2ef
Fix test_migrate_rao
gztensor Jan 8, 2025
fbe85e6
1 fix for sam :)
sam0x17 Jan 8, 2025
e95783a
Merge remote-tracking branch 'origin/feat/rao-2025-01' into feat/rao-…
sam0x17 Jan 8, 2025
ad3772c
cargo fmt
sam0x17 Jan 8, 2025
cb4f8b1
cargo clippy --fix --workspace --all-features
sam0x17 Jan 8, 2025
1c275ef
fix tao weight
Jan 8, 2025
b3e1a8a
fix critical clippy vulnerability using saturating add
sam0x17 Jan 8, 2025
4d10afa
fix last clippy warning :tada:
sam0x17 Jan 8, 2025
cc2f2bc
Remove migration fix_pending_emissions and test test_migrate_fix_pend…
gztensor Jan 8, 2025
48e5de4
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
gztensor Jan 8, 2025
96e106a
Fix test warnings
gztensor Jan 8, 2025
2a49bcb
Merge remote-tracking branch 'origin/feat/rao-2025-01' into feat/rao-…
sam0x17 Jan 8, 2025
0b521b3
Fix test_swap_total_hotkey_stake
gztensor Jan 8, 2025
ed1ee23
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
gztensor Jan 8, 2025
f4fe592
bump CI
sam0x17 Jan 8, 2025
41849ee
test_swap_delegated_stake_for_coldkey
camfairchild Jan 8, 2025
96d3b2b
fix clippy again
sam0x17 Jan 8, 2025
ee6ee8d
staking::test_get_total_delegated_stake_exclude_owner_stake
orriin Jan 9, 2025
03c1b2f
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
orriin Jan 9, 2025
91c81de
test_swap_total_coldkey_stake
camfairchild Jan 9, 2025
94b4161
typo
camfairchild Jan 9, 2025
862011e
fix: zepter
orriin Jan 9, 2025
6440a61
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
orriin Jan 9, 2025
2226909
test_swap_with_max_values
camfairchild Jan 9, 2025
9931f4f
Fix test_swap_stake_success
gztensor Jan 9, 2025
8c5975b
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
gztensor Jan 9, 2025
0e8c6db
typos
camfairchild Jan 9, 2025
8a7b095
test_swap_with_no_stake
camfairchild Jan 9, 2025
d424aed
test_swap_with_non_existent_new_coldkey
camfairchild Jan 9, 2025
b6abfc5
Fix epoch::test_get_set_alpha
ales-otf Jan 9, 2025
d9f90f2
staking::test_get_alpha_share_stake_multiple_delegators
orriin Jan 9, 2025
9178fa1
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
orriin Jan 9, 2025
684d292
Update epoch::test_bonds_with_liquid_alpha
ales-otf Jan 9, 2025
32b5c2b
remove test_swap_with_overflow_in_stake_addition
camfairchild Jan 9, 2025
13c6b82
Update epoch::test_outdated_weights
ales-otf Jan 9, 2025
f6e9e92
test_swap_delegates_success
camfairchild Jan 9, 2025
2882005
Update epoch::test_validator_permits
ales-otf Jan 9, 2025
0dc55c8
cargo fmt
camfairchild Jan 9, 2025
1c2b029
Update epoch::test_zero_weights
ales-otf Jan 9, 2025
9bf55d4
fix test_bonds_with_liquid_alpha
sam0x17 Jan 9, 2025
ff5da7f
Merge remote-tracking branch 'origin/feat/rao-2025-01' into feat/rao-…
sam0x17 Jan 9, 2025
c9d0b6f
remove become delegate from testing
camfairchild Jan 9, 2025
d9279fb
Update children::test_set_weights_no_parent
ales-otf Jan 9, 2025
f3ed7d9
Fix hotkey swap alpha
camfairchild Jan 9, 2025
789b3c7
Merge pull request #1142 from opentensor/fix/fix-hotkey-swap-alpha
sam0x17 Jan 9, 2025
b90cdca
cargo fmt
sam0x17 Jan 9, 2025
60578d5
fix clippy again
sam0x17 Jan 9, 2025
5398a82
fix test_swap_hotkey_with_multiple_coldkeys test_swap_staking_hotkeys…
open-junius Jan 9, 2025
d0953d8
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
Jan 9, 2025
8c27fe2
Fix test_childkey_set_weights_single_parent
keithtensor Jan 9, 2025
028244f
make run_coinbase take block emission as arg
camfairchild Jan 9, 2025
3b46cff
Use better functions
keithtensor Jan 9, 2025
122eda3
chore: fmt
camfairchild Jan 9, 2025
e1518b0
move clear pending into run_coinbase and pass pending to drain_pending
camfairchild Jan 9, 2025
da27d69
add volumne
Jan 9, 2025
74be7a6
Specify rust toolchain version as 1.83.0
ales-otf Jan 9, 2025
c400217
Fix test_childkey_multiple_parents_emission
gztensor Jan 9, 2025
cae24f9
sam fix test_childkey_take_drain_validator_take
sam0x17 Jan 9, 2025
deffa1a
sam mostly fix test_dynamic_parent_child_relationships, pending vune'…
sam0x17 Jan 9, 2025
1e9a0e2
WIP: test_parent_child_chain_emission
camfairchild Jan 9, 2025
3387795
rename
Jan 9, 2025
8ac655f
add block when the subnet transitioned to dtao
Jan 9, 2025
71b05c1
add dynamic block
Jan 9, 2025
c542916
dynamic block
Jan 9, 2025
9eabb47
wip
camfairchild Jan 9, 2025
0d9be95
mechanism weight change
Jan 9, 2025
f778f91
small changes
Jan 9, 2025
c194de4
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
Jan 9, 2025
2dd0606
record total tao at launch
Jan 9, 2025
d30f9d1
chore: fmt
camfairchild Jan 9, 2025
5f78563
test_dynamic_parent_child_relationships wip
gztensor Jan 9, 2025
7885cd1
Merge branch 'feat/rao-2025-01' of github.com:opentensor/subtensor in…
gztensor Jan 9, 2025
c5d826e
chore: clippy
camfairchild Jan 9, 2025
232dc53
allow test clippy
camfairchild Jan 9, 2025
3ace299
Merge pull request #1127 from opentensor/feat/rao-2025-01
unconst Jan 9, 2025
b71f4a3
Change rust toolchain to 1.84
ales-otf Jan 9, 2025
12a0f71
Merge pull request #1143 from opentensor/chore/specify-rust-version
sam0x17 Jan 9, 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
11 changes: 11 additions & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ members = [
"pallets/admin-utils",
"pallets/collective",
"pallets/registry",
"primitives/*",
"runtime",
"support/tools",
"support/macros",
Expand Down Expand Up @@ -82,6 +83,7 @@ quote = "1"
proc-macro2 = { version = "1", features = ["span-locations"] }
thiserror = "1.0"
walkdir = "2"
approx = "0.5"

subtensor-macros = { path = "support/macros" }

Expand Down
1 change: 1 addition & 0 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ fp-rpc = { workspace = true }
fc-mapping-sync = { workspace = true }
fp-consensus = { workspace = true }
thiserror = { workspace = true }
num-traits = { version = "0.2", features = ["std"] }

# Local Dependencies
node-subtensor-runtime = { path = "../runtime" }
Expand Down
3 changes: 3 additions & 0 deletions node/src/chain_spec/localnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,8 @@ fn localnet_genesis(
"senateMembers": {
"members": senate_members,
},
"evmChainId": {
"chainId": 42,
},
})
}
11 changes: 0 additions & 11 deletions pallets/admin-utils/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,17 +264,6 @@ mod benchmarks {
_(RawOrigin::Root, 1u16/*netuid*/, true/*enabled*/)/*set_commit_reveal_weights_enabled*/;
}

#[benchmark]
fn sudo_set_hotkey_emission_tempo() {
pallet_subtensor::Pallet::<T>::init_new_network(
1u16, /*netuid*/
1u16, /*sudo_tempo*/
);

#[extrinsic_call]
_(RawOrigin::Root, 1u64/*emission_tempo*/)/*set_hotkey_emission_tempo*/;
}

#[benchmark]
fn sudo_set_network_max_stake() {
pallet_subtensor::Pallet::<T>::init_new_network(1u16 /*netuid*/, 1u16 /*tempo*/);
Expand Down
82 changes: 34 additions & 48 deletions pallets/admin-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -958,25 +958,25 @@ pub mod pallet {
Ok(())
}

/// The extrinsic sets the target stake per interval.
/// It is only callable by the root account.
/// The extrinsic will call the Subtensor pallet to set target stake per interval.
#[pallet::call_index(47)]
#[pallet::weight((0, DispatchClass::Operational, Pays::No))]
pub fn sudo_set_target_stakes_per_interval(
origin: OriginFor<T>,
target_stakes_per_interval: u64,
) -> DispatchResult {
ensure_root(origin)?;
pallet_subtensor::Pallet::<T>::set_target_stakes_per_interval(
target_stakes_per_interval,
);
log::debug!(
"TxTargetStakesPerIntervalSet( set_target_stakes_per_interval: {:?} ) ",
target_stakes_per_interval
);
Ok(())
}
// The extrinsic sets the target stake per interval.
// It is only callable by the root account.
// The extrinsic will call the Subtensor pallet to set target stake per interval.
// #[pallet::call_index(47)]
// #[pallet::weight((0, DispatchClass::Operational, Pays::No))]
// pub fn sudo_set_target_stakes_per_interval(
// origin: OriginFor<T>,
// target_stakes_per_interval: u64,
// ) -> DispatchResult {
// ensure_root(origin)?;
// pallet_subtensor::Pallet::<T>::set_target_stakes_per_interval(
// target_stakes_per_interval,
// );
// log::debug!(
// "TxTargetStakesPerIntervalSet( set_target_stakes_per_interval: {:?} ) ",
// target_stakes_per_interval
// ); (DEPRECATED)
// Ok(())
// } (DEPRECATED)

/// The extrinsic enabled/disables commit/reaveal for a given subnet.
/// It is only callable by the root account or subnet owner.
Expand Down Expand Up @@ -1041,35 +1041,21 @@ pub mod pallet {
)
}

/// Sets the hotkey emission tempo.
///
/// This extrinsic allows the root account to set the hotkey emission tempo, which determines
/// the number of blocks before a hotkey drains accumulated emissions through to nominator staking accounts.
///
/// # Arguments
/// * `origin` - The origin of the call, which must be the root account.
/// * `emission_tempo` - The new emission tempo value to set.
///
/// # Emits
/// * `Event::HotkeyEmissionTempoSet` - When the hotkey emission tempo is successfully set.
///
/// # Errors
/// * `DispatchError::BadOrigin` - If the origin is not the root account.
// #[pallet::weight(<T as Config>::WeightInfo::sudo_set_hotkey_emission_tempo())]
#[pallet::call_index(52)]
#[pallet::weight((0, DispatchClass::Operational, Pays::No))]
pub fn sudo_set_hotkey_emission_tempo(
origin: OriginFor<T>,
emission_tempo: u64,
) -> DispatchResult {
ensure_root(origin)?;
pallet_subtensor::Pallet::<T>::set_hotkey_emission_tempo(emission_tempo);
log::debug!(
"HotkeyEmissionTempoSet( emission_tempo: {:?} )",
emission_tempo
);
Ok(())
}
// DEPRECATED
// #[pallet::call_index(52)]
// #[pallet::weight((0, DispatchClass::Operational, Pays::No))]
// pub fn sudo_set_hotkey_emission_tempo(
// origin: OriginFor<T>,
// emission_tempo: u64,
// ) -> DispatchResult {
// ensure_root(origin)?;
// pallet_subtensor::Pallet::<T>::set_hotkey_emission_tempo(emission_tempo);
// log::debug!(
// "HotkeyEmissionTempoSet( emission_tempo: {:?} )",
// emission_tempo
// );
// Ok(())
// }

/// Sets the maximum stake allowed for a specific network.
///
Expand Down
8 changes: 4 additions & 4 deletions pallets/admin-utils/src/tests/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,15 @@ parameter_types! {
pub const InitialNetworkLockReductionInterval: u64 = 2; // 2 blocks.
pub const InitialSubnetLimit: u16 = 10; // Max 10 subnets.
pub const InitialNetworkRateLimit: u64 = 0;
pub const InitialTargetStakesPerInterval: u16 = 1;
pub const InitialKeySwapCost: u64 = 1_000_000_000;
pub const InitialAlphaHigh: u16 = 58982; // Represents 0.9 as per the production default
pub const InitialAlphaLow: u16 = 45875; // Represents 0.7 as per the production default
pub const InitialLiquidAlphaOn: bool = false; // Default value for LiquidAlphaOn
pub const InitialHotkeyEmissionTempo: u64 = 1;
// pub const InitialHotkeyEmissionTempo: u64 = 1; // (DEPRECATED)
pub const InitialNetworkMaxStake: u64 = u64::MAX; // Maximum possible value for u64, this make the make stake infinity
pub const InitialColdkeySwapScheduleDuration: u64 = 5 * 24 * 60 * 60 / 12; // 5 days
pub const InitialDissolveNetworkScheduleDuration: u64 = 5 * 24 * 60 * 60 / 12; // 5 days
pub const InitialTaoWeight: u64 = u64::MAX/10; // 10% global weight.
}

impl pallet_subtensor::Config for Test {
Expand Down Expand Up @@ -188,16 +188,16 @@ impl pallet_subtensor::Config for Test {
type InitialNetworkLockReductionInterval = InitialNetworkLockReductionInterval;
type InitialSubnetLimit = InitialSubnetLimit;
type InitialNetworkRateLimit = InitialNetworkRateLimit;
type InitialTargetStakesPerInterval = InitialTargetStakesPerInterval;
type KeySwapCost = InitialKeySwapCost;
type AlphaHigh = InitialAlphaHigh;
type AlphaLow = InitialAlphaLow;
type LiquidAlphaOn = InitialLiquidAlphaOn;
type InitialHotkeyEmissionTempo = InitialHotkeyEmissionTempo;
// type InitialHotkeyEmissionTempo = InitialHotkeyEmissionTempo; // (DEPRECATED)
type InitialNetworkMaxStake = InitialNetworkMaxStake;
type Preimages = ();
type InitialColdkeySwapScheduleDuration = InitialColdkeySwapScheduleDuration;
type InitialDissolveNetworkScheduleDuration = InitialDissolveNetworkScheduleDuration;
type InitialTaoWeight = InitialTaoWeight;
}

#[derive_impl(frame_system::config_preludes::TestDefaultConfig)]
Expand Down
Loading
Loading