-
Notifications
You must be signed in to change notification settings - Fork 147
Open
Labels
Description
| blk* : Block |
A second copy of the same data is stored in txFrame as the block is serialized and persisted there after verification.
When there is a longer period of non-finality, this leads to high memory consumption. Instead:
- remove
blkfrom BlockRef and load it on demand fromtxFrame- this halves memory usage - eventually, flatten
txFrameand keep it up to date using theheadsstructure, akin to howFcStatedoes it - this way, almost no block payload data will be kept in memory.
#3628 implements this idea the other way around by keeping blk and removing it from txFrame - that approach however has almost no advantages and cannot be flattened.