Merge 08944fc5e7ec563b57d90eb909a844abc9956c56 into fb083ce91ec10487fc17137a48c47f4322f9c768

This commit is contained in:
Pravdyvy 2026-03-23 19:43:04 +02:00 committed by GitHub
commit 100703ab4d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 173 additions and 161 deletions

View File

@ -14,151 +14,151 @@ on:
name: General name: General
jobs: jobs:
fmt-rs: # fmt-rs:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
steps: # steps:
- uses: actions/checkout@v5 # - uses: actions/checkout@v5
with: # with:
ref: ${{ github.head_ref }} # ref: ${{ github.head_ref }}
- name: Install nightly toolchain for rustfmt # - name: Install nightly toolchain for rustfmt
run: rustup install nightly --profile minimal --component rustfmt # run: rustup install nightly --profile minimal --component rustfmt
- name: Check Rust files are formatted # - name: Check Rust files are formatted
run: cargo +nightly fmt --check # run: cargo +nightly fmt --check
fmt-toml: # fmt-toml:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
steps: # steps:
- uses: actions/checkout@v5 # - uses: actions/checkout@v5
with: # with:
ref: ${{ github.head_ref }} # ref: ${{ github.head_ref }}
- name: Install taplo-cli # - name: Install taplo-cli
run: cargo install --locked taplo-cli # run: cargo install --locked taplo-cli
- name: Check TOML files are formatted # - name: Check TOML files are formatted
run: taplo fmt --check . # run: taplo fmt --check .
machete: # machete:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
steps: # steps:
- uses: actions/checkout@v5 # - uses: actions/checkout@v5
with: # with:
ref: ${{ github.head_ref }} # ref: ${{ github.head_ref }}
- name: Install active toolchain # - name: Install active toolchain
run: rustup install # run: rustup install
- name: Install cargo-machete # - name: Install cargo-machete
run: cargo install cargo-machete # run: cargo install cargo-machete
- name: Check for unused dependencies # - name: Check for unused dependencies
run: cargo machete # run: cargo machete
deny: # deny:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
steps: # steps:
- uses: actions/checkout@v5 # - uses: actions/checkout@v5
with: # with:
ref: ${{ github.head_ref }} # ref: ${{ github.head_ref }}
- name: Install cargo-deny # - name: Install cargo-deny
run: cargo install --locked cargo-deny # run: cargo install --locked cargo-deny
- name: Check licenses and advisories # - name: Check licenses and advisories
run: cargo deny check # run: cargo deny check
lint: # lint:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
timeout-minutes: 60 # timeout-minutes: 60
name: lint # name: lint
steps: # steps:
- uses: actions/checkout@v5 # - uses: actions/checkout@v5
with: # with:
ref: ${{ github.head_ref }} # 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 # - uses: ./.github/actions/install-logos-blockchain-circuits
with: # with:
github-token: ${{ secrets.GITHUB_TOKEN }} # github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install active toolchain # - name: Install active toolchain
run: rustup install # run: rustup install
- name: Lint workspace # - name: Lint workspace
env: # env:
RISC0_SKIP_BUILD: "1" # RISC0_SKIP_BUILD: "1"
run: cargo clippy --workspace --all-targets --all-features -- -D warnings # run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: Lint programs # - name: Lint programs
env: # env:
RISC0_SKIP_BUILD: "1" # RISC0_SKIP_BUILD: "1"
run: cargo clippy -p "*programs" -- -D warnings # run: cargo clippy -p "*programs" -- -D warnings
unit-tests: # unit-tests:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
timeout-minutes: 60 # timeout-minutes: 60
steps: # steps:
- uses: actions/checkout@v5 # - uses: actions/checkout@v5
with: # with:
ref: ${{ github.head_ref }} # 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 # - uses: ./.github/actions/install-logos-blockchain-circuits
with: # with:
github-token: ${{ secrets.GITHUB_TOKEN }} # github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install active toolchain # - name: Install active toolchain
run: rustup install # run: rustup install
- name: Install nextest # - name: Install nextest
run: cargo install --locked cargo-nextest # run: cargo install --locked cargo-nextest
- name: Run tests # - name: Run tests
env: # env:
RISC0_DEV_MODE: "1" # RISC0_DEV_MODE: "1"
RUST_LOG: "info" # RUST_LOG: "info"
run: cargo nextest run --workspace --exclude integration_tests # run: cargo nextest run --workspace --exclude integration_tests
integration-tests: # integration-tests:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
timeout-minutes: 60 # timeout-minutes: 60
steps: # steps:
- uses: actions/checkout@v5 # - uses: actions/checkout@v5
with: # with:
ref: ${{ github.head_ref }} # 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 # - uses: ./.github/actions/install-logos-blockchain-circuits
with: # with:
github-token: ${{ secrets.GITHUB_TOKEN }} # github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install active toolchain # - name: Install active toolchain
run: rustup install # run: rustup install
- name: Install nextest # - name: Install nextest
run: cargo install --locked cargo-nextest # run: cargo install --locked cargo-nextest
- name: Run tests # - name: Run tests
env: # env:
RISC0_DEV_MODE: "1" # RISC0_DEV_MODE: "1"
RUST_LOG: "info" # RUST_LOG: "info"
run: cargo nextest run -p integration_tests -- --skip tps_test --skip indexer # run: cargo nextest run -p integration_tests -- --skip tps_test --skip indexer
integration-tests-indexer: integration-tests-indexer:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 60 timeout-minutes: 120
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
with: with:
@ -182,55 +182,55 @@ jobs:
env: env:
RISC0_DEV_MODE: "1" RISC0_DEV_MODE: "1"
RUST_LOG: "info" RUST_LOG: "info"
run: cargo nextest run -p integration_tests indexer -- --skip tps_test run: cargo test -p integration_tests -- --exact indexer_test_run
valid-proof-test: # valid-proof-test:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
timeout-minutes: 60 # timeout-minutes: 60
steps: # steps:
- uses: actions/checkout@v5 # - uses: actions/checkout@v5
with: # with:
ref: ${{ github.head_ref }} # 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 # - uses: ./.github/actions/install-logos-blockchain-circuits
with: # with:
github-token: ${{ secrets.GITHUB_TOKEN }} # github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install active toolchain # - name: Install active toolchain
run: rustup install # run: rustup install
- name: Test valid proof # - name: Test valid proof
env: # env:
RUST_LOG: "info" # RUST_LOG: "info"
run: cargo test -p integration_tests -- --exact private::private_transfer_to_owned_account # run: cargo test -p integration_tests -- --exact private::private_transfer_to_owned_account
artifacts: # artifacts:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
timeout-minutes: 60 # timeout-minutes: 60
name: artifacts # name: artifacts
steps: # steps:
- uses: actions/checkout@v5 # - uses: actions/checkout@v5
with: # with:
ref: ${{ github.head_ref }} # ref: ${{ github.head_ref }}
- uses: ./.github/actions/install-risc0 # - uses: ./.github/actions/install-risc0
- name: Install just # - name: Install just
run: cargo install just # run: cargo install just
- name: Build artifacts # - name: Build artifacts
run: just build-artifacts # run: just build-artifacts
- name: Check if artifacts match repository # - name: Check if artifacts match repository
run: | # run: |
if ! git diff --exit-code artifacts/; then # if ! git diff --exit-code artifacts/; then
echo "❌ Artifacts in the repository are out of date!" # echo "❌ Artifacts in the repository are out of date!"
echo "Please run 'just build-artifacts' and commit the changes." # echo "Please run 'just build-artifacts' and commit the changes."
exit 1 # exit 1
fi # fi
echo "✅ Artifacts are up to date" # echo "✅ Artifacts are up to date"

