lnrpc: add auth_proof to graph APIs#9950
lnrpc: add auth_proof to graph APIs#9950yyforyongyu merged 2 commits intolightningnetwork:masterfrom
Conversation
|
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
348ab1d to
5e0003c
Compare
lnrpc/lightning.proto
Outdated
| channel. Each of these signatures signs the following digest: chanID || | ||
| nodeID1 || nodeID2 || bitcoinKey1|| bitcoinKey2 || 2-byte-feature-len || | ||
| features. |
There was a problem hiding this comment.
this is outdated, we sign more than just this for the channelAnnouncement so we can maybe remove this comment ?
There was a problem hiding this comment.
I removed the comment. Note that I copy-pasted the description from graph/db/models/channel_auth_proof.go and the outdated comment still exists there.
|
|
||
| // bitcoin_sig1 are the raw bytes of the first bitcoin signature encoded | ||
| // in DER format. | ||
| bytes bitcoin_sig1 = 2; |
There was a problem hiding this comment.
Nit: add a comment that this is the signature of the MultiSigKey key of the channel.
| edge.Node2Policy = marshalDBRoutingPolicy(c2) | ||
| } | ||
|
|
||
| if includeAuthProof && edgeInfo.AuthProof != nil { |
There was a problem hiding this comment.
Add a comment when we do not expect an AuthProof (private channels)
There was a problem hiding this comment.
we also dont expect it for our own public channels for the time between channel funding & channel announcement
There was a problem hiding this comment.
Added the comment. Thanks, @ziggie1984 @ellemouton !
| // the advertised channel. | ||
| // This field is not filled by default. Pass include_auth_proof flag to | ||
| // DescribeGraph, GetNodeInfo or GetChanInfo to get this data. | ||
| ChannelAuthProof auth_proof = 10; |
There was a problem hiding this comment.
add a comment that this only is available for advertised channels.
There was a problem hiding this comment.
Added the comment.
Added flag include_auth_proof to DescribeGraph, GetNodeInfo, GetChanInfo and the corresponding lncli commands. With the flag, these APIs add AuthProof (signatures from the channel announcement) to the returned ChannelEdge. This is useful to extract this data from the DB.
5e0003c to
409bf3c
Compare
Change Description
Added flag
include_auth_prooftoDescribeGraph,GetNodeInfo,GetChanInfoand the correspondinglnclicommands. With the flag, these APIs addAuthProof(signatures from the channel announcement) to the returnedChannelEdge.This is useful to extract this data from the DB.
Steps to Test
Pull Request Checklist
Testing
Code Style and Documentation
[skip ci]in the commit message for small changes.📝 Please see our Contribution Guidelines for further guidance.