From ea616d010024a640595c00071100790938fdfc33 Mon Sep 17 00:00:00 2001 From: Pravdyvy Date: Fri, 20 Mar 2026 15:14:59 +0200 Subject: [PATCH 1/5] test: ci testing --- .github/workflows/ci.yml | 294 ++++++++++++++--------------- integration_tests/tests/indexer.rs | 2 +- 2 files changed, 148 insertions(+), 148 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb4cc791..04d7bab5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,147 +14,147 @@ on: name: General jobs: - fmt-rs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - with: - ref: ${{ github.head_ref }} +# fmt-rs: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v5 +# with: +# ref: ${{ github.head_ref }} - - name: Install nightly toolchain for rustfmt - run: rustup install nightly --profile minimal --component rustfmt +# - name: Install nightly toolchain for rustfmt +# run: rustup install nightly --profile minimal --component rustfmt - - name: Check Rust files are formatted - run: cargo +nightly fmt --check +# - name: Check Rust files are formatted +# run: cargo +nightly fmt --check - fmt-toml: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - with: - ref: ${{ github.head_ref }} +# fmt-toml: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v5 +# with: +# ref: ${{ github.head_ref }} - - name: Install taplo-cli - run: cargo install --locked taplo-cli +# - name: Install taplo-cli +# run: cargo install --locked taplo-cli - - name: Check TOML files are formatted - run: taplo fmt --check . +# - name: Check TOML files are formatted +# run: taplo fmt --check . - machete: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - with: - ref: ${{ github.head_ref }} +# machete: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v5 +# with: +# ref: ${{ github.head_ref }} - - name: Install active toolchain - run: rustup install +# - name: Install active toolchain +# run: rustup install - - name: Install cargo-machete - run: cargo install cargo-machete +# - name: Install cargo-machete +# run: cargo install cargo-machete - - name: Check for unused dependencies - run: cargo machete +# - name: Check for unused dependencies +# run: cargo machete - deny: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - with: - ref: ${{ github.head_ref }} +# deny: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v5 +# with: +# ref: ${{ github.head_ref }} - - name: Install cargo-deny - run: cargo install --locked cargo-deny +# - name: Install cargo-deny +# run: cargo install --locked cargo-deny - - name: Check licenses and advisories - run: cargo deny check +# - name: Check licenses and advisories +# run: cargo deny check - lint: - runs-on: ubuntu-latest - timeout-minutes: 60 +# lint: +# runs-on: ubuntu-latest +# timeout-minutes: 60 - name: lint - steps: - - uses: actions/checkout@v5 - with: - ref: ${{ github.head_ref }} +# name: lint +# steps: +# - uses: actions/checkout@v5 +# with: +# ref: ${{ github.head_ref }} - - uses: ./.github/actions/install-system-deps +# - uses: ./.github/actions/install-system-deps - - uses: ./.github/actions/install-risc0 +# - uses: ./.github/actions/install-risc0 - - uses: ./.github/actions/install-logos-blockchain-circuits - with: - github-token: ${{ secrets.GITHUB_TOKEN }} +# - uses: ./.github/actions/install-logos-blockchain-circuits +# with: +# github-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install active toolchain - run: rustup install +# - name: Install active toolchain +# run: rustup install - - name: Lint workspace - env: - RISC0_SKIP_BUILD: "1" - run: cargo clippy --workspace --all-targets --all-features -- -D warnings +# - name: Lint workspace +# env: +# RISC0_SKIP_BUILD: "1" +# run: cargo clippy --workspace --all-targets --all-features -- -D warnings - - name: Lint programs - env: - RISC0_SKIP_BUILD: "1" - run: cargo clippy -p "*programs" -- -D warnings +# - name: Lint programs +# env: +# RISC0_SKIP_BUILD: "1" +# run: cargo clippy -p "*programs" -- -D warnings - unit-tests: - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - uses: actions/checkout@v5 - with: - ref: ${{ github.head_ref }} +# unit-tests: +# runs-on: ubuntu-latest +# timeout-minutes: 60 +# steps: +# - uses: actions/checkout@v5 +# with: +# ref: ${{ github.head_ref }} - - uses: ./.github/actions/install-system-deps +# - uses: ./.github/actions/install-system-deps - - uses: ./.github/actions/install-risc0 +# - uses: ./.github/actions/install-risc0 - - uses: ./.github/actions/install-logos-blockchain-circuits - with: - github-token: ${{ secrets.GITHUB_TOKEN }} +# - uses: ./.github/actions/install-logos-blockchain-circuits +# with: +# github-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install active toolchain - run: rustup install +# - name: Install active toolchain +# run: rustup install - - name: Install nextest - run: cargo install --locked cargo-nextest +# - name: Install nextest +# run: cargo install --locked cargo-nextest - - name: Run tests - env: - RISC0_DEV_MODE: "1" - RUST_LOG: "info" - run: cargo nextest run --workspace --exclude integration_tests +# - name: Run tests +# env: +# RISC0_DEV_MODE: "1" +# RUST_LOG: "info" +# run: cargo nextest run --workspace --exclude integration_tests - integration-tests: - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - uses: actions/checkout@v5 - with: - ref: ${{ github.head_ref }} +# integration-tests: +# runs-on: ubuntu-latest +# timeout-minutes: 60 +# steps: +# - uses: actions/checkout@v5 +# with: +# ref: ${{ github.head_ref }} - - uses: ./.github/actions/install-system-deps +# - uses: ./.github/actions/install-system-deps - - uses: ./.github/actions/install-risc0 +# - uses: ./.github/actions/install-risc0 - - uses: ./.github/actions/install-logos-blockchain-circuits - with: - github-token: ${{ secrets.GITHUB_TOKEN }} +# - uses: ./.github/actions/install-logos-blockchain-circuits +# with: +# github-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install active toolchain - run: rustup install +# - name: Install active toolchain +# run: rustup install - - name: Install nextest - run: cargo install --locked cargo-nextest +# - name: Install nextest +# run: cargo install --locked cargo-nextest - - name: Run tests - env: - RISC0_DEV_MODE: "1" - RUST_LOG: "info" - run: cargo nextest run -p integration_tests -- --skip tps_test --skip indexer +# - name: Run tests +# env: +# RISC0_DEV_MODE: "1" +# RUST_LOG: "info" +# run: cargo nextest run -p integration_tests -- --skip tps_test --skip indexer integration-tests-indexer: runs-on: ubuntu-latest @@ -182,55 +182,55 @@ 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 indexer -- --skip tps_test --exact indexer_test_run - valid-proof-test: - runs-on: ubuntu-latest - timeout-minutes: 60 - steps: - - uses: actions/checkout@v5 - with: - ref: ${{ github.head_ref }} + # valid-proof-test: + # runs-on: ubuntu-latest + # timeout-minutes: 60 + # steps: + # - uses: actions/checkout@v5 + # with: + # ref: ${{ github.head_ref }} - - uses: ./.github/actions/install-system-deps + # - uses: ./.github/actions/install-system-deps - - uses: ./.github/actions/install-risc0 + # - uses: ./.github/actions/install-risc0 - - uses: ./.github/actions/install-logos-blockchain-circuits - with: - github-token: ${{ secrets.GITHUB_TOKEN }} + # - uses: ./.github/actions/install-logos-blockchain-circuits + # with: + # github-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install active toolchain - run: rustup install + # - name: Install active toolchain + # run: rustup install - - name: Test valid proof - env: - RUST_LOG: "info" - run: cargo test -p integration_tests -- --exact private::private_transfer_to_owned_account + # - name: Test valid proof + # env: + # RUST_LOG: "info" + # run: cargo test -p integration_tests -- --exact private::private_transfer_to_owned_account - artifacts: - runs-on: ubuntu-latest - timeout-minutes: 60 + # artifacts: + # runs-on: ubuntu-latest + # timeout-minutes: 60 - name: artifacts - steps: - - uses: actions/checkout@v5 - with: - ref: ${{ github.head_ref }} + # name: artifacts + # steps: + # - uses: actions/checkout@v5 + # with: + # ref: ${{ github.head_ref }} - - uses: ./.github/actions/install-risc0 + # - uses: ./.github/actions/install-risc0 - - name: Install just - run: cargo install just + # - name: Install just + # run: cargo install just - - name: Build artifacts - run: just build-artifacts + # - name: Build artifacts + # run: just build-artifacts - - name: Check if artifacts match repository - run: | - if ! git diff --exit-code artifacts/; then - echo "❌ Artifacts in the repository are out of date!" - echo "Please run 'just build-artifacts' and commit the changes." - exit 1 - fi - echo "✅ Artifacts are up to date" + # - name: Check if artifacts match repository + # run: | + # if ! git diff --exit-code artifacts/; then + # echo "❌ Artifacts in the repository are out of date!" + # echo "Please run 'just build-artifacts' and commit the changes." + # exit 1 + # fi + # echo "✅ Artifacts are up to date" diff --git a/integration_tests/tests/indexer.rs b/integration_tests/tests/indexer.rs index cb8cf0e9..623f8650 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 = 100_000; #[test] async fn indexer_test_run() -> Result<()> { From c5925e964fd05c48e4ff26fff5caad71b33fe388 Mon Sep 17 00:00:00 2001 From: Pravdyvy Date: Fri, 20 Mar 2026 18:38:54 +0200 Subject: [PATCH 2/5] test: test tun 2 --- .github/workflows/ci.yml | 2 +- indexer/core/src/lib.rs | 7 ++++--- integration_tests/tests/indexer.rs | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04d7bab5..14acbd30 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 --exact indexer_test_run + run: cargo test -p integration_tests -- --exact indexer_test_run # valid-proof-test: # runs-on: ubuntu-latest diff --git a/indexer/core/src/lib.rs b/indexer/core/src/lib.rs index 6c96821e..aea1ea17 100644 --- a/indexer/core/src/lib.rs +++ b/indexer/core/src/lib.rs @@ -5,7 +5,7 @@ use bedrock_client::{BedrockClient, HeaderId}; use common::block::{Block, HashableBlockData}; // ToDo: Remove after testnet use common::{HashType, PINATA_BASE58}; -use log::{debug, error, info}; +use log::{error, info}; use logos_blockchain_core::mantle::{ Op, SignedMantleTx, ops::channel::{ChannelId, inscribe::InscriptionOp}, @@ -214,11 +214,11 @@ impl IndexerCore { "INITIAL SEARCH: Observed L1 block at slot {}", cycle_block.header().slot().into_inner() ); - debug!( + info!( "INITIAL SEARCH: This block header is {}", cycle_block.header().id() ); - debug!( + info!( "INITIAL SEARCH: This block parent is {}", cycle_block.header().parent() ); @@ -317,6 +317,7 @@ fn parse_block_owned( l1_block: &bedrock_client::Block, decoded_channel_id: &ChannelId, ) -> (Vec, HeaderId) { + info!("Block with slot {:?} have {} transactions", l1_block.header().slot(), l1_block.transactions_vec().len()); ( #[expect( clippy::wildcard_enum_match_arm, diff --git a/integration_tests/tests/indexer.rs b/integration_tests/tests/indexer.rs index 623f8650..3b548c96 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 = 100_000; +const L2_TO_L1_TIMEOUT_MILLIS: u64 = 200_000; #[test] async fn indexer_test_run() -> Result<()> { From 29f7cc2ee4d4e394bb97787efcad7b87af01ccce Mon Sep 17 00:00:00 2001 From: Pravdyvy Date: Mon, 23 Mar 2026 16:43:10 +0200 Subject: [PATCH 3/5] test: loong test --- .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 14acbd30..d31c32da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -158,7 +158,7 @@ jobs: integration-tests-indexer: runs-on: ubuntu-latest - timeout-minutes: 60 + timeout-minutes: 120 steps: - uses: actions/checkout@v5 with: diff --git a/integration_tests/tests/indexer.rs b/integration_tests/tests/indexer.rs index 3b548c96..aa016a79 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 = 200_000; +const L2_TO_L1_TIMEOUT_MILLIS: u64 = 1_200_000; #[test] async fn indexer_test_run() -> Result<()> { From 8073ee6d877a4e31f62aab328a420a46c88f513c Mon Sep 17 00:00:00 2001 From: Pravdyvy Date: Mon, 23 Mar 2026 18:10:13 +0200 Subject: [PATCH 4/5] test: loooong test --- integration_tests/tests/indexer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_tests/tests/indexer.rs b/integration_tests/tests/indexer.rs index aa016a79..62bcbbc8 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 = 2_400_000; #[test] async fn indexer_test_run() -> Result<()> { From 08944fc5e7ec563b57d90eb909a844abc9956c56 Mon Sep 17 00:00:00 2001 From: Pravdyvy Date: Mon, 23 Mar 2026 19:42:54 +0200 Subject: [PATCH 5/5] test: downgrade containers --- Cargo.lock | 29 ++++++++++++++++++++--------- integration_tests/Cargo.toml | 2 +- integration_tests/tests/indexer.rs | 2 +- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6e0461fd..0ec691d2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1076,9 +1076,9 @@ dependencies = [ [[package]] name = "bollard" -version = "0.20.1" +version = "0.19.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "227aa051deec8d16bd9c34605e7aaf153f240e35483dd42f6f78903847934738" +checksum = "87a52479c9237eb04047ddb94788c41ca0d26eaff8b697ecfbb4c32f7fdc3b1b" dependencies = [ "async-stream", "base64 0.22.1", @@ -1086,6 +1086,7 @@ dependencies = [ "bollard-buildkit-proto", "bollard-stubs", "bytes", + "chrono", "futures-core", "futures-util", "hex", @@ -1103,13 +1104,14 @@ dependencies = [ "rand 0.9.2", "rustls", "rustls-native-certs", + "rustls-pemfile", "rustls-pki-types", "serde", "serde_derive", "serde_json", + "serde_repr", "serde_urlencoded", "thiserror 2.0.18", - "time", "tokio", "tokio-stream", "tokio-util", @@ -1134,18 +1136,19 @@ dependencies = [ [[package]] name = "bollard-stubs" -version = "1.52.1-rc.29.1.3" +version = "1.49.1-rc.28.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f0a8ca8799131c1837d1282c3f81f31e76ceb0ce426e04a7fe1ccee3287c066" +checksum = "5731fe885755e92beff1950774068e0cae67ea6ec7587381536fca84f1779623" dependencies = [ "base64 0.22.1", "bollard-buildkit-proto", "bytes", + "chrono", "prost 0.14.3", "serde", "serde_json", "serde_repr", - "time", + "serde_with", ] [[package]] @@ -6891,6 +6894,15 @@ dependencies = [ "security-framework", ] +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "rustls-pki-types" version = "1.14.0" @@ -7842,9 +7854,9 @@ dependencies = [ [[package]] name = "testcontainers" -version = "0.27.1" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1c0624faaa317c56d6d19136580be889677259caf5c897941c6f446b4655068" +checksum = "a81ec0158db5fbb9831e09d1813fe5ea9023a2b5e6e8e0a5fe67e2a820733629" dependencies = [ "astral-tokio-tar", "async-trait", @@ -7856,7 +7868,6 @@ dependencies = [ "etcetera", "ferroid", "futures", - "http", "itertools 0.14.0", "log", "memchr", diff --git a/integration_tests/Cargo.toml b/integration_tests/Cargo.toml index c88ec1fd..85e45436 100644 --- a/integration_tests/Cargo.toml +++ b/integration_tests/Cargo.toml @@ -32,4 +32,4 @@ hex.workspace = true tempfile.workspace = true bytesize.workspace = true futures.workspace = true -testcontainers = { version = "0.27.0", features = ["docker-compose"] } +testcontainers = { version = "0.26.0", features = ["docker-compose"] } diff --git a/integration_tests/tests/indexer.rs b/integration_tests/tests/indexer.rs index 62bcbbc8..cb8cf0e9 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 = 2_400_000; +const L2_TO_L1_TIMEOUT_MILLIS: u64 = 600_000; #[test] async fn indexer_test_run() -> Result<()> {