29
Cargo.lock generated
View File

@ -1076,9 +1076,9 @@ dependencies = [
[[package]] [[package]]
name = "bollard" name = "bollard"
version = "0.20.1" version = "0.19.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "227aa051deec8d16bd9c34605e7aaf153f240e35483dd42f6f78903847934738" checksum = "87a52479c9237eb04047ddb94788c41ca0d26eaff8b697ecfbb4c32f7fdc3b1b"
dependencies = [ dependencies = [
"async-stream", "async-stream",
"base64 0.22.1", "base64 0.22.1",
@ -1086,6 +1086,7 @@ dependencies = [
"bollard-buildkit-proto", "bollard-buildkit-proto",
"bollard-stubs", "bollard-stubs",
"bytes", "bytes",
"chrono",
"futures-core", "futures-core",
"futures-util", "futures-util",
"hex", "hex",
@ -1103,13 +1104,14 @@ dependencies = [
"rand 0.9.2", "rand 0.9.2",
"rustls", "rustls",
"rustls-native-certs", "rustls-native-certs",
"rustls-pemfile",
"rustls-pki-types", "rustls-pki-types",
"serde", "serde",
"serde_derive", "serde_derive",
"serde_json", "serde_json",
"serde_repr",
"serde_urlencoded", "serde_urlencoded",
"thiserror 2.0.18", "thiserror 2.0.18",
"time",
"tokio", "tokio",
"tokio-stream", "tokio-stream",
"tokio-util", "tokio-util",
@ -1134,18 +1136,19 @@ dependencies = [
[[package]] [[package]]
name = "bollard-stubs" 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" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f0a8ca8799131c1837d1282c3f81f31e76ceb0ce426e04a7fe1ccee3287c066" checksum = "5731fe885755e92beff1950774068e0cae67ea6ec7587381536fca84f1779623"
dependencies = [ dependencies = [
"base64 0.22.1", "base64 0.22.1",
"bollard-buildkit-proto", "bollard-buildkit-proto",
"bytes", "bytes",
"chrono",
"prost 0.14.3", "prost 0.14.3",
"serde", "serde",
"serde_json", "serde_json",
"serde_repr", "serde_repr",
"time", "serde_with",
] ]
[[package]] [[package]]
@ -6891,6 +6894,15 @@ dependencies = [
"security-framework", "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]] [[package]]
name = "rustls-pki-types" name = "rustls-pki-types"
version = "1.14.0" version = "1.14.0"
@ -7842,9 +7854,9 @@ dependencies = [
[[package]] [[package]]
name = "testcontainers" name = "testcontainers"
version = "0.27.1" version = "0.26.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1c0624faaa317c56d6d19136580be889677259caf5c897941c6f446b4655068" checksum = "a81ec0158db5fbb9831e09d1813fe5ea9023a2b5e6e8e0a5fe67e2a820733629"
dependencies = [ dependencies = [
"astral-tokio-tar", "astral-tokio-tar",
"async-trait", "async-trait",
@ -7856,7 +7868,6 @@ dependencies = [
"etcetera", "etcetera",
"ferroid", "ferroid",
"futures", "futures",
"http",
"itertools 0.14.0", "itertools 0.14.0",
"log", "log",
"memchr", "memchr",

View File

@ -5,7 +5,7 @@ use bedrock_client::{BedrockClient, HeaderId};
use common::block::{Block, HashableBlockData}; use common::block::{Block, HashableBlockData};
// ToDo: Remove after testnet // ToDo: Remove after testnet
use common::{HashType, PINATA_BASE58}; use common::{HashType, PINATA_BASE58};
use log::{debug, error, info}; use log::{error, info};
use logos_blockchain_core::mantle::{ use logos_blockchain_core::mantle::{
Op, SignedMantleTx, Op, SignedMantleTx,
ops::channel::{ChannelId, inscribe::InscriptionOp}, ops::channel::{ChannelId, inscribe::InscriptionOp},
@ -214,11 +214,11 @@ impl IndexerCore {
"INITIAL SEARCH: Observed L1 block at slot {}", "INITIAL SEARCH: Observed L1 block at slot {}",
cycle_block.header().slot().into_inner() cycle_block.header().slot().into_inner()
); );
debug!( info!(
"INITIAL SEARCH: This block header is {}", "INITIAL SEARCH: This block header is {}",
cycle_block.header().id() cycle_block.header().id()
); );
debug!( info!(
"INITIAL SEARCH: This block parent is {}", "INITIAL SEARCH: This block parent is {}",
cycle_block.header().parent() cycle_block.header().parent()
); );
@ -317,6 +317,7 @@ fn parse_block_owned(
l1_block: &bedrock_client::Block<SignedMantleTx>, l1_block: &bedrock_client::Block<SignedMantleTx>,
decoded_channel_id: &ChannelId, decoded_channel_id: &ChannelId,
) -> (Vec<Block>, HeaderId) { ) -> (Vec<Block>, HeaderId) {
info!("Block with slot {:?} have {} transactions", l1_block.header().slot(), l1_block.transactions_vec().len());
( (
#[expect( #[expect(
clippy::wildcard_enum_match_arm, clippy::wildcard_enum_match_arm,

View File

@ -32,4 +32,4 @@ hex.workspace = true
tempfile.workspace = true tempfile.workspace = true
bytesize.workspace = true bytesize.workspace = true
futures.workspace = true futures.workspace = true
testcontainers = { version = "0.27.0", features = ["docker-compose"] } testcontainers = { version = "0.26.0", features = ["docker-compose"] }