-
Notifications
You must be signed in to change notification settings - Fork 419
Split NetworkGraph
message handling fns into unsigned and signed (+update bindings)
#758
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
Split NetworkGraph
message handling fns into unsigned and signed (+update bindings)
#758
Conversation
It seems travis isn't even bothering to spawn our jobs anymore, and Github CI has been pretty stable, so just drop Travis entirely.
Codecov Report
@@ Coverage Diff @@
## main #758 +/- ##
=======================================
Coverage 91.41% 91.41%
=======================================
Files 37 37
Lines 22411 22423 +12
=======================================
+ Hits 20486 20497 +11
- Misses 1925 1926 +1
Continue to review full report at Codecov.
|
2ec7475
to
b80a74b
Compare
This makes the public utility methods in `NetworkGraph` able to do UTXO lookups ala `NetworkMsgHandler`'s `RoutingMessageHandler` implementation, slightly simplifying the public interface. We also take this opportunity to verify signatures before calling out to UTXO lookups, under the "do actions in order of cheapest-to-most-expensive to reduce DoS surface" principle.
932d3ac
to
083c02a
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.
Nice clean-up! Looks like a largely mechanical change.
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.
I like the new API!
This takes the now-public `NetworkGraph` message handling functions and splits them all into two methods - one which takes a required Secp256k1 context and verifies signatures and one which takes only the unsigned part of the message and does not take a Secp256k1 context. This both clarifies the public API as well as simplifies it, all without duplicating code. Finally, this adds an assertion in the Router fuzzer to make sure the constants used for message deserialization are correct.
083c02a
to
1447729
Compare
Only changed the minor nits from @jkczyz. |
1447729
to
ccd4a7a
Compare
Val noted in 748 (#748 (comment)) that exposing the existing functions as public was a bit lazy. I indicated I'd handle it in a follow-up post-0.0.12, but realized that 0.0.12 didn't actually pass bindings checks because the newly-exposed APIs required additional features in the bindings. Thus, I went ahead and did the fixup here as well as updated the auto-generated bindings successfully.
As a bonus, this drops Travis CI.