ChainSafe / ChainSafe/gossamer
use transaction weights to optimally fill a block when building
- Dominant language
- Go
- Stars
- 454
- Forks
- 144
- PR merge metrics
- No merged PRs in 30d
Description
## Task summary
- gossamer should optimally fill a block with transactions when building a block
- this means it should get as close to the block weight limit as possible, while respecting the block size limit (in bytes)
- every transaction already has a weight associated to it (calculated in the validate_transaction step), so we need to create an algorithm that will determine which txs to include in the next block (ie. which to put into the tx queue)
- this should be implemented via the "move from tx pool to queue" function; txs should be moved from the pool to the queue on the basis of this "upcoming tx selection" algorithm
## Specification reference
- see [spec chapter 8](https://w3f.github.io/polkadot-spec/develop/_weights.html)
- block size limit = 5,242,880 bytes (Def 13)
- block weight limit = 2,000,000,000,000 (Def 15)
## Other information and links
-
Contributor guide
Assessment
This issue has not been assessed yet.