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

# OP Stack

> OP Stack specific implementation of the Credible Layer

This L2 design connects assertion validation to an OP Stack sequencer through [Rollup-Boost](https://github.com/flashbots/rollup-boost). Confirm implementation and support status before use.

See [L2 Integration Planning](https://docs.phylax.systems/credible/l2-integrations/network-integration.md) for requirements.

## Architecture Diagram

```mermaid theme={null}
---
title: OP Stack Implementation Architecture
---
flowchart TD

classDef sequencer fill:#0288d1,stroke:#01579b,stroke-width:2px,color:#fff
classDef credible fill:#7b1fa2,stroke:#4a148c,stroke-width:2px,color:#fff
classDef rollupBoost fill:#388e3c,stroke:#1b5e20,stroke-width:2px,color:#fff

subgraph Sequencer[**Sequencer**]
    SequencerCL[op-node]
    SequencerEL[op-geth/op-reth]
end

subgraph CredibleLayer[**Credible Layer**]
    AssertionEnforcerEL[op-reth]
    AssertionEnforcerCLI[CLI]
    AssertionEnforcerDapp[Platform]
    AssertionDA[Assertion DA]
    subgraph AssertionEnforcerBlockBuilder[Block Builder]
        AssertionEnforcer
    end
end

subgraph RollupBoost[**Rollup-Boost**]
    RollupBoostProxy[Proxy]
end

SequencerEL --> |Fallback Blocks + Validation| RollupBoost

AssertionDA --> |Serve Assertions| AssertionEnforcerBlockBuilder
AssertionEnforcerCLI --> |Auth + Apply| AssertionEnforcerDapp
AssertionEnforcerDapp --> |Store bytecode| AssertionDA
AssertionEnforcerDapp --> |Fetch assertions| AssertionDA

AssertionEnforcerEL <--> |Pulls State + Txs| SequencerEL
AssertionEnforcerEL <--> |Provide Best Transactions| AssertionEnforcerBlockBuilder
RollupBoost <--> |Request Credible Blocks| AssertionEnforcerBlockBuilder
RollupBoost <--> |Request Credible Blocks| SequencerCL

class SequencerCL,SequencerEL sequencer
class AssertionEnforcerBlockBuilder,AssertionEnforcerEL,AssertionEnforcerCLI,AssertionEnforcerDapp,AssertionDA credible
class RollupBoostProxy,AssertionEnforcer rollupBoost
```

## System Components

### Sequencer

* **op-node**: The main orchestrator node in the OP Stack, responsible for sequencing transactions and maintaining consensus with the execution layer.
* **op-geth/op-reth**: The execution layer clients (Geth or Reth) that process and execute transactions, providing the EVM environment for the rollup.

### Credible Layer (Sidecar)

* **[Block Builder](https://docs.phylax.systems/credible/glossary.md#block-builder)**: The component of the network that simulates transactions and runs assertions before transaction finalization to ensure they don't violate defined conditions.
* **op-reth**: The execution layer client within the Credible Layer that processes transactions and maintains state.
* **[`pcl` CLI](https://docs.phylax.systems/credible/glossary#pcl)**: Command-line interface for developers to write, test, and deploy assertions to the system.
* **[Platform](https://app.phylax.systems)**: The web application interface to deploy, manage, and view assertions and projects.
* **[Assertion DA](https://docs.phylax.systems/credible/glossary.md#assertion-da-data-availability)**: The Assertion Data Availability layer, which stores assertion bytecode and serves it to both end-users and the Assertion Enforcer for execution.

### Rollup-Boost

* **Proxy**: Acts as a bridge between the block builder and the sequencer, enabling integration without requiring changes to the sequencer code. It handles new block requests and fallback validation.

## Component Interactions

* The Credible Layer op-reth pulls state and transactions from the Sequencer op-geth/op-reth.
* The Credible Layer op-reth provides best transactions to the Block Builder.
* The Block Builder enforces assertions and produces credible blocks, which are requested by Rollup-Boost.
* Rollup-Boost requests credible blocks from both the Block Builder and the Sequencer op-node.
* The Assertion DA serves assertion bytecode to the Block Builder, ensuring up-to-date enforcement.
* `pcl` and the platform provide interfaces for assertion development, submission and management.

## L1-Originated Transactions

OP Stack networks can define an L1-originated transaction validation policy alongside the ordinary sequencer-selected transaction path.

An integration should specify where assertion validation runs, how validation results are reported to sequencing components, and what metadata is sent to the platform. See [Network Integration Overview](https://docs.phylax.systems/credible/l2-integrations/network-integration.md#transaction-source-coverage) for the general checklist.

## Transaction Flow

![Transaction Flow](https://mintcdn.com/phylaxsystems/EZR39AC53XCQbLT_/images/tx-flow-credible.png?fit=max\&auto=format\&n=EZR39AC53XCQbLT_\&q=85\&s=e0d54acfe7a3a943e6196d477edb1c87)

The diagram above illustrates transaction flow through the OP Stack implementation. The top section shows the complete deployment: users submit transactions that flow through OP-Talos (block builder) → Rollup-Boost → OP Stack Sequencer → Network. Candidates violating active assertions are excluded by the enforcing integration; a violation is not necessarily malicious.

The bottom section illustrates **assertion execution**, a component shared with other integrations. It does not show Ethereum guard or marker checks. The transaction and State 1 (pre-state) flow into the EVM for simulation, producing State 2 (post-state). PhEVM then validates these states against deployed assertions, returning valid/invalid.

## Key Technologies

* **OP-Talos**: Implementation of [rbuilder](https://github.com/flashbots/rbuilder) as the Assertion Enforcer. rbuilder is Flashbots' open-source block builder, which we've adapted to include assertion validation logic for the OP Stack.
* [**Rollup-Boost**](https://github.com/flashbots/rollup-boost): Developed by Flashbots, Rollup-Boost is a proxy architecture that enables external block builders to integrate with rollup sequencers. It integrates OP-Talos with the Sequencer without requiring code changes to the Sequencer, allowing for modular and non-invasive assertion enforcement.

## Integration Benefits

Rollup-Boost connects an external builder without sequencer code changes. Assertion workers can run separately. Measure latency and backpressure for the deployment.

Review coverage, activation timing, and failure handling before changing enforcement policy.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.