Skip to content

Commit

Permalink
Merge branch 'main' into gas-estimation-update
Browse files Browse the repository at this point in the history
  • Loading branch information
jlwllmr authored Sep 30, 2024
2 parents aa50729 + 12843f0 commit 21716f4
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 1 deletion.
39 changes: 39 additions & 0 deletions docs/architecture/stack/trace-expansion-proving/prover-limits.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: Module limits
description: How module limits ensure the prover can generate proofs.
sidebar_position: 3
---

Linea uses module limits to keep proof complexity manageable and ensure that the prover can
generate proofs efficiently without overwhelming the infrastructure.

Linea's arithmetization specification is divided into modules, and each module represents a collection
of EVM or Linea zkEVM operations (opcodes). Modules can:
- Process transaction data.
- Manage zkEVM memory.
- Coordinate interactions between modules.

Each module has a specific limit on the number of lines of data its operations can generate,
regardless of its purpose. You can view these limits in the
[Linea source code](https://github.com/Consensys/linea-monorepo/blob/main/config/common/traces-limits-besu-v2.toml).
Additional lines are generated each time unique instructions are provided to a module's operations,
but repeat calls with the same arguments do not generate new lines.

High-complexity transactions that repeatedly use a large volume of operations may generate too many
lines of data and exceed a module's limit. Transactions that reach this point are rejected by the
[sequencer](../sequencer/index.mdx) to ensure that the trace data passed to the prover is of a
manageable scope, and that a proof can be generated.

Transactions rejected for exceeding module limits can be identified through the following
methods, which return an error:

- [`linea_estimateGas`](../../../developers/reference/api/linea-estimategas.mdx)
- [`eth_sendRawTransaction`](../../../developers/reference/api/eth-sendrawtransaction.mdx)

Use [`linea_getTransactionExclusionStatusV1`](../../../developers/reference/api/linea-gettransactionexclusionstatusv1.mdx)
to get the rejection status of a transaction hash, if it was sent and didn't get rejected directly,
nor included in a block.

This API method can be used to query the reason for transaction rejection in edge cases where
`linea_estimateGas` or `eth_sendRawTransaction` did not return an error. It's intended to be used
only in cases the transaction execution differs between an RPC node and the sequencer.
2 changes: 1 addition & 1 deletion docs/developers/reference/api/eth-sendrawtransaction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ On Linea, each transaction is represented by a sequence of lines representing th
happening at the EVM level. These lines are grouped by modules and are used as inputs to the prover.
In order to limit the resources required to generate proofs, limits are enforced on the maximum
number of lines each module can have. Hence, when a transaction is considered for inclusion in a
block, a line count check is perform to ensure it conforms to the requirements.
block, a [line count check is performed to ensure it conforms to the requirements](../../../architecture/stack/trace-expansion-proving/prover-limits.mdx).

## Parameters

Expand Down
1 change: 1 addition & 0 deletions project-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ gcsize
gctime
genkey
getopts
gettransactionexclusionstatusv
gitgraph
gitpod
Gizathon
Expand Down
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ const sidebars = {
items: [
"architecture/stack/trace-expansion-proving/proving",
"architecture/stack/trace-expansion-proving/trace-expansion",
"architecture/stack/trace-expansion-proving/prover-limits"
],
},
],
Expand Down

0 comments on commit 21716f4

Please sign in to comment.