You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We don't strictly need the DataAvailabilityHeader to be in Block, so we can remove it.
Problem Definition
Since the DataAvailabilityHeader does not have to be in Block, and validators already have to regenerate the DataAvailabilityHeader to verify the block, then we could optimize the size of the Block struct by removing the DataAvailabilityHeader field.
Proposal
Instead of passing the DataAvailabilityHeader with the Block, we can remove the DataAvailabilityHeader field and instead generate it after receiving the Block. The DataAvailabilityHeader would then be passed to any function that needs it, or regenerated.
Note: this is purely an optimization, and should therefore not be prioritized until later. This could also be accomplished in conjunction with #505, as that will be required to fully remove the DAH from the block
Implementation
Remove the DataAvailabilityHeader from block
Regenerate the DAH when verifying the block
Save the DAH in BlockMeta by passing it the SaveBlock method
Pass the DAH to PutBlock (assuming we keep PutBlock at all)
We also have to the option to only remove the DAH from the proto type of tmrpoto.Block and not from the tendermint type types.Block, which would give us the optimization while also allowing us to pass the DAH around with the Block for convenience purposes.
Summary
We don't strictly need the
DataAvailabilityHeader
to be inBlock
, so we can remove it.Problem Definition
Since the
DataAvailabilityHeader
does not have to be inBlock
, and validators already have to regenerate the DataAvailabilityHeader to verify the block, then we could optimize the size of theBlock
struct by removing theDataAvailabilityHeader
field.Proposal
Instead of passing the
DataAvailabilityHeader
with theBlock
, we can remove theDataAvailabilityHeader
field and instead generate it after receiving theBlock
. TheDataAvailabilityHeader
would then be passed to any function that needs it, or regenerated.Note: this is purely an optimization, and should therefore not be prioritized until later. This could also be accomplished in conjunction with #505, as that will be required to fully remove the DAH from the block
Implementation
DataAvailabilityHeader
from blockBlockMeta
by passing it theSaveBlock
methodPutBlock
(assuming we keep PutBlock at all)blocked by:
#518
#505
The text was updated successfully, but these errors were encountered: