Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

feat: adding filter on message when non validator #405

Merged
merged 2 commits into from
Dec 14, 2023

Conversation

Freyskeyd
Copy link
Member

Description

In order to prevent many non validator's messages to be published on the gossip topics, I introduced an update where the message is filtered when the DoubleEcho is producing events.

For validator nothing changed, for FullNode and Sentry node, their Echo and Ready messages are filtered, they still produce Gossip messages tho.

It doesn't mean that a FullNode will not propagate messages from validators, it only prevents a non validator to publish messages that will be ignored by others. FullNode still consume Echo and Ready coming from validators and build their state same as before.

PR Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added or updated tests that comprehensively prove my change is effective or that my feature works

@Freyskeyd Freyskeyd requested a review from a team as a code owner December 14, 2023 11:28
@Freyskeyd Freyskeyd requested review from dvdplm and hadjiszs December 14, 2023 11:28
Signed-off-by: Simon Paitrault <simon.paitrault@gmail.com>
@Freyskeyd Freyskeyd force-pushed the feature/filter-message-for-non-validator branch from 054b973 to b0a1023 Compare December 14, 2023 11:30
Copy link

codecov bot commented Dec 14, 2023

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (b424aa9) 62.85% compared to head (ebde07e) 62.85%.

Files Patch % Lines
crates/topos-tce/src/lib.rs 0.00% 5 Missing ⚠️
crates/topos-tce/src/app_context/protocol.rs 50.00% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #405   +/-   ##
=======================================
  Coverage   62.85%   62.85%           
=======================================
  Files         220      221    +1     
  Lines       11801    11818   +17     
=======================================
+ Hits         7417     7428   +11     
- Misses       4384     4390    +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@dvdplm dvdplm left a comment

Choose a reason for hiding this comment

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

LGTM

I would copy the (excellent) PR description into the module docs for DoubleEcho.

crates/topos-tce/src/app_context/protocol.rs Show resolved Hide resolved
Signed-off-by: Simon Paitrault <simon.paitrault@gmail.com>
@Freyskeyd Freyskeyd merged commit b096482 into main Dec 14, 2023
21 checks passed
@Freyskeyd Freyskeyd deleted the feature/filter-message-for-non-validator branch December 14, 2023 20:57
@Freyskeyd Freyskeyd added this to the Soft-fork investigation milestone Dec 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants