-
Notifications
You must be signed in to change notification settings - Fork 906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rpc: checkmessage return an error is the pubkey is not found in the graph #5252
rpc: checkmessage return an error is the pubkey is not found in the graph #5252
Conversation
131f23b
to
0c07b7a
Compare
ACK 0c07b7a |
Ok, this is obviously confusing for people. How about we just return an error in this case? Because we've failed to verify, we're probably best off failing: we know nothing useful about the signature on that case. |
Yeah I agree on this, the idea that I have not implemented is to make the public key a requirement for the command, but I was not able to find a historical reason to say that my idea was a good idea. So I make the question here, what is the reason to have the pub key optional? |
Yeah, lnd didn't require the pubkey. I felt it was too easy to misuse, but that was their API. That's kind of OK (it means use a pubkey from known nodes), but it should fail more cleanly. OK, let's change it (with So, it will always return valid=true (deprecated), otherwise it will actually error. Make sure the error includes the public key they would have needed to use to make the signature valid though: if someone really wants that they can dig it out. |
I agree, I will try to make this change today! |
72ec17a
to
bde4d04
Compare
Ok, the suggestion is landed in the PR! let wait the CI to make sure I didn't put any regression! |
dec3302
to
25a2e82
Compare
25a2e82
to
d211bf0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it needs rebasing anyway, some minor nitpicks :)
d211bf0
to
5fe1b17
Compare
@rustyrussell Apologize for the delay here but I missed your review, just jump here today during a tour of my open PR on cln and found that you were waiting for me! I rebased and resolved the conflicts |
5fe1b17
to
cf7617e
Compare
1618819
to
6b8a44d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack 6b8a44d
Returning an warning message when the pub key is not specified and there is no node in the graph. We try to help people that use core lightning as a signer and nothings else. Changelog-Deprecated: rpc: checkmessage return an error when the pubkey is not specified and it is unknown in the network graph.
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
6b8a44d
to
aed995c
Compare
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
aed995c
to
8d695ab
Compare
Trivial conflict resolution, and rebase on master |
Ack 8d695ab |
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Fixed the rust autogeneration code :) the diff check works! |
Returning a warning message when the pub key is not specified and there is no node in the graph.
We try to help people that use core lightning as a signer and nothing else.
Fixes #5247
Changelog-Added: rpc: checkmessage return an warning msg when no node is found in the graph and no pubkey is provided.
Signed-off-by: Vincenzo Palazzo vincenzopalazzodev@gmail.com