diff --git a/pallets/subtensor/src/coinbase/root.rs b/pallets/subtensor/src/coinbase/root.rs index 328ce3805c..88183a43b0 100644 --- a/pallets/subtensor/src/coinbase/root.rs +++ b/pallets/subtensor/src/coinbase/root.rs @@ -184,6 +184,8 @@ impl Pallet { NetUid::ROOT, subnetwork_uid, hotkey, + 0u64.into(), + 0u64.into(), )); // --- 16. Finish and return success. diff --git a/pallets/subtensor/src/macros/events.rs b/pallets/subtensor/src/macros/events.rs index a06e035d86..c17f717acd 100644 --- a/pallets/subtensor/src/macros/events.rs +++ b/pallets/subtensor/src/macros/events.rs @@ -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 diff --git a/pallets/subtensor/src/subnets/registration.rs b/pallets/subtensor/src/subnets/registration.rs index a7771857bb..459b494bc2 100644 --- a/pallets/subtensor/src/subnets/registration.rs +++ b/pallets/subtensor/src/subnets/registration.rs @@ -160,9 +160,15 @@ impl Pallet { RegistrationsThisBlock::::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(()) @@ -328,7 +334,7 @@ impl Pallet { // --- 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(()) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 52746675f9..48e49b76c9 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -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,