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: remove epoch manager calls from consensus gossipsub #1190

Merged

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Oct 28, 2024

Description

fix: remove epoch manager calls from consensus gossipsub

Motivation and Context

Several epoch manager calls were used for message broadcasts, however, all required info obtained from these calls is already available at the consensus level, this PR removes the epoch manager dependency from consensus gossip only using the epoch manager events receiver.

Also directly encode and send the gossip message in the handle instead of first routing the message through the consensus gossip service and then to networking. The consensus gossip service is only responsible for ensuring that the node is subscribed to the correct shard group topic.

Increased gossipsub message limit to 1MiB to account for large foreign proposal messages which were rejected when testing. This is temporary and improvements to the protocol should allow us to reduce this.

How Has This Been Tested?

Manually

What process can a PR reviewer use to test or verify this change?

Slight and certainly unobservable performance improvements, this is a simplification PR

Breaking Changes

  • None
  • Requires data directory to be deleted
  • Other - Please specify

@sdbondi sdbondi force-pushed the gossipsub-remove-epoch-manger-calls branch from 1701a01 to e0cc1f8 Compare October 28, 2024 13:17
Copy link

Test Results (CI)

578 tests  ±0   578 ✅ ±0   3h 5m 11s ⏱️ + 12m 18s
 64 suites ±0     0 💤 ±0 
  2 files   ±0     0 ❌ ±0 

Results for commit e0cc1f8. ± Comparison against base commit d1d0d88.

@sdbondi sdbondi merged commit f45c0c1 into tari-project:development Oct 28, 2024
12 checks passed
@sdbondi sdbondi deleted the gossipsub-remove-epoch-manger-calls branch October 28, 2024 13:54
sdbondi added a commit that referenced this pull request Oct 29, 2024
)

Description
---
fix(gossip): bug vn might not be subscribed to consensus messages
Removed unused `ThisValidatorIsRegistered` epoch manager event
Added `registered_shard_group` to `EpochChanged` event that is Some when
local VN is registered for the epoch

Motivation and Context
---
Bug introduced in #1190 where VNs might not be subscribed to consensus
messages.

How Has This Been Tested?
---
Manually, validator node that has been shutdown and restarted without
the epoch changing was not subscribed to consensus messages

What process can a PR reviewer use to test or verify this change?
---
As above

Breaking Changes
---

- [x] None
- [ ] Requires data directory to be deleted
- [ ] Other - Please specify
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants