⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@gztensor
Copy link
Contributor

Description

Allow paying transaction fees in alpha when no tao balance is available.
See issue #2336 for details.

Related Issue(s)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Breaking Change

The Alpha and TotalHotkeyShares maps will be deprecated in favor of high precision AlphaV2 and TotalHotkeySharesV2.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have run ./scripts/fix_rust.sh to ensure my code is formatted and linted correctly
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@gztensor gztensor added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label Jan 16, 2026
Copy link
Collaborator

@shamil-gadelshin shamil-gadelshin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

A couple of comments:

  • What is the reason we copy zstd-* libs in our repo? I would move zstd-libs into separate crates and reference them like our bls patch.
  • We need to merge #2251 to integrate "swap coldkey changes" first
  • Consider hiding Alpha map access behind some "temporary interface". It'll allow implementing Alphav2 logic easily. We would remove the interface after the migration period.
  • I don't see effects on the root claim (it should work as expected)

(key, sf)
});

legacy.chain(v2)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deduplication, maybe?


// Same thing as populate_root_coldkey_staking_maps, but for AlphaV2
pub fn populate_root_coldkey_staking_maps_v2() {
// Get starting key for the batch. Get the first key if we restart the process.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this?

let mut staking_hotkeys = StakingHotkeys::<T>::get(&coldkey);
weight.saturating_accrue(T::DbWeight::get().reads(1));
if staking_hotkeys.contains(old_hotkey) && !staking_hotkeys.contains(new_hotkey) {
staking_hotkeys.push(new_hotkey.clone());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we remove the old hotkey here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-cargo-audit This PR fails cargo audit but needs to be merged anyway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants