Admin

Sudo logic for calling select functions throughout select pallets

Overview

The admin pallet is responsible for the logic of parameterizing the network. This pallet will transition into a governance-owned functionality as the blockchain matures.

Functions

Note:

The following functions can only be called by the Sudo Account.


Model Vote In

pub fn set_vote_model_in(origin: OriginFor<T>, value: Vec<u8>) -> DispatchResult

Storage

ModelVoteIn

Parameters


Model Vote Out

pub fn set_vote_model_out(origin: OriginFor<T>, value: Vec<u8>) -> DispatchResult

Storage

ModelVoteOut

Parameters


Max Models

pub fn set_max_models(origin: OriginFor<T>, value: u32) -> DispatchResult

Storage

MaxModels

Parameters

  • value: The maximum models.


Min Model Peers

pub fn set_min_model_peers(origin: OriginFor<T>, value: u32) -> DispatchResult

Storage

MinModelPeers

Parameters

  • value: The minimum model peers per model.


Max Model Peers

pub fn set_max_model_peers(origin: OriginFor<T>, value: u32) -> DispatchResult

Storage

MaxModelPeers

Parameters

  • value: The maximum model peers per model.


Min Stake Balance

pub fn set_min_stake_balance(origin: OriginFor<T>, value: u32) -> DispatchResult

Storage

MinStakeBalance

Parameters

  • value: The minimum required stake balance for each peer towards a model.


Tx Rate Limit

pub fn set_tx_rate_limit(origin: OriginFor<T>, value: u64) -> DispatchResult

Storage

TxRateLimit

Parameters

  • value: The transaction rate limit.


Max Zero Consensus Epochs

pub fn set_max_zero_consensus_epochs(origin: OriginFor<T>, value: u32) -> DispatchResult

Storage

MaxConsensusEpochErrors

Parameters

  • value: The maximum amount of zero consensus epochs per model.


Min Required Model Consensus Submit Epochs

pub fn set_min_required_model_consensus_submit_epochs(origin: OriginFor<T>, value: u64) -> DispatchResult

Storage

MinRequiredModelConsensusSubmitEpochs

Parameters

  • value: The minimum required epochs for a model to begin accepting consensus submissions.


Min Required Peer Consensus Submit Epochs

pub fn set_min_required_peer_consensus_submit_epochs(origin: OriginFor<T>, value: u64) -> DispatchResult

Storage

MinRequiredPeerConsensusSubmitEpochs

Parameters

  • value: The minimum required epochs for a peer to begin submitting consensus data.


Min Required Peer Consensus Inclusion Epochs

pub fn set_min_required_peer_consensus_inclusion_epochs(origin: OriginFor<T>, value: u64) -> DispatchResult

Storage

MinRequiredPeerConsensusInclusionEpochs

Parameters

  • value: The minimum required epochs for a peer to be included, required, and accepted in peer consensus.


Max Outlier Delta Percent

pub fn set_max_outlier_delta_percent(origin: OriginFor<T>, value: u8) -> DispatchResult

Storage

MaximumOutlierDeltaPercent

Parameters

  • value: The maximum percent delta a score of a peer another peer submits can be away from the average resulted score.


Model Peer Consensus Submit Percent Requirement

pub fn set_model_peer_consensus_submit_percent_requirement(origin: OriginFor<T>, value: u128) -> DispatchResult

Storage

ModelPeerConsensusSubmitPercentRequirement

Parameters

  • value: The required percentage of peers to submit data to form consensus.


Consensus Blocks Interval

pub fn set_consensus_blocks_interval(origin: OriginFor<T>, value: u64) -> DispatchResult

Storage

ConsensusBlockInterval

Parameters

  • value: Blocks per consensus epoch.


Peer Removal Threshold

pub fn set_peer_removal_threshold(origin: OriginFor<T>, value: u128) -> DispatchResult

Storage

PeerRemovalThreshold

Parameters

  • value: The required percentage of consensus to remove a peer.


Max Model Rewards Weight

pub fn set_max_model_rewards_weight(origin: OriginFor<T>, value: u128) -> DispatchResult

Storage

MaxModelRewardsWeight

Parameters

  • value: The maximum percentage of rewards any model can have.


Max Model Rewards Weight

pub fn set_stake_reward_weight(origin: OriginFor<T>, value: u128) -> DispatchResult

Storage

StakeRewardWeight

Parameters

  • value: The percentage of the stake vault to be distributed based on model validator stake balances.


Max Model Per Peer Initialization Cost

pub fn set_model_per_peer_init_cost(origin: OriginFor<T>, value: u128) -> DispatchResult

Storage

ModelPerPeerInitCost

Parameters

  • value: The value of the model peer multiplier cost to initialize a model.


Remove Model Peer Epoch Percentage

pub fn set_remove_model_peer_epoch_percentage(origin: OriginFor<T>, value: u128) -> DispatchResult

Storage

RemoveModelPeerEpochPercentage

Parameters

  • value: The percentage value of an epoch where a model can be updated or removed.


Model Consensus Unconfirmed Threshold

pub fn set_model_consensus_unconfirmed_threshold(origin: OriginFor<T>, value: u128) -> DispatchResult

Storage

ModelConsensusUnconfirmedThreshold

Parameters

  • value: The threshold value to unconfirm an epoch's consensus for a model.

Last updated