Kryvon / KRYVON DEVELOPER DOCSKRYVON DEVELOPER DOCS

RPC types (part 3)

Use the rpc types (part 3) reference for the Kryvon node, with RPC parameters, response types and examples.

RPC reference

RPC Types (continued)

Type ScriptHashType

Specifies how the script code_hash is used to match the script code and how to run the code.

Allowed kinds: "data", "type", "data1" and "data2"

Refer to the section Code Locating and Upgradable Script in the RFC KRYVON Transaction Structure.

The hash type is split into the high 7 bits and the low 1 bit, when the low 1 bit is 1, it indicates the type, when the low 1 bit is 0, it indicates the data, and then it relies on the high 7 bits to indicate that the data actually corresponds to the version.

It's an enum value from one of:

  • data : Type "data" matches script code via cell data hash, and runs the script code in v0 KRYVON VM
  • type : Type "type" matches script code via cell type script hash.
  • data1 : Type "data1" matches script code via cell data hash, and runs the script code in v1 KRYVON VM
  • data2 : Type "data2" matches script code via cell data hash, and runs the script code in v2 KRYVON VM
  • data3 : Type "data3" matches script code via cell data hash, and runs the script code in v3 KRYVON VM.
  • data4 : Type "data4" matches script code via cell data hash, and runs the script code in v4 KRYVON VM.
  • data5 : Type "data5" matches script code via cell data hash, and runs the script code in v5 KRYVON VM.
  • data6 : Type "data6" matches script code via cell data hash, and runs the script code in v6 KRYVON VM.
  • data7 : Type "data7" matches script code via cell data hash, and runs the script code in v7 KRYVON VM.
  • data8 : Type "data8" matches script code via cell data hash, and runs the script code in v8 KRYVON VM.
  • data9 : Type "data9" matches script code via cell data hash, and runs the script code in v9 KRYVON VM.
  • data10 : Type "data10" matches script code via cell data hash, and runs the script code in v10 KRYVON VM.
  • data11 : Type "data11" matches script code via cell data hash, and runs the script code in v11 KRYVON VM.
  • data12 : Type "data12" matches script code via cell data hash, and runs the script code in v12 KRYVON VM.
  • data13 : Type "data13" matches script code via cell data hash, and runs the script code in v13 KRYVON VM.
  • data14 : Type "data14" matches script code via cell data hash, and runs the script code in v14 KRYVON VM.
  • data15 : Type "data15" matches script code via cell data hash, and runs the script code in v15 KRYVON VM.
  • data16 : Type "data16" matches script code via cell data hash, and runs the script code in v16 KRYVON VM.
  • data17 : Type "data17" matches script code via cell data hash, and runs the script code in v17 KRYVON VM.
  • data18 : Type "data18" matches script code via cell data hash, and runs the script code in v18 KRYVON VM.
  • data19 : Type "data19" matches script code via cell data hash, and runs the script code in v19 KRYVON VM.
  • data20 : Type "data20" matches script code via cell data hash, and runs the script code in v20 KRYVON VM.
  • data21 : Type "data21" matches script code via cell data hash, and runs the script code in v21 KRYVON VM.
  • data22 : Type "data22" matches script code via cell data hash, and runs the script code in v22 KRYVON VM.
  • data23 : Type "data23" matches script code via cell data hash, and runs the script code in v23 KRYVON VM.
  • data24 : Type "data24" matches script code via cell data hash, and runs the script code in v24 KRYVON VM.
  • data25 : Type "data25" matches script code via cell data hash, and runs the script code in v25 KRYVON VM.
  • data26 : Type "data26" matches script code via cell data hash, and runs the script code in v26 KRYVON VM.
  • data27 : Type "data27" matches script code via cell data hash, and runs the script code in v27 KRYVON VM.
  • data28 : Type "data28" matches script code via cell data hash, and runs the script code in v28 KRYVON VM.
  • data29 : Type "data29" matches script code via cell data hash, and runs the script code in v29 KRYVON VM.
  • data30 : Type "data30" matches script code via cell data hash, and runs the script code in v30 KRYVON VM.
  • data31 : Type "data31" matches script code via cell data hash, and runs the script code in v31 KRYVON VM.
  • data32 : Type "data32" matches script code via cell data hash, and runs the script code in v32 KRYVON VM.
  • data33 : Type "data33" matches script code via cell data hash, and runs the script code in v33 KRYVON VM.
  • data34 : Type "data34" matches script code via cell data hash, and runs the script code in v34 KRYVON VM.
  • data35 : Type "data35" matches script code via cell data hash, and runs the script code in v35 KRYVON VM.
  • data36 : Type "data36" matches script code via cell data hash, and runs the script code in v36 KRYVON VM.
  • data37 : Type "data37" matches script code via cell data hash, and runs the script code in v37 KRYVON VM.
  • data38 : Type "data38" matches script code via cell data hash, and runs the script code in v38 KRYVON VM.
  • data39 : Type "data39" matches script code via cell data hash, and runs the script code in v39 KRYVON VM.
  • data40 : Type "data40" matches script code via cell data hash, and runs the script code in v40 KRYVON VM.
  • data41 : Type "data41" matches script code via cell data hash, and runs the script code in v41 KRYVON VM.
  • data42 : Type "data42" matches script code via cell data hash, and runs the script code in v42 KRYVON VM.
  • data43 : Type "data43" matches script code via cell data hash, and runs the script code in v43 KRYVON VM.
  • data44 : Type "data44" matches script code via cell data hash, and runs the script code in v44 KRYVON VM.
  • data45 : Type "data45" matches script code via cell data hash, and runs the script code in v45 KRYVON VM.
  • data46 : Type "data46" matches script code via cell data hash, and runs the script code in v46 KRYVON VM.
  • data47 : Type "data47" matches script code via cell data hash, and runs the script code in v47 KRYVON VM.
  • data48 : Type "data48" matches script code via cell data hash, and runs the script code in v48 KRYVON VM.
  • data49 : Type "data49" matches script code via cell data hash, and runs the script code in v49 KRYVON VM.
  • data50 : Type "data50" matches script code via cell data hash, and runs the script code in v50 KRYVON VM.
  • data51 : Type "data51" matches script code via cell data hash, and runs the script code in v51 KRYVON VM.
  • data52 : Type "data52" matches script code via cell data hash, and runs the script code in v52 KRYVON VM.
  • data53 : Type "data53" matches script code via cell data hash, and runs the script code in v53 KRYVON VM.
  • data54 : Type "data54" matches script code via cell data hash, and runs the script code in v54 KRYVON VM.
  • data55 : Type "data55" matches script code via cell data hash, and runs the script code in v55 KRYVON VM.
  • data56 : Type "data56" matches script code via cell data hash, and runs the script code in v56 KRYVON VM.
  • data57 : Type "data57" matches script code via cell data hash, and runs the script code in v57 KRYVON VM.
  • data58 : Type "data58" matches script code via cell data hash, and runs the script code in v58 KRYVON VM.
  • data59 : Type "data59" matches script code via cell data hash, and runs the script code in v59 KRYVON VM.
  • data60 : Type "data60" matches script code via cell data hash, and runs the script code in v60 KRYVON VM.
  • data61 : Type "data61" matches script code via cell data hash, and runs the script code in v61 KRYVON VM.
  • data62 : Type "data62" matches script code via cell data hash, and runs the script code in v62 KRYVON VM.
  • data63 : Type "data63" matches script code via cell data hash, and runs the script code in v63 KRYVON VM.
  • data64 : Type "data64" matches script code via cell data hash, and runs the script code in v64 KRYVON VM.
  • data65 : Type "data65" matches script code via cell data hash, and runs the script code in v65 KRYVON VM.
  • data66 : Type "data66" matches script code via cell data hash, and runs the script code in v66 KRYVON VM.
  • data67 : Type "data67" matches script code via cell data hash, and runs the script code in v67 KRYVON VM.
  • data68 : Type "data68" matches script code via cell data hash, and runs the script code in v68 KRYVON VM.
  • data69 : Type "data69" matches script code via cell data hash, and runs the script code in v69 KRYVON VM.
  • data70 : Type "data70" matches script code via cell data hash, and runs the script code in v70 KRYVON VM.
  • data71 : Type "data71" matches script code via cell data hash, and runs the script code in v71 KRYVON VM.
  • data72 : Type "data72" matches script code via cell data hash, and runs the script code in v72 KRYVON VM.
  • data73 : Type "data73" matches script code via cell data hash, and runs the script code in v73 KRYVON VM.
  • data74 : Type "data74" matches script code via cell data hash, and runs the script code in v74 KRYVON VM.
  • data75 : Type "data75" matches script code via cell data hash, and runs the script code in v75 KRYVON VM.
  • data76 : Type "data76" matches script code via cell data hash, and runs the script code in v76 KRYVON VM.
  • data77 : Type "data77" matches script code via cell data hash, and runs the script code in v77 KRYVON VM.
  • data78 : Type "data78" matches script code via cell data hash, and runs the script code in v78 KRYVON VM.
  • data79 : Type "data79" matches script code via cell data hash, and runs the script code in v79 KRYVON VM.
  • data80 : Type "data80" matches script code via cell data hash, and runs the script code in v80 KRYVON VM.
  • data81 : Type "data81" matches script code via cell data hash, and runs the script code in v81 KRYVON VM.
  • data82 : Type "data82" matches script code via cell data hash, and runs the script code in v82 KRYVON VM.
  • data83 : Type "data83" matches script code via cell data hash, and runs the script code in v83 KRYVON VM.
  • data84 : Type "data84" matches script code via cell data hash, and runs the script code in v84 KRYVON VM.
  • data85 : Type "data85" matches script code via cell data hash, and runs the script code in v85 KRYVON VM.
  • data86 : Type "data86" matches script code via cell data hash, and runs the script code in v86 KRYVON VM.
  • data87 : Type "data87" matches script code via cell data hash, and runs the script code in v87 KRYVON VM.
  • data88 : Type "data88" matches script code via cell data hash, and runs the script code in v88 KRYVON VM.
  • data89 : Type "data89" matches script code via cell data hash, and runs the script code in v89 KRYVON VM.
  • data90 : Type "data90" matches script code via cell data hash, and runs the script code in v90 KRYVON VM.
  • data91 : Type "data91" matches script code via cell data hash, and runs the script code in v91 KRYVON VM.
  • data92 : Type "data92" matches script code via cell data hash, and runs the script code in v92 KRYVON VM.
  • data93 : Type "data93" matches script code via cell data hash, and runs the script code in v93 KRYVON VM.
  • data94 : Type "data94" matches script code via cell data hash, and runs the script code in v94 KRYVON VM.
  • data95 : Type "data95" matches script code via cell data hash, and runs the script code in v95 KRYVON VM.
  • data96 : Type "data96" matches script code via cell data hash, and runs the script code in v96 KRYVON VM.
  • data97 : Type "data97" matches script code via cell data hash, and runs the script code in v97 KRYVON VM.
  • data98 : Type "data98" matches script code via cell data hash, and runs the script code in v98 KRYVON VM.
  • data99 : Type "data99" matches script code via cell data hash, and runs the script code in v99 KRYVON VM.
  • data100 : Type "data100" matches script code via cell data hash, and runs the script code in v100 KRYVON VM.
  • data101 : Type "data101" matches script code via cell data hash, and runs the script code in v101 KRYVON VM.
  • data102 : Type "data102" matches script code via cell data hash, and runs the script code in v102 KRYVON VM.
  • data103 : Type "data103" matches script code via cell data hash, and runs the script code in v103 KRYVON VM.
  • data104 : Type "data104" matches script code via cell data hash, and runs the script code in v104 KRYVON VM.
  • data105 : Type "data105" matches script code via cell data hash, and runs the script code in v105 KRYVON VM.
  • data106 : Type "data106" matches script code via cell data hash, and runs the script code in v106 KRYVON VM.
  • data107 : Type "data107" matches script code via cell data hash, and runs the script code in v107 KRYVON VM.
  • data108 : Type "data108" matches script code via cell data hash, and runs the script code in v108 KRYVON VM.
  • data109 : Type "data109" matches script code via cell data hash, and runs the script code in v109 KRYVON VM.
  • data110 : Type "data110" matches script code via cell data hash, and runs the script code in v110 KRYVON VM.
  • data111 : Type "data111" matches script code via cell data hash, and runs the script code in v111 KRYVON VM.
  • data112 : Type "data112" matches script code via cell data hash, and runs the script code in v112 KRYVON VM.
  • data113 : Type "data113" matches script code via cell data hash, and runs the script code in v113 KRYVON VM.
  • data114 : Type "data114" matches script code via cell data hash, and runs the script code in v114 KRYVON VM.
  • data115 : Type "data115" matches script code via cell data hash, and runs the script code in v115 KRYVON VM.
  • data116 : Type "data116" matches script code via cell data hash, and runs the script code in v116 KRYVON VM.
  • data117 : Type "data117" matches script code via cell data hash, and runs the script code in v117 KRYVON VM.
  • data118 : Type "data118" matches script code via cell data hash, and runs the script code in v118 KRYVON VM.
  • data119 : Type "data119" matches script code via cell data hash, and runs the script code in v119 KRYVON VM.
  • data120 : Type "data120" matches script code via cell data hash, and runs the script code in v120 KRYVON VM.
  • data121 : Type "data121" matches script code via cell data hash, and runs the script code in v121 KRYVON VM.
  • data122 : Type "data122" matches script code via cell data hash, and runs the script code in v122 KRYVON VM.
  • data123 : Type "data123" matches script code via cell data hash, and runs the script code in v123 KRYVON VM.
  • data124 : Type "data124" matches script code via cell data hash, and runs the script code in v124 KRYVON VM.
  • data125 : Type "data125" matches script code via cell data hash, and runs the script code in v125 KRYVON VM.
  • data126 : Type "data126" matches script code via cell data hash, and runs the script code in v126 KRYVON VM.
  • data127 : Type "data127" matches script code via cell data hash, and runs the script code in v127 KRYVON VM.

