ethereum-optimism / ethereum-optimism/optimism

kona-service: make SequencerActor initial engine reset non-blocking

Open
#19,249 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
6.5k
Forks
4k
Avg merge
2d 15h
Merged PRs (30d)
145

Description

## Summary

The `SequencerActor` currently needs to reset the engine before starting to process transactions. This is done as a blocking call to the engine interface, requiring an `initial_reset: bool` field to be stored in the actor state to track whether the reset has completed.

**File:** `rust/kona/crates/node/service/src/actors/sequencer/actor.rs`

## Current Behavior

The sequencer actor calls `engine_client.reset_engine_forkchoice().await` as a blocking operation within `step()`, and tracks the reset state via the `initial_reset` boolean field on the actor struct.

## Desired Behavior

Make the initial engine reset non-blocking to avoid having to store the initial reset state in the actor state. This would simplify the actor's state management and align better with the async actor model.

## Context

From the TODO comment in the source:
```
/// TODO:
/// The sequencer actor needs to reset the engine before starting to process transactions. For
/// now this is a blocking call to the engine interface. We should make it non-blocking to
/// avoid having to store the initial reset state in the actor state.
```

Contributor guide

Open the contributing guide

Research direction

Start with rust/kona/crates/node/service/src/actors/sequencer/actor.rs, focusing on step(), the initial_reset field, and the reset_engine_forkchoice().await call. Trace the actor's startup flow and existing tests or call sites to determine how the reset can be initiated without blocking; done means the initial reset is non-blocking and initial_reset is no longer required in actor state.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, distributed-systems
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.