Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions config/common/traces-limits-v1.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ ADD = 524288
BIN = 262144
BIN_RT = 262144
EC_DATA = 4096
EXT = 131072
EXT = 1048576
HUB = 2097152
INSTRUCTION_DECODER = 512
MMIO = 131072
MMU = 131072
MMIO = 1048576
MMU = 524288
MMU_ID = 131072
MOD = 131072
MUL = 65536
Expand All @@ -28,7 +28,7 @@ PUB_HASH_INFO = 32768
PUB_LOG = 16384
PUB_LOG_INFO = 16384
RLP = 512
ROM = 4194304
ROM = 13000000
SHF = 65536
SHF_RT = 4096
TX_RLP = 131072
Expand All @@ -44,12 +44,13 @@ BLOCK_KECCAK = 8192
#
# Precompiles limits
#
PRECOMPILE_ECRECOVER = 10000
PRECOMPILE_SHA2 = 10000
PRECOMPILE_RIPEMD = 10000
PRECOMPILE_ECRECOVER = 100
PRECOMPILE_SHA2 = 100
PRECOMPILE_RIPEMD = 100
PRECOMPILE_IDENTITY = 10000
PRECOMPILE_MODEXP = 10000
PRECOMPILE_ECADD = 10000
PRECOMPILE_ECMUL = 10000
PRECOMPILE_ECPAIRING = 10000
PRECOMPILE_MODEXP = 1000
PRECOMPILE_ECADD = 1000
PRECOMPILE_ECMUL = 100
PRECOMPILE_ECPAIRING = 100
PRECOMPILE_BLAKE2F = 512