Type SerializedBlock

This is a 0x-prefix hex string. It is the block serialized by molecule using the schema table Block.

Type SerializedHeader

This is a 0x-prefix hex string. It is the block header serialized by molecule using the schema table Header.

Type Status

Status for transaction

It's an enum value from one of:

  • pending : Status "pending". The transaction is in the pool, and not proposed yet.
  • proposed : Status "proposed". The transaction is in the pool and has been proposed.
  • committed : Status "committed". The transaction has been committed to the canonical chain.
  • unknown : Status "unknown". The node has not seen the transaction, or it should be rejected but was cleared due to storage limitations.
  • rejected : Status "rejected". The transaction has been recently removed from the pool. Due to storage limitations, the node can only hold the most recently removed transactions.

Type SyncState

The overall chain synchronization state of this local node.

Fields

SyncState is a JSON object with the following fields.

  • assume_valid_target: Byte32 - The assume_valid_target specified by kryvon, if no assume_valid_target, this will be all zero.

  • assume_valid_target_reached: boolean - Is kryvon reached the assume_valid_target? If no assume_valid_target, this will be true.

  • best_known_block_number: Uint64 - This is the best known block number observed by the local node from the P2P network.

    The best here means that the block leads a chain which has the best known accumulated difficulty.

    This can be used to estimate the synchronization progress. If this RPC returns B, and the RPC get_tip_block_number returns T, the node has already synchronized T/B blocks.

  • best_known_block_timestamp: Uint64 - This is timestamp of the same block described in best_known_block_number.

  • fast_time: Uint64 - The download scheduler's time analysis data, the fast is the 1/3 of the cut-off point, unit ms

  • ibd: boolean - Whether the local node is in IBD, Initial Block Download.

    When a node starts and its chain tip timestamp is far behind the wall clock, it will enter the IBD until it catches up the synchronization.

    During IBD, the local node only synchronizes the chain with one selected remote node and stops responding to most P2P requests.

  • inflight_blocks_count: Uint64 - Count of downloading blocks.

  • low_time: Uint64 - The download scheduler's time analysis data, the low is the 9/10 of the cut-off point, unit ms

  • min_chain_work: Uint128 - This field acts as a security measure to ensure that a node only synchronizes with other nodes that have a significant amount of computational work invested in them, thereby preventing certain types of attacks and ensuring network integrity. Only the mainnet uses a hardcoded value for this field.

  • min_chain_work_reached: boolean - Is kryvon reached the min_chain_work?

  • normal_time: Uint64 - The download scheduler's time analysis data, the normal is the 4/5 of the cut-off point, unit ms

  • orphan_blocks_count: Uint64 - Count of orphan blocks the local node has downloaded.

    The local node downloads multiple blocks simultaneously but blocks must be connected consecutively. If a descendant is downloaded before its ancestors, it becomes an orphan block.

    If this number is too high, it indicates that block download has stuck at some block.

  • tip_hash: H256 - The block hash of current tip block

  • tip_number: Uint64 - The block number of current tip block

  • unverified_tip_hash: H256 - The block hash of current unverified tip block

  • unverified_tip_number: Uint64 - The block number of current unverified tip block

