From 34351b9f5a8edcf5c77819fef03965dee678753b Mon Sep 17 00:00:00 2001 From: Mathis Antony Date: Tue, 23 Apr 2024 16:23:56 +0800 Subject: [PATCH] CI: fix contracts fuzz tests - Update flake.lock to get a foundry bugfix that enables fixes inline config: https://github.com/foundry-rs/foundry/pull/7431 - Only set `RAYON_NUM_THREADS` in prover. Foundry also uses it to set how many tests run in parallel. In addition it sets parallelism for `diff-test` which is run by foundry tests. --- .env | 5 +++-- docker-compose.yaml | 1 + flake.lock | 6 +++--- process-compose.yaml | 1 + 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.env b/.env index 5b70f0c877..8120b4c415 100644 --- a/.env +++ b/.env @@ -10,8 +10,9 @@ RUST_LOG_FORMAT=full ASYNC_STD_THREAD_COUNT=1 # Rayon is only used occasionally when generating a light client proof. Allow it to use 2 threads to # speed up proof generation, but still don't use every available core or else the demo is too -# heavyweight. -RAYON_NUM_THREADS=2 +# heavyweight. To avoid interfering with the use of rayon elsewhere we don't set RAYON_NUM_THREADS +# var directly, but only when running the prover services in demos. +PROVER_RAYON_NUM_THREADS=2 # Internal port inside container ESPRESSO_CDN_SERVER_PORT=40000 diff --git a/docker-compose.yaml b/docker-compose.yaml index 92f1ccac01..0ee69ffa1c 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -142,6 +142,7 @@ services: - ESPRESSO_SEQUENCER_LIGHTCLIENT_ADDRESS - MNEMONIC=$ESPRESSO_SEQUENCER_ETH_MNEMONIC - ESPRESSO_SEQUENCER_STATE_PROVER_ACCOUNT_INDEX + - RAYON_NUM_THREADS=$PROVER_RAYON_NUM_THREADS - RUST_LOG - RUST_LOG_FORMAT - ASYNC_STD_THREAD_COUNT diff --git a/flake.lock b/flake.lock index c34c4ec02c..832aab8c3a 100644 --- a/flake.lock +++ b/flake.lock @@ -196,11 +196,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1709457044, - "narHash": "sha256-1SktmSjTjC1rhJwQ+kvqUeExKogNzserFGuoGwOerHw=", + "lastModified": 1712135466, + "narHash": "sha256-+xFfYk17EI0zZTGmhh3MyeSpl7RVohoVp/4HaSvGj4I=", "owner": "shazow", "repo": "foundry.nix", - "rev": "592e8ca2e82a2c3a8d0d4dcc7f7c5b8c3842efcd", + "rev": "ece7c960a440c6725a7a5576d1f49a5fabde3747", "type": "github" }, "original": { diff --git a/process-compose.yaml b/process-compose.yaml index 8b60c364dc..451207f50a 100644 --- a/process-compose.yaml +++ b/process-compose.yaml @@ -66,6 +66,7 @@ processes: - MNEMONIC=$ESPRESSO_SEQUENCER_ETH_MNEMONIC - ESPRESSO_SEQUENCER_STAKE_TABLE_CAPACITY=10 - ESPRESSO_STATE_PROVER_UPDATE_INTERVAL=30s + - RAYON_NUM_THREADS=$PROVER_RAYON_NUM_THREADS depends_on: orchestrator: condition: process_healthy