4 changes: 2 additions & 2 deletions config/coordinator/coordinator-docker.config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ eip4844-switch-l2-block-number=0
[prover]
fs-inprogress-request-writing-suffix = ".inprogress_coordinator_writing"
fs-inprogress-proving-suffix-pattern = ".*\\.inprogress\\.prover.*"
fs-polling-interval = "PT1S"
fs-polling-timeout = "PT10M"
fs-polling-interval="PT20S"
fs-polling-timeout="P5D"
[prover.execution]
fs-requests-directory = "/data/prover/v2/execution/requests"
fs-responses-directory = "/data/prover/v2/execution/responses"
Expand Down
44 changes: 20 additions & 24 deletions docker/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ services:
BOOTNODES: "enode://14408801a444dafc44afbccce2eb755f902aed3b5743fed787b3c790e021fef28b8c827ed896aa4e8fb46e22bd67c39f994a73768b4b382f8597b0d44370e15d@11.11.11.101:30303"
NETRESTRICT: "11.11.11.0/24"
DISABLE_ZKEVM: "true"
MAX_BLOCK_GAS: 10000000 #10M
MAX_BLOCK_GAS: 10000000 #10M
MAX_BLOCKDATA_BYTES: 35000 #35 KBytes
MAX_TXDATA_BYTES: 30000 #30 KBytes
ZKGETH_LOWER_GAS_MARGIN_PERCENTS: 120
Expand Down Expand Up @@ -164,7 +164,7 @@ services:
# ETHSTATS_URL: "zkgeth-traces-node:${WS_SECRET:-dummy-secret}@l2-ethstats:3000"
BOOTNODES: "enode://14408801a444dafc44afbccce2eb755f902aed3b5743fed787b3c790e021fef28b8c827ed896aa4e8fb46e22bd67c39f994a73768b4b382f8597b0d44370e15d@11.11.11.101:30303"
TRACES_DIR: "/data/traces/raw"
MAX_BLOCK_GAS: 10000000 #10M
MAX_BLOCK_GAS: 10000000 #10M
MAX_BLOCKDATA_BYTES: 35000 #35 KBytes
MAX_TXDATA_BYTES: 30000 #30 KBytes
VERSION: "0.2.0"
Expand All @@ -187,18 +187,20 @@ services:
# to avoid spinning up on CI for now
profiles: [ "l2" ]
environment:
GOMAXPROCS: 16
GOMAXPROCS: 160
CONTROLLER_CONFIG: "/opt/linea/prover/config/controller/controller.config.toml"
GOMEMLIMIT: "10GiB"
GOMEMLIMIT: "700GiB"
WORKER_ID: prover-i1 # keep this prover- to mimic prod env prover-aggregation-91
volumes:
- local-dev:/data
- logs:/logs
- ./config/prover/v2/prover-controller.config.toml:/opt/linea/prover/config/controller/controller.config.toml
- ./config/prover/v2/prover-execution.config.toml:/opt/linea/prover/config/executor/execution.config.toml
- ./config/prover/v2/prover-decompression.config.toml:/opt/linea/prover/config/executor/decompression.config.toml
- ./config/prover/v2/prover-aggregation.config.toml:/opt/linea/prover/config/executor/aggregation.config.toml
- ./config/prover/v2/prover-execution-full.config.toml:/opt/linea/prover/config/executor/execution.config.toml
- ./config/prover/v2/prover-decompression-full.config.toml:/opt/linea/prover/config/executor/decompression.config.toml
- ./config/prover/v2/prover-aggregation-full.config.toml:/opt/linea/prover/config/executor/aggregation.config.toml
- ../config/common/traces-limits-v1.toml:/opt/linea/prover/config/executor/traces-limits-M.toml
# full-prover assets
- ../prover/prover-assets:/opt/linea/prover/prover-assets
networks:
linea:
ipv4_address: 11.11.11.108
Expand Down Expand Up @@ -233,7 +235,7 @@ services:
condition: service_started
ports:
- "8080:8080"
command: [ 'java', '-Dvertx.configurationFile=config/vertx-options.json', '-Dlog4j2.configurationFile=config/log4j2-dev.xml', '-jar', 'libs/app-all.jar', 'config/traces-app-docker.config.toml', ]
command: [ 'java', '-Dvertx.configurationFile=config/vertx-options.json', '-Dlog4j2.configurationFile=config/log4j2-dev.xml', '-jar', 'libs/app-all.jar', 'config/traces-app-docker.config.toml' ]
volumes:
- ../config/traces-api/traces-app-docker.config.toml:/opt/consensys/linea/traces-api-facade/config/traces-app-docker.config.toml:ro
- ../config/traces-api/vertx-options.json:/opt/consensys/linea/traces-api-facade/config/vertx-options.json:ro
Expand All @@ -254,7 +256,7 @@ services:
condition: service_healthy
ports:
- "8082:8080"
command: [ 'java', '-Dvertx.configurationFile=config/vertx-options.json', '-Dlog4j2.configurationFile=config/log4j2-dev.xml', '-jar', 'libs/transaction-exclusion-api.jar', 'config/transaction-exclusion-app-docker.config.toml', ]
command: [ 'java', '-Dvertx.configurationFile=config/vertx-options.json', '-Dlog4j2.configurationFile=config/log4j2-dev.xml', '-jar', 'libs/transaction-exclusion-api.jar', 'config/transaction-exclusion-app-docker.config.toml' ]
volumes:
- ../config/transaction-exclusion-api/transaction-exclusion-app-docker.config.toml:/opt/consensys/linea/transaction-exclusion-api/config/transaction-exclusion-app-docker.config.toml:ro
- ../config/transaction-exclusion-api/vertx-options.json:/opt/consensys/linea/transaction-exclusion-api/config/vertx-options.json:ro
Expand Down Expand Up @@ -400,7 +402,7 @@ services:
l1-cl-node:
container_name: l1-cl-node
hostname: l1-cl-node
# image: consensys/teku:24.2.0
# image: consensys/teku:24.2.0
image: consensys/teku:24.10.3
profiles: [ "l1", "debug", "external-to-monorepo" ]
depends_on:
Expand Down Expand Up @@ -428,12 +430,7 @@ services:
build:
context: ./config/l1-node/
profiles: [ "l1", "debug", "external-to-monorepo" ]
command:
--genesis-time ${L1_GENESIS_TIME}
--l1-genesis /config/l1-genesis.json
--network-config /config/network-config.yml
--mnemonics /config/mnemonics.yaml
--output-dir /data/l1-node-config
command: --genesis-time ${L1_GENESIS_TIME} --l1-genesis /config/l1-genesis.json --network-config /config/network-config.yml --mnemonics /config/mnemonics.yaml --output-dir /data/l1-node-config
volumes:
- ./config/l1-node/cl/network-config.yml:/config/network-config.yml:ro
- ./config/l1-node/cl/mnemonics.yaml:/config/mnemonics.yaml:ro
Expand Down Expand Up @@ -628,13 +625,13 @@ services:
- "4001:4001"
env_file: "./config/blobscan/env"
restart: no
# healthcheck:
# test: [ "CMD", "curl", "-f", "http://localhost:4001/healthcheck" ]
# disable: true
# interval: 30s
# timeout: 10s
# retries: 20
# start_period: 5s
# healthcheck:
# test: [ "CMD", "curl", "-f", "http://localhost:4001/healthcheck" ]
# disable: true
# interval: 30s
# timeout: 10s
# retries: 20
# start_period: 5s
networks:
linea:
l1network:
Expand Down Expand Up @@ -740,4 +737,3 @@ services:
- loki
networks:
- linea

