opentensor / subtensor

Bittensor Blockchain Layer
The Unlicense
159 stars 157 forks source link

LastHotkeyEmissionDrain to include the value that was drained. #823

Open Thanos30 opened 2 months ago

Thanos30 commented 2 months ago

Is your feature request related to a problem? Please describe.

It is possible for a subnet to be on epoch at the same block that a hotkey reaches 20 epochs and will be drained. In this case, there is a chance that the PendingHotkeyEmission of that hotkey increases through the accumulate_hotkey_emission function, and drained later on drain_hotkey_emission. In that case, there is no way for us to know the actual PendingHotkeyEmission before the drain.

Describe the solution you'd like

Either the LastHotkeyEmissionDrain to include the value that was drained along with the block number, or as formalised suggested, fire an event that will include that information.

Describe alternatives you've considered

No response

Additional context

No response