Expand description
Tx-pool shared type define.
Structs
- A struct as a sorted key in tx-pool
- A Tx details info in tx-pool.
- The JSON view of a transaction as well as its status.
- Tx-pool entry info
- All in-pool transaction entry info
- Array of transaction ids
- Transaction pool information.
Enums
- TX reject message
- Tx-pool transaction status
Constants
- Equal to MAX_BLOCK_BYTES / MAX_BLOCK_CYCLES, see ckb-chain-spec. The precision is set so that the difference between MAX_BLOCK_CYCLES * DEFAULT_BYTES_PER_CYCLES and MAX_BLOCK_BYTES is less than 1.
- The maximum size of the tx-pool to accept transactions The ckb consensus does not limit the size of a single transaction, but if the size of the transaction is close to the limit of the block, it may cause the transaction to fail to be packed
Functions
- get_transaction_virtual_bytesDeprecatedvbytes has been deprecated, renamed to weight to prevent ambiguity
- The miners select transactions to fill the limited block space which gives the highest fee. Because there are two different limits, serialized size and consumed cycles, the selection algorithm is a multi-dimensional knapsack problem. Introducing the transaction weight converts the multi-dimensional knapsack to a typical knapsack problem, which has a simple greedy algorithm.