Skip to content

Commit 7e306e2

Browse files
authored
feat: remove l2-node in e2e test and make it to run in local stack op… (#1001)
* feat: remove l2-node in e2e test and make it to run in local stack optionally * fix: l2 spec transaction data size limit e2e test * feat: revise blockscout configs * feat: revised comment in Makefile * feat: update transaction-exclusion-api and postman image * feat: remove expected-traces-api-version-v2 from coordinator local overrides toml * feat: remove shomei-frontend from ci and add disabled option in Type2StateProofProviderConfig * feat: add endpoint for type2-state-proof-provider * feat: revise coordinator local-dev override configs * feat: remove white space
1 parent c07457e commit 7e306e2

File tree

22 files changed

+171
-149
lines changed

22 files changed

+171
-149
lines changed

Makefile

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ start-env: CLEAN_PREVIOUS_ENV:=true
2323
start-env: COMPOSE_FILE:=docker/compose-tracing-v2.yml
2424
start-env: L1_CONTRACT_VERSION:=6
2525
start-env: SKIP_CONTRACTS_DEPLOYMENT:=false
26+
start-env: SKIP_L1_L2_NODE_HEALTH_CHECK:=false
2627
start-env: LINEA_PROTOCOL_CONTRACTS_ONLY:=false
2728
start-env:
2829
@if [ "$(CLEAN_PREVIOUS_ENV)" = "true" ]; then \
@@ -32,8 +33,9 @@ start-env:
3233
fi; \
3334
mkdir -p tmp/local; \
3435
COMPOSE_PROFILES=$(COMPOSE_PROFILES) docker compose -f $(COMPOSE_FILE) up -d; \
35-
while [ "$$(docker compose -f $(COMPOSE_FILE) ps -q l1-el-node | xargs docker inspect -f '{{.State.Health.Status}}')" != "healthy" ] || \
36-
[ "$$(docker compose -f $(COMPOSE_FILE) ps -q sequencer | xargs docker inspect -f '{{.State.Health.Status}}')" != "healthy" ]; do \
36+
while [ "$(SKIP_L1_L2_NODE_HEALTH_CHECK)" = "false" ] && \
37+
{ [ "$$(docker compose -f $(COMPOSE_FILE) ps -q l1-el-node | xargs docker inspect -f '{{.State.Health.Status}}')" != "healthy" ] || \
38+
[ "$$(docker compose -f $(COMPOSE_FILE) ps -q sequencer | xargs docker inspect -f '{{.State.Health.Status}}')" != "healthy" ]; }; do \
3739
sleep 2; \
3840
echo "Checking health status of l1-el-node and sequencer..."; \
3941
done
@@ -44,17 +46,17 @@ start-env:
4446
fi
4547

4648
start-l1:
47-
command start-env COMPOSE_PROFILES:=l1 COMPOSE_FILE:=docker/compose-tracing-v2.yml SKIP_CONTRACTS_DEPLOYMENT:=true
49+
make start-env COMPOSE_PROFILES:=l1 COMPOSE_FILE:=docker/compose-tracing-v2.yml SKIP_CONTRACTS_DEPLOYMENT:=true SKIP_L1_L2_NODE_HEALTH_CHECK:=true
4850

49-
start-l2:
50-
command start-env COMPOSE_PROFILES:=l2 COMPOSE_FILE:=docker/compose-tracing-v2.yml SKIP_CONTRACTS_DEPLOYMENT:=true
51+
start-l1-l2:
52+
make start-env COMPOSE_PROFILES:=l1,l2 COMPOSE_FILE:=docker/compose-tracing-v2.yml SKIP_CONTRACTS_DEPLOYMENT:=true SKIP_L1_L2_NODE_HEALTH_CHECK:=true
5153

5254
start-l2-blockchain-only:
53-
command start-env COMPOSE_PROFILES:=l2-bc COMPOSE_FILE:=docker/compose-tracing-v2.yml SKIP_CONTRACTS_DEPLOYMENT:=true
55+
make start-env COMPOSE_PROFILES:=l2-bc COMPOSE_FILE:=docker/compose-tracing-v2.yml SKIP_CONTRACTS_DEPLOYMENT:=true SKIP_L1_L2_NODE_HEALTH_CHECK:=true
5456

5557
fresh-start-l2-blockchain-only:
56-
make clean-environment
57-
make start-l2-blockchain-only
58+
make clean-environment
59+
make start-l2-blockchain-only
5860

5961
##
6062
## Creating new targets to avoid conflicts with existing targets
@@ -63,8 +65,12 @@ fresh-start-l2-blockchain-only:
6365
start-env-with-tracing-v2:
6466
make start-env COMPOSE_FILE=docker/compose-tracing-v2.yml LINEA_PROTOCOL_CONTRACTS_ONLY=true
6567

68+
## Enable L2 geth node
69+
start-env-with-tracing-v2-extra:
70+
make start-env COMPOSE_PROFILES:=l1,l2 COMPOSE_FILE:=docker/compose-tracing-v2-extra-extension.yml LINEA_PROTOCOL_CONTRACTS_ONLY=true DISABLE_JSON_RPC_PRICING_PROPAGATION=false DISABLE_TYPE2_STATE_PROOF_PROVIDER=false
71+
6672
start-env-with-tracing-v2-ci:
67-
make start-env COMPOSE_FILE=docker/compose-tracing-v2-ci-extension.yml DISABLE_JSON_RPC_PRICING_PROPAGATION=false
73+
make start-env COMPOSE_FILE=docker/compose-tracing-v2-ci-extension.yml
6874

6975
start-env-with-staterecovery: COMPOSE_PROFILES:=l1,l2,staterecovery
7076
start-env-with-staterecovery: L1_CONTRACT_VERSION:=6

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ allprojects {
8585
systemProperty("L1_RPC_URL", "http://localhost:8445")
8686
systemProperty("L2_RPC_URL", "http://localhost:8545")
8787
systemProperty("L1_GENESIS", "docker/config/l1-node/el/genesis.json")
88-
systemProperty("L2_GENESIS", "docker/config/linea-local-dev-genesis-PoA-geth.json")
88+
systemProperty("L2_GENESIS", "docker/config/linea-local-dev-genesis-PoA-besu.json")
8989

9090
systemProperties["junit.jupiter.execution.timeout.default"] = "5 m" // 5 minutes
9191
systemProperties["junit.jupiter.execution.parallel.enabled"] = true

config/blockscout/l1-blockscout.env

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ BLOCKSCOUT_PROTOCOL=http #use https for prod
1818
# SECRET_KEY_BASE=
1919
# CHECK_ORIGIN=
2020
PORT=4000
21-
COIN=GOERLI-ETH
22-
COIN_NAME="Test Eth"
21+
COIN="ethereum"
22+
COIN_NAME="ETH"
2323
# METADATA_CONTRACT=
2424
# VALIDATORS_CONTRACT=
2525
# KEYS_MANAGER_CONTRACT=
@@ -88,7 +88,7 @@ TXS_STATS_DAYS_TO_COMPILE_AT_INIT=10
8888
COIN_BALANCE_HISTORY_DAYS=90
8989
APPS_MENU=false
9090
# GAS_PRICE=
91-
CHAIN_ID=19940131
91+
CHAIN_ID=31648428
9292
MAX_SIZE_UNLESS_HIDE_ARRAY=50
9393
HIDE_BLOCK_MINER=false
9494
DISPLAY_TOKEN_ICONS=false

config/blockscout/l2-blockscout.env

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# DOC of ENV https://docs.blockscout.com/for-developers/information-and-settings/env-variables
22
# DOCKER_TAG=
3-
ETHEREUM_JSONRPC_VARIANT=geth
3+
ETHEREUM_JSONRPC_VARIANT=besu
44
NETWORK=Ethereum
55
SUBNETWORK="Local Linea"
66
LOGO=/images/blockscout_logo.svg
@@ -14,8 +14,8 @@ API_PATH=/
1414
SOCKET_ROOT=/
1515
BLOCKSCOUT_PROTOCOL=http #use https for prod
1616
PORT=4000
17-
COIN=GOERLI-ETH
18-
COIN_NAME="Goerli Eth"
17+
COIN="ethereum"
18+
COIN_NAME="ETH"
1919
CHAIN_SPEC_PATH=/app/genesis.json
2020
POOL_SIZE=20
2121
POOL_SIZE_API=5
@@ -62,7 +62,7 @@ TXS_HISTORIAN_INIT_LAG=0
6262
TXS_STATS_DAYS_TO_COMPILE_AT_INIT=10
6363
COIN_BALANCE_HISTORY_DAYS=90
6464
APPS_MENU=false
65-
CHAIN_ID=59140
65+
CHAIN_ID=1337
6666
MAX_SIZE_UNLESS_HIDE_ARRAY=50
6767
HIDE_BLOCK_MINER=false
6868
DISPLAY_TOKEN_ICONS=false

config/coordinator/coordinator-local-dev.config-traces-v2.overrides.toml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ fs-responses-directory = "tmp/local/prover/v3/compression/responses"
99
fs-requests-directory = "tmp/local/prover/v3/aggregation/requests"
1010
fs-responses-directory = "tmp/local/prover/v3/aggregation/responses"
1111

12-
[dynamic-gas-price-service]
13-
geth-gas-price-update-recipients=[
14-
"http://127.0.0.1:8845"
15-
]
16-
1712
[l2]
1813
rpc-endpoint="http://127.0.0.1:8745"
1914
blocks-to-finalization=0
@@ -30,4 +25,4 @@ endpoints=[]
3025
[l2-network-gas-pricing.json-rpc-pricing-propagation]
3126
disabled=true
3227
geth-gas-price-update-recipients=[]
33-
besu-gas-price-update-recipients=["http://127.0.0.1:9045"]
28+
besu-gas-price-update-recipients=[]

config/coordinator/coordinator-local-dev.config.overrides.toml

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,18 @@ endpoint="http://127.0.0.1:9000"
1212

1313
[prover]
1414
[prover.execution]
15-
fs-requests-directory = "tmp/local/prover/v3/execution/requests"
16-
fs-responses-directory = "tmp/local/prover/v3/execution/responses"
15+
fs-requests-directory="tmp/local/prover/v3/execution/requests"
16+
fs-responses-directory="tmp/local/prover/v3/execution/responses"
1717
[prover.blob-compression]
18-
fs-requests-directory = "tmp/local/prover/v3/compression/requests"
19-
fs-responses-directory = "tmp/local/prover/v3/compression/responses"
18+
fs-requests-directory="tmp/local/prover/v3/compression/requests"
19+
fs-responses-directory="tmp/local/prover/v3/compression/responses"
2020
[prover.proof-aggregation]
21-
fs-requests-directory = "tmp/local/prover/v2/aggregation/requests"
22-
fs-responses-directory = "tmp/local/prover/v2/aggregation/responses"
21+
fs-requests-directory="tmp/local/prover/v3/aggregation/requests"
22+
fs-responses-directory="tmp/local/prover/v3/aggregation/responses"
2323

2424
# Config of Traces API Facade endpoint
2525
[traces]
2626
blob-compressor-version="V1_2"
27-
expected-traces-api-version-v2="beta-v2.1-rc14"
2827
[traces.counters-v2]
2928
endpoints=["http://127.0.0.1:8745/"]
3029
[traces.conflation-v2]
@@ -33,12 +32,17 @@ endpoints=["http://127.0.0.1:8745/"]
3332
[state-manager]
3433
endpoints=["http://127.0.0.1:8998/"]
3534

35+
[type2-state-proof-provider]
36+
disabled=true
37+
endpoints=["http://127.0.0.1:8889/"]
38+
3639
[l2-network-gas-pricing.extra-data-pricing-propagation]
37-
extra-data-update-recipient = "http://127.0.0.1:8545/"
40+
extra-data-update-recipient="http://127.0.0.1:8545/"
3841

3942
[l2-network-gas-pricing.json-rpc-pricing-propagation]
40-
geth-gas-price-update-recipients = ["http://127.0.0.1:8845"]
41-
besu-gas-price-update-recipients = []
43+
disabled=true
44+
geth-gas-price-update-recipients=["http://127.0.0.1:8845/"]
45+
besu-gas-price-update-recipients=[]
4246

4347
[l1]
4448
rpc-endpoint="http://127.0.0.1:8445"
@@ -52,20 +56,11 @@ finalized-block-tag="finalized"
5256
earliestBlock=0
5357

5458
[l2]
55-
rpc-endpoint="http://127.0.0.1:8845"
59+
rpc-endpoint="http://127.0.0.1:9045"
5660
blocks-to-finalization=0
5761

5862
[database]
5963
host="localhost"
6064

6165
[api]
6266
observability_port=9546
63-
64-
[type2-state-proof-provider]
65-
endpoints = ["http://127.0.0.1:8889/"]
66-
67-
[conflation]
68-
#switch-block-number=20
69-
70-
[type2-state-proof-provider]
71-
endpoints=[]

coordinator/app/src/main/kotlin/net/consensys/zkevm/coordinator/app/L1DependentApp.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,10 @@ class L1DependentApp(
10771077
l2Web3jClient: Web3j,
10781078
vertx: Vertx
10791079
): LongRunningService {
1080-
if (type2StateProofProviderConfig == null || type2StateProofProviderConfig.endpoints.isEmpty()) {
1080+
if (type2StateProofProviderConfig == null ||
1081+
type2StateProofProviderConfig.disabled ||
1082+
type2StateProofProviderConfig.endpoints.isEmpty()
1083+
) {
10811084
return DisabledLongRunningService
10821085
}
10831086

coordinator/app/src/main/kotlin/net/consensys/zkevm/coordinator/app/config/CoordinatorConfig.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,11 +479,12 @@ data class SmartContractErrorCodesConfig(val smartContractErrors: SmartContractE
479479
data class GasPriceCapTimeOfDayMultipliersConfig(val gasPriceCapTimeOfDayMultipliers: TimeOfDayMultipliers)
480480

481481
data class Type2StateProofProviderConfig(
482+
override var disabled: Boolean = false,
482483
val endpoints: List<URL>,
483484
val l1QueryBlockTag: BlockParameter.Tag = BlockParameter.Tag.LATEST,
484485
val l1PollingInterval: Duration = Duration.ofSeconds(12),
485486
override val requestRetry: RequestRetryConfigTomlFriendly
486-
) : RequestRetryConfigurable
487+
) : FeatureToggleable, RequestRetryConfigurable
487488

488489
data class TracesLimitsV2ConfigFile(val tracesLimits: Map<TracingModuleV2, UInt>)
489490

coordinator/ethereum/test-utils/src/main/kotlin/net/consensys/zkevm/ethereum/AccountManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ object L1AccountManager : AccountManager by WhaleBasedAccountManager(
229229

230230
object L2AccountManager : AccountManager by WhaleBasedAccountManager(
231231
web3jClient = Web3jClientManager.l2Client,
232-
genesisFile = getPathTo(System.getProperty("L2_GENESIS", "docker/config/linea-local-dev-genesis-PoA-geth.json")),
232+
genesisFile = getPathTo(System.getProperty("L2_GENESIS", "docker/config/linea-local-dev-genesis-PoA-besu.json")),
233233
log = LogManager.getLogger(L2AccountManager::class.java)
234234
)
235235

docker/compose-spec-extra-observability.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,22 @@ services:
3636
depends_on:
3737
postgres:
3838
condition: service_healthy
39-
l2-node:
39+
l2-node-besu:
4040
condition: service_started
4141
# - smart-contract-verifier not supported for v0.1
4242
command: bash -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start"
4343
env_file:
4444
- ../config/blockscout/l2-blockscout.env
4545
environment:
46-
ETHEREUM_JSONRPC_HTTP_URL: http://l2-node:8545/
47-
ETHEREUM_JSONRPC_TRACE_URL: http://l2-node:8545/
48-
ETHEREUM_JSONRPC_WS_URL: ws://l2-node:8546/
46+
ETHEREUM_JSONRPC_HTTP_URL: http://l2-node-besu:8545/
47+
ETHEREUM_JSONRPC_TRACE_URL: http://l2-node-besu:8545/
48+
ETHEREUM_JSONRPC_WS_URL: ws://l2-node-besu:8546/
4949
DATABASE_URL: postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/l2_blockscout_db?ssl=false
5050
ECTO_USE_SSL: 'false'
5151
ports:
5252
- "4000:4000"
5353
volumes:
54-
- ./config/linea-local-dev-genesis-PoA-geth.json:/app/genesis.json:ro
54+
- ./config/linea-local-dev-genesis-PoA-besu.json:/app/genesis.json:ro
5555
networks:
5656
- linea
5757

docker/compose-spec-l2-services.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ services:
4848
hostname: l2-node
4949
image: consensys/linea-geth:${ZKGETH_TAG:-0588665}
5050
platform: linux/amd64
51-
profiles: [ "l2", "l2-bc", "debug", "external-to-monorepo" ]
51+
profiles: [ "l2", "debug" ]
5252
depends_on:
5353
sequencer:
5454
condition: service_healthy
@@ -181,7 +181,7 @@ services:
181181
postman:
182182
container_name: postman
183183
hostname: postman
184-
image: consensys/linea-postman:${POSTMAN_TAG:-c332ec7}
184+
image: consensys/linea-postman:${POSTMAN_TAG:-8a0bcc8}
185185
profiles: [ "l2", "debug" ]
186186
platform: linux/amd64
187187
restart: on-failure
@@ -221,7 +221,7 @@ services:
221221
restart: on-failure
222222
environment:
223223
config__override__l2-network-gas-pricing__json-rpc-pricing-propagation__disabled: ${DISABLE_JSON_RPC_PRICING_PROPAGATION:-true}
224-
config__override__type2-state-proof-provider__endpoints: # leave empty to disable
224+
config__override__type2-state-proof-provider__disabled: ${DISABLE_TYPE2_STATE_PROOF_PROVIDER:-true}
225225
command: [ 'java', '-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005','-Dvertx.configurationFile=/var/lib/coordinator/vertx-options.json', '-Dlog4j2.configurationFile=/var/lib/coordinator/log4j2-dev.xml', '-jar', 'libs/coordinator.jar', '--traces-limits-v2', 'config/traces-limits-v2.toml', '--smart-contract-errors', 'config/smart-contract-errors.toml', '--gas-price-cap-time-of-day-multipliers', 'config/gas-price-cap-time-of-day-multipliers.toml', 'config/coordinator-docker.config.toml', 'config/coordinator-docker-traces-v2-override.config.toml' ]
226226
volumes:
227227
- ../config/coordinator/coordinator-docker.config.toml:/opt/consensys/linea/coordinator/config/coordinator-docker.config.toml:ro
@@ -369,7 +369,7 @@ services:
369369
image: consensys/linea-shomei:2.3.0
370370
hostname: shomei-frontend
371371
container_name: shomei-frontend
372-
profiles: [ "l2", "l2-bc", "external-to-monorepo" ]
372+
profiles: [ "l2", "l2-bc" ]
373373
depends_on:
374374
zkbesu-shomei:
375375
condition: service_started
@@ -410,7 +410,7 @@ services:
410410
transaction-exclusion-api:
411411
hostname: transaction-exclusion-api
412412
container_name: transaction-exclusion-api
413-
image: consensys/linea-transaction-exclusion-api:${TRANSACTION_EXCLUSION_API_TAG:-c332ec7}
413+
image: consensys/linea-transaction-exclusion-api:${TRANSACTION_EXCLUSION_API_TAG:-8a0bcc8}
414414
profiles: [ "l2", "debug" ]
415415
restart: on-failure
416416
depends_on:

docker/compose-tracing-v2-ci-extension.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,11 @@ include:
22
- compose-tracing-v2.yml
33

44
services:
5-
l2-node:
6-
extends:
7-
file: compose-spec-l2-services.yml
8-
service: l2-node
9-
105
l2-node-besu:
116
extends:
127
file: compose-spec-l2-services.yml
138
service: l2-node-besu
149

15-
shomei-frontend:
16-
extends:
17-
file: compose-spec-l2-services.yml
18-
service: shomei-frontend
19-
2010
postman:
2111
extends:
2212
file: compose-spec-l2-services.yml
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
include:
2+
- compose-tracing-v2.yml
3+
4+
services:
5+
shomei-frontend:
6+
extends:
7+
file: compose-spec-l2-services.yml
8+
service: shomei-frontend
9+
10+
l2-node:
11+
extends:
12+
file: compose-spec-l2-services.yml
13+
service: l2-node
14+
15+
l2-node-besu:
16+
extends:
17+
file: compose-spec-l2-services.yml
18+
service: l2-node-besu
19+
20+
postman:
21+
extends:
22+
file: compose-spec-l2-services.yml
23+
service: postman
24+
25+
transaction-exclusion-api:
26+
extends:
27+
file: compose-spec-l2-services.yml
28+
service: transaction-exclusion-api
29+

docker/config/l2-node-besu/l2-node-besu-config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ plugin-linea-tx-pool-profitability-check-api-enabled=true
4646
plugin-linea-tx-pool-simulation-check-api-enabled=true
4747
plugin-linea-tx-pool-simulation-check-p2p-enabled=true
4848
plugin-linea-extra-data-pricing-enabled=true
49+
plugin-linea-max-tx-calldata-size=30000 # lower this to 30000 (default 60000) for the transaction data limit e2e test
4950
plugin-linea-tx-pool-min-margin="0.8"
5051
plugin-linea-min-margin="1.0"
5152
plugin-linea-fixed-gas-cost-wei=30000000

0 commit comments

Comments
 (0)