Type SysInfo

System’s information.

Fields

SysInfo is a JSON object with the following fields.

  • cpu_usage: number - Returns the total kryvon CPU usage (in %). Notice that it might be bigger than 100 if run on a multi-core machine.

  • disk_usage: DiskUsage - Returns number of bytes kryvon read and written to disk.

  • global: Global - global system information

  • memory: integer - Returns the memory kryvon usage (in bytes).

  • virtual_memory: integer - Returns the virtual memory usage (in bytes).

Type TerminalPoolInfo

Transaction pool information.

Fields

TerminalPoolInfo is a JSON object with the following fields.

  • committing: Uint64 - Count of committing transactions.

    The Committing transactions refer to transactions that have been packaged into the block_template and are awaiting mining into a block.

  • last_txs_updated_at: Uint64 - Last updated time. This is the Unix timestamp in milliseconds.

  • max_tx_pool_size: Uint64 - Total limit on the size of transactions in the tx-pool

  • orphan: Uint64 - Count of orphan transactions.

    An orphan transaction has an input cell from the transaction which is neither in the chain nor in the transaction pool.

  • pending: Uint64 - Count of transactions in the pending state.

    The pending transactions must be proposed in a new block first.

  • proposed: Uint64 - Count of transactions in the proposed state.

    The proposed transactions are ready to be committed in the new block after the block tip_hash.

  • total_recent_reject_num: Uint64 - Total count of recent reject transactions by pool

  • total_tx_cycles: Uint64 - Total consumed VM cycles of all the transactions in the pool (excluding orphan transactions).

  • total_tx_size: Uint64 - Total size of transactions bytes in the pool of all the different kinds of states (excluding orphan transactions).

