repo_name stringlengths 1 62 | dataset stringclasses 1
value | lang stringclasses 11
values | pr_id int64 1 20.1k | owner stringlengths 2 34 | reviewer stringlengths 2 39 | diff_hunk stringlengths 15 262k | code_review_comment stringlengths 1 99.6k |
|---|---|---|---|---|---|---|---|
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -367,23 +367,21 @@ pub mod pallet {
/// Duplicate proposals not allowed
DuplicateProposal,
/// Proposal must exist
- ProposalMissing,
- /// Mismatched index
- WrongIndex,
+ ProposalNotExists,
+ /// Index mismatched the proposal hash
+ IndexNotMatch... | Maybe "Index mismatched with the proposal hash" reads a bit better. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -367,23 +367,21 @@ pub mod pallet {
/// Duplicate proposals not allowed
DuplicateProposal,
/// Proposal must exist
- ProposalMissing,
- /// Mismatched index
- WrongIndex,
+ ProposalNotExists,
+ /// Index mismatched the proposal hash
+ IndexNotMatch... | I know the above was not changed. But still, "close call" has a specific meaning in English and we don't want that to intrude here. I suggest we say "The call to close the proposal was made too early, before the end of the voting." |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -367,23 +367,21 @@ pub mod pallet {
/// Duplicate proposals not allowed
DuplicateProposal,
/// Proposal must exist
- ProposalMissing,
- /// Mismatched index
- WrongIndex,
+ ProposalNotExists,
+ /// Index mismatched the proposal hash
+ IndexNotMatch... | Avoid possible misunderstandings by rewriting it as "The given weight-bound for the proposal was too low." |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -367,23 +367,21 @@ pub mod pallet {
/// Duplicate proposals not allowed
DuplicateProposal,
/// Proposal must exist
- ProposalMissing,
- /// Mismatched index
- WrongIndex,
+ ProposalNotExists,
+ /// Index mismatched the proposal hash
+ IndexNotMatch... | Avoid possible misunderstandings by rewriting it as "The given length-bound for the proposal was too low." |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -1118,7 +1118,7 @@ fn motions_all_first_vote_free_works() {
assert_eq!(close_rval.unwrap().pays_fee, Pays::No);
// trying to close the proposal, which is already closed. | remove the comma. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -1118,7 +1118,7 @@ fn motions_all_first_vote_free_works() {
assert_eq!(close_rval.unwrap().pays_fee, Pays::No);
// trying to close the proposal, which is already closed.
- // Expecting error "ProposalMissing" with Pays::Yes
+ // Expecting error "ProposalNotExists" with Pays::Yes | Something is missing here. What do we want the error to say here? Is it saying "you are expecting the error "proposalnotexists" with Pays::Yes but you should not expect it?" or ... ? |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -77,11 +77,11 @@ pub mod pallet {
#[pallet::error]
pub enum Error<T> {
/// Account passed too many additional fields to their commitment
- TooManyFields,
+ TooManyFieldsInCommitmentInfo,
/// Account isn't allow to make commitments to the chain
- CannotCommit,
+ ... | isn't allow → is not allowed |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -77,11 +77,11 @@ pub mod pallet {
#[pallet::error]
pub enum Error<T> {
/// Account passed too many additional fields to their commitment
- TooManyFields,
+ TooManyFieldsInCommitmentInfo,
/// Account isn't allow to make commitments to the chain
- CannotCommit,
+ ... | Account is trying to commit data too fast, rate limit exceeded |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -85,7 +85,7 @@ pub mod pallet {
/// Account attempted to register an identity but doesn't meet the requirements.
CannotRegister, | As a general rule of thumb, contractions like "aren't" or "doesn't" should be fully expanded. So, replace "aren't" with "are not" and "doesn't" with "does not". |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist, | The subnet does not exist. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | The root network does not exist. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | The user is trying to serve an axon which is not of type 4 (IPv4) or 6 (IPv6). |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | An invalid IP address is passed to the serve function. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | an → An |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | The hotkey is not registered in the subnet. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | The hotkey does not exist. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | The hotkey is not registered in any subnet. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | Request to stake, unstake or subscribe is made by a coldkey that is not associated with the hotkey account. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | The hotkey is not a delegate and the signer is not the owner of the hotkey. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | Stake amount to withdraw is zero |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | The caller requests removing more stake than that exists in the staking account. See: [remove_stake()].
I think the "[remove_stake()]" will create a link to the function, which is preferred. I am not 100% sure though. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | The caller requests to set weights but the caller has less than minimum stake required to set weights (less than WeightsMinStake). |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | The caller requests adding more stake than that exists in the coldkey account. See: [add_stake()].
I think the "[add_stake()]" will create a link to the function, which is preferred. I am not 100% sure though. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | The caller is trying to add stake, but for some reason the requested amount could not be withdrawn from the coldkey account. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | Is this saying "Successfully deducted, and now the balance available for withdrawal is zero"? Or is this saying, "Successfully withdrawn zero balance."? |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | The caller is attempting to set non-self weights without being a permitted validator. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | The caller is attempting to set the weight keys and values but these vectors have different size. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | The caller is attempting to set weights with duplicate UIDs in the weight matrix. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | The caller is attempting to set weight to at least one UID that does not exist in the metagraph. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | The dispatch is attempting to set weights on chain with fewer elements than are allowed. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | Number of registrations in this block exceeds the allowed number (i.e., exceeds the subnet hyperparameter "max_regs_per_block"). |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | The caller is requesting to register a neuron that already exists in the active set. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | The new hotkey is the same as old one |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | The supplied PoW hash block is in the future or negative. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -7,41 +7,53 @@ mod errors {
#[pallet::error]
pub enum Error<T> {
/// the network does not exist.
- NetworkDoesNotExist,
- /// an invalid modality attempted on serve.
- InvalidModality,
+ SubNetworkDoesNotExist,
+ /// the root network does not exist.
+ Root... | The supplied PoW hash block does not meet the network difficulty. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit. | The dispatch is attempting to set weights on chain with weight value exceeding the MaxWeightLimit (max_weight_limit subnet hyperparameter). |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | The hotkey is attempting to become a delegate when the hotkey is already a delegate. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | The hotkey is attempting to set weights twice within the duration of net_tempo/2 blocks. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | Attempting to set weights from a subnet validator with incorrect code base key.
Question: Is the above "code base key" the same as the "weight_version" subnet hyperparameter? If yes, then we should use the hyperparameter in the error description. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | An axon or prometheus serving exceeds the rate limit for a registered neuron. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | The caller is attempting to set weights with more UIDs than allowed. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | A transactor exceeded the rate limit for a network transaction. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | A transactor exceeded the rate limit for delegate transactions. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | A transactor exceeded the rate limit for setting or swapping hotkey. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | A transactor exceeded the rate limit for staking. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | A transactor exceeded the rate limit for unstaking. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | Registration is disabled |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | The number of registration attempts exceeded the allowed number in the interval. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | The hotkey passed is not the origin. The hotkey is required to be the origin. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | A hotkey is attempting to do something only senate members can do. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | Faucet is disabled. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | Not a subnet owner. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | Operation not permitted on the root subnet. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | A hotkey with too little stake is attempting to join the root subnet. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | All subnets are in the immunity period. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | Not enough balance to pay for swapping hotkey. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | Netuid does not match for setting root network weights |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | Cannot set weights for the root network. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | No neuron ID is available. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | Stake amount below the minimum threshold for nominator validations. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | Delegate take is too low. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | Delegate take is too high. |
subtensor | github_2023 | others | 433 | opentensor | rajkaramchedu | @@ -50,67 +62,65 @@ mod errors {
InvalidSeal,
/// the dispatch attempts to set weights on chain with where any normalized weight is more than MaxWeightLimit.
MaxWeightExceeded,
- /// tempo is not valid.
- InvalidTempo,
/// the hotkey attempts to become delegate when the... | No commit found for the provided hotkey+netuid combination when attempting to reveal the weights. |
subtensor | github_2023 | others | 429 | opentensor | camfairchild | @@ -528,18 +528,14 @@ impl<T: Config> Pallet<T> {
hash_as_vec
}
- #[allow(clippy::indexing_slicing)]
pub fn hash_block_and_hotkey(block_hash_bytes: &[u8; 32], hotkey: &T::AccountId) -> H256 {
- // Get the public key from the account id.
- let hotkey_pubkey: MultiAddress<T::AccountI... | This seems right to me |
subtensor | github_2023 | others | 286 | opentensor | distributedstatemachine | @@ -473,9 +481,9 @@ impl pallet_sudo::Config for Runtime {
parameter_types! {
// One storage item; key size is 32; value is size 4+4+16+32 bytes = 56 bytes.
- pub const DepositBase: Balance = (1) as Balance * 2_000 * 10_000 + (88 as Balance) * 100 * 10_000;
+ pub const DepositBase: Balance = deposit(1, 88... | Where does this figure come from ? The calculation doesnt seem to match the comments |
subtensor | github_2023 | others | 286 | opentensor | distributedstatemachine | @@ -489,6 +497,121 @@ impl pallet_multisig::Config for Runtime {
type WeightInfo = pallet_multisig::weights::SubstrateWeight<Runtime>;
}
+// Proxy Pallet config
+parameter_types! {
+ // One storage item; key size sizeof(AccountId) = 32, value sizeof(Balance) = 8; 40 total
+ pub const ProxyDepositBase: Bal... | Note to self: Rebase stao off development so we can capture this |
subtensor | github_2023 | others | 400 | opentensor | camfairchild | @@ -65,11 +72,12 @@ pub mod pallet {
MaxAllowedUIdsNotAllowed,
}
- // Dispatchable functions allows users to interact with the pallet and invoke state changes.
- // These functions materialize as "extrinsics", which are often compared to transactions.
- // Dispatchable functions must be annotat... | ```suggestion
/// The extrinsic sets the new authorities for Aura consensus.
```
|
subtensor | github_2023 | others | 400 | opentensor | camfairchild | @@ -759,6 +869,9 @@ pub mod pallet {
Ok(())
}
+ /// The extrinsic sets the recycled RAO for a subnet.
+ /// It is only callable by the root account.
+ /// The extrinsic will call the Subtensor pallet to set the recycled RAO. | Please correct to the below call |
subtensor | github_2023 | others | 400 | opentensor | camfairchild | @@ -788,6 +902,9 @@ pub mod pallet {
Ok(())
}
+ /// The extrinsic sets the maximum stake required for nominators.
+ /// It is only callable by the root account.
+ /// The extrinsic will call the Subtensor pallet to set the maximum stake required for nominators. | Please correct for the below call |
subtensor | github_2023 | others | 400 | opentensor | orriin | @@ -207,50 +253,61 @@ pub mod pallet {
pub(super) type SenateRequiredStakePercentage<T> =
StorageValue<_, u64, ValueQuery, DefaultSenateRequiredStakePercentage<T>>;
- // ============================
- // ==== Staking + Accounts ====
- // ============================
+ /// ===================... | ```suggestion
// ============================
// ==== Staking + Accounts ====
// ============================
/// Total Rao in circulation.
#[pallet::type_value]
``` |
subtensor | github_2023 | others | 400 | opentensor | orriin | @@ -307,45 +364,55 @@ pub mod pallet {
DefaultAccountTake<T>,
>;
- // =====================================
- // ==== Difficulty / Registrations =====
- // =====================================
+ /// =====================================
+ /// ==== Difficulty / Registrations =====
+ //... | ```suggestion
/// =====================================
/// Default last adjustment block.
``` |
subtensor | github_2023 | others | 400 | opentensor | camfairchild | @@ -258,6 +293,9 @@ pub mod pallet {
Ok(())
}
+ /// The extrinsic sets the adjustment beta for a subnet.
+ /// It is only callable by the root account.
+ /// The extrinsic will call the Subtensor pallet to set the adjustment beta. | please correct for the below call |
subtensor | github_2023 | others | 400 | opentensor | orriin | @@ -380,69 +447,85 @@ pub mod pallet {
pub type RAORecycledForRegistration<T> =
StorageMap<_, Identity, u16, u64, ValueQuery, DefaultRAORecycledForRegistration<T>>;
- // ==============================
- // ==== Subnetworks Storage =====
- // ==============================
+ /// =============... | ```suggestion
/// ==============================
/// Default number of networks.
``` |
subtensor | github_2023 | others | 400 | opentensor | orriin | @@ -508,34 +591,41 @@ pub mod pallet {
pub type NominatorMinRequiredStake<T> =
StorageValue<_, u64, ValueQuery, DefaultNominatorMinRequiredStake<T>>;
- // ==============================
- // ==== Subnetwork Features =====
- // ==============================
+ /// ============================... | ```suggestion
/// ==============================
/// Default value for emission values.
``` |
subtensor | github_2023 | others | 400 | opentensor | orriin | @@ -640,77 +748,95 @@ pub mod pallet {
OptionQuery,
>;
- // =======================================
- // ==== Subnetwork Hyperparam storage ====
- // =======================================
+ /// =======================================
+ /// ==== Subnetwork Hyperparam storage ====
+ //... | ```suggestion
/// =======================================
/// Default weights set rate limit.
``` |
subtensor | github_2023 | others | 400 | opentensor | orriin | @@ -786,29 +912,35 @@ pub mod pallet {
pub type AdjustmentAlpha<T: Config> =
StorageMap<_, Identity, u16, u64, ValueQuery, DefaultAdjustmentAlpha<T>>;
- // =======================================
- // ==== Subnetwork Consensus Storage ====
- // =======================================
+ /// ... | ```suggestion
/// =======================================
/// Value definition for vector of u16.
``` |
subtensor | github_2023 | others | 400 | opentensor | orriin | @@ -1344,36 +1476,36 @@ pub mod pallet {
Self::do_decrease_take(origin, hotkey, take)
}
- // --- Allows delegates to increase its take value. This call is rate-limited.
- //
- // # Args:
- // * 'origin': (<T as frame_system::Config>::Origin):
- // - The sign... | do you mean
```suggestion
/// * TakeIncreased;
/// - On successfully setting a increased take for this hotkey.
``` |
subtensor | github_2023 | others | 400 | opentensor | orriin | @@ -1344,36 +1476,36 @@ pub mod pallet {
Self::do_decrease_take(origin, hotkey, take)
}
- // --- Allows delegates to increase its take value. This call is rate-limited.
- //
- // # Args:
- // * 'origin': (<T as frame_system::Config>::Origin):
- // - The sign... | ```suggestion
/// greater than the previous value. T is the new value (rational number),
``` |
subtensor | github_2023 | others | 400 | opentensor | orriin | @@ -1344,36 +1476,36 @@ pub mod pallet {
Self::do_decrease_take(origin, hotkey, take)
}
- // --- Allows delegates to increase its take value. This call is rate-limited.
- //
- // # Args:
- // * 'origin': (<T as frame_system::Config>::Origin):
- // - The sign... | ```suggestion
/// - The delegate is setting a take which is not greater than the previous.
``` |
subtensor | github_2023 | others | 400 | opentensor | camfairchild | @@ -104,6 +118,9 @@ pub mod pallet {
Ok(())
}
+ /// The extrinsic sets the serving rate limit for a subnet.
+ /// It is only callable by the root account. | Please fix this line for each call that allows the subnet owner OR the root account |
subtensor | github_2023 | others | 400 | opentensor | orriin | @@ -1430,38 +1561,37 @@ pub mod pallet {
Self::do_add_stake(origin, hotkey, amount_staked)
}
- // ---- Remove stake from the staking account. The call must be made
- // from the coldkey account attached to the neuron metadata. Only this key
- // has permission to make stakin... | ```suggestion
/// Remove stake from the staking account. The call must be made
``` |
subtensor | github_2023 | others | 400 | opentensor | orriin | @@ -1782,7 +1942,7 @@ pub mod pallet {
// ---- Subtensor helper functions.
impl<T: Config> Pallet<T> {
- // --- Returns the transaction priority for setting weights.
+ /// --- Returns the transaction priority for setting weights. | ```suggestion
/// Returns the transaction priority for setting weights.
``` |
subtensor | github_2023 | others | 400 | opentensor | orriin | @@ -1794,12 +1954,13 @@ pub mod pallet {
0
}
- // --- Is the caller allowed to set weights
+ /// --- Is the caller allowed to set weights | ```suggestion
/// Is the caller allowed to set weights
``` |
subtensor | github_2023 | others | 400 | opentensor | camfairchild | @@ -654,6 +746,9 @@ pub mod pallet {
Ok(())
}
+ /// The extrinsic sets the network lock for the network.
+ /// It is only callable by the root account.
+ /// The extrinsic will call the Subtensor pallet to set the network lock. | Please correct for the below call |
subtensor | github_2023 | others | 400 | opentensor | orriin | @@ -86,7 +86,7 @@ impl<T: Config> Pallet<T> {
Error::<T>::ServingRateLimitExceeded
);
- // --- 6. We insert the axon meta.
+ // --- 5. We insert the axon meta. | I think we should remove these numbers, they're a pain to maintain |
subtensor | github_2023 | others | 400 | opentensor | camfairchild | @@ -667,6 +762,9 @@ pub mod pallet {
Ok(())
}
+ /// The extrinsic sets the network lock for the network.
+ /// It is only callable by the root account.
+ /// The extrinsic will call the Subtensor pallet to set the network lock. | Please correct for the below call |
subtensor | github_2023 | others | 400 | opentensor | camfairchild | @@ -687,6 +785,9 @@ pub mod pallet {
Ok(())
}
+ /// The extrinsic sets the network lock for the network.
+ /// It is only callable by the root account.
+ /// The extrinsic will call the Subtensor pallet to set the network lock. | ```suggestion
/// The extrinsic sets the minimum network lock cost for the network.
/// It is only callable by the root account.
/// The extrinsic will call the Subtensor pallet to set the minimum network lock cost.
```
|
subtensor | github_2023 | others | 400 | opentensor | keithtensor | @@ -57,6 +57,7 @@ pub mod subnet_info;
extern crate alloc;
pub mod migration;
+#[deny(missing_docs)] | We should just do a crate-wide deny by using `#![deny(missing_docs)]` |
subtensor | github_2023 | others | 400 | opentensor | rajkaramchedu | @@ -624,6 +710,9 @@ pub mod pallet {
Ok(())
}
+ /// The extrinsic sets the network rate limit for the network.
+ /// It is only callable by the root account.
+ /// The extrinsic will call the Subtensor pallet to set the network rate limit. | Some docstrings say "for the network" and others "for the subnet". We should clarify how "for the network" differs from "for the subnet", and also clarify "for the network" if root account still synonymous with the subnet owner? |
subtensor | github_2023 | others | 400 | opentensor | rajkaramchedu | @@ -209,6 +238,9 @@ pub mod pallet {
Ok(())
}
+ /// The extrinsic sets the adjustment interval for a subnet.
+ /// It is only callable by the root account. | We currently say in our docs that this hyperparam must not be changed. Should the doc be revised to say a subnet owner can now change this param? See https://github.com/opentensor/bittensor/blob/staging/bittensor/commands/network.py#L307 (only changeable hyperparams are in this list, should we update this list?) cc: @g... |
subtensor | github_2023 | others | 396 | opentensor | gztensor | @@ -324,4 +378,49 @@ impl<T: Config> Pallet<T> {
// we should expect at most subnetwork_n uids.
uids.len() <= subnetwork_n as usize
}
+
+ pub fn can_commit(netuid: u16, who: &T::AccountId) -> bool {
+ if let Some((_hash, commit_block)) = WeightCommits::<T>::get(netuid, who) {
+ ... | current_block >= interval_start seems to be always true |
subtensor | github_2023 | others | 396 | opentensor | Rapperswil | @@ -1,8 +1,62 @@
use super::*;
use crate::math::*;
+use sp_core::H256;
+use sp_runtime::traits::{BlakeTwo256, Hash};
+use sp_runtime::SaturatedConversion;
use sp_std::vec;
impl<T: Config> Pallet<T> {
+ pub fn do_commit_weights(
+ origin: T::RuntimeOrigin,
+ netuid: u16,
+ commit_hash: H256... | if you include the account nonce in the hash, is the caller allowed to do any transaction between the commit and the reveal ? |
subtensor | github_2023 | others | 396 | opentensor | distributedstatemachine | @@ -1196,6 +1218,32 @@ pub mod pallet {
Self::do_set_weights(origin, netuid, dests, weights, version_key)
}
+ #[pallet::call_index(96)]
+ #[pallet::weight((Weight::from_parts(10_151_000_000, 0) | Can we benchmark these to arrive at the weights ? Intuition says the commits will be cheaper than the previous set_weights function , and reveals more expensive |
subtensor | github_2023 | others | 396 | opentensor | distributedstatemachine | @@ -1,8 +1,62 @@
use super::*;
use crate::math::*;
+use sp_core::H256;
+use sp_runtime::traits::{BlakeTwo256, Hash};
use sp_std::vec;
impl<T: Config> Pallet<T> {
+ pub fn do_commit_weights( | Can we please add rust docs for these |
subtensor | github_2023 | others | 396 | opentensor | distributedstatemachine | @@ -1,8 +1,62 @@
use super::*;
use crate::math::*;
+use sp_core::H256;
+use sp_runtime::traits::{BlakeTwo256, Hash};
use sp_std::vec;
impl<T: Config> Pallet<T> {
+ pub fn do_commit_weights(
+ origin: T::RuntimeOrigin,
+ netuid: u16,
+ commit_hash: H256,
+ ) -> DispatchResult {
+ ... | rust docs please |
subtensor | github_2023 | others | 396 | opentensor | distributedstatemachine | @@ -1230,6 +1247,34 @@ pub mod pallet {
Self::do_commit_weights(origin, netuid, commit_hash)
}
+ // ---- Used to reveal the weights for a previously commited hash. | Can we please use actual rust doc syntax i.e. `///` ? |
subtensor | github_2023 | others | 411 | opentensor | open-junius | @@ -260,6 +260,18 @@ pub fn inplace_normalize_64(x: &mut [I64F64]) {
x.iter_mut().for_each(|value| *value /= x_sum);
}
+// Normalizes (sum to 1 except 0) each row (dim=0) of a I64F64 matrix in-place.
+#[allow(dead_code)]
+pub fn inplace_row_normalize_64(x: &mut [Vec<I64F64>]) {
+ for row in x { | for each row, can reuse and call inplace_normalize_64. |
subtensor | github_2023 | others | 391 | opentensor | distributedstatemachine | @@ -184,18 +184,18 @@ fn test_proxy_pallet() {
call_register,
];
- for call in calls.iter() {
- for proxy_type in proxy_types.iter() {
- new_test_ext().execute_with(|| {
- assert_ok!(Proxy::add_proxy(
- RuntimeOrigin::signed(AccountId::from(ACCOUNT)... | Why is this commented out ? If is not needed anymore would it make sesne to delete it ? |
subtensor | github_2023 | others | 391 | opentensor | distributedstatemachine | @@ -172,7 +172,7 @@ fn test_proxy_pallet() {
ProxyType::Registration,
];
- let calls = [
+ let _calls = [ | Also this , its not being used anymore ? |
subtensor | github_2023 | others | 335 | opentensor | distributedstatemachine | @@ -577,6 +577,135 @@ impl<T: Config> Pallet<T> {
Ok(())
}
+ pub fn do_set_root_weights(
+ origin: T::RuntimeOrigin,
+ netuid: u16,
+ hotkey: T::AccountId,
+ uids: Vec<u16>,
+ values: Vec<u16>,
+ version_key: u64,
+ ) -> dispatch::DispatchResult {
+ ... |
```suggestion
log::trace!(
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.