Skip to content

Conversation

@turuslan
Copy link
Contributor

@turuslan turuslan commented Nov 3, 2025

  • receiveMessage to know message received_from peers
  • "publish" messages are big, split batch to separate frames for faster independent decoding
  • fix lsquic_stream_write when lsquic buffer is full

@turuslan turuslan requested a review from kamilsa November 3, 2025 14:47
@kamilsa kamilsa requested a review from Copilot November 4, 2025 04:39
Copy link

Copilot AI left a 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 support for handling write buffer full conditions in QUIC streams and improves gossip message batching. The key changes include adding asynchronous write flow control to QUIC streams, exposing the full Message object (including metadata like sender) to gossip consumers, and splitting large gossip batches into separate protobuf messages.

  • Added write flow control to QUIC streams to handle buffer full conditions
  • Modified gossip to send Message objects instead of just payload data, including sender information
  • Refactored gossip message batching to split control messages and publish messages into separate protobuf frames

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/transport/quic/stream.cpp Implements retry logic for write operations when buffer is full
src/transport/quic/engine.cpp Adds on_write callback handler to notify waiting writers
include/libp2p/transport/quic/engine.hpp Adds writing field to StreamCtx for async write coordination
src/protocol/gossip/gossip.cpp Refactors message batching, adds receiveMessage method, and includes sender in messages
include/libp2p/protocol/gossip/gossip.hpp Updates Topic API to expose full Message objects
include/libp2p/protocol/gossip/config.hpp Adds received_from field to Message struct

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@turuslan turuslan merged commit 7a3dce0 into main Nov 4, 2025
2 checks passed
@kamilsa kamilsa deleted the feature/gossip-from branch November 4, 2025 06:03
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