Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

LSPS1: Fix and test serialization #126

Merged
merged 12 commits into from
Apr 26, 2024

Conversation

tnull
Copy link
Collaborator

@tnull tnull commented Apr 9, 2024

Based on #124.

Fixes #122.
Fixes #123.
Fixes #65.

tnull added 12 commits March 28, 2024 07:52
Previously, we'd decode/encode `payload` with `String`'s default
encoding, which prepends the lenght. However, according to BOLT8/LSPS0
describe the payload as: "A variable-length message payload (the
remainder of the message).", i.e., without any prepended lenght.

Here, we fix this de/ser bug by encoding and decoding the payload using
LDK's `WithoutLength` helper.
Previously, during a cleanup, we accidentally also renamed the actual
`BuyResponse` field, not only our internal variables. Here, we fix this
regression to reestablish compliance with the spec.
.. to account for the spec changes in
BitcoinAndLightningLayerSpecs/lsp#88

In particular we also introduce the `CLIENT_REJECTED` error as part of
LSPS0, but currently don't use it (yet).
.. not super descriptive, but more in line with `ChannelInfo`
@tnull tnull force-pushed the 2024-03-lsps1-client branch from 1ae3016 to 812ad1d Compare April 9, 2024 14:41
@tnull tnull merged commit 783d5bd into lightningdevkit:main Apr 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants