Closed gavofyork closed 5 years ago
Keeping storage_root
outside of the main header struct will put a non-negligible load on light clients' bandwidth and memory -- they'll have to obtain and check the entire receipt of a block every time they want a state proof.
light clients that actually need the storage_root
in all instances would just grab a ladder of FatHeader
s, which are pretty much equivalent to the existing Header
.
I'm not convinced that's any better, because then the clients are still downloading the receipt when they don't need that data at all. And then they have to download the header and the fat header, because the header hash isn't computed from the fat header.
If you have a FatHeader
then Header
is superfluous as it can always be derived from FatHeader
(just hash the Receipt
).
Light-clients shouldn't need to always download the FatHeader
- if it's just a header-chain for sync/catchup, then the client isn't interested in extrinsics
and mostly isn't interested in receipt
. The instances where a light-client would care about receipt
(e.g. in a validator-set change), a FatHeader
can be provided by the serving-node instead of a Header
.
@rphmeier if you're still unconvinced, maybe we can go over this in more detail in person?
Not going to happen in time for 1.0. Will shelve until 2.0 is mooted.