lisk-docs
lisk-docs copied to clipboard
Add explanations about the transaction pool
Description
Add explanations about the transaction pool
- how many transaction can be added in total / per user
- how transactions are prioritized for block inclusion
- how they are validated
- how txs are applied
- how transactions are shared with the peer nodes
Additional information
See also #1238
In the transaction pool, it will validate/apply multiple times but nothing will be stored in the data base and when block is being forged, all the hooks (beforeBlockApply, beforeTransactionApply, apply, afterTransactionApply, afterBlockApply) will be called so that everything will be ok this is to increase the chance of rejecting the invalid transaction, but we will be revisiting if this is actually needed or not because it will cost the resource on pool.
by default, 64 txs per acct is the limit and 4096 txs in total 64 until those txs are included or otherwise removed from the pool
you can use this endpoint https://mainnet-service.lisk.io/api/v2/transactions?limit=100&includePending=true it will show you also pending transactions
If you throw in apply anywhere even last line all state changes done above will be rejected
by the default setting, there is limit of max 4096 transactions and 64 transaction per account. Also, transaction will be removed from pool in 3 hours if it was not get included in a blockalso, if the transaction becomes invalid, it will be removed (nonce becomes higher, balance not enough etc)i mean 4096 txs, and 64 txs per accountthose numbers are not confugurable by delegates as well
if it receive a new tx, it is decided based on nonce and feeif the transaction has higher fee, it will include and discard the lower fee tx