Introduce Trampoline Packet deserialization for Inbound::Receive#2806
Introduce Trampoline Packet deserialization for Inbound::Receive#2806shaavan wants to merge 6 commits intolightningdevkit:mainfrom
Conversation
- This PR introduces Trampoline Packets to Inbound::Receive - Implement Readable for VariableLengthOnionPacket struct to allow deserialization for Trampoline Packets. - Make appropriate changes in rest of code, to allow proper compiling with the new change.
| r.read_exact(&mut buf)?; | ||
| PublicKey::from_slice(&buf) | ||
| }, | ||
| hop_data: Readable::read(r)?, |
There was a problem hiding this comment.
could you add a unit test to make sure this works? The current spec doesn't encode the length of the hop_data, so I think there's a chance this might break without using a reader with an a priori specified fixed length.
|
Thanks for working on this! Sadly, @arik-so came up with a potential new version of trampoline that we may want to do instead of the existing one. He's gonna present more about it in the lightning spec meeting on Monday and we'll decide where to go from there, but if other implementations prefer the alternative approach this may end up being a dead-end. Sorry about that. |
|
Putting this PR on hold. Since the original PR's being revamped. comment
|
This PR builds over #2756.
And addresses Inbound Deserialization in #2299
deserialization for Trampoline Packets.
with the new change.
TODO: