> ## Documentation Index
> Fetch the complete documentation index at: https://docs.optimism.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Node Design Overview

The entry-point for the `kona-node` is the [`RollupNode`][node] service,
which encapsulates the core wiring for the node. A `RollupNode` is
constructed through the [`RollupNodeBuilder`][builder], and its
[`start` method][start] handles connecting the different components
of the node and running its actors in spawned tasks.

The `RollupNode` abstracts individual actors through the
[`NodeActor` trait][actor], a minimal interface with a single `step`
method that the service drives in a loop until the actor reports a
fatal error or the node shuts down.

Kona provides implementations for all `NodeActor`s required to run a
`RollupNode`. Actors are defined in the [actors][actors] module of the
`kona-node-service` crate, and the `RollupNode` wiring lives in the
[service][service] module.

### Actors

The architecture of `kona-node` is a web of actors that share
state through message passing, using channels, rather than using
shared memory.

The [`RollupNode`][node] builds and starts the following actors.

* **Derivation Actor**: Orchestrates the derivation pipeline,
  deriving L2 payload attributes from L1 blocks. Payload
  attributes prepared this way are forwarded to the Engine
  Actor to be executed. The [derivation][derivation] docs
  dive deeper into how the derivation actor works.
* **Engine Actor**: Brokers the connection to the execution
  layer client (or "execution engine"). The engine actor
  turns messages from other actors into engine "tasks"
  that are executed in priority order against the EL client.
  Read-only engine queries are served directly by `RollupRpc`.
  The [engine][engine] docs expand on this.
* **L1 Watcher Actor**: Watches the L1 chain for new
  head and finalized blocks and relays them to the
  derivation actor. It also keeps the unsafe block
  signer current from the `SystemConfig` contract, for
  gossip validation and the signer actor.
* **Network Actor**: Manages the P2P Network for the rollup
  node. The P2P stack consists of `discv5` peer discovery
  and block gossip through libp2p. Visit the [network][p2p]
  docs for more detail.
* **Sequencer Actor**: The sequencer actor extends the
  `kona-node` to be run as a sequencer. Sequencing is
  periphery to the basic rollup node operation. See
  the [sequencer][sequencer] docs.
* **Signer Actor**: Runs alongside the sequencer actor.
  It signs each block the sequencer builds, in order,
  and passes it to the network actor to gossip.
* **RPC Actor**: Supervises the JSON-RPC server and handles
  restarts. Jsonrpsee dispatches requests to the registered
  modules, including `RollupRpc`, which serves the rollup
  methods required by the [OP Stack Specs][specs].

[p2p]: https://docs.optimism.io/node-operators/kona-node/design/p2p.md

[engine]: https://docs.optimism.io/node-operators/kona-node/design/engine.md

[derivation]: https://docs.optimism.io/node-operators/kona-node/design/derivation.md

[sequencer]: https://docs.optimism.io/node-operators/kona-node/design/sequencer.md

[specs]: https://specs.optimism.io/protocol/rollup-node.html

[service]: https://github.com/ethereum-optimism/optimism/tree/develop/rust/kona/crates/node/service/src/service

[actors]: https://github.com/ethereum-optimism/optimism/tree/develop/rust/kona/crates/node/service/src/actors

[actor]: https://github.com/ethereum-optimism/optimism/blob/develop/rust/kona/crates/node/service/src/actors/traits.rs

[start]: https://github.com/ethereum-optimism/optimism/blob/develop/rust/kona/crates/node/service/src/service/node.rs

[node]: https://github.com/ethereum-optimism/optimism/blob/develop/rust/kona/crates/node/service/src/service/node.rs

[builder]: https://github.com/ethereum-optimism/optimism/blob/develop/rust/kona/crates/node/service/src/service/builder.rs
