-
Notifications
You must be signed in to change notification settings - Fork 367
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
Trampoline Payload Construction Method #3386
base: main
Are you sure you want to change the base?
Trampoline Payload Construction Method #3386
Conversation
/// amended to match the features present in the invoice this node generated. | ||
pub node_features: NodeFeatures, | ||
/// The channel_announcement features of the channel that should be used from the previous hop | ||
/// to reach this node. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really confused, there's no explicit way that I see in OutboundOnionPayload::BlindedForward
to specify the channel used. The previous trampoline hop can pick any channel they want, AFAIU...
@@ -454,6 +454,9 @@ impl_writeable_tlv_based!(BlindedTail, { | |||
pub struct Path { | |||
/// The list of unblinded hops in this [`Path`]. Must be at least length one. | |||
pub hops: Vec<RouteHop>, | |||
/// The list of unblinded Trampoline hops. If present, must be at least one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vacuous statement is vacuous.
@@ -454,6 +454,9 @@ impl_writeable_tlv_based!(BlindedTail, { | |||
pub struct Path { | |||
/// The list of unblinded hops in this [`Path`]. Must be at least length one. | |||
pub hops: Vec<RouteHop>, | |||
/// The list of unblinded Trampoline hops. If present, must be at least one. | |||
/// The public key of the first Trampoline hop must match the public key of the last regular hop. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see why this needs to be true. Can we just have each trampoline hop be next hops starting after the last unblinded node.
@@ -454,6 +454,9 @@ impl_writeable_tlv_based!(BlindedTail, { | |||
pub struct Path { | |||
/// The list of unblinded hops in this [`Path`]. Must be at least length one. | |||
pub hops: Vec<RouteHop>, | |||
/// The list of unblinded Trampoline hops. If present, must be at least one. | |||
/// The public key of the first Trampoline hop must match the public key of the last regular hop. | |||
pub trampoline_hops: Vec<TrampolineHop>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems weird to add this to the public API in a PR that doesn't use it. Can you go ahead and wire up build_trampoline_onion_payloads
to build the valid onion in the same PR?
68d2c20
to
7cad33e
Compare
Introduce a method for constructing Trampoline payloads.
This will allow the non-Trampoline method to be modified to generate a Trampoline onion and finish its own regular payload construction.