Skip to content

Conversation

@evgenyzdanovich
Copy link
Contributor

@evgenyzdanovich evgenyzdanovich commented Oct 1, 2025

Description

  • additional adapters in the service framework for listeners service.
  • integration of ASM Logs in the CSM.
  • "servization" of CSM worker as a listener.

Note:
parts of the work were done with the use of Claude.

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
  • Dependency Update

Notes to Reviewers

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 (where necessary) tests that prove my changes are effective or that my feature works.
  • New and existing tests pass with my changes.
  • I have disclosed my use of AI
    in the body of this PR.

Related Issues

@github-actions
Copy link
Contributor

github-actions bot commented Oct 1, 2025

Commit: 801a821

SP1 Execution Results

program cycles success
EVM EE STF 1,173,192
CL STF 330,693
Checkpoint 2,422

Copy link
Contributor

@delbonis delbonis left a comment

Choose a reason for hiding this comment

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

Really happy with how this is coming along far. Main comments are on service input handling and logging.

Do you think you should make the change to how ServiceMonitor is defined in this PR or should we do it in a different one?

@evgenyzdanovich
Copy link
Contributor Author

evgenyzdanovich commented Oct 1, 2025

Do you think you should make the change to how ServiceMonitor is defined in this PR or should we do it in a different one?

@delbonis I don't have a strong opinion here.
I kept changes to crates/service within first and last commit (so far), so I can easily split it into a separate PR if needed.

@evgenyzdanovich
Copy link
Contributor Author

@delbonis PTAL on service related stuff (I'll address logs tiny bit later).

@delbonis
Copy link
Contributor

delbonis commented Oct 2, 2025

@evgenyzdanovich I don't see any other open PRs that use the monitor system right now so it's probably fine just to do it here, since this is close to being mergeable and it won't cause much complication.

Copy link
Contributor

@delbonis delbonis left a comment

Choose a reason for hiding this comment

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

Changes to services look good, this is mostly nits, plus the other review comments.

Copy link
Contributor

@prajwolrg prajwolrg left a comment

Choose a reason for hiding this comment

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

Apart from the log handling, looks good to me.


It seems you’ve intentionally avoided making major changes to the existing data structures and legacy code in this PR, which is fine. Maybe we should also keep a track of the changes that needs to be done in the upcoming PRs.

@evgenyzdanovich evgenyzdanovich force-pushed the str-1739-logs-in-csm branch 2 times, most recently from 59e12cc to 81d4714 Compare October 10, 2025 15:01
@evgenyzdanovich
Copy link
Contributor Author

mostly finished working on this:

  • rebased PR
  • resolved most of the comments
  • fixed tests

what's left is to resolve proof and checkpoint related stuff. I'll ask for a final review once it's ready.

@codecov
Copy link

codecov bot commented Oct 12, 2025

Codecov Report

❌ Patch coverage is 83.92102% with 114 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.35%. Comparing base (f2d6b5e) to head (66e4877).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
crates/db-store-rocksdb/src/asm/db.rs 0.00% 26 Missing ⚠️
crates/db-store-rocksdb/src/client_state/db.rs 0.00% 23 Missing ⚠️
crates/service/src/status.rs 52.63% 18 Missing ⚠️
bin/strata-dbtool/src/cmd/chainstate.rs 78.94% 12 Missing ⚠️
crates/csm-worker/src/processor.rs 96.04% 11 Missing ⚠️
crates/storage/src/managers/client_state.rs 0.00% 8 Missing ⚠️
crates/consensus-logic/src/sync_manager.rs 88.00% 6 Missing ⚠️
crates/csm-worker/src/sync_actions.rs 90.32% 3 Missing ⚠️
crates/csm-worker/src/service.rs 92.59% 2 Missing ⚠️
crates/db-store-sled/src/asm/db.rs 89.47% 2 Missing ⚠️
... and 2 more
@@            Coverage Diff             @@
##             main    #1078      +/-   ##
==========================================
+ Coverage   74.97%   75.35%   +0.38%     
==========================================
  Files         499      498       -1     
  Lines       42123    42406     +283     
==========================================
+ Hits        31580    31956     +376     
+ Misses      10543    10450      -93     
Flag Coverage Δ
functional 53.69% <81.18%> (+0.46%) ⬆️
unit 55.01% <55.57%> (+1.33%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
bin/strata-client/src/main.rs 91.98% <100.00%> (-0.05%) ⬇️
...asm/subprotocols/checkpoint-v0/src/verification.rs 69.31% <100.00%> (+17.04%) ⬆️
crates/asm/worker/src/builder.rs 91.17% <100.00%> (-2.01%) ⬇️
crates/asm/worker/src/handle.rs 70.00% <100.00%> (+22.94%) ⬆️
crates/asm/worker/src/service.rs 88.13% <100.00%> (+1.34%) ⬆️
crates/consensus-logic/src/fork_choice_manager.rs 80.07% <ø> (+1.07%) ⬆️
crates/csm-worker/src/state.rs 100.00% <100.00%> (ø)
crates/db/src/traits.rs 0.00% <ø> (ø)
crates/sequencer/src/block_template/handle.rs 86.56% <ø> (ø)
crates/service/src/builder.rs 92.72% <100.00%> (+30.90%) ⬆️
... and 15 more

... and 31 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@prajwolrg prajwolrg marked this pull request as ready for review October 13, 2025 08:56
@prajwolrg prajwolrg requested review from a team as code owners October 13, 2025 08:56
Copy link
Contributor

@bewakes bewakes left a comment

Choose a reason for hiding this comment

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

Great work! It's very good to see the service framework being used/enhanced. :)
There are some nits and suggestions, particularly to add unit tests.

@bewakes
Copy link
Contributor

bewakes commented Oct 13, 2025

Approved the PR just to realize that this needs a rebase.

@prajwolrg prajwolrg dismissed stale reviews from bewakes and delbonis via febf00a October 13, 2025 16:37
@prajwolrg prajwolrg force-pushed the str-1739-logs-in-csm branch from 058da54 to febf00a Compare October 13, 2025 16:37
@prajwolrg
Copy link
Contributor

The dbtools functional tests were consistently failing on this PR but are now passing.

The issue was identified in revert_checkpoint, where L1 entries were deleted but the corresponding ClientState entries were not. This behavior has been corrected.

Previously, the bug remained hidden because the CSM was the first consumer of L1 information. This is no longer the case, as the ASM now consumes it first. Since ASM entries should never be removed (as they remain unchanged once committed and processed), the ClientState must be cleaned up and reapplied instead.

It was also observed that similar changes are being introduced in this PR, so conflicts may need to be resolved in the PR whichever gets merged later.

@prajwolrg prajwolrg self-assigned this Oct 14, 2025
@prajwolrg prajwolrg enabled auto-merge October 14, 2025 11:15
@prajwolrg prajwolrg requested a review from delbonis October 14, 2025 14:54
Copy link
Member

@storopoli storopoli left a comment

Choose a reason for hiding this comment

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

ACK

@prajwolrg prajwolrg added this pull request to the merge queue Oct 14, 2025
Merged via the queue into main with commit 6aab219 Oct 14, 2025
36 of 39 checks passed
@prajwolrg prajwolrg deleted the str-1739-logs-in-csm branch October 14, 2025 15:48
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.

7 participants