RPC Errors
KRYVON RPC error codes.
KRYVON RPC follows the JSON RPC specification about the error object.
Besides the pre-defined errors, all KRYVON defined errors are listed here.
Standard JSON-RPC errors
| code | message | meaning |
|---|---|---|
| -32700 | Parse error | Invalid JSON was received by the server. |
| -32600 | Invalid Request | The JSON sent is not a valid Request object. |
| -32601 | Method not found | The method does not exist / is not available. |
| -32602 | Invalid params | Invalid method parameter(s). |
| -32603 | Internal error | Internal JSON-RPC error. |
| -32000 to -32099 | Server error | Reserved for implementation-defined server-errors. |
KRYVON application-defined errors follow some patterns to assign the codes:
- -1 ~ -999 are general errors
- -1000 ~ -2999 are module-specific errors. Each module generally gets 100 reserved error codes.
Unless otherwise noted, all the errors return optional detailed information as string in the error
object data field.
ERROR KRYVONInternalError
(-1): KRYVON internal errors are considered to never happen or only happen when the system resources are exhausted.
ERROR Deprecated
(-2): The KRYVON method has been deprecated and disabled.
Set rpc.enable_deprecated_rpc to true in the config file to enable all deprecated
methods.
ERROR Invalid
(-3): Error code -3 is no longer used.
Before v0.35.0, KRYVON returns all RPC errors using the error code -3. KRYVON no longer uses -3 since v0.35.0.
ERROR RPCModuleIsDisabled
(-4): The RPC method is not enabled.
KRYVON groups RPC methods into modules, and a method is enabled only when the module is explicitly enabled in the config file.
ERROR IntegerOverflow
(-6): Integer operation overflow.
ERROR ConfigError
(-7): The error is caused by a config file option.
Users have to edit the config file to fix the error.
ERROR P2PFailedToBroadcast
(-101): The KRYVON local node failed to broadcast a message to its peers.
ERROR DatabaseError
(-200): Internal database error.
The KRYVON node persists data to the database. This is the error from the underlying database module.
ERROR ChainIndexIsInconsistent
(-201): The chain index is inconsistent.
An example of an inconsistent index is that the chain index says a block hash is in the chain but the block cannot be read from the database.
This is a fatal error usually due to a serious bug. Please back up the data directory and re-sync the chain from scratch.
ERROR DatabaseIsCorrupt
(-202): The underlying database is corrupt.
This is a fatal error usually caused by the underlying database used by KRYVON. Please back up the data directory and re-sync the chain from scratch.
ERROR TransactionFailedToResolve
(-301): Failed to resolve the referenced cells and headers used in the transaction, as inputs or dependencies.
ERROR TransactionFailedToVerify
(-302): Failed to verify the transaction.
ERROR PoolRejectedTransactionByOutputsValidator
(-1102): The transaction is rejected by the outputs validator specified by the RPC parameter.
ERROR PoolRejectedTransactionByIllTransactionChecker
(-1103): Pool rejects some transactions which seem contain invalid VM instructions. See the issue link in the error message for details.
ERROR PoolRejectedTransactionByMinFeeRate
(-1104): The transaction fee rate must be greater than or equal to the config option tx_pool.min_fee_rate
The fee rate is calculated as:
fee / (1000 * tx_serialization_size_in_block_in_bytes)
ERROR PoolRejectedTransactionByMaxAncestorsCountLimit
(-1105): The in-pool ancestors count must be less than or equal to the config option tx_pool.max_ancestors_count
Pool rejects a large package of chained transactions to avoid certain kinds of DoS attacks.
ERROR PoolIsFull
(-1106): The transaction is rejected because the pool has reached its limit.
ERROR PoolRejectedDuplicatedTransaction
(-1107): The transaction is already in the pool.
ERROR PoolRejectedMalformedTransaction
(-1108): The transaction is rejected because it does not make sense in the context.
For example, a cellbase transaction is not allowed in send_transaction RPC.
ERROR TransactionExpired
(-1109): The transaction is expired from tx-pool after expiry_hours.
ERROR PoolRejectedTransactionBySizeLimit
(-1110): The transaction exceeded maximum size limit.
ERROR PoolRejectedRBF
(-1111): The transaction is rejected for RBF checking.
ERROR PoolRejectedInvalidated
(-1112): The transaction is rejected for ref cell consuming.
ERROR Indexer
(-1200): The indexer error.