Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pallets/subtensor/src/coinbase/run_coinbase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,14 @@ impl<T: Config> Pallet<T> {

let owner: T::AccountId = Owner::<T>::get(&hotkey);
let destination = AutoStakeDestination::<T>::get(&owner).unwrap_or(hotkey.clone());

Self::deposit_event(Event::<T>::AutoStakeAdded {
netuid,
Copy link
Contributor

Choose a reason for hiding this comment

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

Add miner hotkey here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

destination is the hotkey if there is no autostake key. Should we add both regardless?

destination: destination.clone(),
hotkey,
owner: owner.clone(),
incentive,
});
Self::increase_stake_for_hotkey_and_coldkey_on_subnet(
&destination,
&owner,
Expand Down
5 changes: 5 additions & 0 deletions pallets/subtensor/src/epoch/run_epoch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,11 @@ impl<T: Config> Pallet<T> {
}
});

Self::deposit_event(Event::IncentiveAlphaEmittedToMiners {
netuid,
emissions: server_emission.clone(),
});

// Emission tuples ( hotkeys, server_emission, validator_emission )
hotkeys
.into_iter()
Expand Down
22 changes: 22 additions & 0 deletions pallets/subtensor/src/macros/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -413,5 +413,27 @@ mod events {
/// - **netuid**: The network identifier.
/// - **who**: The account ID of the user revealing the weights.
TimelockedWeightsRevealed(NetUid, T::AccountId),

/// Auto-staking hotkey received stake
AutoStakeAdded {
/// Subnet identifier.
netuid: NetUid,
/// Destination account that received the auto-staked funds.
destination: T::AccountId,
/// Hotkey account whose stake was auto-staked.
hotkey: T::AccountId,
/// Owner (coldkey) account associated with the hotkey.
owner: T::AccountId,
/// Amount of alpha auto-staked.
incentive: AlphaCurrency,
},

/// End-of-epoch miner incentive alpha by UID
IncentiveAlphaEmittedToMiners {
/// Subnet identifier.
netuid: NetUid,
/// UID-indexed array of miner incentive alpha; index equals UID.
emissions: Vec<AlphaCurrency>,
},
}
}
Loading