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

Receipt Compression Strategy #5767

Closed
7 tasks done
non-fungible-nelson opened this issue Aug 17, 2023 · 3 comments
Closed
7 tasks done

Receipt Compression Strategy #5767

non-fungible-nelson opened this issue Aug 17, 2023 · 3 comments
Assignees
Labels
bonsai epic in-progress Epic being worked on by a workstream mainnet TeamGroot GH issues worked on by Groot Team

Comments

@non-fungible-nelson
Copy link
Contributor

non-fungible-nelson commented Aug 17, 2023

Description

The largest part of the database storage is the receipts. As a Besu user, I want the lowest storage size possible on my disk.

Some clients have a notion of "ancient" receipts that they compress or move to a freezer to keep storage small. For more recent data, Besu can provide non-compressed receipts/data. For older data, decompression will happen, latency may be introduced, which is a tradeoff for lower overall storage use.

We need to determine what "ancient" (user configurable) barriers are appropriate, what compression strategy we may use for these ancient receipts, and if we want to combine it with the freezer approach.

Some references & implementations:
ethereum/go-ethereum#19345
NethermindEth/nethermind#5531

We may also be able to prune receipts over the historical-block-limit for BONSAI, reducing data further (is this covered by --Xchain-pruning? ).

Notes

  • may also mean we can improve sync because there's less data to write?
  • storing bloom filter is useless because you can recreate it?
  • Could also compress other parts of the body?
  • Could we push to modify snapsync spec to avoid needing to download the receipt
    • because it can be recreated anyway
    • then maybe don't need to store the receipt at all
  • often addresses are stored multiple times in the receipt?
  • Are receipts stored for forks as well? c.f. trie log storage pruning Removal of old trie logs specified by historical block limit #5390
  • Avoiding a "pruning"-style operation by always storing in a compressed format would have some benefits
  • Maybe split out some improvements we can do for all blocks, including near-head VS some we can only apply to "ancient data"

Tasks

@non-fungible-nelson non-fungible-nelson added bonsai mainnet TeamChupa GH issues worked on by Chupacabara Team TeamGroot GH issues worked on by Groot Team labels Aug 17, 2023
@non-fungible-nelson non-fungible-nelson removed the TeamChupa GH issues worked on by Chupacabara Team label Sep 19, 2023
@non-fungible-nelson
Copy link
Contributor Author

we need to engage the community at large around needing receipts - in the DB and in the snap sync protocol.

Create a discussion in Eth R&D

@non-fungible-nelson non-fungible-nelson added icebox items that need more consideration, time, or can wait and removed icebox items that need more consideration, time, or can wait epic labels Jan 23, 2024
@siladu siladu added the epic label Jan 28, 2024
@macfarla macfarla added this to the 2024 Q1 Besu team milestone Feb 2, 2024
@non-fungible-nelson
Copy link
Contributor Author

@jframe what is the status on this epic?

@jframe
Copy link
Contributor

jframe commented Feb 28, 2024

I have a draft PR with the changes for receipt compression. Currently doing some additional testing before I open the PR for review.

@non-fungible-nelson non-fungible-nelson added the in-progress Epic being worked on by a workstream label Feb 28, 2024
@jframe jframe self-assigned this Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bonsai epic in-progress Epic being worked on by a workstream mainnet TeamGroot GH issues worked on by Groot Team
Projects
None yet
Development

No branches or pull requests

5 participants