Include funding amounts in channel announcements#102
Merged
TheBlueMatt merged 2 commits intolightningdevkit:mainfrom Jul 12, 2025
Merged
Include funding amounts in channel announcements#102TheBlueMatt merged 2 commits intolightningdevkit:mainfrom
TheBlueMatt merged 2 commits intolightningdevkit:mainfrom
Conversation
This is the server-side changeset for addressing lightningdevkit/rust-lightning#1559
|
I've assigned @jkczyz as a reviewer! |
jkczyz
approved these changes
Jul 11, 2025
| let mut node_id_b_index = node_id_b_index as u64; | ||
| if version >= 2 { | ||
| // Set the "extra data" bit so that we can write the funding amount below. | ||
| node_id_b_index |= 1 << 63; |
There was a problem hiding this comment.
Does the client reset this bit when looking up the node id?
Contributor
Author
There was a problem hiding this comment.
| BigSize(node_id_a_index as u64).write(&mut stripped_announcement).unwrap(); | ||
| BigSize(node_id_b_index as u64).write(&mut stripped_announcement).unwrap(); | ||
|
|
||
| let mut node_id_b_index = node_id_b_index as u64; |
There was a problem hiding this comment.
I take it we'll always use the second node index for indicating extra data follows?
Contributor
Author
There was a problem hiding this comment.
TheBlueMatt
added a commit
to TheBlueMatt/rust-lightning
that referenced
this pull request
Jul 12, 2025
Neither `channel_announcement`s nor `channel_update`s contain a channel's actual funding amount, complicating scoring as nodes may set an `htlc_maximum_msat` to something less than the funding amount. When scoring, we use `htlc_maximum_msat` anyway if we don't know the funding amount, but its not a perfect proxy. In lightningdevkit/rapid-gossip-sync-server#102 we started including a channel's real funding amount in RGS data, and here we start parsing it and including it in our network graph.
TheBlueMatt
added a commit
to TheBlueMatt/rust-lightning
that referenced
this pull request
Jul 12, 2025
Neither `channel_announcement`s nor `channel_update`s contain a channel's actual funding amount, complicating scoring as nodes may set an `htlc_maximum_msat` to something less than the funding amount. When scoring, we use `htlc_maximum_msat` anyway if we don't know the funding amount, but its not a perfect proxy. In lightningdevkit/rapid-gossip-sync-server#102 we started including a channel's real funding amount in RGS data, and here we start parsing it and including it in our network graph. Fixes lightningdevkit#1559
TheBlueMatt
added a commit
to TheBlueMatt/rust-lightning
that referenced
this pull request
Jul 16, 2025
Neither `channel_announcement`s nor `channel_update`s contain a channel's actual funding amount, complicating scoring as nodes may set an `htlc_maximum_msat` to something less than the funding amount. When scoring, we use `htlc_maximum_msat` anyway if we don't know the funding amount, but its not a perfect proxy. In lightningdevkit/rapid-gossip-sync-server#102 we started including a channel's real funding amount in RGS data, and here we start parsing it and including it in our network graph. Fixes lightningdevkit#1559
TheBlueMatt
added a commit
to TheBlueMatt/rust-lightning
that referenced
this pull request
Jul 17, 2025
Neither `channel_announcement`s nor `channel_update`s contain a channel's actual funding amount, complicating scoring as nodes may set an `htlc_maximum_msat` to something less than the funding amount. When scoring, we use `htlc_maximum_msat` anyway if we don't know the funding amount, but its not a perfect proxy. In lightningdevkit/rapid-gossip-sync-server#102 we started including a channel's real funding amount in RGS data, and here we start parsing it and including it in our network graph. Fixes lightningdevkit#1559
carlaKC
pushed a commit
to carlaKC/rust-lightning
that referenced
this pull request
Aug 21, 2025
Neither `channel_announcement`s nor `channel_update`s contain a channel's actual funding amount, complicating scoring as nodes may set an `htlc_maximum_msat` to something less than the funding amount. When scoring, we use `htlc_maximum_msat` anyway if we don't know the funding amount, but its not a perfect proxy. In lightningdevkit/rapid-gossip-sync-server#102 we started including a channel's real funding amount in RGS data, and here we start parsing it and including it in our network graph. Fixes lightningdevkit#1559
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the server-side changeset for addressing
lightningdevkit/rust-lightning#1559