Skip to content

Commit 5049214

Browse files
authored
Merge pull request #84 from latent-to/errors
Errors
2 parents 60931c4 + 8fbebf6 commit 5049214

File tree

2 files changed

+100
-4
lines changed

2 files changed

+100
-4
lines changed

docs/errors/custom.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,26 @@ Related:
100100
**Error**: `ZeroMaxAmount`
101101
**Description**: The executable amount must be greater than zero.
102102

103+
### Error Code 15
104+
105+
**Error**: `InvalidRevealRound`
106+
**Description**: The provided reveal round is outdated or invalid.
107+
108+
### Error Code 16
109+
110+
**Error**: `CommitNotFound`
111+
**Description**: The referenced validator commit does not exist.
112+
113+
### Error Code 17
114+
115+
**Error**: `CommitBlockNotInRevealRange`
116+
**Description**: The referenced commit cannot be revealed in the current block range.
117+
118+
### Error Code 18
119+
120+
**Error**: `InputLengthsUnequal`
121+
**Description**: Attempted to batch reveal weights with mismatched vector input lenghts.
122+
103123
### Error Code 255
104124

105125
**Error**: `BadRequest`

docs/errors/subtensor.md

Lines changed: 80 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ title: "Subtensor Standard Errors"
66

77
This page documents the standard errors that can arise from Subtensor, the blockchain underlying the Bittensor network.
88

9-
Related:
9+
Related:
10+
1011
- [Source code in GitHub](https://github.com/opentensor/subtensor/blob/main/pallets/subtensor/src/macros/errors.rs)
1112
- [Subtensor Custom Errors](./custom.md)
12-
- [Substrate Errors](https://polkadot.js.org/docs/substrate/errors/) - Errors from the underlying Substrate framework
13+
- [Substrate Errors](https://polkadot.js.org/docs/substrate/errors/) - Errors from the underlying Substrate framework
1314

14-
1515
## Network and Subnet Errors
1616

1717
### `SubNetworkDoesNotExist`
@@ -21,6 +21,7 @@ The specified subnet does not exist.
2121
### `RootNetworkDoesNotExist`
2222

2323
The root network does not exist.
24+
2425
<!-- Why would this ever happen? only local build? -->
2526

2627
### `SubnetNotExists`
@@ -42,11 +43,13 @@ Operation is not permitted on the root subnet.
4243
### `AllNetworksInImmunity`
4344

4445
All subnets are in the immunity period.
46+
4547
<!-- umm why? -->
4648

4749
### `MechanismDoesNotExist`
4850

4951
Trying to register a subnet into a mechanism that does not exist.
52+
5053
<!-- wth does this mean? -->
5154

5255
### `SubNetRegistrationDisabled`
@@ -111,6 +114,10 @@ Public key cannot be recovered.
111114

112115
Recovered public key is invalid.
113116

117+
### `HotKeySwapOnSubnetIntervalNotPassed`
118+
119+
Attempting a hotkey swap on subnet too frequently.
120+
114121
## Stake and Balance Errors
115122

116123
### `NotEnoughStake`
@@ -185,6 +192,10 @@ Transaction slippage is above your limit.
185192

186193
Transfers are disallowed on this subnet.
187194

195+
### `InsufficientBalance`
196+
197+
The caller does not have enough balance for the operation.
198+
188199
## Weight Setting Errors
189200

190201
### `NeuronNoValidatorPermit`
@@ -271,6 +282,18 @@ Alpha high value is too low (> 0.8 required).
271282

272283
Alpha low value is out of allowed range (0 < alpha_low < 0.8).
273284

285+
### `IncorrectCommitRevealVersion`
286+
287+
Incorrect commit-reveal version.
288+
289+
### `RevealPeriodTooLarge`
290+
291+
Reveal period is too large.
292+
293+
### `RevealPeriodTooSmall`
294+
295+
Reveal period is too small.
296+
274297
## Rate Limiting Errors
275298

276299
### `ServingRateLimitExceeded`
@@ -301,6 +324,10 @@ Default transaction rate limit exceeded.
301324

302325
Childkey take rate limit exceeded.
303326

327+
### `StakingOperationRateLimitExceeded`
328+
329+
Attempting staking operations too frequently.
330+
304331
## Registration and Network Management
305332

306333
### `TooManyRegistrationsThisBlock`
@@ -355,12 +382,50 @@ Proportion overflow when setting children.
355382

356383
### `TooManyChildren`
357384

358-
Too many children.
385+
Too many children.
359386

360387
### `InvalidChildkeyTake`
361388

362389
Childkey take is invalid.
363390

391+
## Subnet Leasing Errors
392+
393+
### `InvalidLeaseBeneficiary`
394+
395+
Invalid lease beneficiary to register the leased network.
396+
397+
### `LeaseCannotEndInThePast`
398+
399+
Lease cannot end in the past.
400+
401+
### `LeaseNetuidNotFound`
402+
403+
Couldn't find the lease netuid.
404+
405+
### `LeaseDoesNotExist`
406+
407+
Lease does not exist.
408+
409+
### `LeaseHasNoEndBlock`
410+
411+
Lease has no end block.
412+
413+
### `LeaseHasNotEnded`
414+
415+
Lease has not ended.
416+
417+
### `Overflow`
418+
419+
An overflow occurred.
420+
421+
### `BeneficiaryDoesNotOwnHotkey`
422+
423+
Beneficiary does not own hotkey.
424+
425+
### `ExpectedBeneficiaryOrigin`
426+
427+
Expected beneficiary origin.
428+
364429
## Other Errors
365430

366431
### `InvalidIpType`
@@ -419,3 +484,14 @@ SubToken disabled.
419484

420485
Invalid netuid duplication.
421486

487+
### `SymbolDoesNotExist`
488+
489+
Symbol does not exist.
490+
491+
### `SymbolAlreadyInUse`
492+
493+
Symbol already in use.
494+
495+
### `InvalidValue`
496+
497+
Generic error for out-of-range parameter value

0 commit comments

Comments
 (0)