2 changes: 1 addition & 1 deletion docker/config/linea-besu-sequencer/sequencer.config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ data-storage-format="FOREST"
sync-mode="FULL"
host-allowlist=["*"]

# target-gas-limit=30000000
target-gas-limit=2000000000
min-gas-price=1000000
tx-pool-min-gas-price=0
max-peers=10
Expand Down
21 changes: 21 additions & 0 deletions docker/config/prover/v2/prover-aggregation-full.config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
dev_mode = false
version = "v2.0.0"
exec_proof_dir = "/data/prover/v2/execution/responses"
decompress_proof_dir = "/data/prover/v2/compression/responses"

[bn254_circuit]
verifier_id = 3
files = {out_folder = "/opt/linea/prover/prover-assets/2.0.0/prover-aggregation/regular/895c049", pkey_file = "proving_key.bin", vkey_file = "verifying_key.bin", circuit_file = "circuit.bin"}

[[bw6_circuits]]
max_nb_execution = 50
files = {out_folder = "/opt/linea/prover/prover-assets/2.0.0/prover-aggregation/regular/895c049/aggregation-bw6-50-proofs", pkey_file = "proving_key.bin", vkey_file = "verifying_key.bin", circuit_file = "circuit.bin"}
verifying_keys_shasum = [
"0xd1624b8e9e5987f7bbf85cb32bb7b9787144aceb4527864f31ba1957e300f7eb",
"0xe89bce9a0de99fcc66f02c528de4584d68e8f614a258d9df6f16ffa6875e257e",
"0x3a0a889b95674c33892c8c2894a2026d9c0769d749af7efe0da2f8bfc68c264e",
"0xbcade9728beb1bf5b51c74081d38b47db7276f7ffc3a2fdfe3a081ce04dd8a35",
"0x6ff0a53bfe1d28c5a850006d7908c3d9e48a64b886be7f56597a98e7ef87d806",
"0x0dd53e4bc14eca47b1c5590dea10ee526d835b2c89e4ea46af7d798dcd164f64",
"0x32ece023e1ffe0123c9c1cce9b450a147eda42a1037a140705bb23271c48a9d4"
]
11 changes: 11 additions & 0 deletions docker/config/prover/v2/prover-decompression-full.config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This file is empty, partly because we have not determined what should be the
# the exact configuration of the prover-compression yet. We leave it as a placeholder.
# NOTE: It will be passed to the prover-compression, but it will not be opened by the
# command.
dev_mode = false

[[setups]]
dict_path = "/opt/linea/prover/lib/compressor/compressor_dict.bin"
compressed_max_data_size = 131_072
decompressed_max_data_size = 800_000
files = {out_folder = "/opt/linea/prover/prover-assets/2.0.0/prover-compression/regular/32ece02", pkey_file = "proving_key.bin", vkey_file = "verifying_key.bin", circuit_file = "circuit.bin"}
43 changes: 43 additions & 0 deletions docker/config/prover/v2/prover-execution-full.config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
tolerate_parent_state_root_hash_mismatch = true

[logging]
# level: trace=1|debug=2|info=3|warn=4|error=5|fatal=6
level = 3
file = ""

[monitoring]
profiling = true
tracing = true

[prover]
version = "v2.0.0"
# type: development|partial|full|proofless
#type = "development"
type = "full"
# size: medium|large
size = "medium"

[files]
#out_folder = "/opt/linea/prover/setup/light/d1624b8"
out_folder = "/opt/linea/prover/prover-assets/2.0.0/prover-execution/full/3a0a889"
pkey_file = "proving_key.bin"
vkey_file = "verifying_key.bin"
circuit_file = "circuit.bin"

[verifier_contract]
verifier_id_partial_m = 1
verifier_id_full_m = 2
verifier_id_full_l = 3

[inputs]
# @alex: Hotfix, although the exec prover runs in dev mode. It will still check
# if the conflated traces dir exists.
conflated_traces_dir = "/data/traces/v1/conflated"

[feature_gates]
with_keccak = true
with_ecdsa = false

[layer2]
message_service_contract = "0xe537D669CA013d86EBeF1D64e40fC74CADC91987"
chain_id = 1337
2 changes: 1 addition & 1 deletion e2e/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const config: Config = {
preset: "ts-jest",
testEnvironment: "node",
rootDir: "src",
testRegex: ".spec.ts$",
testRegex: "gas-limit.spec.ts$",
verbose: true,
globalSetup: "./config/jest/global-setup.ts",
globalTeardown: "./config/jest/global-teardown.ts",
Expand Down
6 changes: 3 additions & 3 deletions e2e/src/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export async function waitForFile(

export async function sendTransactionsToGenerateTrafficWithInterval(
signer: AbstractSigner,
pollingInterval: number = 1_000,
pollingInterval: number = 100,
) {
const { maxPriorityFeePerGas, maxFeePerGas } = await signer.provider!.getFeeData();
const transactionRequest = {
Expand All @@ -290,8 +290,8 @@ export async function sendTransactionsToGenerateTrafficWithInterval(
if (!isRunning) return;

try {
const tx = await signer.sendTransaction(transactionRequest);
await tx.wait();
await signer.sendTransaction(transactionRequest);
//await tx.wait();
} catch (error) {
console.error("Error sending transaction:", error);
} finally {
Expand Down
62 changes: 33 additions & 29 deletions e2e/src/gas-limit.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from "@jest/globals";
import { pollForContractMethodReturnValueExceedTarget, wait } from "./common/utils";
import { pollForContractMethodReturnValueExceedTarget } from "./common/utils";
import { config } from "./config/tests-config";
import { ContractTransactionReceipt, Wallet } from "ethers";

Expand Down Expand Up @@ -53,36 +53,40 @@ describe("Gas limit test suite", () => {
});

// One-time test to test block gas limit increase from 61M -> 2B
it.skip("Should successfully reach the target gas limit, and finalize the corresponding transaction", async () => {
const targetBlockGasLimit = 2_000_000_000n;
let isTargetBlockGasLimitReached = false;
let blockNumberToCheckFinalization = 0;
const account = await l2AccountManager.generateAccount();
const lineaRollupV6 = config.getLineaRollupContract();

console.log(`Target block gas limit: ${targetBlockGasLimit}`);

while (!isTargetBlockGasLimitReached) {
const txReceipt = await setGasLimit(account);
expect(txReceipt?.status).toEqual(1);
const blockGasLimit = await getGasLimit();
console.log("blockGasLimit: ", blockGasLimit);
if (blockGasLimit === targetBlockGasLimit) {
isTargetBlockGasLimitReached = true;
// Ok to type assertion here, because txReceipt won't be null if it passed above assertion.
blockNumberToCheckFinalization = <number>txReceipt?.blockNumber;
it.concurrent(
"Should successfully reach the target gas limit, and finalize the corresponding transaction",
async () => {
const targetBlockGasLimit = 2_000_000_000n;
let isTargetBlockGasLimitReached = false;
let blockNumberToCheckFinalization = 0;
const account = await l2AccountManager.generateAccount();
const lineaRollupV6 = config.getLineaRollupContract();

console.log(`Target block gas limit: ${targetBlockGasLimit}`);

while (!isTargetBlockGasLimitReached) {
const txReceipt = await setGasLimit(account);
expect(txReceipt?.status).toEqual(1);
const blockGasLimit = await getGasLimit();
console.log("blockGasLimit: ", blockGasLimit);
if (blockGasLimit === targetBlockGasLimit) {
isTargetBlockGasLimitReached = true;
// Ok to type assertion here, because txReceipt won't be null if it passed above assertion.
blockNumberToCheckFinalization = <number>txReceipt?.blockNumber;
}
//await wait(1000);
}
await wait(1000);
}

console.log(`Waiting for ${blockNumberToCheckFinalization} to be finalized...`);
console.log(`Waiting for ${blockNumberToCheckFinalization} to be finalized...`);

const isBlockFinalized = await pollForContractMethodReturnValueExceedTarget(
lineaRollupV6.currentL2BlockNumber,
BigInt(blockNumberToCheckFinalization),
);
const isBlockFinalized = await pollForContractMethodReturnValueExceedTarget(
lineaRollupV6.currentL2BlockNumber,
BigInt(blockNumberToCheckFinalization),
);

expect(isBlockFinalized).toEqual(true);
// Timeout of 6 hrs
}, 21_600_000);
expect(isBlockFinalized).toEqual(true);
// Timeout of 6 hrs
},
21_600_000,
);
});