Skip to content

Provide guidance on ChannelMonitorUpdate serialized size #1670

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

Merged

Conversation

TheBlueMatt
Copy link
Collaborator

Users need to make decisions about storage sizing and we need to
have advice on the maximum size of various things users need to
store. ChannelMonitorUpdates are likely the worst case of this,
they're usually at max a few KB, but can get up to a few hundred
KB for commitment transactions that have 400+ HTLCs pending.

We had one user report an update (likely) going over 400 KiB, which
isn't immediately obvious to me is practical, but its within a few
multiples of trivially-reachable sizes, so its likely that did
occur. To be on the safe side, we simply recommend users ensure
they can support "upwards of 1 MiB" here.

tnull
tnull previously approved these changes Aug 15, 2022
Copy link
Contributor

@tnull tnull left a comment

Choose a reason for hiding this comment

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

LGTM.

While you're here, would you mind going through the doc comment of ChannelMonitorUpdate (maybe also ChannelMonitor) and insert links and backticks everywhere? Github unfortunately doesn't let me mark all the spots where they are missing...

tnull
tnull previously approved these changes Aug 17, 2022
wpaulino
wpaulino previously approved these changes Aug 17, 2022
Users need to make decisions about storage sizing and we need to
have advice on the maximum size of various things users need to
store. ChannelMonitorUpdates are likely the worst case of this,
they're usually at max a few KB, but can get up to a few hundred
KB for commitment transactions that have 400+ HTLCs pending.

We had one user report an update (likely) going over 400 KiB, which
isn't immediately obvious to me is practical, but its within a few
multiples of trivially-reachable sizes, so its likely that did
occur. To be on the safe side, we simply recommend users ensure
they can support "upwards of 1 MiB" here.
@TheBlueMatt TheBlueMatt dismissed stale reviews from wpaulino and tnull via 36e9725 August 17, 2022 20:49
@TheBlueMatt TheBlueMatt force-pushed the 2022-08-mon-size-guidelines branch from 943e845 to 36e9725 Compare August 17, 2022 20:49
@TheBlueMatt
Copy link
Collaborator Author

Squashed without change.

@TheBlueMatt TheBlueMatt merged commit 65d71cd into lightningdevkit:main Aug 18, 2022
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.

3 participants