-
Notifications
You must be signed in to change notification settings - Fork 3
ping and identify #9
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
Conversation
turuslan
commented
Aug 26, 2025
- ping protocol
- identify protocol
- fix quic incoming connection address
- some changes from gossip #6
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.
Pull Request Overview
This PR implements ping and identify protocols for libp2p, along with a fix for QUIC connection address handling. It adds two core libp2p protocols that enable peer connectivity testing and peer information exchange.
- Implements ping protocol for peer connectivity testing with configurable timeout and interval
- Implements identify protocol for exchanging peer information including addresses and supported protocols
- Fixes QUIC incoming connection address resolution to use actual peer endpoint
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/transport/quic/engine.cpp | Fixes QUIC connection to use actual peer socket address instead of remote address from operation |
| src/protocol/ping.cpp | Implements ping protocol with echo functionality and periodic ping operations |
| src/protocol/identify/identify.proto | Defines protobuf schema for identify protocol messages |
| src/protocol/identify/identify.cpp | Implements identify protocol for peer information exchange |
| src/protocol/identify/CMakeLists.txt | Build configuration for identify protocol |
| src/protocol/CMakeLists.txt | Build configuration for ping protocol |
| src/host/basic_host.cpp | Changes constructor parameters from unique_ptr to shared_ptr and adds new methods |
| src/CMakeLists.txt | Links new protocol libraries |
| include/libp2p/protocol/ping.hpp | Header for ping protocol implementation |
| include/libp2p/protocol/identify.hpp | Header for identify protocol implementation |
| include/libp2p/peer/protocol.hpp | Simplifies protocol name type definitions |
| include/libp2p/host/basic_host.hpp | Updates method signatures for shared_ptr usage |
| include/libp2p/coro/yield.hpp | Utility for coroutine thread switching |
| include/libp2p/common/weak_macro.hpp | Macros for weak pointer handling |
| include/libp2p/common/protobuf.hpp | Utilities for protobuf encoding/decoding |
| include/libp2p/basic/write_varint.hpp | Utility for writing varint-prefixed messages |
| include/libp2p/basic/read_varint.hpp | Utility for reading varint-prefixed messages |
| include/libp2p/basic/encode_varint.hpp | Utility for varint encoding |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
64e6c38 to
68cb463
Compare