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

@DanielDerefaka
Copy link
Author

@open-junius would you review this PR?

@open-junius
Copy link
Contributor

open-junius commented Dec 29, 2025

@open-junius would you review this PR?
Please set the target branch as devnet-ready. and bump the runtime version.

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
- Added new event NeuronRegistrationBurn(NetUid, AccountId, TaoCurrency, AlphaCurrency)
- Emitted during do_burned_registration to track actual alpha burned
- Bumped spec_version to 366 for devnet-ready

Fixes opentensor#2104
@DanielDerefaka DanielDerefaka force-pushed the feat/registration-burn-event branch from 86e342a to adbb6eb Compare December 29, 2025 12:37
@DanielDerefaka DanielDerefaka changed the base branch from main to devnet-ready December 29, 2025 12:37
Instead of creating a separate NeuronRegistrationBurn event, expanded
the existing NeuronRegistered event to include the burn amounts:
- NeuronRegistered(NetUid, u16, T::AccountId, TaoCurrency, AlphaCurrency)

For POW and root registration (which don't burn), tao_cost and alpha_burned are 0.

Fixes opentensor#2104
@DanielDerefaka
Copy link
Author

@open-junius Good suggestion I've updated the PR to expand the existing NeuronRegistered event instead of creating a new one:

NeuronRegistered(NetUid, u16, T::AccountId, TaoCurrency, AlphaCurrency)

For POW and root registration (which don't burn), tao_cost and alpha_burned are set to 0.

@DanielDerefaka
Copy link
Author

@open-junius Updated I've expanded the existing NeuronRegistered event to include tao_cost and alpha_burned:

NeuronRegistered(NetUid, u16, T::AccountId, TaoCurrency, AlphaCurrency)

For POW and root registration (which don't burn), the values are set to 0.

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

2 participants