Skip to content
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

CBOR Stream Read in LibP2P RPC #932

Merged
merged 8 commits into from
Jan 18, 2021
Merged

CBOR Stream Read in LibP2P RPC #932

merged 8 commits into from
Jan 18, 2021

Conversation

ec2
Copy link
Member

@ec2 ec2 commented Jan 15, 2021

Summary of changes
Changes introduced in this pull request:

  • Before, we read libp2p RPC streams until we see an EOF. This is wrong because we can tell when cbor objects end and lotus doesnt send an EOF after writing to the stream. This PR introduces streams and decodes.
  • Must come in after Switch temp bytes deserialize to Cow #931

Reference issue to close (if applicable)

Closes

Other information and links

Copy link
Contributor

@austinabell austinabell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ut but looks correct. Also, what was the reason for not switching the write to this as well? Not a blocking issue since the functionality will be the same, but would avoid going through the vec buffer first. Seems like it's worth to do now while we test this specifically?

@@ -45,6 +45,8 @@ ipld_blockstore = "0.1"
async-trait = "0.1"
lazy_static = "1.4"

futures_cbor_codec = { git = "https://github.com/najamelan/futures_cbor_codec", rev = "de08e31530513f993cbf5efef7311ac5194b2256" }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did the most recent release, 0.2 not work?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it because of the version bump from the commit after the release?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. The 0.2 release is using futures-codec 0.3 whereas I wanted to use 0.4.

@ec2 ec2 merged commit 749303c into main Jan 18, 2021
@ec2 ec2 deleted the ec2/stream-rpc-read branch January 18, 2021 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Network Libp2p and PubSub stuff Status: Needs Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants