-
Notifications
You must be signed in to change notification settings - Fork 409
Use zero-sized field for message padding #467
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
Comments
Happy to pick this up, unless @TheBlueMatt is already working on it. @jkczyz To clarify, do we always set |
Go for it!
Padding actually predates the format becoming legacy. It is reserved for future use in that format. This is defined in BOLT 4 in v1.0 of the spec. https://github.com/lightningnetwork/lightning-rfc/blob/v1.0/04-onion-routing.md The changes in #434 are from the working v1.1 spec, which makes that format legacy. https://github.com/lightningnetwork/lightning-rfc/blob/master/04-onion-routing.md |
Pushed for review: #469 |
IIUC: this ticket could be closed. Looks like PR #469 made the code change. |
That PR never ended up getting merged, though I'm not sure it's worth doing this now - it wouldn't clean up our serialization and let us switch to a macro and eventually we'll fully remove the pre-TLV onion format. |
Could you use something like
PhantomData<[u8; 12]>
(or our own customPadding
type) for this? It could allow for using zero bytes yet still have a field for reading/writing the data. Then we'd make reading the padding explicit rather than doing so while readingoutgoing_cltv_value
.Originally posted by @jkczyz in #434
The text was updated successfully, but these errors were encountered: