Skip to content
Open
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
2 changes: 2 additions & 0 deletions pallets/subtensor/src/coinbase/root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ impl<T: Config> Pallet<T> {
NetUid::ROOT,
subnetwork_uid,
hotkey,
0u64.into(),
0u64.into(),
));

// --- 16. Finish and return success.
Expand Down
3 changes: 2 additions & 1 deletion pallets/subtensor/src/macros/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ mod events {
/// a caller successfully sets their weights on a subnetwork.
WeightsSet(NetUidStorageIndex, u16),
/// a new neuron account has been registered to the chain.
NeuronRegistered(NetUid, u16, T::AccountId),
/// (netuid, uid, hotkey, tao_cost, alpha_burned)
NeuronRegistered(NetUid, u16, T::AccountId, TaoCurrency, AlphaCurrency),
/// multiple uids have been concurrently registered.
BulkNeuronsRegistered(u16, u16),
/// FIXME: Not used yet
Expand Down
12 changes: 9 additions & 3 deletions pallets/subtensor/src/subnets/registration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,15 @@ impl<T: Config> Pallet<T> {
RegistrationsThisBlock::<T>::mutate(netuid, |val| val.saturating_inc());
Self::increase_rao_recycled(netuid, Self::get_burn(netuid).into());

// --- 13. Deposit successful event.
// --- 13. Deposit successful events.
log::debug!("NeuronRegistered( netuid:{netuid:?} uid:{neuron_uid:?} hotkey:{hotkey:?} ) ");
Self::deposit_event(Event::NeuronRegistered(netuid, neuron_uid, hotkey));
Self::deposit_event(Event::NeuronRegistered(
netuid,
neuron_uid,
hotkey,
actual_burn_amount.into(),
burned_alpha.into(),
));

// --- 14. Ok and done.
Ok(())
Expand Down Expand Up @@ -328,7 +334,7 @@ impl<T: Config> Pallet<T> {

// --- 15. Deposit successful event.
log::debug!("NeuronRegistered( netuid:{netuid:?} uid:{neuron_uid:?} hotkey:{hotkey:?} ) ");
Self::deposit_event(Event::NeuronRegistered(netuid, neuron_uid, hotkey));
Self::deposit_event(Event::NeuronRegistered(netuid, neuron_uid, hotkey, 0u64.into(), 0u64.into()));

// --- 16. Ok and done.
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// `spec_version`, and `authoring_version` are the same between Wasm and native.
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
// the compatible custom types.
spec_version: 365,
spec_version: 366,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down