Type Timestamp

The Unix timestamp in milliseconds (1 second is 1000 milliseconds).

For example, 1588233578000 is Thu, 30 Apr 2020 07:59:38 +0000

This is a 64-bit unsigned integer type encoded as the 0x-prefixed hex string in JSON. See examples of Uint64.

Type Transaction

The transaction.

Refer to RFC KRYVON Transaction Structure.

Fields

Transaction is a JSON object with the following fields.

  • cell_deps: Array< CellDep > - An array of cell deps.

    KRYVON locates lock script and type script code via cell deps. The script also can use syscalls to read the cells here.

    Unlike inputs, the live cells can be used as cell deps in multiple transactions.

  • header_deps: Array< H256 > - An array of header deps.

    The block must already be in the canonical chain.

    Lock script and type script can read the header information of blocks listed here.

  • inputs: Array< CellInput > - An array of input cells.

    In the canonical chain, any cell can only appear as an input once.

  • outputs: Array< CellOutput > - An array of output cells.

  • outputs_data: Array< JsonBytes > - Output cells data.

    This is a parallel array of outputs. The cell capacity, lock, and type of the output i is outputs[i] and its data is outputs_data[i].

  • version: Uint32 - Reserved for future usage. It must equal 0 in current version.

  • witnesses: Array< JsonBytes > - An array of variable-length binaries.

    Lock script and type script can read data here to verify the transaction.

    For a native payment, the lock witness carries the 83-byte SQIsign public key and 200-byte signature.

