Skip to content

Conversation

@carlaKC
Copy link
Owner

@carlaKC carlaKC commented Oct 23, 2025

Downside:

  • We create this struct early on, so have to set this value to none and then mutate it.

Upside:

  • We coherently store the accountable signal with the other forwarding information that we'll be using later on.

Alternative is here, I like it less.

Downside:
- We create this struct early on, so have to set this value to none
  and then mutate it.

Upside:
- We coherently store the accountable signal with the other forwarding
  information that we'll be using later on.
@carlaKC carlaKC force-pushed the accountable-outgoing-in-pendinghtlcinfo branch from d93db8f to c62eb0f Compare October 28, 2025 12:33
@carlaKC
Copy link
Owner Author

carlaKC commented Oct 28, 2025

@elnosh - first attempt at implementing blip 04! Please will you give me a sanity check on impl and then I'll write some tests + open upstream 🙏

Copy link

@elnosh elnosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mostly one comment that I'm unsure about where nodes would provide their accountability signal from a reputation algorithm

Comment on lines +11329 to +11335
// Set the value for our outgoing accountable signal to copy the received
// incoming value (or just set zero if not present). This point is where we
// could introduce an interceptor that provides us with custom accountable
// values if desired.
pending_add.forward_info.outgoing_accountable =
pending_add.forward_info.incoming_accountable.or(Some(0));

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this should be here or in process_forward_htlcs? IIUC, the outgoing channel on which the HTLC will end up being forwarded could potentially change there.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taken a shot at this here - I think that I prefer this approach for now, because it gives us good flexibility (see PR description). Also addresses the PendingHTLCRouting comment below nicely (in that we don't have to put it anywhere, which I like).

Comment on lines +432 to +434
/// An experimental field indicating whether the outgoing node's reputation would be held
/// accountable for the timely resolution of the offered HTLC.
pub outgoing_accountable: Option<u8>,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this field won't apply for receives, would it be better to put it accordingly for each variant in PendingHTLCRouting?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants