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

Enhance traffic observability by using SendEnvelope instead of Send #1099

Closed
staheri14 opened this issue Sep 27, 2023 · 0 comments · Fixed by #1101
Closed

Enhance traffic observability by using SendEnvelope instead of Send #1099

staheri14 opened this issue Sep 27, 2023 · 0 comments · Fixed by #1101
Assignees

Comments

@staheri14
Copy link
Collaborator

staheri14 commented Sep 27, 2023

Context

When you want to send data to another peer, two methods can be used: Send (link) and SendEnvelope (link). Note that SendEnvelope actually uses Send internally.
If we look at the code, we see that Send is used directly in two places: in the CAT mempool and in the Broadcast method (link) of switch. However, it seems like switch's Broadcast isn't used anywhere else, and instead, the code prefers to use BroadcastEnvelope everywhere else. Considering this, it appears that SendEnvelope is the preferred choice in most cases.
Sticking to the usage of one method, e.g., SendEnvelope could enhance the clarity of monitoring outgoing traffic (note that it is preferred to monitor the message type as well which is available in the SendEnvelope side, before marshalling the message to bytes).

Problem

With the current state of the celestia-core, we lack observability into the messages (and message types) exchanged via the CAT mempool Reactor, using P2P Prometheus metrics (MessageReceiveBytesTotal and MessageSendBytesTotal). To provide that visibility, we need to utilize use SendEnvelope in that reactor instead of Send. This change should also be applied to other parts of the code that might be using Send.

@staheri14 staheri14 self-assigned this Sep 27, 2023
@staheri14 staheri14 changed the title Enhance traffic observability by using SendEnvelope in CAT mempool reactor Enhance traffic observability by using SendEnvelope instead of Send Sep 27, 2023
rootulp pushed a commit to rootulp/celestia-core that referenced this issue Sep 20, 2024
…estiaorg#1099)

Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.8.0 to 2.9.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](docker/setup-buildx-action@v2.8.0...v2.9.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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 a pull request may close this issue.

1 participant