Provide guidance on ChannelMonitorUpdate serialized size 2022-08-mon-size-guidelines
authorMatt Corallo <git@bluematt.me>
Mon, 15 Aug 2022 19:30:32 +0000 (19:30 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 17 Aug 2022 20:49:01 +0000 (20:49 +0000)
commit36e9725d9a9e9f71b31f8193daccfc96bb94090a
tree2c345d4d7f5e00485b2c766c59d3b4a9f3d0a341
parentd02425121ec082689a18bb0b22bec226cc02ff7d
Provide guidance on ChannelMonitorUpdate serialized size

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.
lightning/src/chain/channelmonitor.rs