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

consensus-logic: Remove redundant messaging #457

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bewakes
Copy link
Contributor

@bewakes bewakes commented Nov 7, 2024

Description

This PR removes the cycle between FCM worker and CSM worker by having CSM send NewState message to FCM via watch channel instead as ForkChoiceMessage::NewState via mpsc channel.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature/Enhancement (non-breaking change which adds functionality or enhances an existing one)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor
  • New or updated tests

Checklist

  • I have performed a self-review of my code.
  • I have commented my code where necessary.
  • I have updated the documentation if needed.
  • My changes do not introduce new warnings.
  • I have added tests that prove my changes are effective or that my feature works.
  • New and existing tests pass with my changes.

Related Issues

Make StatusRx attributes private and add wait_until_genesis

sync-worker: Remove sleep while handling block

status_manager: Restructure genesis check thread

consensus-logic: Fix state watch channel deadlock
@bewakes
Copy link
Contributor Author

bewakes commented Nov 7, 2024

The conversation from #434 (comment) can be continued here.

Copy link

codecov bot commented Nov 7, 2024

Codecov Report

Attention: Patch coverage is 3.20000% with 121 lines in your changes missing coverage. Please review.

Project coverage is 57.00%. Comparing base (7bc96ed) to head (2721e56).

Files with missing lines Patch % Lines
crates/status/src/status_manager.rs 0.00% 60 Missing ⚠️
crates/consensus-logic/src/fork_choice_manager.rs 0.00% 33 Missing ⚠️
crates/consensus-logic/src/csm/worker.rs 0.00% 6 Missing ⚠️
crates/consensus-logic/src/unfinalized_tracker.rs 44.44% 5 Missing ⚠️
bin/strata-client/src/rpc_server.rs 0.00% 4 Missing ⚠️
crates/consensus-logic/src/sync_manager.rs 0.00% 4 Missing ⚠️
crates/consensus-logic/src/csm/ctl.rs 0.00% 3 Missing ⚠️
crates/state/src/client_state.rs 0.00% 3 Missing ⚠️
crates/bridge-relay/src/relayer.rs 0.00% 1 Missing ⚠️
crates/consensus-logic/src/csm/state_tracker.rs 0.00% 1 Missing ⚠️
... and 1 more
@@            Coverage Diff             @@
##             main     #457      +/-   ##
==========================================
- Coverage   57.01%   57.00%   -0.02%     
==========================================
  Files         252      252              
  Lines       27950    27963      +13     
==========================================
+ Hits        15937    15941       +4     
- Misses      12013    12022       +9     
Files with missing lines Coverage Δ
crates/consensus-logic/src/csm/message.rs 0.00% <ø> (ø)
crates/sync/src/worker.rs 0.00% <ø> (ø)
crates/bridge-relay/src/relayer.rs 33.88% <0.00%> (ø)
crates/consensus-logic/src/csm/state_tracker.rs 46.03% <0.00%> (-0.37%) ⬇️
crates/consensus-logic/src/duty/worker.rs 0.00% <0.00%> (ø)
crates/consensus-logic/src/csm/ctl.rs 0.00% <0.00%> (ø)
crates/state/src/client_state.rs 50.98% <0.00%> (-1.02%) ⬇️
bin/strata-client/src/rpc_server.rs 0.00% <0.00%> (ø)
crates/consensus-logic/src/sync_manager.rs 0.00% <0.00%> (ø)
crates/consensus-logic/src/unfinalized_tracker.rs 91.76% <44.44%> (-1.06%) ⬇️
... and 3 more

... and 2 files with indirect coverage changes

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.

1 participant