Type TransactionAndWitnessProof

Merkle proof for transactions' witnesses in a block.

Fields

TransactionAndWitnessProof is a JSON object with the following fields.

  • block_hash: H256 - Block hash

  • transactions_proof: MerkleProof - Merkle proof of all transactions' hash

  • witnesses_proof: MerkleProof - Merkle proof of transactions' witnesses

Type TransactionProof

Merkle proof for transactions in a block.

Fields

TransactionProof is a JSON object with the following fields.

  • block_hash: H256 - Block hash

  • proof: MerkleProof - Merkle proof of all transactions' hash

  • witnesses_root: H256 - Merkle root of all transactions' witness hash

Type TransactionTemplate

Transaction template which is ready to be committed in the new block.

Fields

TransactionTemplate is a JSON object with the following fields.

  • data: Transaction - The transaction.

    Miners must keep it unchanged when including it in the new block.

  • hash: H256 - Transaction hash.

  • required: boolean - Whether miner must include this transaction in the new block.

Type TransactionView

The JSON view of a Transaction.

This structure is serialized into a JSON object with field hash and all the fields in Transaction.

Examples
{
  "cell_deps": [],
  "hash": "0xd43a26b1897c98a5917cd7f8af629e2f749ac37142068ef93c11048e208eff42",
  "header_deps": [],
  "inputs": [
    {
      "previous_output": {
        "index": "0xffffffff",
        "tx_hash": "0x0000000000000000000000000000000000000000000000000000000000000000"
      },
      "since": "0x0"
    }
  ],
  "outputs": [
    {
      "capacity": "0xaa87bee538000",
      "lock": {
        "args": "0xfc6a14efa21dda983e863549c2c6015132147a1e30433db78e0226bfeb4f9908",
        "code_hash": "0x0ab222ccd15b0160e2113b036ffe7a0d4cbcb40ac2fe7454194f381a33bd0d65",
        "hash_type": "data"
      },
      "type": null
    }
  ],
  "outputs_data": [
    "0x"
  ],
  "version": "0x0",
  "witnesses": [
    "0x960000000c00000061000000550000001000000030000000310000000ab222ccd15b0160e2113b036ffe7a0d4cbcb40ac2fe7454194f381a33bd0d650020000000fc6a14efa21dda983e863549c2c6015132147a1e30433db78e0226bfeb4f9908310000004b5259564f4e206e6174697665205351497369676e2067656e657369733b206865696768742069737375616e6365205631"
  ]
}

