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

RAO goes live on Testnet #853

Open
gztensor opened this issue Oct 11, 2024 · 1 comment · May be fixed by #980
Open

RAO goes live on Testnet #853

gztensor opened this issue Oct 11, 2024 · 1 comment · May be fixed by #980
Assignees

Comments

@gztensor
Copy link
Contributor

gztensor commented Oct 11, 2024

PR: #980

Tasks

  • Compare and intelligently merge changes for source/accumulate_hotkey_emission and draining hotkey emission, check that childkey logic and draining fixes are preserved. Check Tests.
  • Implement chain bloat fix in 'run_coinbase'
  • subtensor pallet - TODO: add back (migrations) - @camfairchild
  • LargestLocked and Locks on subnet creation - commented out?
  • epoch_mock - use real one
  • run_coinbase - remove // No more emission, add test to ensure emission
  • Is this check needed for subnet owner cut:
    if SubnetOwner::<T>::contains_key(netuid) {
  • Remove update_subnet_owner (dynamically changing subnet owner based on conviction)
  • sudo_hotfix_swap_coldkey_delegates - review (not implemented)
  • Fix tests, especially ones that were pulled from devnet-ready and not present in rao yet
  • return the locks from prior subnet owners
  • remove the conviction based owner fee
  • remove dynamic tempos for now, just make the min and the max value always 300 blocks. (not 360)
  • global weight should be 1 at launch and then converge to 50% over a period of 1 year.
  • Remove locked from StakeInfo (always 0 for now)
  • Subnet specific rate limits (request from @unconst)
  • Hotkey draining needs to be optimized
  • In rao migration return all Locked TAO except for 1 rao (not 1 TAO)

Tests

  • test_coinbase_basic
  • test_childkey_single_parent_emission
  • test_childkey_multiple_parents_emission
  • test_parent_child_chain_emission
  • test_dynamic_parent_child_relationships
  • test_rank_trust_incentive_calculation_with_parent_child
  • test_sudo_get_set_alpha
  • test_get_stake_for_hotkey_on_subnet_single_parent_child
  • test_get_stake_for_hotkey_on_subnet_multiple_parents_single_child
  • test_get_stake_for_hotkey_on_subnet_single_parent_multiple_children
  • test_get_stake_for_hotkey_on_subnet_edge_cases
  • test_get_stake_for_hotkey_on_subnet_complex_hierarchy
  • test_children_stake_values
  • test_get_set_alpha
  • test_blocks_since_last_step
  • test_replace_neuron_multiple_subnets_unstake_all
  • test_get_network_max_stake
  • test_basic_emission_distribution_scenario
  • test_hotkey_take_calculation_scenario
  • test_distribute_owner_cut_large_amount
  • Remove test_distribute_owner_cut_expired_locks
  • Remove test_distribute_owner_cut_lions_share_distribution
  • Remove test_distribute_owner_cut_different_lock_durations
  • Remove test_distribute_owner_cut_conviction_calculation
  • test_distribute_owner_cut_basic
  • test_distribute_owner_cut_multiple_subnets
  • Remove test_distribute_owner_cut_uneven_stakes
  • test_distribute_owner_cut_single_hotkey
  • test_distribute_owner_cut_rounding
  • test_distribute_owner_cut_storage_updates
  • Subnet tempo is 300
  • DefaultTempo is 300 (because it is used to create subnet and in migration to rao)
  • Tests for distribution of OwnerCut (include missing owner hotkey case)
  • test_add_singular_child
  • test_get_stake_for_hotkey_on_subnet_max_network_stake - can either hardcode to 1M
  • Remove locks (and tests)
  • Review hotkey tempo CPU usage

Missing tests (maybe for mainnet)

  • Review tests from deleted pallets/subtensor/tests/root.rs
  • Review tests from deleted pallets/subtensor/tests/network.rs
  • Review tests from deleted pallets/subtensor/tests/migration.rs
  • Test for emission for childkey, parent, and nominator - childkey take only
  • Test for emission for childkey, parent, and nominator - delegate take only
  • The run_epoch function distributes subnet owner cut
  • test_childkey_take_drain (branch hotfix/childkey-emission-distibution)
  • test_childkey_take_drain_validator_take (branch hotfix/childkey-emission-distibution)
  • test_mining_emission_drain (branch hotfix/childkey-emission-distibution)
  • test_mining_emission_drain_with_validation (branch hotfix/childkey-emission-distibution)
  • test_mining_emission_drain_validator_valiminer_miner (branch hotfix/childkey-emission-distibution)
  • Test that real epoch function is used, not epoch_mock
  • Ensure emission doesn't end in 1 week
  • Chain bloat fix in 'run_coinbase'
  • Subnet owner doesn't update based on conviction
  • Subnet owner take is flat % and doesn't depend on conviction
  • test_fast_stake_unstake_protection_source_hotkey
  • test_stake_delta_tracks_adds_and_removes
  • test_coldkey_swap_stake_delta
  • test hotkey_swap for all rao maps
  • Test that rao migration converts PendingHotkeyEmission to PendingHotkeyEmissionOnNetuid on netuid 0
  • Migration tests: Either ensure it has already run on Finney and delete this test or fix it
    • test_migrate_total_issuance
    • test_migration_fix_total_stake_maps
    • test_total_issuance_global
    • test_migrate_fix_total_coldkey_stake
    • test_migrate_fix_total_coldkey_stake_value_already_in_total
    • test_migrate_fix_total_coldkey_stake_no_entry
    • test_migrate_fix_total_coldkey_stake_no_entry_in_hotkeys
    • test_migrate_fix_total_coldkey_stake_one_hotkey_stake_missing
    • test_migrate_fix_total_coldkey_stake_runs_once
    • test_migrate_fix_total_coldkey_stake_starts_with_value_no_stake_map_entries
  • test_tempo_change_during_commit_reveal_process: Decide if we need to keep it (tempos wouldn't change at first with rao)
  • test_tempo_and_reveal_period_change_during_commit_reveal_process: same
  • test_highly_concurrent_commits_and_reveals_with_multiple_hotkeys: Part of the test depends on tempos being dynamic, review
  • test_increase_total_stake_ok
  • test_decrease_total_stake_ok
  • test_unstake_all_coldkeys_from_hotkey_account
  • test_unstake_all_coldkeys_from_hotkey_account_single_staker
  • test_coldkey_swap_total
  • test_replace_neuron_multiple_subnets_unstake_all - test is marked as "DEPRECATED, see fn replace_neuron", see if fn replace_neuron is tested
  • test_swap_hotkey_with_pending_emissions
  • test_parent_child_chain_emission
  • test_coinbase_nominator_drainage_overflow
  • test_coinbase_nominator_drainage_no_deltas
  • test_coinbase_nominator_drainage_with_neutral_delta
  • test_coinbase_nominator_drainage_with_negative_delta
  • test_coinbase_nominator_drainage_with_positive_delta
  • test_coinbase_nominator_drainage_with_net_positive_delta
  • test_coinbase_nominator_drainage_with_net_negative_delta

Things for later (maybe mainnet)

  • allow subnet owners to turn up and down the alpha-in term via owner call
  • per-subnet hotkey takes
  • Unstake all extrinsic
  • Move all extrinsic to move all stake to one subnet (or sell all tokens)
  • Migration to remove state vars/maps:
    • BlockEmission
    • TotalHotkeyStake
    • TotalColdkeyStake
    • PendingdHotkeyEmission
  • Review if migrate_pending_emissions_including_null_stake is still needed, fix if yes.
@gztensor
Copy link
Contributor Author

more details about "global weight should be 1 at launch and then converge to 50% over a period of 1 year.":

Global vs local is going to anneal from 1 to 0.5 over X blocks for all subnets when we upgrade. However all subnets should have this quality when they register. So we need to make the annealing subnet specific. When a subnet registers it starts from 1 and goes to 0.5 over x blocks

@gztensor gztensor mentioned this issue Oct 24, 2024
13 tasks
@gztensor gztensor linked a pull request Nov 13, 2024 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants