@@ -197,8 +197,8 @@ mod dispatches {
197197 /// - On failure for each failed item in the batch.
198198 ///
199199 #[ pallet:: call_index( 80 ) ]
200- #[ pallet:: weight( ( Weight :: from_parts( 100_500_000 , 0 )
201- . saturating_add( T :: DbWeight :: get( ) . reads( 15_u64 ) )
200+ #[ pallet:: weight( ( Weight :: from_parts( 95_460_000 , 0 )
201+ . saturating_add( T :: DbWeight :: get( ) . reads( 14_u64 ) )
202202 . saturating_add( T :: DbWeight :: get( ) . writes( 2_u64 ) ) , DispatchClass :: Normal , Pays :: No ) ) ]
203203 pub fn batch_set_weights (
204204 origin : OriginFor < T > ,
@@ -557,118 +557,6 @@ mod dispatches {
557557 )
558558 }
559559
560- /// # Args:
561- /// * `origin`: (<T as frame_system::Config>Origin):
562- /// - The caller, a hotkey who wishes to set their weights.
563- ///
564- /// * `netuid` (u16):
565- /// - The network uid we are setting these weights on.
566- ///
567- /// * `hotkey` (T::AccountId):
568- /// - The hotkey associated with the operation and the calling coldkey.
569- ///
570- /// * `dests` (Vec<u16>):
571- /// - The edge endpoint for the weight, i.e. j for w_ij.
572- ///
573- /// * 'weights' (Vec<u16>):
574- /// - The u16 integer encoded weights. Interpreted as rational
575- /// values in the range [0,1]. They must sum to in32::MAX.
576- ///
577- /// * 'version_key' ( u64 ):
578- /// - The network version key to check if the validator is up to date.
579- ///
580- /// # Event:
581- ///
582- /// * WeightsSet;
583- /// - On successfully setting the weights on chain.
584- ///
585- /// # Raises:
586- ///
587- /// * NonAssociatedColdKey;
588- /// - Attempting to set weights on a non-associated cold key.
589- ///
590- /// * 'SubNetworkDoesNotExist':
591- /// - Attempting to set weights on a non-existent network.
592- ///
593- /// * 'NotRootSubnet':
594- /// - Attempting to set weights on a subnet that is not the root network.
595- ///
596- /// * 'WeightVecNotEqualSize':
597- /// - Attempting to set weights with uids not of same length.
598- ///
599- /// * 'UidVecContainInvalidOne':
600- /// - Attempting to set weights with invalid uids.
601- ///
602- /// * 'NotRegistered':
603- /// - Attempting to set weights from a non registered account.
604- ///
605- /// * 'WeightVecLengthIsLow':
606- /// - Attempting to set weights with fewer weights than min.
607- ///
608- /// * 'IncorrectWeightVersionKey':
609- /// - Attempting to set weights with the incorrect network version key.
610- ///
611- /// * 'SettingWeightsTooFast':
612- /// - Attempting to set weights too fast.
613- ///
614- /// * 'WeightVecLengthIsLow':
615- /// - Attempting to set weights with fewer weights than min.
616- ///
617- /// * 'MaxWeightExceeded':
618- /// - Attempting to set weights with max value exceeding limit.
619- ///
620- #[ pallet:: call_index( 8 ) ]
621- #[ pallet:: weight( ( Weight :: from_parts( 3_176_000 , 0 )
622- . saturating_add( T :: DbWeight :: get( ) . reads( 0_u64 ) )
623- . saturating_add( T :: DbWeight :: get( ) . writes( 0_u64 ) ) , DispatchClass :: Normal , Pays :: No ) ) ]
624- pub fn set_tao_weights (
625- _origin : OriginFor < T > ,
626- _netuid : NetUid ,
627- _hotkey : T :: AccountId ,
628- _dests : Vec < u16 > ,
629- _weights : Vec < u16 > ,
630- _version_key : u64 ,
631- ) -> DispatchResult {
632- // DEPRECATED
633- // Self::do_set_root_weights(origin, netuid, hotkey, dests, weights, version_key)
634- // Self::do_set_tao_weights(origin, netuid, hotkey, dests, weights, version_key)
635- Ok ( ( ) )
636- }
637-
638- /// --- Sets the key as a delegate.
639- ///
640- /// # Args:
641- /// * 'origin': (<T as frame_system::Config>Origin):
642- /// - The signature of the caller's coldkey.
643- ///
644- /// * 'hotkey' (T::AccountId):
645- /// - The hotkey we are delegating (must be owned by the coldkey.)
646- ///
647- /// * 'take' (u64):
648- /// - The stake proportion that this hotkey takes from delegations.
649- ///
650- /// # Event:
651- /// * DelegateAdded;
652- /// - On successfully setting a hotkey as a delegate.
653- ///
654- /// # Raises:
655- /// * 'NotRegistered':
656- /// - The hotkey we are delegating is not registered on the network.
657- ///
658- /// * 'NonAssociatedColdKey':
659- /// - The hotkey we are delegating is not owned by the calling coldket.
660- ///
661- #[ pallet:: call_index( 1 ) ]
662- #[ pallet:: weight( ( Weight :: from_parts( 3_406_000 , 0 )
663- . saturating_add( T :: DbWeight :: get( ) . reads( 0 ) )
664- . saturating_add( T :: DbWeight :: get( ) . writes( 0 ) ) , DispatchClass :: Normal , Pays :: Yes ) ) ]
665- pub fn become_delegate ( _origin : OriginFor < T > , _hotkey : T :: AccountId ) -> DispatchResult {
666- // DEPRECATED
667- // Self::do_become_delegate(origin, hotkey, Self::get_default_delegate_take())
668-
669- Ok ( ( ) )
670- }
671-
672560 /// --- Allows delegates to decrease its take value.
673561 ///
674562 /// # Args:
@@ -1591,64 +1479,6 @@ mod dispatches {
15911479 Ok ( ( ) . into ( ) )
15921480 }
15931481
1594- /// Schedule the dissolution of a network at a specified block number.
1595- ///
1596- /// # Arguments
1597- ///
1598- /// * `origin` - The origin of the call, must be signed by the sender.
1599- /// * `netuid` - The u16 network identifier to be dissolved.
1600- ///
1601- /// # Returns
1602- ///
1603- /// Returns a `DispatchResultWithPostInfo` indicating success or failure of the operation.
1604- ///
1605- /// # Weight
1606- ///
1607- /// Weight is calculated based on the number of database reads and writes.
1608-
1609- #[ pallet:: call_index( 74 ) ]
1610- #[ pallet:: weight( ( Weight :: from_parts( 119_000_000 , 0 )
1611- . saturating_add( T :: DbWeight :: get( ) . reads( 6 ) )
1612- . saturating_add( T :: DbWeight :: get( ) . writes( 31 ) ) , DispatchClass :: Normal , Pays :: Yes ) ) ]
1613- pub fn schedule_dissolve_network (
1614- _origin : OriginFor < T > ,
1615- _netuid : NetUid ,
1616- ) -> DispatchResultWithPostInfo {
1617- Err ( Error :: < T > :: CallDisabled . into ( ) )
1618-
1619- // let who = ensure_signed(origin)?;
1620-
1621- // let current_block: BlockNumberFor<T> = <frame_system::Pallet<T>>::block_number();
1622- // let duration: BlockNumberFor<T> = DissolveNetworkScheduleDuration::<T>::get();
1623- // let when: BlockNumberFor<T> = current_block.saturating_add(duration);
1624-
1625- // let call = Call::<T>::dissolve_network {
1626- // coldkey: who.clone(),
1627- // netuid,
1628- // };
1629-
1630- // let bound_call = T::Preimages::bound(LocalCallOf::<T>::from(call.clone()))
1631- // .map_err(|_| Error::<T>::FailedToSchedule)?;
1632-
1633- // T::Scheduler::schedule(
1634- // DispatchTime::At(when),
1635- // None,
1636- // 63,
1637- // frame_system::RawOrigin::Root.into(),
1638- // bound_call,
1639- // )
1640- // .map_err(|_| Error::<T>::FailedToSchedule)?;
1641-
1642- // // Emit the SwapScheduled event
1643- // Self::deposit_event(Event::DissolveNetworkScheduled {
1644- // account: who.clone(),
1645- // netuid,
1646- // execution_block: when,
1647- // });
1648-
1649- // Ok(().into())
1650- }
1651-
16521482 /// ---- Set prometheus information for the neuron.
16531483 /// # Args:
16541484 /// * 'origin': (<T as frame_system::Config>Origin):
0 commit comments