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

Fixes for STR-522 #406

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Fixes for STR-522 #406

wants to merge 3 commits into from

Conversation

delbonis
Copy link
Collaborator

Description

Something unclear is broken with the CSM stuff that's preventing us from correctly advancing the chain. This PR is incomplete and is trying to investigate and fix those issues.

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

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.

Copy link

codecov bot commented Oct 13, 2024

Codecov Report

Attention: Patch coverage is 0% with 253 lines in your changes missing coverage. Please review.

Project coverage is 56.90%. Comparing base (0592017) to head (0e29ec7).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
crates/consensus-logic/src/csm/worker.rs 0.00% 242 Missing ⚠️
crates/state/src/sync_event.rs 0.00% 8 Missing ⚠️
crates/consensus-logic/src/csm/config.rs 0.00% 3 Missing ⚠️
@@            Coverage Diff             @@
##             main     #406      +/-   ##
==========================================
- Coverage   57.06%   56.90%   -0.17%     
==========================================
  Files         255      256       +1     
  Lines       27011    27069      +58     
==========================================
- Hits        15415    15403      -12     
- Misses      11596    11666      +70     
Files with missing lines Coverage Δ
bin/strata-client/src/helpers.rs 0.00% <ø> (ø)
bin/strata-client/src/l1_reader.rs 0.00% <ø> (ø)
...rates/consensus-logic/src/csm/client_transition.rs 61.93% <ø> (ø)
crates/consensus-logic/src/csm/ctl.rs 0.00% <ø> (ø)
crates/consensus-logic/src/csm/message.rs 0.00% <ø> (ø)
crates/consensus-logic/src/csm/state_tracker.rs 46.40% <ø> (ø)
crates/consensus-logic/src/duty/worker.rs 0.00% <ø> (ø)
crates/consensus-logic/src/fork_choice_manager.rs 0.00% <ø> (ø)
crates/consensus-logic/src/l1_handler.rs 0.00% <ø> (ø)
crates/consensus-logic/src/sync_manager.rs 0.00% <ø> (ø)
... and 4 more

... and 22 files with indirect coverage changes

@delbonis
Copy link
Collaborator Author

Here's what I've done so far:

  • reorganized the CSM modules a bit, split out some exec behavior so we might be able to refactor it some more in the future
  • improved logging with span so that we can see from the logs more easily what the CSM is trying to do
  • added sync event retry and exponential backoff so if it really is a transient issue we'll just retry it in a second or a few
  • if there's ever an error processing a CSM message we quit the CSM worker, which crashes the client that we can identify more clearly instead of leaving it in some weird broken state

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