Fields

TransactionView is a JSON object with the following fields.

  • cell_deps: Array< CellDep > - An array of cell deps.

    KRYVON locates lock script and type script code via cell deps. The script also can use syscalls to read the cells here.

    Unlike inputs, the live cells can be used as cell deps in multiple transactions.

  • hash: H256 - The transaction hash.

  • header_deps: Array< H256 > - An array of header deps.

    The block must already be in the canonical chain.

    Lock script and type script can read the header information of blocks listed here.

  • inputs: Array< CellInput > - An array of input cells.

    In the canonical chain, any cell can only appear as an input once.

  • outputs: Array< CellOutput > - An array of output cells.

  • outputs_data: Array< JsonBytes > - Output cells data.

    This is a parallel array of outputs. The cell capacity, lock, and type of the output i is outputs[i] and its data is outputs_data[i].

  • version: Uint32 - Reserved for future usage. It must equal 0 in current version.

  • witnesses: Array< JsonBytes > - An array of variable-length binaries.

    Lock script and type script can read data here to verify the transaction.

    For a native payment, the lock witness carries the 83-byte SQIsign public key and 200-byte signature.

Type TransactionWithStatusResponse

The JSON view of a transaction as well as its status.

Fields

TransactionWithStatusResponse is a JSON object with the following fields.

  • tx_status: TxStatus - The Transaction status.

Type TxPoolEntries

Tx-pool entries object

Fields

TxPoolEntries is a JSON object with the following fields.

  • conflicted: Array< H256 > - Conflicted tx hash vec

  • pending: - Pending tx verbose info

  • proposed: - Proposed tx verbose info

Type TxPoolEntry

Transaction entry info

Fields

TxPoolEntry is a JSON object with the following fields.

  • ancestors_count: Uint64 - Number of in-tx-pool ancestor transactions

  • ancestors_cycles: Uint64 - Cycles of in-tx-pool ancestor transactions

  • ancestors_size: Uint64 - Size of in-tx-pool ancestor transactions

  • cycles: Uint64 - Consumed cycles.

  • fee: Uint64 - The transaction fee.

  • size: Uint64 - The transaction serialized size in block.

  • timestamp: Uint64 - The unix timestamp when entering the Txpool, unit: Millisecond

Type TxPoolIds

Array of transaction ids

Fields

TxPoolIds is a JSON object with the following fields.

  • pending: Array< H256 > - Pending transaction ids

  • proposed: Array< H256 > - Proposed transaction ids

Type TxPoolInfo

Transaction pool information.

Fields

