From ef1a256899f3207e75eae79952244255b354c9cf Mon Sep 17 00:00:00 2001 From: Petar Radovic Date: Thu, 19 Mar 2026 12:55:09 +0100 Subject: [PATCH 01/10] use newer logos-blockchain-node docker image for indexer tests --- Cargo.lock | 1 + bedrock/cfgsync.yaml | 16 ++++++++++++++-- bedrock/docker-compose.yml | 16 +++++++++++----- indexer/core/Cargo.toml | 1 - nssa/Cargo.toml | 2 +- programs/amm/Cargo.toml | 6 ++++-- 6 files changed, 31 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6faf3b1e..6bb8255c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8971,6 +8971,7 @@ dependencies = [ "nssa", "nssa_core", "optfield", + "rand 0.8.5", "serde", "serde_json", "sha2", diff --git a/bedrock/cfgsync.yaml b/bedrock/cfgsync.yaml index e09fe586..d7caa4a9 100644 --- a/bedrock/cfgsync.yaml +++ b/bedrock/cfgsync.yaml @@ -2,11 +2,23 @@ port: 4400 n_hosts: 4 timeout: 10 +faucet_settings: + enabled: true + +deployment_settings_storage_path: + deployment-settings.yaml + +entropy_file: /etc/logos-blockchain/test_entropy + +mode: Setup + # Tracing tracing_settings: - logger: Stdout + logger: + stdout: true + stderr: true tracing: None filter: None metrics: None console: None - level: DEBUG + level: Debug diff --git a/bedrock/docker-compose.yml b/bedrock/docker-compose.yml index 4f85bf25..d4ba9859 100644 --- a/bedrock/docker-compose.yml +++ b/bedrock/docker-compose.yml @@ -1,14 +1,17 @@ services: cfgsync: - image: ghcr.io/logos-blockchain/logos-blockchain@sha256:000982e751dfd346ca5346b8025c685fc3abc585079c59cde3bde7fd63100657 + platform: linux/amd64 + image: ghcr.io/logos-blockchain/logos-blockchain@sha256:2d35c2564e0e64b1181b5158908ec8842c9c540786cdbd665202026b349f61eb volumes: - ./scripts:/etc/logos-blockchain/scripts - ./cfgsync.yaml:/etc/logos-blockchain/cfgsync.yaml:z + - ./test_entropy:/etc/logos-blockchain/test_entropy:z entrypoint: /etc/logos-blockchain/scripts/run_cfgsync.sh logos-blockchain-node-0: - image: ghcr.io/logos-blockchain/logos-blockchain@sha256:000982e751dfd346ca5346b8025c685fc3abc585079c59cde3bde7fd63100657 + platform: linux/amd64 + image: ghcr.io/logos-blockchain/logos-blockchain@sha256:2d35c2564e0e64b1181b5158908ec8842c9c540786cdbd665202026b349f61eb ports: - "${PORT:-8080}:18080/tcp" volumes: @@ -19,7 +22,8 @@ services: entrypoint: /etc/logos-blockchain/scripts/run_logos_blockchain_node.sh logos-blockchain-node-1: - image: ghcr.io/logos-blockchain/logos-blockchain@sha256:000982e751dfd346ca5346b8025c685fc3abc585079c59cde3bde7fd63100657 + platform: linux/amd64 + image: ghcr.io/logos-blockchain/logos-blockchain@sha256:2d35c2564e0e64b1181b5158908ec8842c9c540786cdbd665202026b349f61eb volumes: - ./scripts:/etc/logos-blockchain/scripts - ./kzgrs_test_params:/kzgrs_test_params:z @@ -28,7 +32,8 @@ services: entrypoint: /etc/logos-blockchain/scripts/run_logos_blockchain_node.sh logos-blockchain-node-2: - image: ghcr.io/logos-blockchain/logos-blockchain@sha256:000982e751dfd346ca5346b8025c685fc3abc585079c59cde3bde7fd63100657 + platform: linux/amd64 + image: ghcr.io/logos-blockchain/logos-blockchain@sha256:2d35c2564e0e64b1181b5158908ec8842c9c540786cdbd665202026b349f61eb volumes: - ./scripts:/etc/logos-blockchain/scripts - ./kzgrs_test_params:/kzgrs_test_params:z @@ -37,7 +42,8 @@ services: entrypoint: /etc/logos-blockchain/scripts/run_logos_blockchain_node.sh logos-blockchain-node-3: - image: ghcr.io/logos-blockchain/logos-blockchain@sha256:000982e751dfd346ca5346b8025c685fc3abc585079c59cde3bde7fd63100657 + platform: linux/amd64 + image: ghcr.io/logos-blockchain/logos-blockchain@sha256:2d35c2564e0e64b1181b5158908ec8842c9c540786cdbd665202026b349f61eb volumes: - ./scripts:/etc/logos-blockchain/scripts - ./kzgrs_test_params:/kzgrs_test_params:z diff --git a/indexer/core/Cargo.toml b/indexer/core/Cargo.toml index 8129c1ea..13e81088 100644 --- a/indexer/core/Cargo.toml +++ b/indexer/core/Cargo.toml @@ -28,4 +28,3 @@ async-stream.workspace = true [dev-dependencies] tempfile.workspace = true - diff --git a/nssa/Cargo.toml b/nssa/Cargo.toml index e1b6805f..b50f189b 100644 --- a/nssa/Cargo.toml +++ b/nssa/Cargo.toml @@ -37,4 +37,4 @@ test-case = "3.3.1" [features] default = [] prove = ["risc0-zkvm/prove"] -test-utils = [] \ No newline at end of file +test-utils = [] diff --git a/programs/amm/Cargo.toml b/programs/amm/Cargo.toml index 449d5dcc..30074ac8 100644 --- a/programs/amm/Cargo.toml +++ b/programs/amm/Cargo.toml @@ -8,10 +8,12 @@ license = { workspace = true } workspace = true [dependencies] -nssa = { workspace = true, optional = true, features = ["test-utils"], default-features = true } +nssa = { workspace = true, optional = true, features = [ + "test-utils", +], default-features = true } nssa_core.workspace = true token_core.workspace = true amm_core.workspace = true [features] -nssa = ["dep:nssa"] \ No newline at end of file +nssa = ["dep:nssa"] From 67bd4a034a3ed948182cd7ca959c4b97dc01031a Mon Sep 17 00:00:00 2001 From: Petar Radovic Date: Thu, 19 Mar 2026 13:05:25 +0100 Subject: [PATCH 02/10] entropy file --- bedrock/test_entropy | 1 + 1 file changed, 1 insertion(+) create mode 100644 bedrock/test_entropy diff --git a/bedrock/test_entropy b/bedrock/test_entropy new file mode 100644 index 00000000..314128ee --- /dev/null +++ b/bedrock/test_entropy @@ -0,0 +1 @@ +deterministic-lez-test-entropy-seed-do-not-use-in-production \ No newline at end of file From db6b44869cb9e88c4721aeb40593794bb433a332 Mon Sep 17 00:00:00 2001 From: Petar Radovic Date: Thu, 19 Mar 2026 13:43:37 +0100 Subject: [PATCH 03/10] without faucet --- bedrock/cfgsync.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bedrock/cfgsync.yaml b/bedrock/cfgsync.yaml index d7caa4a9..43ffdfca 100644 --- a/bedrock/cfgsync.yaml +++ b/bedrock/cfgsync.yaml @@ -3,10 +3,9 @@ n_hosts: 4 timeout: 10 faucet_settings: - enabled: true + enabled: false -deployment_settings_storage_path: - deployment-settings.yaml +deployment_settings_storage_path: deployment-settings.yaml entropy_file: /etc/logos-blockchain/test_entropy From 82723df85d8d1499f3f63942a6f71006c1c82fc9 Mon Sep 17 00:00:00 2001 From: Petar Radovic Date: Thu, 19 Mar 2026 13:48:34 +0100 Subject: [PATCH 04/10] fetch deployment setting and update genesis from cfgsync --- bedrock/scripts/run_logos_blockchain_node.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/bedrock/scripts/run_logos_blockchain_node.sh b/bedrock/scripts/run_logos_blockchain_node.sh index e318ab4a..be2f7976 100755 --- a/bedrock/scripts/run_logos_blockchain_node.sh +++ b/bedrock/scripts/run_logos_blockchain_node.sh @@ -9,5 +9,9 @@ export CFG_FILE_PATH="/config.yaml" \ LOG_LEVEL="INFO" \ POL_PROOF_DEV_MODE=true -/usr/bin/logos-blockchain-cfgsync-client && \ - exec /usr/bin/logos-blockchain-node /config.yaml +/usr/bin/logos-blockchain-cfgsync-client + +# Download deployment settings generated by cfgsync +curl -sf "${CFG_SERVER_ADDR}/deployment-settings" -o /deployment-settings.yaml + +exec /usr/bin/logos-blockchain-node /config.yaml --deployment /deployment-settings.yaml From 3e28374791492c50ad5d0d0fad5640451647b3bd Mon Sep 17 00:00:00 2001 From: Petar Radovic Date: Thu, 19 Mar 2026 14:21:24 +0100 Subject: [PATCH 05/10] increase cfgsync timeout --- bedrock/cfgsync.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bedrock/cfgsync.yaml b/bedrock/cfgsync.yaml index 43ffdfca..d9b2c04d 100644 --- a/bedrock/cfgsync.yaml +++ b/bedrock/cfgsync.yaml @@ -1,6 +1,6 @@ port: 4400 n_hosts: 4 -timeout: 10 +timeout: 60 faucet_settings: enabled: false From ae153f96192f6f549230ca8480278f8404f6d49c Mon Sep 17 00:00:00 2001 From: Petar Radovic Date: Thu, 19 Mar 2026 15:25:42 +0100 Subject: [PATCH 06/10] retry waiting for deploment settings --- bedrock/scripts/run_logos_blockchain_node.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/bedrock/scripts/run_logos_blockchain_node.sh b/bedrock/scripts/run_logos_blockchain_node.sh index be2f7976..cc5c11a2 100755 --- a/bedrock/scripts/run_logos_blockchain_node.sh +++ b/bedrock/scripts/run_logos_blockchain_node.sh @@ -11,7 +11,19 @@ export CFG_FILE_PATH="/config.yaml" \ /usr/bin/logos-blockchain-cfgsync-client -# Download deployment settings generated by cfgsync -curl -sf "${CFG_SERVER_ADDR}/deployment-settings" -o /deployment-settings.yaml +# Wait for deployment settings to be available (generated after all nodes register) +echo "Waiting for deployment settings from cfgsync..." +RETRIES=0 +MAX_RETRIES=60 +until curl -sf "${CFG_SERVER_ADDR}/deployment-settings" -o /deployment-settings.yaml; do + RETRIES=$((RETRIES + 1)) + if [ "$RETRIES" -ge "$MAX_RETRIES" ]; then + echo "Failed to download deployment settings after ${MAX_RETRIES} attempts" + exit 1 + fi + echo "Deployment settings not ready yet, retrying in 1s... (${RETRIES}/${MAX_RETRIES})" + sleep 1 +done +echo "Deployment settings downloaded successfully" exec /usr/bin/logos-blockchain-node /config.yaml --deployment /deployment-settings.yaml From 0613ca58a8263ce90126111d468e12834ea06ec2 Mon Sep 17 00:00:00 2001 From: Petar Radovic Date: Thu, 19 Mar 2026 16:00:58 +0100 Subject: [PATCH 07/10] try serial execution --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb4cc791..3b6f4bcf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -182,7 +182,7 @@ jobs: env: RISC0_DEV_MODE: "1" RUST_LOG: "info" - run: cargo nextest run -p integration_tests indexer -- --skip tps_test + run: cargo nextest run -p integration_tests -j 1 indexer -- --skip tps_test valid-proof-test: runs-on: ubuntu-latest From d6fc025f915b19ba74fb2ec9557ec2b556d41a6c Mon Sep 17 00:00:00 2001 From: Petar Radovic Date: Thu, 19 Mar 2026 16:40:52 +0100 Subject: [PATCH 08/10] increase timeout --- .github/workflows/ci.yml | 2 +- integration_tests/tests/indexer.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b6f4bcf..50b11c62 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -182,7 +182,7 @@ jobs: env: RISC0_DEV_MODE: "1" RUST_LOG: "info" - run: cargo nextest run -p integration_tests -j 1 indexer -- --skip tps_test + run: cargo nextest run -p integration_tests indexer -- --skip tps_test valid-proof-test: runs-on: ubuntu-latest diff --git a/integration_tests/tests/indexer.rs b/integration_tests/tests/indexer.rs index 0b947135..768cf7e5 100644 --- a/integration_tests/tests/indexer.rs +++ b/integration_tests/tests/indexer.rs @@ -13,7 +13,7 @@ use tokio::test; use wallet::cli::{Command, programs::native_token_transfer::AuthTransferSubcommand}; /// Timeout in milliseconds to reliably await for block finalization. -const L2_TO_L1_TIMEOUT_MILLIS: u64 = 600_000; +const L2_TO_L1_TIMEOUT_MILLIS: u64 = 1_200_000; #[test] async fn indexer_test_run() -> Result<()> { From 60ab077adc571c7f08969489b33cd1b91d4eaae1 Mon Sep 17 00:00:00 2001 From: Petar Radovic Date: Thu, 19 Mar 2026 17:21:42 +0100 Subject: [PATCH 09/10] reduce the security param in tests --- bedrock/scripts/run_logos_blockchain_node.sh | 19 +++++-------------- integration_tests/tests/indexer.rs | 2 +- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/bedrock/scripts/run_logos_blockchain_node.sh b/bedrock/scripts/run_logos_blockchain_node.sh index cc5c11a2..13ab2de2 100755 --- a/bedrock/scripts/run_logos_blockchain_node.sh +++ b/bedrock/scripts/run_logos_blockchain_node.sh @@ -11,19 +11,10 @@ export CFG_FILE_PATH="/config.yaml" \ /usr/bin/logos-blockchain-cfgsync-client -# Wait for deployment settings to be available (generated after all nodes register) -echo "Waiting for deployment settings from cfgsync..." -RETRIES=0 -MAX_RETRIES=60 -until curl -sf "${CFG_SERVER_ADDR}/deployment-settings" -o /deployment-settings.yaml; do - RETRIES=$((RETRIES + 1)) - if [ "$RETRIES" -ge "$MAX_RETRIES" ]; then - echo "Failed to download deployment settings after ${MAX_RETRIES} attempts" - exit 1 - fi - echo "Deployment settings not ready yet, retrying in 1s... (${RETRIES}/${MAX_RETRIES})" - sleep 1 -done -echo "Deployment settings downloaded successfully" +# Download deployment settings generated by cfgsync +curl -sf "${CFG_SERVER_ADDR}/deployment-settings" -o /deployment-settings.yaml + +# Set security parameter to 10 to keep integration tests within the 10 minute timeout +sed -i 's/security_param: 30/security_param: 10/' /deployment-settings.yaml exec /usr/bin/logos-blockchain-node /config.yaml --deployment /deployment-settings.yaml diff --git a/integration_tests/tests/indexer.rs b/integration_tests/tests/indexer.rs index 768cf7e5..0b947135 100644 --- a/integration_tests/tests/indexer.rs +++ b/integration_tests/tests/indexer.rs @@ -13,7 +13,7 @@ use tokio::test; use wallet::cli::{Command, programs::native_token_transfer::AuthTransferSubcommand}; /// Timeout in milliseconds to reliably await for block finalization. -const L2_TO_L1_TIMEOUT_MILLIS: u64 = 1_200_000; +const L2_TO_L1_TIMEOUT_MILLIS: u64 = 600_000; #[test] async fn indexer_test_run() -> Result<()> { From 3958854cf233d65ffb8ef1ca1420d68973a79fcb Mon Sep 17 00:00:00 2001 From: Petar Radovic Date: Thu, 19 Mar 2026 23:10:59 +0100 Subject: [PATCH 10/10] restore cfgsync timeout --- bedrock/cfgsync.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bedrock/cfgsync.yaml b/bedrock/cfgsync.yaml index d9b2c04d..43ffdfca 100644 --- a/bedrock/cfgsync.yaml +++ b/bedrock/cfgsync.yaml @@ -1,6 +1,6 @@ port: 4400 n_hosts: 4 -timeout: 60 +timeout: 10 faucet_settings: enabled: false