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

fix: upgrade to libp2p 0.53 #205

Merged
merged 1 commit into from
Dec 5, 2023
Merged

fix: upgrade to libp2p 0.53 #205

merged 1 commit into from
Dec 5, 2023

Conversation

nathanielc
Copy link
Collaborator

@nathanielc nathanielc commented Dec 5, 2023

Libp2p has three major features we want:

  1. Stable support for QUIC
  2. Full tracing support
  3. Uses prometheus_client 0.22, this enables use to use tokio-metrics

In order to upgrade we needed to address the follow major breaking changes:

  • KeepAlive is now a boolean signal (bitswap keep alive logic is now much simpler)
  • Supported Protocols are only known per connection, we now hard code the list for diagnostic reasons

There are a few other minor breaking changes but did not affect our code much.

Closes WS1-1291
Closes WS1-1345

Copy link

linear bot commented Dec 5, 2023

Copy link
Contributor

@dav1do dav1do left a comment

Choose a reason for hiding this comment

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

I noticed that the test_dht test fails but I didn't investigate. That was the only one with --no-fail-fast. Otherwise a minor comment/question.

beetle/iroh-bitswap/src/lib.rs Show resolved Hide resolved
p2p/src/node.rs Show resolved Hide resolved
Copy link
Collaborator

@smrz2001 smrz2001 left a comment

Choose a reason for hiding this comment

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

LGTM apart from a minor typo and a question :shipit:

beetle/iroh-bitswap/src/handler.rs Outdated Show resolved Hide resolved
self.keep_alive
fn connection_keep_alive(&self) -> bool {
// Only keep the connection alive if we are not idle
!matches!(&self.state, State::Idle)
}

// TODO(WS1-1345): Remove uses of ConnectionHandler::Error
Copy link
Collaborator

@smrz2001 smrz2001 Dec 5, 2023

Choose a reason for hiding this comment

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

WS1-1345 is also taken care of in this PR, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It does, I have removed this comment and others like it. Thanks

Libp2p has three major features we want:

1. Stable support for QUIC
2. Full tracing support
3. Uses prometheus_client 0.22, this enables use to use tokio-metrics

In order to upgrade we needed to address the follow major breaking
changes:

* KeepAlive is now a boolean signal (bitswap keep alive logic is now
  much simpler)
* Supported Protocols are only known per connection, we now hard code
  the list for diagnostic reasons

There are a few other minor breaking changes but did not affect our code
much.
Copy link

linear bot commented Dec 5, 2023

@nathanielc nathanielc added this pull request to the merge queue Dec 5, 2023
Merged via the queue into main with commit 9a8c017 Dec 5, 2023
5 checks passed
@nathanielc nathanielc deleted the fix/libp2p-0.53 branch December 5, 2023 23:37
@smrz2001 smrz2001 mentioned this pull request Jan 23, 2024
@github-actions github-actions bot mentioned this pull request Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants