Skip to content

cip: Header Pruning for LNs#279

Merged
jcstein merged 21 commits intocelestiaorg:mainfrom
Wondertan:header-pruning
Apr 30, 2025
Merged

cip: Header Pruning for LNs#279
jcstein merged 21 commits intocelestiaorg:mainfrom
Wondertan:header-pruning

Conversation

@Wondertan
Copy link
Copy Markdown
Member

@Wondertan Wondertan commented Mar 21, 2025

Overview

CIP for Header Pruning. As Header Pruning breaks users, particularly by preventing historical queries(to be fixed in subsequent CIP), it was decided to promote this change to a CIP.

This CIP start a series of DA targeted CIPs to optimize bandwidth and storage usage for LN, particularly targeting overhead brought by headers.

Copy link
Copy Markdown
Member

@jcstein jcstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits mostly

Copy link
Copy Markdown
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after resolving the parameter question. Given the DA network parameters aren't already in CIPs (or specs) somewhere, I suggest keeping the source of truth in code and removing the parameter from this CIP.

The rationale is that it's way easier to update the parameter in code and there is no risk of the parameter in docs becoming stale with the implementation in code.

@Wondertan
Copy link
Copy Markdown
Member Author

Given the DA network parameters aren't already in CIPs (or specs) somewhere, I suggest keeping the source of truth in code and removing the parameter from this CIP.

@rootulp, rhere is SamplingWindow param that is already in CIP-4. We can tie HeaderPruningWindow to it which is 30 days for simplicity. It should though be defined based of TrustingPeriod which is 14 days(basing on @nashqueue's findings), but that's gonna be a different CIP by someone else(like @cmwaters) that will define the TrustingPeriod and resolve issues in between all the params by adjusting them.

So given we have the linkable parameter in the old CIP, I believe it fine to define the new parameter in the CIP.

@cmwaters
Copy link
Copy Markdown
Collaborator

Yeah there are already node parameters defined in CIP 4 (and we may look to adjust those soon). These are important parameters so I would also prefer to have them documented here (possibly in the same way we do core/app parameters)

Copy link
Copy Markdown
Member

@jcstein jcstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Collaborator

@ebuchman ebuchman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Some nits and a few stupid questions

@Wondertan
Copy link
Copy Markdown
Member Author

Wondertan commented Mar 26, 2025

@jcstein, when should we assign the number?

@Wondertan
Copy link
Copy Markdown
Member Author

GH applied the same suggestion from Ethan 5 times as separate commits lol

@jcstein
Copy link
Copy Markdown
Member

jcstein commented Mar 27, 2025

@Wondertan after comments are resolved. can you please close the ones above that you've resolved with a link to the commit before resolving? thank you!

then we'll assign number and get this merged. just want to make sure @ebuchman's comments are addressed!

@Wondertan
Copy link
Copy Markdown
Member Author

can you please close the ones above that you've resolved with a link to the commit before resolving?

You mean like I did with your review? Ofc

@jcstein jcstein self-requested a review March 31, 2025 14:30
@jcstein
Copy link
Copy Markdown
Member

jcstein commented Mar 31, 2025

this should be good after comments are resolved @Wondertan

@jcstein
Copy link
Copy Markdown
Member

jcstein commented Apr 1, 2025

I just realized maybe @Wondertan doesn't have permissions to resolve the comments. can you confirm?

@jcstein jcstein self-requested a review April 1, 2025 18:46
@jcstein jcstein self-requested a review April 3, 2025 15:05
Wondertan and others added 20 commits April 30, 2025 10:20
Co-authored-by: Josh Stein <46639943+jcstein@users.noreply.github.com>
Co-authored-by: Rootul P <rootulp@gmail.com>
Co-authored-by: Ethan Buchman <ethan@coinculture.info>
Co-authored-by: Ethan Buchman <ethan@coinculture.info>
Co-authored-by: Ethan Buchman <ethan@coinculture.info>
Co-authored-by: Ethan Buchman <ethan@coinculture.info>
Co-authored-by: Ethan Buchman <ethan@coinculture.info>
numBlocksToKeep -> headersToRetain
@Wondertan
Copy link
Copy Markdown
Member Author

This is RFR again

@jcstein jcstein merged commit 13df7a3 into celestiaorg:main Apr 30, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

8 participants