-
Notifications
You must be signed in to change notification settings - Fork 407
Swap NetworkGraph PublicKey
s for [u8; 33]
#960
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
Comments
I'm going to take a look at this one. Will reach out for help / guidance. |
I've migrated the |
Glad to hear someone is working on this! If its not too late, it may make sense to base this work off of #1043, as otherwise it may cause some disruptive conflicts. |
@TheBlueMatt thanks, it's definitely not too late. Had to pause for a bit because of work but getting back to it today 😄 |
Randomly going by, perhaps |
I have this basically complete on my fork. Just making some tweaks and cleaning up before I open the PR. |
Results of #1107 are, roughly (from Github CI):
to
In other words, a slight regression in sending in a loop (maybe, it may just be actions being weird, most of that time is in I/O so I dunno why it would slow down), but otherwise a pretty nice win for routing and a huge win deserializing the network graph itself. |
Deserializing the network graph takes quite a while, of which my initial testing shows 80+% of the time is spent deserializing the publickeys from compressed 33-byte form into secp 64-byte form (and presumably verifying they are on the curve). There is relatively little reason to be verifying all the public keys, let alone using them in 64 byte format everywhere in the network graph in memory. We should instead simply use
[u8; 33]
for them, checking their correctness only after we've built a route with them and need to construct aRoute
object. Note that I'd think this may also represent a material speedup for route finding as pubkey comparison can be inlined instead of needing to call out to C code due to lack of cross-language LTO in most builds.The text was updated successfully, but these errors were encountered: