Skip to content

Set the new dont_forward bit in channel_update messages #1672

Closed

Description

@TheBlueMatt

See lightning/bolts#999 should be super trivial to set.

Activity

  1. added this to the 0.1 milestone on Aug 15, 2022
  2. jirijakes commented on Feb 10, 2023

    @jirijakes
    Contributor

    I am looking at this as my potential first contribution and would like to clarify when the dont_forward flag should be set to 1. To my understanding, the flag should be set to 1 only in get_channel_update_for_unicast when short_channel_id does not exist but latest_inbound_scid_alias exists. In all other cases, it should be 0. Is that correct?

    /// Gets the current channel_update for the given channel. This does not check if the channel
    /// is public (only returning an Err if the channel does not yet have an assigned short_id),
    /// and thus MUST NOT be called unless the recipient of the resulting message has already
    /// provided evidence that they know about the existence of the channel.
    /// May be called with peer_state already locked!
    fn get_channel_update_for_unicast(&self, chan: &Channel<<SP::Target as SignerProvider>::Signer>) -> Result<msgs::ChannelUpdate, LightningError> {
    log_trace!(self.logger, "Attempting to generate channel update for channel {}", log_bytes!(chan.channel_id()));
    let short_channel_id = match chan.get_short_channel_id().or(chan.latest_inbound_scid_alias()) {
    None => return Err(LightningError{err: "Channel not yet established".to_owned(), action: msgs::ErrorAction::IgnoreError}),
    Some(id) => id,
    };
    self.get_channel_update_for_onion(short_channel_id, chan)
    }

  3. TheBlueMatt commented on Feb 10, 2023

    @TheBlueMatt
    CollaboratorAuthor

    No, its unrelated to the SCID, but rather should be set based on the channel is_public

  4. TheBlueMatt commented on Feb 16, 2023

    @TheBlueMatt
    CollaboratorAuthor

    Once we do this, we should print a big fat WARNING log in ChannelManager if we receive a channel_update with the dont_forward bit set but for a channel we don't have - telling the user they may want to look at whether they are passing the correct tx index to chain::Confirm::transactions_confirmed.

  5. removed this from the 0.1 milestone on Oct 11, 2024
  6. Thrishalmadasu commented on Jan 22, 2026

    @Thrishalmadasu
    Contributor

    Hi! Is this issue still open and available to work on?

    It's been a while since the last update, so I wanted to check before diving in.

  7. TheBlueMatt commented on Jan 22, 2026

    @TheBlueMatt
    CollaboratorAuthor

    Yea, I believe so!

  8. malsomesh9 commented on Feb 1, 2026

    @malsomesh9

    I wold like to contribute ? is it open.

  9. malsomesh9 commented on Feb 1, 2026

    @malsomesh9

    @Thrishalmadasu is it still open

  10. Thrishalmadasu commented on Feb 1, 2026

    @Thrishalmadasu
    Contributor

    @malsomesh9 I’ve already created a PR for this issue and am actively working on it.

  11. malsomesh9 commented on Feb 1, 2026

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions