This repository was archived by the owner on Jan 16, 2026. It is now read-only.
chore(node/service): refactor and simplify the RollupNodeService trait#2284
Merged
chore(node/service): refactor and simplify the RollupNodeService trait#2284
RollupNodeService trait#2284Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
clabby
approved these changes
Jun 25, 2025
Contributor
clabby
left a comment
There was a problem hiding this comment.
Really like this, nice work.
Follow-up items that'd be really nice are:
- Removing the
*Launcherpatterns entirely - Removing
processmethods +Inbound<Actor>Messageenums, splitting up action dispatch.
e63f065 to
6a007b2
Compare
6a007b2 to
645155f
Compare
645155f to
2717d48
Compare
theochap
added a commit
to ethereum-optimism/optimism
that referenced
this pull request
Dec 10, 2025
…ait (op-rs/kona#2284) ## Description This PR builds up on the changes introduced by op-rs/kona#2271 to simplify/unify further the structure of the node service crates. In particular this PR: - Adds two associated types to the `NodeActor` trait. `OutboundData` and `State` which are used to specify a new build method for the actor that aims to replace single calls of the `new` methods. The build method has the following signature: ``` fn build(initial_state: Self::State) -> (Self::OutboundData, Self); ``` - Takes out the output channels from the `ActorContext` back into the `Actor` struct. This allows to drastically reduce the number of arguments to provide to the `build` methods and remove the need to define channels inside the implementation of the `RollupNodeService` trait. Instead this is done inside the `NodeActor` themselves - Add an associated type to the `RollupNodeService` for each actor and call the build methods from the associated types. That will make it much easier to have a modular architecture where we can easily swap out components if needed ## Follow-ups Most of the heavy lifting is done in this PR, but I would like to do some quick follow-ups to refactor/simplify/improve the inner structure of actors even further. We should also think about which types we want to expose to the public api and try to cut down the number of public exports in our libraries.
theochap
added a commit
to ethereum-optimism/optimism
that referenced
this pull request
Jan 14, 2026
…ait (op-rs/kona#2284) ## Description This PR builds up on the changes introduced by #2271 to simplify/unify further the structure of the node service crates. In particular this PR: - Adds two associated types to the `NodeActor` trait. `OutboundData` and `State` which are used to specify a new build method for the actor that aims to replace single calls of the `new` methods. The build method has the following signature: ``` fn build(initial_state: Self::State) -> (Self::OutboundData, Self); ``` - Takes out the output channels from the `ActorContext` back into the `Actor` struct. This allows to drastically reduce the number of arguments to provide to the `build` methods and remove the need to define channels inside the implementation of the `RollupNodeService` trait. Instead this is done inside the `NodeActor` themselves - Add an associated type to the `RollupNodeService` for each actor and call the build methods from the associated types. That will make it much easier to have a modular architecture where we can easily swap out components if needed ## Follow-ups Most of the heavy lifting is done in this PR, but I would like to do some quick follow-ups to refactor/simplify/improve the inner structure of actors even further. We should also think about which types we want to expose to the public api and try to cut down the number of public exports in our libraries.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR builds up on the changes introduced by #2271 to simplify/unify further the structure of the node service crates. In particular this PR:
NodeActortrait.OutboundDataandStatewhich are used to specify a new build method for the actor that aims to replace single calls of thenewmethods. The build method has the following signature:ActorContextback into theActorstruct. This allows to drastically reduce the number of arguments to provide to thebuildmethods and remove the need to define channels inside the implementation of theRollupNodeServicetrait. Instead this is done inside theNodeActorthemselvesRollupNodeServicefor each actor and call the build methods from the associated types. That will make it much easier to have a modular architecture where we can easily swap out components if neededFollow-ups
Most of the heavy lifting is done in this PR, but I would like to do some quick follow-ups to refactor/simplify/improve the inner structure of actors even further.
We should also think about which types we want to expose to the public api and try to cut down the number of public exports in our libraries.