Skip to content

refactor(sync): drop process_block indirection on SyncService#737

Merged
tcoratger merged 2 commits into
leanEthereum:mainfrom
tcoratger:chore/drop-process-block-indirection
May 21, 2026
Merged

refactor(sync): drop process_block indirection on SyncService#737
tcoratger merged 2 commits into
leanEthereum:mainfrom
tcoratger:chore/drop-process-block-indirection

Conversation

@tcoratger
Copy link
Copy Markdown
Collaborator

Summary

  • Merge _default_process_block and _process_block_wrapper into a single process_block method on SyncService and drop the injectable process_block: Callable | None field.
  • HeadSync is now wired directly to SyncService.process_block; the spec call, telemetry, counter, deconstruction, and persistence all live in one place.
  • Tests no longer inject a custom processor: MockForkchoiceStore exposes opt-in on_block_* hooks (post-state, justified/finalized advance) and now carries the attributes the full telemetry path needs (safe_target, real Checkpoint, parent_root on the genesis stub).

Test plan

  • uv run pytest tests/lean_spec/subspecs/sync tests/lean_spec/helpers --no-cov — 159 passed.
  • ruff check, ruff format --check, ty check, codespell, mdformat --check, uv lock --check — all green.

🤖 Generated with Claude Code

tcoratger and others added 2 commits May 20, 2026 23:58
Merge _default_process_block and _process_block_wrapper into a single
process_block method on SyncService and remove the injectable
process_block field. Tests that previously injected a custom processor
now configure the mock store directly via opt-in on_block hooks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tcoratger tcoratger merged commit d7662f6 into leanEthereum:main May 21, 2026
13 checks passed
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