From 3c38e15b923d9c71180032bb841a421851e03dad Mon Sep 17 00:00:00 2001 From: Vasyl Ivanchuk Date: Thu, 23 May 2024 14:49:58 +0300 Subject: [PATCH] chore: fix docker compose (#256) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # What ❔ Fix docker compose by applying the same updates that were done in [local-setup](https://github.com/matter-labs/local-setup.) ## Why ❔ Old docker compose doesn't work with the latest `local-node` docker image. ## Checklist - [X] PR title corresponds to the body of PR (we generate changelog entries from PRs). --- docker-compose.yaml | 39 +++++---- .../redirection/redirectionSet1.feature | 2 +- reth_chaindata/reth_config | 86 +++++++++++++++++++ scripts/setup-hyperchain-config.ts | 2 +- 4 files changed, 110 insertions(+), 19 deletions(-) create mode 100644 reth_chaindata/reth_config diff --git a/docker-compose.yaml b/docker-compose.yaml index 55e1999cbf..390d5a3bad 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -79,15 +79,18 @@ services: - POSTGRES_PASSWORD=postgres - POSTGRES_DB=block-explorer - geth: - image: "matterlabs/geth:latest" - logging: - driver: none - ports: - - "8545:8545" - - "8546:8546" + reth: + restart: always + image: "ghcr.io/paradigmxyz/reth:v0.2.0-beta.2" volumes: - - geth:/var/lib/geth/data + - type: bind + source: ./reth_chaindata + target: /chaindata + command: node --dev --datadir /rethdata --http --http.addr 0.0.0.0 --http.port 8545 --dev.block-time 300ms --chain /chaindata/reth_config + environment: + - RUST_LOG=warn + ports: + - 127.0.0.1:8545:8545 zksync: stdin_open: true @@ -96,28 +99,30 @@ services: depends_on: postgres: condition: service_healthy - geth: + reth: condition: service_started ports: - - "3050:3050" # JSON RPC HTTP port - - "3051:3051" # JSON RPC WS port + - 127.0.0.1:3050:3050 # JSON RPC HTTP port + - 127.0.0.1:3051:3051 # JSON RPC WS port volumes: # Configs folder bind - zksync-config:/etc/env/ # Storage folder bind - zksync-data:/var/lib/zksync/data environment: - - DATABASE_URL=postgres://postgres:postgres@postgres:5432/zksync_local - - ETH_CLIENT_WEB3_URL=http://geth:8545 + - DATABASE_PROVER_URL=postgres://postgres:postgres@postgres/prover_local + - DATABASE_URL=postgres://postgres:postgres@postgres/zksync_local + - ETH_CLIENT_WEB3_URL=http://reth:8545 healthcheck: - test: "curl -H \"Content-Type: application/json\" -X POST --data '{\"jsonrpc\":\"2.0\",\"method\":\"web3_clientVersion\",\"params\":[],\"id\":67}' 127.0.0.1:3050 || exit 1" - interval: 5s + test: curl --fail http://localhost:3071/health || exit 1 + interval: 10s timeout: 5s - retries: 300 + retries: 60 + start_period: 30s restart: unless-stopped volumes: - geth: + reth: postgres: zksync-config: zksync-data: \ No newline at end of file diff --git a/packages/app/tests/e2e/features/redirection/redirectionSet1.feature b/packages/app/tests/e2e/features/redirection/redirectionSet1.feature index 468f71feab..4a9871b9c2 100644 --- a/packages/app/tests/e2e/features/redirection/redirectionSet1.feature +++ b/packages/app/tests/e2e/features/redirection/redirectionSet1.feature @@ -27,7 +27,7 @@ Feature: Redirection | Icon | url | # discord renamed to "join" | join | https://join.zksync.dev/ | - | twitter | https://twitter.com/zksync | + | twitter | https://x.com/zksync | @id251 Scenario: Verify redirection for Documentation link diff --git a/reth_chaindata/reth_config b/reth_chaindata/reth_config new file mode 100644 index 0000000000..8c4a53f83b --- /dev/null +++ b/reth_chaindata/reth_config @@ -0,0 +1,86 @@ +{ + "config": { + "chainId": 9, + "homesteadBlock": 0, + "eip150Block": 0, + "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "eip155Block": 0, + "eip158Block": 0, + "daoForkBlock": 0, + "frontierBlock": 0, + "byzantiumBlock": 0, + "constantinopleBlock": 0, + "petersburgBlock": 0, + "muirGlacierBlock": 0, + "istanbulBlock": 0, + "berlinBlock": 0, + "londonBlock": 0, + "terminalTotalDifficulty": "0x0", + "mergeNetsplitBlock": 0, + "shanghaiTime": 0, + "cancunTime": 0, + "clique": { + "period": 0, + "epoch": 30000 + } + }, + "nonce": "0x0", + "timestamp": "0x5ca9158b", + "gasLimit": "0x1c9c380", + "difficulty": "0x0", + "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "coinbase": "0x0000000000000000000000000000000000000000", + "alloc": { + "0000000000000000000000000000000000000000": { + "balance": "0x1" + }, + "8a91dc2d28b689474298d91899f0c1baf62cb85b": { + "balance": "0x4B3B4CA85A86C47A098A224000000000" + }, + "de03a0b5963f75f1c8485b355ff6d30f3093bde7": { + "balance": "0x4B3B4CA85A86C47A098A224000000000" + }, + "52312AD6f01657413b2eaE9287f6B9ADaD93D5FE": { + "balance": "0x4B3B4CA85A86C47A098A224000000000" + }, + "36615Cf349d7F6344891B1e7CA7C72883F5dc049": { + "balance": "0x4B3B4CA85A86C47A098A224000000000" + }, + "a61464658AfeAf65CccaaFD3a512b69A83B77618": { + "balance": "0x4B3B4CA85A86C47A098A224000000000" + }, + "0D43eB5B8a47bA8900d84AA36656c92024e9772e": { + "balance": "0x4B3B4CA85A86C47A098A224000000000" + }, + "A13c10C0D5bd6f79041B9835c63f91de35A15883": { + "balance": "0x4B3B4CA85A86C47A098A224000000000" + }, + "8002cD98Cfb563492A6fB3E7C8243b7B9Ad4cc92": { + "balance": "0x4B3B4CA85A86C47A098A224000000000" + }, + "4F9133D1d3F50011A6859807C837bdCB31Aaab13": { + "balance": "0x4B3B4CA85A86C47A098A224000000000" + }, + "bd29A1B981925B94eEc5c4F1125AF02a2Ec4d1cA": { + "balance": "0x4B3B4CA85A86C47A098A224000000000" + }, + "edB6F5B4aab3dD95C7806Af42881FF12BE7e9daa": { + "balance": "0x4B3B4CA85A86C47A098A224000000000" + }, + "e706e60ab5Dc512C36A4646D719b889F398cbBcB": { + "balance": "0x4B3B4CA85A86C47A098A224000000000" + }, + "E90E12261CCb0F3F7976Ae611A29e84a6A85f424": { + "balance": "0x4B3B4CA85A86C47A098A224000000000" + }, + "e706e60ab5dc512c36a4646d719b889f398cbbcb": { + "balance": "0x4B3B4CA85A86C47A098A224000000000" + } + }, + "number": "0x0", + "gasUsed": "0x0", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "baseFeePerGas": 1, + "excessBlobGas": "0x0", + "blobGasUsed": 0 +} \ No newline at end of file diff --git a/scripts/setup-hyperchain-config.ts b/scripts/setup-hyperchain-config.ts index 38b6e9343d..56652b485e 100644 --- a/scripts/setup-hyperchain-config.ts +++ b/scripts/setup-hyperchain-config.ts @@ -57,7 +57,7 @@ const buildEnvFileContent = (json: { [key: string]: string | number }) => Object } console.log(`zksync-era repo found at ${zkSyncHome}`); - const zkSyncEnvFolder = `${zkSyncHome}/etc/env`; + const zkSyncEnvFolder = `${zkSyncHome}/etc/env/target`; const envFiles = readdirSync(zkSyncEnvFolder) .map((fullFileName) => path.parse(fullFileName)) .filter((file) => {