<!-- Canonical: https://docs.linea.build/protocol/architecture/sequencer/traces-generator -->

> For the complete Linea documentation index, see [llms.txt](/llms.txt).
> Agents can fetch this page as Markdown at [https://docs.linea.build/protocol/architecture/sequencer/traces-generator.md](https://docs.linea.build/protocol/architecture/sequencer/traces-generator.md).

# Tracer

The tracer is part of the [Lineth](/protocol/reference/zero-knowledge-glossary#lineth)**Lineth** (Formerly the Linea Stack) The open-source ZK-rollup stack, codebase, and technical protocol that's the foundation of Linea Mainnet. Operators can deploy this stack to launch their own Ethereum-compatible L2 or L3 networks. [sequencer](/protocol/architecture/sequencer). The tracer is a Besu plugin bundled with [Linea Besu](/protocol/reference/zero-knowledge-glossary#linea-besu)**Linea Besu** A build of the Besu execution client, extended with Lineth plugins such as the sequencer and tracer that add ZK-rollup functionality. Linea Besu is required to propose blocks and to generate traces, so every sequencer node must run it. Nodes that only import blocks or serve standard Ethereum JSON-RPC can run any Ethereum execution client.. It generates the data the [prover](/protocol/architecture/prover) needs to create [ZK proofs](/protocol/reference/zero-knowledge-glossary#zero-knowledge-proof)**Zero-knowledge proof** A cryptographic method that allows an individual to prove that a statement is true without conveying any additional information. This is useful for scaling blockchain networks through rollups, because it reduces the amount of information you have to provide to lower layers., and the data the sequencer needs to keep blocks provable.

A _trace_ records the operations the [EVM](/protocol/reference/zero-knowledge-glossary#ethereum-virtual-machine-evm)**Ethereum Virtual Machine (EVM)** A stack-based virtual machine that executes bytecode. In Ethereum, the execution model specifies how the system state is altered given a series of bytecode instructions and a small tuple of environmental data. This is specified through a formal model of a virtual state machine. performs during execution: the state of the network, and the state of the accounts involved in a transaction, at each granular step of that transaction's execution.

## How it works

The tracer produces data on request, at two points in the pipeline.

While the sequencer builds a block, the tracer counts the trace lines each candidate transaction would generate, so the sequencer can reject transactions that exceed a [module limit](/protocol/architecture/prover/prover-limits) and stop adding transactions once the block reaches its limits.

Once blocks are built, the [coordinator](/protocol/architecture/coordinator) uses the tracer to prepare them for proving:

1.  The coordinator requests the trace counts for each new block.
2.  Using those counts, it decides how many consecutive blocks to [conflate](/protocol/architecture/coordinator/conflation) into one batch.
3.  When it closes a batch, it requests the conflated traces for that block range. The tracer re-executes those blocks, writes a single trace file, and returns its location.
4.  The coordinator passes the trace file to the prover, which uses it to generate the execution proof.

Both paths are exposed through the Traces API, which internal protocol services call over RPC. Trace generation runs inside Linea Besu because replaying blocks requires an execution client, but the batch boundaries are decided by the coordinator, not the sequencer.

## See also

-   Configure tracer behavior using the [Linea Besu tracer options](/reference/component-configuration/linea-besu-plugin-options#tracer).
-   See the [tracer source code](https://github.com/LFDT-Lineth/lineth-monorepo/tree/main/tracer) in the `lineth-monorepo`.
