Reuse Block Data for Values
Closed this issue · 0 comments
patrick-ogrady commented
SetTx.Value
are copied from the block into an additional DB when a block is verified. We should instead find a way to pull value data from the saved block to avoid unnecessary copying.
Alternatively, we could "thin" blocks when they are synced and then re-populate them if they are requested with what is stored in the value (although this could get complicated because values could be overwritten). => we could store as hash(block, tx_hash)
pretty easily.
Importantly, this allow allow us to easily externalize the "value" storage at some point to an external service/DB.
TL;DR find a way to store values once.