Skip to content

Conversation

@JohnReedV
Copy link
Contributor

Description

dTao-Compatible Subnet Deregistration

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):

@mcjkula
Copy link

mcjkula commented May 27, 2025

Currently the immunity period of the subnet's neurons is being called instead of the network immunity period, which you should be able to get with Self::get_network_immunity_period(); (I think), as well you don't need to cast it as u64, because the method then already returns u64. @JohnReedV

@JohnReedV JohnReedV changed the title dTao-Compatible Subnet Deregistration dTao-Compatible Subnet Deregistration WIP Jun 2, 2025
@JohnReedV JohnReedV added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label Jun 9, 2025
@JohnReedV JohnReedV changed the title dTao-Compatible Subnet Deregistration WIP dTao-Compatible Subnet Deregistration Jun 9, 2025
@JohnReedV JohnReedV marked this pull request as ready for review June 9, 2025 20:00
sam0x17
sam0x17 previously approved these changes Sep 17, 2025
.sort_by(|a, b| (a.owner == protocol_account).cmp(&(b.owner == protocol_account)));

for CloseItem { owner, pos_id } in to_close.into_iter() {
let rm = Self::do_remove_liquidity(netuid, &owner, pos_id)?;
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make sense to ignore errors here since we’re in the loop? If reserves are ideal, errors will not happen, but we had a few small discrepancies in the state so liquidity removals may fail for some (larger) accounts while they will succeed for smaller ones.

@sam0x17 sam0x17 merged commit 978c40c into devnet-ready Sep 17, 2025
24 of 25 checks passed
}

// (netuid, locked_rao) pairs taken from the historical snapshot (block #4_828_623).
const SUBNET_LOCKED: &[(u16, u64)] = &[
Copy link

Choose a reason for hiding this comment

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

Maybe I misunderstand the migration, but why again are we re-inserting lock costs into pre-DTAO subnets?

Their locked should be 0 because we have given them their lock cost already, so nothing to refund

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.

7 participants