Skip to content

rpc+htlcswitch: add HTLC transformation capabilities to the interceptor  #8619

@Roasbeef

Description

@Roasbeef

Today we have the HTLCInterceptor, it's useful for doing things like implementing a custom forwarding policy. Today you can accept/reject, and even provide a custom preimage to short circuit normal forwarding an "inject" the preimage directly into the route.

Protocol improvement proposals such as the endorsement bit also need the ability to transform an incoming HTLC into a new outgoing HTLC. On example is if you get the bit set on the incoming link, but decide to not set it on the outgoing link. Today, the htlc interceptor won't allow such a workflow. We should extend the interceptor to support this feature.

Steps To Completion

  • Extend the ForwardHtlcInterceptResponse struct with the ability to swap out the outgoing amt and/or custom TLV blobs.

  • Update the intercept-able switch to be able to process the new ResolveHoldForwardAction type.

Metadata

Metadata

Assignees

Labels

enhancementImprovements to existing features / behaviourhtlcswitchroutingrpcRelated to the RPC interface

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions