Skip to content

Conversation

@DanielDerefaka
Copy link

Summary

Adds a new event NeuronRegistrationBurn that is emitted during burned registration to enable accurate tracking of the alpha amount that was burned.

Problem

Currently, it's impossible to calculate how much alpha was burned by neuron registration (as noted in #2104). This makes accurate balance bookkeeping and analytics difficult.

Solution

Added a new event NeuronRegistrationBurn(NetUid, T::AccountId, TaoCurrency, AlphaCurrency) that includes:

  • netuid: The subnet where registration occurred
  • hotkey: The registered hotkey
  • tao_cost: The TAO amount that was spent
  • alpha_burned: The alpha amount that was actually burned

The event is emitted alongside the existing NeuronRegistered event during do_burned_registration.

Changes

  • pallets/subtensor/src/macros/events.rs: Added new NeuronRegistrationBurn event definition
  • pallets/subtensor/src/subnets/registration.rs: Emit the new event with burn amounts

Test plan

  • Verified cargo check --lib passes
  • Verified cargo check --tests passes
  • Event emission logic follows existing patterns

Fixes #2104

Adds a new event `NeuronRegistrationBurn` that is emitted during burned
registration to track the exact amount of alpha that was burned.

The event includes:
- netuid: The subnet where registration occurred
- hotkey: The registered hotkey
- tao_cost: The TAO amount that was spent
- alpha_burned: The alpha amount that was actually burned

This enables accurate tracking of registration burn amounts for
accounting and analytics purposes.

Fixes opentensor#2104
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 this pull request may close these issues.

Neuron registration burn is hard to track

1 participant