Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the DataAvailabilityHeader from Block #512

Closed
4 tasks
evan-forbes opened this issue Aug 24, 2021 · 3 comments
Closed
4 tasks

Remove the DataAvailabilityHeader from Block #512

evan-forbes opened this issue Aug 24, 2021 · 3 comments

Comments

@evan-forbes
Copy link
Member

evan-forbes commented Aug 24, 2021

Summary

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)

blocked by:
#518
#505

@adlerjohn
Copy link
Member

Makes sense

@evan-forbes
Copy link
Member Author

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.

@evan-forbes
Copy link
Member Author

closed by the merging of #534

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants