Skip to content

Unclear cleanup of weights and bonds on deregistration or stake loss #2399

@Miracle0524

Description

@Miracle0524

Unclear cleanup of weights and bonds on deregistration or stake loss

Summary

It is unclear whether weight and bond entries are removed when a neuron is deregistered, loses vpermit, or falls below minimum stake.

Problem

  • Weight and bond storage may persist beyond neuron lifecycle.
  • No clear guarantees exist for cleanup in all exit paths.
  • Potential for long-term accumulation of orphaned matrices.

Details

  • Storage layout:
    (netuid, neuron_uid) -> Vec<(uid, weight)>
  • One entry per validator per subnet.

Expected Outcome

  • Audit of cleanup behavior across all exit paths.
  • Explicit removal of weights and bonds for inactive neurons.
  • Prevention of silent chain state growth.

Context

Filed at the request of Rhef to enable supervised investigation and fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions