-
Notifications
You must be signed in to change notification settings - Fork 22
Conversation
Seems like it sometimes sets |
With the new interface-connection being finished soon, should I first just port secio to async/await or already implement the async iterators? |
@mkg20001 async iterators. I'm working on the internal refactor for the switch around the crypto upgrade. I am implementing the plaintext 2.0.0 spec in async iterators as part of that to make sure the upgrade process works smoothly, as well as sorting out any bugs with the current async updates. |
@jacobheun Could you give me some guidance on how to implement them? Btw, it seems like I can't push to this branch |
@mkg20001 yes, once I get the initial dial flow working and any bugs worked out I am aiming to create a contributor guide for the async iterators to help us migrate the remaining modules. Hoping to get started on that in the next couple days. |
This should be fixed, looks like the teams got shuffled a bit. |
d7ed983
to
4cbcf38
Compare
@mkg20001 I opened a PR for a crypto interface for the async work, libp2p/js-libp2p-interfaces#2, which also includes a crypto mock in the test suite for those tests which shows how the crypto streams might get wrapped internally. I'm going to be building plaintext/2.0.0 off of that. I also added an example and some resources to the streaming iterables guide in js-libp2p, libp2p/js-libp2p#466. |
@mkg20001 |
@jacobheun I've updated it-pb-rpc and added the LP encoder/decoder. I'll fix the rest of the mentioned comments and then this should be ready! 🎉 |
There was an issue with benchmarks that was causing the performance to appear to be much higher than it actually is. I am looking into an issue with compatibility against the current version of libp2p. I believe there are a couple places we are still using varint that is causing the issue. I'm looking to fix that today so we can get this merged. |
I created a PR in mkg20001/it-pb-rpc#2 to add support for passing the fixed encoder. The last issue with compatibility I am working on is that this branch is currently just sending the final handshake of nonces over the unencrypted connection. The nonces have to be sent over the newly constructed crypto box streams so that the encryption can be validated. |
Aren't they currently? |
fix: exchange final nonce handshake over encryption
No, the write and read in I pushed up 840c217 which fixes it. I am working on adding a test that will verify the exchange is compliant with the spec. |
95c9991
to
c375211
Compare
c375211
to
41ca19b
Compare
I've added the tests for inbound and outbound (which are the same since it's symmetric) encryption so we can verify the upgrade process. I also updated the dependency list and added node 12 to CI. Here are the most recent benchmarks:
master
I have also run a test with an echo protocol of |
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.
LGTM!
We resolved npm perms issues, the |
I've implemented secio in an async way
For now only the main methods have been done, as I'm unsure whether or not the approach taken by me fits into the libp2p ecosystemI'm refactoring the whole thing, yet it would be great if somebody could review it during the refactor, as I'm unsure whether or not the approach taken by me fits into the libp2p ecosystemBasically: The callback(s) have been completely replace by a new variable
encryptedConnection.awaitConnected
that can beawait
ed to see if any errors occured