TxPoolInfo is a JSON object with the following fields.

  • last_txs_updated_at: Uint64 - Last updated time. This is the Unix timestamp in milliseconds.

  • max_tx_pool_size: Uint64 - Total limit on the size of transactions in the tx-pool

  • min_fee_rate: Uint64 - Fee rate threshold. The pool rejects transactions which fee rate is below this threshold.

    The unit is quarks per 1000 bytes transaction serialization size in the block.

  • min_rbf_rate: Uint64 - RBF rate threshold.

    The pool rejects to replace transactions whose fee rate is below this threshold. if min_rbf_rate > min_fee_rate then RBF is enabled on the node.

    The unit is quarks per 1000 bytes transaction serialization size in the block.

  • orphan: Uint64 - Count of orphan transactions.

    An orphan transaction has an input cell from the transaction which is neither in the chain nor in the transaction pool.

  • pending: Uint64 - Count of transactions in the pending state.

    The pending transactions must be proposed in a new block first.

  • proposed: Uint64 - Count of transactions in the proposed state.

    The proposed transactions are ready to be committed in the new block after the block tip_hash.

  • tip_hash: H256 - The associated chain tip block hash.

    The transaction pool is stateful. It manages the transactions which are valid to be committed after this block.

  • tip_number: Uint64 - The block number of the block tip_hash.

  • total_tx_cycles: Uint64 - Total consumed VM cycles of all the transactions in the pool (excluding orphan transactions).

  • total_tx_size: Uint64 - Total size of transactions bytes in the pool of all the different kinds of states (excluding orphan transactions).

  • tx_size_limit: Uint64 - Limiting transactions to tx_size_limit

    Transactions with a large size close to the block size limit may not be packaged, because the block header and cellbase are occupied, so the tx-pool is limited to accepting transaction up to tx_size_limit.

  • verify_queue_size: Uint64 - verify_queue size

Type TxStatus

Transaction status and the block hash if it is committed.

Fields

TxStatus is a JSON object with the following fields.

  • status: Status - The transaction status, allowed values: "pending", "proposed" "committed" "unknown" and "rejected".

Type U256

The 256-bit unsigned integer type encoded as the 0x-prefixed hex string in JSON.

Type Uint128

Uint128 is uint128

Type Uint32

Uint32 is uint32

Type Uint64

Uint64 is uint64

Type UncleBlock

The uncle block used as a parameter in the RPC.

The chain stores only the uncle block header and proposal IDs. The header ensures the block is covered by PoW and can pass the consensus rules on uncle blocks. Proposal IDs are there because a block can commit transactions proposed in an uncle.

A block B1 is considered to be the uncle of another block B2 if all the following conditions are met:

  1. They are in the same epoch, sharing the same difficulty;
  2. B2 block number is larger than B1;
  3. B1's parent is either B2's ancestor or an uncle embedded in B2 or any of B2's ancestors.
  4. B2 is the first block in its chain to refer to B1.

Fields

UncleBlock is a JSON object with the following fields.

  • header: Header - The uncle block header.

  • proposals: Array< ProposalShortId > - Proposal IDs in the uncle block body.

Type UncleBlockView

The uncle block.

The chain stores only the uncle block header and proposal IDs. The header ensures the block is covered by PoW and can pass the consensus rules on uncle blocks. Proposal IDs are there because a block can commit transactions proposed in an uncle.

A block B1 is considered to be the uncle of another block B2 if all the following conditions are met:

  1. They are in the same epoch, sharing the same difficulty;
  2. B2 block number is larger than B1;
  3. B1's parent is either B2's ancestor or an uncle embedded in B2 or any of B2's ancestors.
  4. B2 is the first block in its chain to refer to B1.

Fields

UncleBlockView is a JSON object with the following fields.

Type UncleTemplate

The uncle block template of the new block for miners.

Fields

UncleTemplate is a JSON object with the following fields.

  • hash: H256 - The uncle block hash.

  • header: Header - The header of the uncle block.

    Miners must keep this unchanged when including this uncle in the new block.

  • proposals: Array< ProposalShortId > - The proposals of the uncle block.

    Miners must keep this unchanged when including this uncle in the new block.

  • required: boolean - Whether miners must include this uncle in the submit block.

Type Version

The simple increasing integer version.

This is a 32-bit unsigned integer type encoded as the 0x-prefixed hex string in JSON. See examples of Uint32.