diff --git a/.env b/.env index 5b70f0c87..8120b4c41 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 92f1ccac0..0ee69ffa1 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 c34c4ec02..832aab8c3 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 8b60c364d..451207f50 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