Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

chore(node/engine): cleanup engine tasks errors. refactors the engine build task to reuse the insert task#2399

Merged
theochap merged 1 commit intomainfrom
theo/engine-cleanups
Jul 15, 2025
Merged

chore(node/engine): cleanup engine tasks errors. refactors the engine build task to reuse the insert task#2399
theochap merged 1 commit intomainfrom
theo/engine-cleanups

Conversation

@theochap
Copy link
Member

@theochap theochap commented Jul 11, 2025

Description

This PR does the following cleanups to the engine tasks:

  • Use explicit error types instead of dyn Box<...> for the EngineTaskError. The goal of this is twofold:
    • Improve the composability of engine tasks (and be able to do some control flow when an engine task emits an error)
    • Allows explicit testing of the error cases (in the future when we'll add tests for the engine tasks)
  • Refactors the build task in the engine to reuse the InsertUnsafe task logic. This task is now called InsertTask to also encapsulate the case where we insert a derived block.

Close #2390. Progress towards #2389

@theochap theochap self-assigned this Jul 11, 2025
@theochap theochap added K-chore Kind: chore A-node Area: cl node (eq. Go op-node) handles single-chain consensus A-engine Area: engine labels Jul 11, 2025
@theochap theochap moved this to In Review in Project Tracking Jul 11, 2025
@theochap theochap added this to the [kona-node] Phase 5: Alpha milestone Jul 11, 2025
@codecov
Copy link

codecov bot commented Jul 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.2%. Comparing base (de0c12d) to head (7737a4c).
Report is 3 commits behind head on main.

✅ All tests successful. No failed tests found.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@theochap theochap force-pushed the theo/engine-cleanups branch from 8f7ebc3 to 7737a4c Compare July 11, 2025 20:47
Copy link
Contributor

@clabby clabby left a comment

Choose a reason for hiding this comment

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

I'm quite happy with this refactor as-is - not too many comments with it being what we spoke about last week. Nice work, happy to see a more re-usable set of tasks :)

@@ -1,18 +1,20 @@
//! Contains the error types for the [InsertUnsafeTask].
//! Contains the error types for the [InsertTask].
Copy link
Contributor

Choose a reason for hiding this comment

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

While we're in here, let's change this over to [InsertTask] and in other cases (note backticks.)

@theochap theochap added this pull request to the merge queue Jul 15, 2025
Merged via the queue into main with commit 76fd73c Jul 15, 2025
25 checks passed
@theochap theochap deleted the theo/engine-cleanups branch July 15, 2025 00:22
@github-project-automation github-project-automation bot moved this from In Review to Done in Project Tracking Jul 15, 2025
theochap added a commit to ethereum-optimism/optimism that referenced this pull request Dec 10, 2025
… build task to reuse the insert task (op-rs/kona#2399)

## Description

This PR does the following cleanups to the engine tasks:

- Use explicit error types instead of `dyn Box<...>` for the
`EngineTaskError`. The goal of this is twofold:
- Improve the composability of engine tasks (and be able to do some
control flow when an engine task emits an error)
- Allows explicit testing of the error cases (in the future when we'll
add tests for the engine tasks)
- Refactors the build task in the engine to reuse the `InsertUnsafe`
task logic. This task is now called `InsertTask` to also encapsulate the
case where we insert a derived block.

Close op-rs/kona#2390. Progress towards op-rs/kona#2389
theochap added a commit to ethereum-optimism/optimism that referenced this pull request Jan 14, 2026
… build task to reuse the insert task (op-rs/kona#2399)

## Description

This PR does the following cleanups to the engine tasks:

- Use explicit error types instead of `dyn Box<...>` for the
`EngineTaskError`. The goal of this is twofold:
- Improve the composability of engine tasks (and be able to do some
control flow when an engine task emits an error)
- Allows explicit testing of the error cases (in the future when we'll
add tests for the engine tasks)
- Refactors the build task in the engine to reuse the `InsertUnsafe`
task logic. This task is now called `InsertTask` to also encapsulate the
case where we insert a derived block.

Close #2390. Progress towards #2389
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A-engine Area: engine A-node Area: cl node (eq. Go op-node) handles single-chain consensus K-chore Kind: chore

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

chore(node/engine): Refactor the new_payload logic

2 participants