When we receive a new block we:
- validate the rangeproofs, update the rangeproof PMMR and discard the rangeproofs if they are valid - storing an output info becomes 32 bytes instead of 700 bytes
- forget about the block that is "older than 2 weeks"
Note: We don't really need the kernel signatures once we have validated them so perhaps we can drop this as well to further reduce the size?
Let's define a curve point kernel_accumulator
that starts with a value of 0*G
.
When we receive a valid block, we pop the block that is now more than 2 weeks old and add all the kernel commitment points it that were present in that block to the kernel_accumulator
point. To validate the chain we can "pretend" we have a signature for the kernel_accumulator
curve point. We can do that because we have validated all the signatures that collectively add to that point which means we don't make any new assumptions doing so.
Since MMR is an append only structure, we know that kernels have an order from oldest to newest. We only need to keep the leaves of the kernels younger than 2 weeks. This means that we can prune most of the kernel MMR - I think we only need to keep the peaks of the merkle trees and all the paths from the current leaves to the root.
This one is already getting prunned when the outputs are spent. Is it possible to improve on this somehow?
Since we forget rangeproofs right away, we can prune these as well and only keep the peaks of the merkle trees we have. This means this structure that was the most costly now (I think) becomes the cheapest because we only need a few hashes (the information needed for future validation).
I think the situation here is similar as with kernels pmmr. Since this is append only, we can keep only the last 2 weeks of header data and the peaks.
Not sure about this one