From e2a82c29585aa789ad7a53406520970e54de8fae Mon Sep 17 00:00:00 2001 From: Gianmarco Fraccaroli Date: Fri, 7 Mar 2025 12:23:40 +0100 Subject: [PATCH 01/39] initial sync height --- chain/src/config.rs | 3 +++ chain/src/main.rs | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/chain/src/config.rs b/chain/src/config.rs index 38a7b67..048718a 100644 --- a/chain/src/config.rs +++ b/chain/src/config.rs @@ -13,6 +13,9 @@ pub struct AppConfig { #[clap(long, env)] pub interval: Option, + #[clap(long, env)] + pub starting_block_height: Option, + #[command(flatten)] pub verbosity: Verbosity, } diff --git a/chain/src/main.rs b/chain/src/main.rs index d64ffb8..cab210e 100644 --- a/chain/src/main.rs +++ b/chain/src/main.rs @@ -44,6 +44,7 @@ async fn main() -> Result<(), MainError> { database_url, interval, verbosity, + starting_block_height, } = AppConfig::parse(); config::install_tracing_subscriber(verbosity); @@ -56,7 +57,7 @@ async fn main() -> Result<(), MainError> { run_migrations(&app_state).await?; let (last_block_height, commitment_tree, witness_map) = - load_committed_state(&app_state).await?; + load_committed_state(&app_state, starting_block_height).await?; let client = HttpClient::builder(cometbft_url.as_str().parse().unwrap()) .compat_mode(CompatMode::V0_37) @@ -156,6 +157,7 @@ async fn run_migrations(app_state: &AppState) -> Result<(), MainError> { async fn load_committed_state( app_state: &AppState, + starting_block_height: Option, ) -> Result<(Option, CommitmentTree, WitnessMap), MainError> { tracing::info!("Loading last committed state from db..."); @@ -165,6 +167,11 @@ async fn load_committed_state( .await .into_db_error()?; + let last_block_height = std::cmp::max( + last_block_height, + starting_block_height.map(BlockHeight::from), + ); + let commitment_tree = db_service::get_last_commitment_tree( app_state.get_db_connection().await.into_db_error()?, ) From 205ab0e82c6600836344f3cd21c7baea5c4c78aa Mon Sep 17 00:00:00 2001 From: Gianmarco Fraccaroli Date: Mon, 10 Mar 2025 20:35:51 +0100 Subject: [PATCH 02/39] update toolchain --- .github/workflows/build.yml | 2 +- Cargo.toml | 2 +- block-index/Dockerfile | 2 +- block-index/src/main.rs | 4 ++-- chain/Dockerfile | 2 +- chain/src/main.rs | 6 +++--- chain/src/services/cometbft.rs | 2 +- chain/src/services/db.rs | 4 ++-- rust-nightly-version | 2 +- rust-toolchain.toml | 2 +- rustfmt.toml | 4 ++-- swagger.yml | 2 +- webserver/Dockerfile | 2 +- webserver/src/app.rs | 2 +- webserver/src/handler/namada_state.rs | 2 +- webserver/src/handler/notes_index.rs | 2 +- webserver/src/handler/tree.rs | 2 +- webserver/src/handler/tx.rs | 2 +- webserver/src/handler/witness_map.rs | 2 +- webserver/src/response/api.rs | 2 +- 20 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f8ad6b5..d8f5cb0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ permissions: contents: read env: - nightly: nightly-2024-09-08 + nightly: nightly-2025-03-01 jobs: validate-swagger: diff --git a/Cargo.toml b/Cargo.toml index 420df25..90c0cac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ members = ["block-index", "chain", "shared", "orm", "webserver"] [workspace.package] authors = ["Heliax AG "] -edition = "2021" +edition = "2024" license = "GPL-3.0-or-later" readme = "README.md" version = "1.0.0" diff --git a/block-index/Dockerfile b/block-index/Dockerfile index c7e7ab1..7757e53 100644 --- a/block-index/Dockerfile +++ b/block-index/Dockerfile @@ -1,4 +1,4 @@ -FROM lukemathwalker/cargo-chef:latest-rust-1.81-bookworm AS chef +FROM lukemathwalker/cargo-chef:latest-rust-1.85-bookworm AS chef WORKDIR /app FROM chef AS planner diff --git a/block-index/src/main.rs b/block-index/src/main.rs index aaaea2e..56ad849 100644 --- a/block-index/src/main.rs +++ b/block-index/src/main.rs @@ -9,7 +9,7 @@ use std::sync::{Arc, Mutex}; use std::task::{Poll, Waker}; use std::time::Duration; -use anyhow::{anyhow, Context}; +use anyhow::{Context, anyhow}; use clap::Parser; use deadpool_diesel::postgres::Object; use orm::block_index::BlockIndex; @@ -159,7 +159,7 @@ fn must_exit() -> impl Future { async fn run_migrations(app_state: &AppState) -> Result<(), MainError> { use diesel_migrations::{ - embed_migrations, EmbeddedMigrations, MigrationHarness, + EmbeddedMigrations, MigrationHarness, embed_migrations, }; const MIGRATIONS: EmbeddedMigrations = diff --git a/chain/Dockerfile b/chain/Dockerfile index f57b741..d2c6dcc 100644 --- a/chain/Dockerfile +++ b/chain/Dockerfile @@ -1,4 +1,4 @@ -FROM lukemathwalker/cargo-chef:latest-rust-1.81-bookworm AS chef +FROM lukemathwalker/cargo-chef:latest-rust-1.85-bookworm AS chef WORKDIR /app FROM chef AS planner diff --git a/chain/src/main.rs b/chain/src/main.rs index cab210e..e10c4e2 100644 --- a/chain/src/main.rs +++ b/chain/src/main.rs @@ -5,8 +5,8 @@ pub mod services; use std::collections::BTreeMap; use std::env; -use std::sync::atomic::{self, AtomicBool}; use std::sync::Arc; +use std::sync::atomic::{self, AtomicBool}; use std::time::Duration; use anyhow::Context; @@ -16,12 +16,12 @@ use shared::height::{BlockHeight, FollowingHeights}; use shared::indexed_tx::IndexedTx; use shared::transaction::Transaction; use shared::tx_index::{MaspTxIndex, TxIndex}; -use tendermint_rpc::client::CompatMode; use tendermint_rpc::HttpClient; +use tendermint_rpc::client::CompatMode; use tokio::signal; use tokio::time::sleep; -use tokio_retry::strategy::{jitter, FixedInterval}; use tokio_retry::RetryIf; +use tokio_retry::strategy::{FixedInterval, jitter}; use crate::appstate::AppState; use crate::config::AppConfig; diff --git a/chain/src/services/cometbft.rs b/chain/src/services/cometbft.rs index 55ccce6..77f7abe 100644 --- a/chain/src/services/cometbft.rs +++ b/chain/src/services/cometbft.rs @@ -1,4 +1,4 @@ -use anyhow::{anyhow, Context}; +use anyhow::{Context, anyhow}; use shared::block::Block; use shared::height::BlockHeight; use tendermint_rpc::endpoint::{block, block_results}; diff --git a/chain/src/services/db.rs b/chain/src/services/db.rs index 1a596d8..f4e3778 100644 --- a/chain/src/services/db.rs +++ b/chain/src/services/db.rs @@ -1,6 +1,6 @@ use std::collections::{BTreeMap, HashMap}; -use anyhow::{anyhow, Context}; +use anyhow::{Context, anyhow}; use deadpool_diesel::postgres::Object; use diesel::connection::DefaultLoadingMode as DbDefaultLoadingMode; use diesel::dsl::max; @@ -9,7 +9,7 @@ use diesel::{ RunQueryDsl, SelectableHelper, }; use diesel_migrations::{ - embed_migrations, EmbeddedMigrations, MigrationHarness, + EmbeddedMigrations, MigrationHarness, embed_migrations, }; use namada_sdk::borsh::{BorshDeserialize, BorshSerializeExt}; use namada_sdk::masp_primitives::merkle_tree::IncrementalWitness; diff --git a/rust-nightly-version b/rust-nightly-version index 2a62052..fb1bd86 100644 --- a/rust-nightly-version +++ b/rust-nightly-version @@ -1 +1 @@ -nightly-2024-09-08 +nightly-2025-03-01 diff --git a/rust-toolchain.toml b/rust-toolchain.toml index c2f79e3..ae0033c 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.81.0" +channel = "1.85.0" components = ["rustc", "cargo", "rust-std", "rust-docs", "rls", "rust-src", "rust-analysis"] targets = [] \ No newline at end of file diff --git a/rustfmt.toml b/rustfmt.toml index 686c505..8fc3e32 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -44,7 +44,7 @@ remove_nested_parens = true reorder_impl_items = true reorder_imports = true reorder_modules = true -required_version = "1.7.1" +required_version = "1.8.0" show_parse_errors = true skip_children = false space_after_colon = true @@ -60,6 +60,6 @@ unstable_features = false use_field_init_shorthand = false use_small_heuristics = "Default" use_try_shorthand = false -version = "Two" +style_edition = "2024" where_single_line = false wrap_comments = true \ No newline at end of file diff --git a/swagger.yml b/swagger.yml index b01ee6e..b820dd4 100644 --- a/swagger.yml +++ b/swagger.yml @@ -1,7 +1,7 @@ openapi: '3.0.2' info: title: Masp Indexer - version: '1.0' + version: '1.1' servers: - url: https://localhost:5000/api/v1 paths: diff --git a/webserver/Dockerfile b/webserver/Dockerfile index 19deeb6..bd4ee46 100644 --- a/webserver/Dockerfile +++ b/webserver/Dockerfile @@ -1,4 +1,4 @@ -FROM lukemathwalker/cargo-chef:latest-rust-1.81-bookworm AS chef +FROM lukemathwalker/cargo-chef:latest-rust-1.85-bookworm AS chef WORKDIR /app FROM chef AS planner diff --git a/webserver/src/app.rs b/webserver/src/app.rs index 78d02dd..31f0606 100644 --- a/webserver/src/app.rs +++ b/webserver/src/app.rs @@ -11,9 +11,9 @@ use axum::{BoxError, Json, Router}; use axum_trace_id::SetTraceIdLayer; use lazy_static::lazy_static; use serde_json::json; +use tower::ServiceBuilder; use tower::buffer::BufferLayer; use tower::limit::RateLimitLayer; -use tower::ServiceBuilder; use tower_http::cors::{Any, CorsLayer}; use tower_http::trace::TraceLayer; diff --git a/webserver/src/handler/namada_state.rs b/webserver/src/handler/namada_state.rs index e48cd97..d67c0a8 100644 --- a/webserver/src/handler/namada_state.rs +++ b/webserver/src/handler/namada_state.rs @@ -1,5 +1,5 @@ -use axum::extract::State; use axum::Json; +use axum::extract::State; use axum_macros::debug_handler; use axum_trace_id::TraceId; use shared::error::InspectWrap; diff --git a/webserver/src/handler/notes_index.rs b/webserver/src/handler/notes_index.rs index bdba3c2..5237f2f 100644 --- a/webserver/src/handler/notes_index.rs +++ b/webserver/src/handler/notes_index.rs @@ -1,5 +1,5 @@ -use axum::extract::{Query, State}; use axum::Json; +use axum::extract::{Query, State}; use axum_macros::debug_handler; use axum_trace_id::TraceId; use shared::error::InspectWrap; diff --git a/webserver/src/handler/tree.rs b/webserver/src/handler/tree.rs index f07ae85..3ef4225 100644 --- a/webserver/src/handler/tree.rs +++ b/webserver/src/handler/tree.rs @@ -1,5 +1,5 @@ -use axum::extract::{Query, State}; use axum::Json; +use axum::extract::{Query, State}; use axum_macros::debug_handler; use axum_trace_id::TraceId; use shared::commitment_tree::empty as empty_tree; diff --git a/webserver/src/handler/tx.rs b/webserver/src/handler/tx.rs index 810207e..30bb0e3 100644 --- a/webserver/src/handler/tx.rs +++ b/webserver/src/handler/tx.rs @@ -1,5 +1,5 @@ -use axum::extract::{Query, State}; use axum::Json; +use axum::extract::{Query, State}; use axum_macros::debug_handler; use axum_trace_id::TraceId; use shared::error::InspectWrap; diff --git a/webserver/src/handler/witness_map.rs b/webserver/src/handler/witness_map.rs index 24534df..ca7c1a7 100644 --- a/webserver/src/handler/witness_map.rs +++ b/webserver/src/handler/witness_map.rs @@ -1,5 +1,5 @@ -use axum::extract::{Query, State}; use axum::Json; +use axum::extract::{Query, State}; use axum_macros::debug_handler; use axum_trace_id::TraceId; use shared::error::InspectWrap; diff --git a/webserver/src/response/api.rs b/webserver/src/response/api.rs index 63a9741..316acfe 100644 --- a/webserver/src/response/api.rs +++ b/webserver/src/response/api.rs @@ -1,6 +1,6 @@ +use axum::Json; use axum::http::StatusCode; use axum::response::{IntoResponse, Response}; -use axum::Json; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] From 651d466bb6de5b4eeb4ada5acaf0bce7cd1966d2 Mon Sep 17 00:00:00 2001 From: Gianmarco Fraccaroli Date: Mon, 10 Mar 2025 21:11:22 +0100 Subject: [PATCH 03/39] ci: fix release ci --- .github/workflows/deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9d6bf03..5db2a20 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,6 +21,7 @@ jobs: [ { image: chain, context: chain }, { image: webserver, context: webserver }, + { image: block-index-builder, context: block-index }, ] steps: @@ -42,7 +43,7 @@ jobs: with: context: . file: ${{ matrix.docker.context }}/Dockerfile - push: ${{ github.ref == 'refs/heads/master' }} + push: true tags: ${{ env.REGISTRY_URL }}/anoma/namada-masp-indexer:${{ matrix.docker.image }}-${{ steps.get_version.outputs.version-without-v }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha From c2f91a489df3edcdd90584b742464616d95f23e5 Mon Sep 17 00:00:00 2001 From: Gianmarco Fraccaroli Date: Tue, 11 Mar 2025 16:13:36 +0100 Subject: [PATCH 04/39] ci: added swagger pages, fix docker cache --- .github/workflows/build.yml | 10 +++++----- .github/workflows/deploy.yml | 37 +++++++++++++++++++++++++++++++----- 2 files changed, 37 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d8f5cb0..9731c95 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -103,9 +103,9 @@ jobs: matrix: docker: [ - { image: chain, context: chain }, - { image: webserver, context: webserver }, - { image: block-index-builder, context: block-index }, + { image: chain, context: chain, cache_scope: "chain" }, + { image: webserver, context: webserver, cache_scope: "webserver" }, + { image: block-index-builder, context: block-index, cache_scope: "block-index" }, ] steps: @@ -140,8 +140,8 @@ jobs: push: ${{ github.event.pull_request.head.repo.full_name == 'anoma/namada-masp-indexer' || github.event_name == 'push' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max + cache-from: type=gha,scope=${{ matrix.images.cache_scope }} + cache-to: type=gha,scope=${{ matrix.images.cache_scope }},mode=max can_enqueue: needs: [clippy, format, build, validate-swagger] diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5db2a20..56b8eea 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -19,9 +19,9 @@ jobs: matrix: docker: [ - { image: chain, context: chain }, - { image: webserver, context: webserver }, - { image: block-index-builder, context: block-index }, + { image: chain, context: chain, cache_scope: "chain" }, + { image: webserver, context: webserver, cache_scope: "webserver" }, + { image: block-index-builder, context: block-index, cache_scope: "block-index" }, ] steps: @@ -46,5 +46,32 @@ jobs: push: true tags: ${{ env.REGISTRY_URL }}/anoma/namada-masp-indexer:${{ matrix.docker.image }}-${{ steps.get_version.outputs.version-without-v }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max \ No newline at end of file + cache-from: type=gha,scope=${{ matrix.images.cache_scope }} + cache-to: type=gha,scope=${{ matrix.images.cache_scope }},mode=max + + swagger-ui: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Generate Swagger UI + uses: Legion2/swagger-ui-action@v1 + with: + output: swagger-ui + spec-file: swagger.yml + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Setup Pages + if: startsWith(github.ref, 'refs/tags/v') + uses: actions/configure-pages@v5 + - name: Upload artifact + if: startsWith(github.ref, 'refs/tags/v') + uses: actions/upload-pages-artifact@v3 + with: + path: 'swagger-ui' + - name: Deploy to GitHub Pages + if: startsWith(github.ref, 'refs/tags/v') + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file From 954f19628b3be398c69dddee37e9735e548c71fe Mon Sep 17 00:00:00 2001 From: Gianmarco Fraccaroli Date: Tue, 11 Mar 2025 16:15:25 +0100 Subject: [PATCH 05/39] ci: added swagger pages, fix docker cache --- .github/workflows/build.yml | 4 ++-- .github/workflows/deploy.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9731c95..a3eea6b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -140,8 +140,8 @@ jobs: push: ${{ github.event.pull_request.head.repo.full_name == 'anoma/namada-masp-indexer' || github.event_name == 'push' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha,scope=${{ matrix.images.cache_scope }} - cache-to: type=gha,scope=${{ matrix.images.cache_scope }},mode=max + cache-from: type=gha,scope=${{ matrix.docker.cache_scope }} + cache-to: type=gha,scope=${{ matrix.docker.cache_scope }},mode=max can_enqueue: needs: [clippy, format, build, validate-swagger] diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 56b8eea..b4577cf 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -46,8 +46,8 @@ jobs: push: true tags: ${{ env.REGISTRY_URL }}/anoma/namada-masp-indexer:${{ matrix.docker.image }}-${{ steps.get_version.outputs.version-without-v }} labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha,scope=${{ matrix.images.cache_scope }} - cache-to: type=gha,scope=${{ matrix.images.cache_scope }},mode=max + cache-from: type=gha,scope=${{ matrix.docker.cache_scope }} + cache-to: type=gha,scope=${{ matrix.docker.cache_scope }},mode=max swagger-ui: environment: From 77f4874a26e5de78dd67da243c13fc4486ddff30 Mon Sep 17 00:00:00 2001 From: Gianmarco Fraccaroli Date: Tue, 11 Mar 2025 18:57:35 +0100 Subject: [PATCH 06/39] added execution time --- chain/src/main.rs | 25 ++++++++++++++++++++++++- chain/src/services/db.rs | 5 ----- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/chain/src/main.rs b/chain/src/main.rs index e10c4e2..53f0cac 100644 --- a/chain/src/main.rs +++ b/chain/src/main.rs @@ -19,7 +19,7 @@ use shared::tx_index::{MaspTxIndex, TxIndex}; use tendermint_rpc::HttpClient; use tendermint_rpc::client::CompatMode; use tokio::signal; -use tokio::time::sleep; +use tokio::time::{Instant, sleep}; use tokio_retry::RetryIf; use tokio_retry::strategy::{FixedInterval, jitter}; @@ -215,6 +215,8 @@ async fn build_and_commit_masp_data_at_height( return Ok(()); } + let start = Instant::now(); + // NB: rollback changes from previous failed commit attempts witness_map.rollback(); commitment_tree.rollback(); @@ -262,6 +264,8 @@ async fn build_and_commit_masp_data_at_height( "Processing new masp transactions...", ); + let num_transactions = block_data.transactions.len(); + for (idx, Transaction { masp_txs, .. }) in block_data.transactions.into_iter() { @@ -285,6 +289,15 @@ async fn build_and_commit_masp_data_at_height( } } + let first_checkpoint = Instant::now(); + + tracing::info!( + %block_height, + num_transactions, + time_taken = first_checkpoint.duration_since(start).as_secs_f64(), + "Processed new masp transactions...", + ); + db_service::commit( &conn_obj, chain_state, @@ -296,5 +309,15 @@ async fn build_and_commit_masp_data_at_height( .await .into_db_error()?; + let second_checkpoint = Instant::now(); + + tracing::info!( + block_height = %chain_state.block_height, + time_taken = second_checkpoint + .duration_since(first_checkpoint) + .as_secs_f64(), + "Committed new block" + ); + Ok(()) } diff --git a/chain/src/services/db.rs b/chain/src/services/db.rs index f4e3778..1f78c9c 100644 --- a/chain/src/services/db.rs +++ b/chain/src/services/db.rs @@ -308,10 +308,5 @@ pub async fn commit( ) })?; - tracing::info!( - block_height = %chain_state.block_height, - "Committed new block" - ); - Ok(()) } From eb265a725a329e4c850b01b695e69672135e5bdc Mon Sep 17 00:00:00 2001 From: Marco Granelli Date: Thu, 6 Mar 2025 15:38:01 +0100 Subject: [PATCH 07/39] Updates fetch logic to handle the new masp events --- Cargo.lock | 2435 +++++++++++++++++++++-------------- Cargo.toml | 6 +- chain/src/main.rs | 34 +- chain/src/services/masp.rs | 2 - shared/src/block.rs | 40 +- shared/src/block_results.rs | 41 +- shared/src/indexed_tx.rs | 12 +- shared/src/transaction.rs | 57 +- shared/src/tx_index.rs | 10 +- 9 files changed, 1562 insertions(+), 1075 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5d30020..32c354d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "Inflector" @@ -14,18 +14,18 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "aead" @@ -68,7 +68,7 @@ dependencies = [ "cfg-if", "once_cell", "version_check", - "zerocopy", + "zerocopy 0.7.35", ] [[package]] @@ -118,9 +118,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -133,43 +133,44 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "once_cell", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" [[package]] name = "ark-bls12-381" @@ -231,7 +232,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" dependencies = [ "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -244,7 +245,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -283,7 +284,7 @@ checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -293,20 +294,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "246a225cc6131e9ee4f24619af0f19d67761fff15d7ccc22e42b80846e69449a" dependencies = [ "num-traits", - "rand", + "rand 0.8.5", ] [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "ascii-canvas" @@ -319,9 +320,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.11" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd066d0b4ef8ecb03a55319dc13aa6910616d0f44008a045bb1835af830abff5" +checksum = "310c9bcae737a48ef5cdee3174184e6d548b292739ede61a1f955ef76a738861" dependencies = [ "brotli", "flate2", @@ -329,19 +330,19 @@ dependencies = [ "memchr", "pin-project-lite", "tokio", - "zstd 0.13.1", - "zstd-safe 7.1.0", + "zstd 0.13.3", + "zstd-safe 7.2.3", ] [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "d556ec1359574147ec0c4fc5eb525f3f23263a592b1a9c07e0a75b427de55c97" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -364,22 +365,28 @@ dependencies = [ "critical-section", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "auto_impl" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +checksum = "e12882f59de5360c748c4cbf569a042d5fb0eb515f7bea9c1f470b47f6ffbd73" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "axum" @@ -393,8 +400,8 @@ dependencies = [ "bytes", "futures-util", "http 0.2.12", - "http-body", - "hyper", + "http-body 0.4.6", + "hyper 0.14.32", "itoa", "matchit", "memchr", @@ -406,9 +413,9 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 0.1.2", "tokio", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", ] @@ -423,7 +430,7 @@ dependencies = [ "bytes", "futures-util", "http 0.2.12", - "http-body", + "http-body 0.4.6", "mime", "rustversion", "tower-layer", @@ -439,7 +446,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -450,23 +457,23 @@ checksum = "179428535861159e550209d711f35667d304cbd77c2dc4037f0f107eff423941" dependencies = [ "axum", "futures", - "tower", - "uuid 1.9.1", + "tower 0.4.13", + "uuid 1.15.1", ] [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -501,15 +508,9 @@ checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "bech32" -version = "0.8.1" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9ff0bbfd639f15c74af777d81383cf53efb7c93613f6cab67c6c11e05bbf8b" +checksum = "bb97d56060ee67d285efb8001fec9d2a4c710c32efd2e14b5cbb5ba71930fc2d" [[package]] name = "bech32" @@ -535,7 +536,7 @@ dependencies = [ "ff", "group", "pairing", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -565,7 +566,7 @@ checksum = "568b6890865156d9043af490d4c4081c385dd68ea10acd6ca15733d511e6b51c" dependencies = [ "hmac", "pbkdf2 0.12.2", - "rand", + "rand 0.8.5", "sha2 0.10.8", "unicode-normalization", "zeroize", @@ -594,9 +595,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" dependencies = [ "serde", ] @@ -624,37 +625,37 @@ dependencies = [ [[package]] name = "blake2b_simd" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23285ad32269793932e830392f2fe2f83e26488fd3ec778883a93c8323735780" +checksum = "06e903a20b159e944f91ec8499fe1e55651480c541ea0a584f5d967c49ad9d99" dependencies = [ "arrayref", "arrayvec", - "constant_time_eq 0.3.0", + "constant_time_eq 0.3.1", ] [[package]] name = "blake2s_simd" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94230421e395b9920d23df13ea5d77a20e1725331f90fbbf6df6040b33f756ae" +checksum = "e90f7deecfac93095eb874a40febd69427776e24e1bd7f87f33ac62d6f0174df" dependencies = [ "arrayref", "arrayvec", - "constant_time_eq 0.3.0", + "constant_time_eq 0.3.1", ] [[package]] name = "blake3" -version = "1.5.1" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +checksum = "675f87afced0413c9bb02843499dbbd3882a237645883f71a2b59644a6d2f753" dependencies = [ "arrayref", "arrayvec", "cc", "cfg-if", - "constant_time_eq 0.3.0", + "constant_time_eq 0.3.1", ] [[package]] @@ -704,7 +705,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7bc6d6292be3a19e6379786dac800f551e5865a5bb51ebbe3064ab80433f403" dependencies = [ "ff", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -720,9 +721,9 @@ dependencies = [ [[package]] name = "borsh" -version = "1.5.1" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" +checksum = "5430e3be710b68d984d1391c854eb431a9d548640711faa54eecb1df93db91cc" dependencies = [ "borsh-derive", "cfg_aliases", @@ -730,23 +731,22 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.1" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" +checksum = "f8b668d39970baad5356d7c83a86fee3a539e6f93bf6764c97368243e17a0487" dependencies = [ "once_cell", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.98", - "syn_derive", + "syn 2.0.100", ] [[package]] name = "brotli" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" +checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -755,9 +755,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "4.0.1" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" +checksum = "74fa05ad7d803d413eb8380983b092cbbaf9a85f151b871360e7b00cd7060b37" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -775,15 +775,15 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "byte-slice-cast" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" +checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" [[package]] name = "bytecheck" @@ -815,9 +815,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" dependencies = [ "serde", ] @@ -834,29 +834,28 @@ dependencies = [ [[package]] name = "bzip2-sys" -version = "0.1.11+1.0.8" +version = "0.1.13+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14" dependencies = [ "cc", - "libc", "pkg-config", ] [[package]] name = "camino" -version = "1.1.7" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] [[package]] name = "cargo-platform" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" dependencies = [ "serde", ] @@ -872,7 +871,7 @@ dependencies = [ "semver", "serde", "serde_json", - "thiserror 1.0.61", + "thiserror 1.0.69", ] [[package]] @@ -886,13 +885,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.100" +version = "1.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c891175c3fb232128f48de6590095e59198bbeb8620c310be349bfc3afd12c7b" +checksum = "be714c154be609ec7f5dad223a33bf1482fff90472de28f7362806e6d4832b8c" dependencies = [ "jobserver", "libc", - "once_cell", + "shlex", ] [[package]] @@ -958,16 +957,14 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" dependencies = [ "android-tzdata", "iana-time-zone", - "js-sys", "num-traits", - "wasm-bindgen", - "windows-targets 0.52.5", + "windows-link", ] [[package]] @@ -992,9 +989,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.7" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" +checksum = "6088f3ae8c3608d19260cd7445411865a485688711b78b5be70d78cd96136f83" dependencies = [ "clap_builder", "clap_derive", @@ -1002,9 +999,9 @@ dependencies = [ [[package]] name = "clap-verbosity-flag" -version = "2.2.0" +version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb9b20c0dd58e4c2e991c8d203bbeb76c11304d1011659686b5b644bc29aa478" +checksum = "34c77f67047557f62582784fd7482884697731b2932c7d37ced54bce2312e1e2" dependencies = [ "clap", "log", @@ -1012,9 +1009,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.7" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" +checksum = "22a7ef7f676155edfb82daa97f99441f3ebf4a58d5e32f295a56259f1b6facc8" dependencies = [ "anstream", "anstyle", @@ -1024,21 +1021,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.5" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" +checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] name = "clap_lex" -version = "0.7.1" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "clru" @@ -1065,7 +1062,7 @@ dependencies = [ "k256", "serde", "sha2 0.10.8", - "thiserror 1.0.61", + "thiserror 1.0.69", ] [[package]] @@ -1079,9 +1076,9 @@ dependencies = [ "hmac", "once_cell", "pbkdf2 0.12.2", - "rand", + "rand 0.8.5", "sha2 0.10.8", - "thiserror 1.0.61", + "thiserror 1.0.69", ] [[package]] @@ -1101,14 +1098,14 @@ dependencies = [ "serde_derive", "sha2 0.10.8", "sha3", - "thiserror 1.0.61", + "thiserror 1.0.69", ] [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "const-crc32-nostd" @@ -1118,9 +1115,9 @@ checksum = "808ac43170e95b11dd23d78aa9eaac5bea45776a602955552c4e833f3f0f823d" [[package]] name = "const-hex" -version = "1.12.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8a24a26d37e1ffd45343323dc9fe6654ceea44c12f2fcb3d7ac29e610bc6" +checksum = "4b0485bab839b018a8f1723fc5391819fea5f8f0f32288ef8a735fd096b6160c" dependencies = [ "cfg-if", "cpufeatures", @@ -1157,9 +1154,9 @@ dependencies = [ [[package]] name = "const_panic" -version = "0.2.8" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6051f239ecec86fde3410901ab7860d458d160371533842974fc61f96d15879b" +checksum = "2459fc9262a1aa204eb4b5764ad4f189caec88aea9634389c0a25f8be7f6265e" [[package]] name = "constant_time_eq" @@ -1169,9 +1166,9 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "core-foundation" @@ -1185,9 +1182,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "core2" @@ -1212,9 +1209,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] @@ -1236,18 +1233,18 @@ checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" [[package]] name = "crossbeam-channel" -version = "0.5.13" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -1264,15 +1261,15 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" [[package]] name = "crypto-bigint" @@ -1281,7 +1278,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", - "rand_core", + "rand_core 0.6.4", "subtle", "zeroize", ] @@ -1298,9 +1295,9 @@ dependencies = [ [[package]] name = "ct-codecs" -version = "1.1.1" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3b7eb4404b8195a9abb6356f4ac07d8ba267045c8d6d220ac4dc992e6cc75df" +checksum = "b916ba8ce9e4182696896f015e8a5ae6081b305f74690baa8465e35f5a142ea4" [[package]] name = "ctr" @@ -1319,16 +1316,16 @@ checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" dependencies = [ "byteorder", "digest 0.9.0", - "rand_core", + "rand_core 0.6.4", "subtle-ng", "zeroize", ] [[package]] name = "darling" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ "darling_core", "darling_macro", @@ -1336,34 +1333,34 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] name = "darling_macro" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] name = "data-encoding" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" +checksum = "575f75dfd25738df5b91b8e43e14d44bda14637a58fae779fd2b064f8bf3e010" [[package]] name = "deadpool" @@ -1456,18 +1453,18 @@ checksum = "74ef43543e701c01ad77d3a5922755c6a1d71b22d942cb8042be4994b380caff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] name = "derive_more" -version = "0.99.18" +version = "0.99.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" +checksum = "3da29a38df43d6f156149c9b43ded5e018ddff2a855cf2cfd62e8cd7d079c69f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -1487,37 +1484,37 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", "unicode-xid", ] [[package]] name = "diesel" -version = "2.2.1" +version = "2.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62d6dcd069e7b5fe49a302411f759d4cf1cf2c27fe798ef46fb8baefc053dd2b" +checksum = "470eb10efc8646313634c99bb1593f402a6434cbd86e266770c6e39219adb86a" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.0", "byteorder", "chrono", "diesel_derives", "itoa", "pq-sys", "serde_json", - "uuid 1.9.1", + "uuid 1.15.1", ] [[package]] name = "diesel_derives" -version = "2.2.1" +version = "2.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59de76a222c2b8059f789cbe07afbfd8deb8c31dd0bc2a21f85e256c1def8259" +checksum = "a93958254b70bea63b4187ff73d10180599d9d8d177071b7f91e6da4e0c0ad55" dependencies = [ "diesel_table_macro_syntax", "dsl_auto_type", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -1537,7 +1534,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" dependencies = [ - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -1620,7 +1617,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -1634,23 +1631,23 @@ dependencies = [ [[package]] name = "dsl_auto_type" -version = "0.1.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0892a17df262a24294c382f0d5997571006e7a4348b4327557c4ff1cd4a8bccc" +checksum = "139ae9aca7527f85f26dd76483eb38533fd84bd571065da1739656ef71c5ff5b" dependencies = [ "darling", "either", "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] name = "dunce" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "dur" @@ -1664,23 +1661,23 @@ dependencies = [ [[package]] name = "duration-str" -version = "0.10.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c1a2e028bbf7921549873b291ddc0cfe08b673d9489da81ac28898cd5a0e6e0" +checksum = "64ad6b66883f70e2f38f1ee99e3797b9d7e7b7fb051ed2e23e027c81753056c8" dependencies = [ "chrono", "rust_decimal", "serde", - "thiserror 1.0.61", + "thiserror 2.0.12", "time", - "winnow 0.6.13", + "winnow 0.6.26", ] [[package]] name = "dyn-clone" -version = "1.0.17" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" +checksum = "1c7a8fb8a9fbf66c1f703fe16184d10ca0ee9d23be5b4436400408ba54a95005" [[package]] name = "ecdsa" @@ -1715,10 +1712,10 @@ checksum = "3c8465edc8ee7436ffea81d21a019b16676ee3db267aa8d5a8d729581ecf998b" dependencies = [ "curve25519-dalek-ng", "hex", - "rand_core", + "rand_core 0.6.4", "serde", "sha2 0.9.9", - "thiserror 1.0.61", + "thiserror 1.0.69", "zeroize", ] @@ -1731,14 +1728,14 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] name = "either" -version = "1.12.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" [[package]] name = "elliptic-curve" @@ -1753,7 +1750,7 @@ dependencies = [ "generic-array", "group", "pkcs8", - "rand_core", + "rand_core 0.6.4", "sec1", "serdect", "subtle", @@ -1783,9 +1780,9 @@ dependencies = [ [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -1801,7 +1798,7 @@ dependencies = [ "hex", "k256", "log", - "rand", + "rand 0.8.5", "rlp", "serde", "sha3", @@ -1825,23 +1822,23 @@ checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] name = "equivalent" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1856,13 +1853,13 @@ dependencies = [ "hex", "hmac", "pbkdf2 0.11.0", - "rand", + "rand 0.8.5", "scrypt", "serde", "serde_json", "sha2 0.10.8", "sha3", - "thiserror 1.0.61", + "thiserror 1.0.69", "uuid 0.8.2", ] @@ -1879,7 +1876,7 @@ dependencies = [ "serde", "serde_json", "sha3", - "thiserror 1.0.61", + "thiserror 1.0.69", "uint 0.9.5", ] @@ -1993,7 +1990,7 @@ dependencies = [ "pin-project", "serde", "serde_json", - "thiserror 1.0.61", + "thiserror 1.0.69", ] [[package]] @@ -2012,11 +2009,11 @@ dependencies = [ "proc-macro2", "quote", "regex", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", - "syn 2.0.98", - "toml 0.8.14", + "syn 2.0.100", + "toml", "walkdir", ] @@ -2033,7 +2030,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -2054,14 +2051,14 @@ dependencies = [ "num_enum", "once_cell", "open-fastrlp", - "rand", + "rand 0.8.5", "rlp", "serde", "serde_json", "strum", - "syn 2.0.98", + "syn 2.0.100", "tempfile", - "thiserror 1.0.61", + "thiserror 1.0.69", "tiny-keccak", "unicode-xid", ] @@ -2074,11 +2071,11 @@ checksum = "e79e5973c26d4baf0ce55520bd732314328cabe53193286671b47144145b9649" dependencies = [ "chrono", "ethers-core", - "reqwest", + "reqwest 0.11.27", "semver", "serde", "serde_json", - "thiserror 1.0.61", + "thiserror 1.0.69", "tracing", ] @@ -2099,10 +2096,10 @@ dependencies = [ "futures-locks", "futures-util", "instant", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", - "thiserror 1.0.61", + "thiserror 1.0.69", "tokio", "tracing", "tracing-futures", @@ -2131,10 +2128,10 @@ dependencies = [ "jsonwebtoken", "once_cell", "pin-project", - "reqwest", + "reqwest 0.11.27", "serde", "serde_json", - "thiserror 1.0.61", + "thiserror 1.0.69", "tokio", "tokio-tungstenite", "tracing", @@ -2159,9 +2156,9 @@ dependencies = [ "elliptic-curve", "eth-keystore", "ethers-core", - "rand", + "rand 0.8.5", "sha2 0.10.8", - "thiserror 1.0.61", + "thiserror 1.0.69", "tracing", ] @@ -2189,7 +2186,7 @@ dependencies = [ "serde_json", "solang-parser", "svm-rs", - "thiserror 1.0.61", + "thiserror 1.0.69", "tiny-keccak", "tokio", "tracing", @@ -2209,40 +2206,29 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" - -[[package]] -name = "fd-lock" -version = "3.0.13" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef033ed5e9bad94e55838ca0ca906db0e043f517adda0c8b79c7a8c66c93c1b5" -dependencies = [ - "cfg-if", - "rustix", - "windows-sys 0.48.0", -] +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "fd-lock" -version = "4.0.2" +version = "4.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e5768da2206272c81ef0b5e951a41862938a6070da63bcea197899942d3b947" +checksum = "0ce92ff622d6dadf7349484f42c93271a0d49b7cc4d466a936405bacbe10aa78" dependencies = [ "cfg-if", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "ff" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" +checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393" dependencies = [ "bitvec", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -2259,7 +2245,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand", + "rand 0.8.5", "rustc-hex", "static_assertions", ] @@ -2270,11 +2256,17 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + [[package]] name = "flate2" -version = "1.0.30" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc" dependencies = [ "crc32fast", "miniz_oxide", @@ -2360,10 +2352,10 @@ dependencies = [ "hex", "itertools 0.14.0", "postcard", - "rand_core", + "rand_core 0.6.4", "serde", "serdect", - "thiserror 2.0.11", + "thiserror 2.0.12", "thiserror-nostd-notrait", "visibility", "zeroize", @@ -2379,7 +2371,7 @@ dependencies = [ "document-features", "frost-core", "hex", - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -2400,9 +2392,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -2415,9 +2407,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -2425,15 +2417,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -2442,9 +2434,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-locks" @@ -2458,26 +2450,26 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-timer" @@ -2491,9 +2483,9 @@ dependencies = [ [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -2547,22 +2539,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi 0.13.3+wasi-0.2.2", - "windows-targets 0.52.5", + "wasm-bindgen", + "windows-targets 0.52.6", ] [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "gloo-timers" @@ -2584,7 +2578,7 @@ checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", "memuse", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -2600,7 +2594,26 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.2.6", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.3.0", + "indexmap", "slab", "tokio", "tokio-util", @@ -2625,12 +2638,6 @@ dependencies = [ "ahash 0.7.8", ] -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" - [[package]] name = "hashbrown" version = "0.15.2" @@ -2704,11 +2711,11 @@ checksum = "77e806677ce663d0a199541030c816847b36e8dc095f70dae4a4f4ad63da5383" [[package]] name = "home" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2724,9 +2731,9 @@ dependencies = [ [[package]] name = "http" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "0a761d192fbf18bdef69f5ceedd0d1333afcbda0ee23840373b8317570d23c65" dependencies = [ "bytes", "fnv", @@ -2744,6 +2751,29 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.3.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http 1.3.0", + "http-body 1.0.1", + "pin-project-lite", +] + [[package]] name = "http-range-header" version = "0.3.1" @@ -2752,9 +2782,9 @@ checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" [[package]] name = "httparse" -version = "1.9.4" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "httpdate" @@ -2764,17 +2794,17 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.29" +version = "0.14.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", - "h2", + "h2 0.3.26", "http 0.2.12", - "http-body", + "http-body 0.4.6", "httparse", "httpdate", "itoa", @@ -2786,6 +2816,26 @@ dependencies = [ "want", ] +[[package]] +name = "hyper" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.8", + "http 1.3.0", + "http-body 1.0.1", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + [[package]] name = "hyper-rustls" version = "0.24.2" @@ -2794,30 +2844,69 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper", - "rustls", + "hyper 0.14.32", + "rustls 0.21.12", + "tokio", + "tokio-rustls 0.24.1", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" +dependencies = [ + "futures-util", + "http 1.3.0", + "hyper 1.6.0", + "hyper-util", + "rustls 0.23.23", + "rustls-pki-types", "tokio", - "tokio-rustls", + "tokio-rustls 0.26.2", + "tower-service", ] [[package]] name = "hyper-tls" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", - "hyper", + "http-body-util", + "hyper 1.6.0", + "hyper-util", "native-tls", "tokio", "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.3.0", + "http-body 1.0.1", + "hyper 1.6.0", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", ] [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2871,7 +2960,7 @@ dependencies = [ "borsh", "derive_more 1.0.0", "displaydoc", - "http 1.1.0", + "http 1.3.0", "ibc-app-transfer-types", "ibc-core", "ibc-proto", @@ -3295,7 +3384,7 @@ checksum = "27e93e76ce4da46027a59a5f2c3152e6d4adc4a9d541c782ff69b89e7fa2ccb8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -3417,6 +3506,124 @@ dependencies = [ "sha3", ] +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -3435,12 +3642,23 @@ dependencies = [ [[package]] name = "idna" -version = "0.5.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] @@ -3513,7 +3731,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -3533,22 +3751,12 @@ checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" [[package]] name = "indexmap" -version = "1.9.3" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" -dependencies = [ - "equivalent", - "hashbrown 0.14.5", + "equivalent", + "hashbrown 0.15.2", ] [[package]] @@ -3572,9 +3780,9 @@ dependencies = [ [[package]] name = "inout" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" dependencies = [ "generic-array", ] @@ -3599,15 +3807,15 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" @@ -3618,15 +3826,6 @@ dependencies = [ "either", ] -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.13.0" @@ -3647,25 +3846,26 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -3693,15 +3893,15 @@ dependencies = [ "bls12_381", "ff", "group", - "rand_core", + "rand_core 0.6.4", "subtle", ] [[package]] name = "k256" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ "cfg-if", "ecdsa", @@ -3714,12 +3914,12 @@ dependencies = [ [[package]] name = "kdam" -version = "0.5.2" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "526586ea01a9a132b5f8d3a60f6d6b41b411550236f5ee057795f20b37316957" +checksum = "7ed2186610f797a95b55e61c420a81d3b9079ac9776d382f41cf35ce0643a90a" dependencies = [ "terminal_size", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3733,9 +3933,9 @@ dependencies = [ [[package]] name = "konst" -version = "0.3.9" +version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50a0ba6de5f7af397afff922f22c149ff605c766cd3269cf6c1cd5e466dbe3b9" +checksum = "4381b9b00c55f251f2ebe9473aef7c117e96828def1a7cb3bd3f0f903c6894e9" dependencies = [ "const_panic", "konst_kernel", @@ -3744,9 +3944,9 @@ dependencies = [ [[package]] name = "konst_kernel" -version = "0.3.9" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be0a455a1719220fd6adf756088e1c69a85bf14b6a9e24537a5cc04f503edb2b" +checksum = "e4b1eb7788f3824c629b1116a7a9060d6e898c358ebff59070093d51103dcc3c" dependencies = [ "typewit", ] @@ -3762,9 +3962,9 @@ dependencies = [ "ena", "itertools 0.11.0", "lalrpop-util", - "petgraph", + "petgraph 0.6.5", "regex", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", "string_cache", "term", "tiny-keccak", @@ -3778,7 +3978,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" dependencies = [ - "regex-automata 0.4.7", + "regex-automata 0.4.9", ] [[package]] @@ -3789,15 +3989,15 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "libredox" @@ -3805,15 +4005,21 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.0", "libc", ] [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db9c683daf087dc577b7506e9695b3d556a9f3849903fa28186283afd6809e9" + +[[package]] +name = "litemap" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" [[package]] name = "litrs" @@ -3833,29 +4039,29 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" [[package]] name = "masp_note_encryption" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9736dbd86140a9d6711b464297a87af9cc0ae485d73a956c595f1bc1f6a7920" +checksum = "7b136637896ff0e2a9f18f25464eb8cc75dde909ab616918d3e13ab7401ab89a" dependencies = [ "borsh", "chacha20", "chacha20poly1305", "cipher", - "rand_core", + "rand_core 0.6.4", "subtle", ] [[package]] name = "masp_primitives" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fb184254ca5cd5fb12e11b81a6a0d6b955d98c7263eae11057f669c31c7123c" +checksum = "c6c3739b3b1a5e767ad88a38c9000cf8014e5fab84b93c4e9415e10a56cede54" dependencies = [ "aes", "bip0039", @@ -3876,8 +4082,8 @@ dependencies = [ "nam-jubjub", "nam-num-traits", "nonempty 0.11.0", - "rand", - "rand_core", + "rand 0.8.5", + "rand_core 0.6.4", "sha2 0.10.8", "subtle", "zcash_encoding", @@ -3885,9 +4091,9 @@ dependencies = [ [[package]] name = "masp_proofs" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "833eb23ccc5e4781636f6a7b2e720f60f31e53e534d1abb2b0ac5e86eb099c14" +checksum = "131fd70050405eb3cfd45e704982a1b44fafc9443dbb352d079ccf1c1cda53c9" dependencies = [ "bellman", "blake2b_simd", @@ -3901,7 +4107,7 @@ dependencies = [ "nam-bls12_381", "nam-jubjub", "nam-redjubjub", - "rand_core", + "rand_core 0.6.4", "tracing", ] @@ -3938,9 +4144,9 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memuse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2145869435ace5ea6ea3d35f59be559317ec9a0d04e1812d5f185a87b6d36f1a" +checksum = "3d97bbf43eb4f088f8ca469930cde17fa036207c9a5e02ccc5107c4e8b17c964" [[package]] name = "memzero" @@ -3955,7 +4161,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd01039851e82f8799046eabbb354056283fb265c8ec0996af940f4e85a380ff" dependencies = [ "serde", - "toml 0.8.14", + "toml", ] [[package]] @@ -3983,35 +4189,34 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" dependencies = [ - "adler", + "adler2", ] [[package]] name = "minreq" -version = "2.11.2" +version = "2.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fdef521c74c2884a4f3570bcdb6d2a77b3c533feb6b27ac2ae72673cc221c64" +checksum = "567496f13503d6cae8c9f961f34536850275f396307d7a6b981eef1464032f53" dependencies = [ "log", - "once_cell", - "rustls", - "rustls-webpki", + "rustls 0.21.12", + "rustls-webpki 0.101.7", "webpki-roots", ] [[package]] name = "mio" -version = "0.8.11" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -4029,7 +4234,7 @@ dependencies = [ "ff", "group", "pairing", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -4055,7 +4260,7 @@ dependencies = [ "ff", "group", "nam-bls12_381", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -4081,9 +4286,9 @@ dependencies = [ "hex", "jubjub", "pasta_curves", - "rand_core", + "rand_core 0.6.4", "serde", - "thiserror 2.0.11", + "thiserror 2.0.12", "zeroize", ] @@ -4094,9 +4299,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e457988762db7daad8d79f8a837a07295f5cc178d9236ba77db7339072ffb61e" dependencies = [ "nam-reddsa", - "rand_core", + "rand_core 0.6.4", "serde", - "thiserror 1.0.61", + "thiserror 1.0.69", "zeroize", ] @@ -4128,9 +4333,8 @@ dependencies = [ [[package]] name = "namada_account" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df13eb11542131b4b821da19e1a30e816fa9b43d2997ff35337f464bfe4967c7" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "borsh", "namada_core", @@ -4141,20 +4345,18 @@ dependencies = [ [[package]] name = "namada_controller" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e346c20510aee8c66a437cd47b0dcbf2207e0d88d3b08239c62ad8002b5dc422" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "namada_core", "smooth-operator", - "thiserror 2.0.11", + "thiserror 2.0.12", ] [[package]] name = "namada_core" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "305f82e07d088d0f98bb9100fc31616b10151d95ba77577d4b0c67db2f43c664" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "bech32 0.11.0", "borsh", @@ -4176,12 +4378,12 @@ dependencies = [ "num-integer", "num-rational", "num-traits", - "num256 0.6.0", + "num256", "num_enum", "primitive-types 0.13.1", "prost-types", - "rand", - "rand_core", + "rand 0.8.5", + "rand_core 0.6.4", "rayon", "ripemd", "serde", @@ -4190,7 +4392,7 @@ dependencies = [ "smooth-operator", "tendermint", "tendermint-proto", - "thiserror 2.0.11", + "thiserror 2.0.12", "tiny-keccak", "tokio", "tracing", @@ -4202,9 +4404,8 @@ dependencies = [ [[package]] name = "namada_ethereum_bridge" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb49f7a94c8bac46f7d4a78bb432412340996b83355cd333b406acb6a166204" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "borsh", "ethers", @@ -4225,44 +4426,41 @@ dependencies = [ "namada_vp_env", "serde", "smooth-operator", - "thiserror 2.0.11", + "thiserror 2.0.12", "tracing", ] [[package]] name = "namada_events" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cffb996dc93beed802b0ebc9093f7480cf16ad3c73fd9176af7fad705886583b" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "borsh", "namada_core", "namada_macros", "serde", "serde_json", - "thiserror 2.0.11", + "thiserror 2.0.12", "tracing", ] [[package]] name = "namada_gas" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "429b267efddcb8b7ade3fbb16ceaa543eafe5bc22b2aeda6fbca21ca0c4368f3" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "borsh", "namada_core", "namada_events", "namada_macros", "serde", - "thiserror 2.0.11", + "thiserror 2.0.12", ] [[package]] name = "namada_governance" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d8fb47a3a9ad5217470c68e9b47d0f0d0c81b906c26999044eca3750e36a30c" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "borsh", "itertools 0.14.0", @@ -4278,15 +4476,14 @@ dependencies = [ "serde", "serde_json", "smooth-operator", - "thiserror 2.0.11", + "thiserror 2.0.12", "tracing", ] [[package]] name = "namada_ibc" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66f077333e403267091ed9db4a0b786273ea8da8a1164bb86f3ba398e2139087" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "borsh", "data-encoding", @@ -4314,42 +4511,39 @@ dependencies = [ "serde_json", "sha2 0.10.8", "smooth-operator", - "thiserror 2.0.11", + "thiserror 2.0.12", "tracing", ] [[package]] name = "namada_io" -version = "0.47.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e6bca372c83fa8b35edd1dbdece4988cf08d504e1c352459d3d14e3721439c4" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "async-trait", "kdam", "namada_core", "tendermint-rpc", - "thiserror 1.0.61", + "thiserror 2.0.12", "tokio", ] [[package]] name = "namada_macros" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713a7c58a2f3e801d4bfb11ff04bed7c674368800ea4b4edf00d1f1a77e7500a" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "data-encoding", "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] name = "namada_merkle_tree" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "015d5bd2c06167f7f6bf47017c0221956e05399af2cf7481802e883178152d10" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "borsh", "eyre", @@ -4358,14 +4552,13 @@ dependencies = [ "namada_core", "namada_macros", "prost", - "thiserror 2.0.11", + "thiserror 2.0.12", ] [[package]] name = "namada_parameters" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3505786793edaa9efb6810b1bed10db9848d58d97481e4306646311d7f53c53a" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "namada_core", "namada_macros", @@ -4374,14 +4567,13 @@ dependencies = [ "namada_tx", "namada_vp_env", "smooth-operator", - "thiserror 2.0.11", + "thiserror 2.0.12", ] [[package]] name = "namada_proof_of_stake" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de1a71a1e875d6716c43217870c4b0f48a2f6e9bd64440ba4ec4c0257e8c1ebe" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "borsh", "itertools 0.14.0", @@ -4398,27 +4590,25 @@ dependencies = [ "once_cell", "serde", "smooth-operator", - "thiserror 2.0.11", + "thiserror 2.0.12", "tracing", ] [[package]] name = "namada_replay_protection" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0be426ad51a235dc34d29422ee5568d9c5bbae89ae057614ce076541a0a6687" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "namada_core", ] [[package]] name = "namada_sdk" -version = "0.47.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74830a07f38ef718ae5c2fe0bc2eb050a707893281029f9e0f6c9bc47bbf608f" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "async-trait", - "bech32 0.8.1", + "bech32 0.11.0", "bimap", "borsh", "circular-queue", @@ -4429,10 +4619,11 @@ dependencies = [ "ethbridge-bridge-contract", "ethers", "eyre", - "fd-lock 3.0.13", + "fd-lock", "futures", + "getrandom 0.3.1", "init-once", - "itertools 0.12.1", + "itertools 0.14.0", "lazy_static", "masp_primitives", "masp_proofs", @@ -4456,27 +4647,27 @@ dependencies = [ "namada_vp", "namada_wallet", "num-traits", - "num256 0.3.5", + "num256", "owo-colors", "paste", "patricia_tree", "prost", - "rand", - "rand_core", + "rand 0.8.5", + "rand_core 0.6.4", "rayon", "regex", - "reqwest", + "reqwest 0.12.12", "rustversion", "serde", "serde_json", - "sha2 0.9.9", + "sha2 0.10.8", "smooth-operator", "tempfile", "tendermint-rpc", - "thiserror 1.0.61", + "thiserror 2.0.12", "tiny-bip39", "tokio", - "toml 0.5.11", + "toml", "tracing", "xorf", "zeroize", @@ -4484,16 +4675,15 @@ dependencies = [ [[package]] name = "namada_shielded_token" -version = "0.47.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dad515f349f1ae992653c9666f6b7558c09453ef99e92969f266a224b42238b3" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "async-trait", "borsh", "eyre", "flume", "futures", - "itertools 0.12.1", + "itertools 0.14.0", "lazy_static", "masp_primitives", "masp_proofs", @@ -4509,16 +4699,16 @@ dependencies = [ "namada_tx", "namada_vp_env", "namada_wallet", - "rand", - "rand_core", + "rand 0.8.5", + "rand_core 0.6.4", "rayon", "ripemd", "serde", "serde_json", - "sha2 0.9.9", + "sha2 0.10.8", "smooth-operator", "tempfile", - "thiserror 1.0.61", + "thiserror 2.0.12", "tracing", "typed-builder", "xorf", @@ -4526,9 +4716,8 @@ dependencies = [ [[package]] name = "namada_state" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d33311b2c0e69cffca41ea02d766842d8c76b0ee4709d9979ae18a7f5a57f66" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "borsh", "clru", @@ -4544,15 +4733,14 @@ dependencies = [ "namada_tx", "patricia_tree", "smooth-operator", - "thiserror 2.0.11", + "thiserror 2.0.12", "tracing", ] [[package]] name = "namada_storage" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd75a52a7cf559552531f426540e65d5319d1205d6720b0e73c86a8d3b54b745" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "borsh", "itertools 0.14.0", @@ -4564,15 +4752,14 @@ dependencies = [ "regex", "serde", "smooth-operator", - "thiserror 2.0.11", + "thiserror 2.0.12", "tracing", ] [[package]] name = "namada_systems" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8efe52efb02d8f690a3ff8e66e5ca76c3f20ca08f1c51727f7e5df24af5bfbc5" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "namada_core", "namada_events", @@ -4581,9 +4768,8 @@ dependencies = [ [[package]] name = "namada_token" -version = "0.47.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47a21856a13cc72aba5d3fb4618d540be9bed82a9f683ca7dd1827df02159729" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "borsh", "namada_core", @@ -4600,9 +4786,8 @@ dependencies = [ [[package]] name = "namada_trans_token" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08c1df33aa4945fe1930e3fbeaf82eef23cc03a7947ed39446c1eae077a3406" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "konst", "namada_core", @@ -4612,18 +4797,17 @@ dependencies = [ "namada_tx", "namada_tx_env", "namada_vp_env", - "thiserror 2.0.11", + "thiserror 2.0.12", "tracing", ] [[package]] name = "namada_tx" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17c34662abcf0ec42b31d24db4947b9b6a1ed358a607deb12caccb11f40845d1" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "ark-bls12-381", - "bitflags 2.6.0", + "bitflags 2.9.0", "borsh", "data-encoding", "either", @@ -4634,23 +4818,22 @@ dependencies = [ "namada_events", "namada_gas", "namada_macros", - "num-derive 0.4.2", + "num-derive", "num-traits", "prost", "prost-types", - "rand_core", + "rand_core 0.6.4", "serde", "serde_json", "sha2 0.10.8", - "thiserror 2.0.11", + "thiserror 2.0.12", "tonic-build", ] [[package]] name = "namada_tx_env" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2adc84a3facc292913273aed31308901f4768da7094a9421cb9f0b26c33901ac" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "namada_core", "namada_events", @@ -4659,9 +4842,8 @@ dependencies = [ [[package]] name = "namada_vm" -version = "0.47.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f61b7368a19e88b5e9f609c9570f2a9e6e136a3a98b7e28a52b3acc293b91070" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "borsh", "clru", @@ -4675,16 +4857,15 @@ dependencies = [ "namada_tx", "namada_vp", "smooth-operator", - "thiserror 1.0.61", + "thiserror 2.0.12", "tracing", "wasmparser", ] [[package]] name = "namada_vote_ext" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e9d839db71e00bba201e40a4901a07dd90b2247cb29dc865d71947cc9b1ffe" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "borsh", "namada_core", @@ -4695,9 +4876,8 @@ dependencies = [ [[package]] name = "namada_vp" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c44d0dfc36cac54942b616811b8dcaa87a0570a44d40790ecafa4a0879b0fa06" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "namada_core", "namada_events", @@ -4706,15 +4886,14 @@ dependencies = [ "namada_tx", "namada_vp_env", "smooth-operator", - "thiserror 2.0.11", + "thiserror 2.0.12", "tracing", ] [[package]] name = "namada_vp_env" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91311bee2c290bd8fe85dd958fa9786b4c318bebd3fd7f0e41754a021ccbe68" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "derivative", "masp_primitives", @@ -4728,15 +4907,14 @@ dependencies = [ [[package]] name = "namada_wallet" -version = "0.47.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5850c17a1caae8363f6f27cde53637c6254c917d97a35505f12dfe094456557" +version = "0.47.0" +source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" dependencies = [ "bimap", "borsh", "data-encoding", "derivation-path", - "fd-lock 4.0.2", + "fd-lock", "itertools 0.14.0", "masp_primitives", "nam-tiny-hderive", @@ -4744,14 +4922,14 @@ dependencies = [ "namada_ibc", "namada_macros", "orion", - "rand", - "rand_core", + "rand 0.8.5", + "rand_core 0.6.4", "serde", "slip10_ed25519", "smooth-operator", - "thiserror 2.0.11", + "thiserror 2.0.12", "tiny-bip39", - "toml 0.8.14", + "toml", "zeroize", ] @@ -4766,9 +4944,9 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e" dependencies = [ "libc", "log", @@ -4819,36 +4997,13 @@ dependencies = [ "winapi", ] -[[package]] -name = "num" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - [[package]] name = "num-bigint" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" -dependencies = [ - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ + "num-integer", "num-traits", ] @@ -4858,17 +5013,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" -[[package]] -name = "num-derive" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "num-derive" version = "0.4.2" @@ -4877,7 +5021,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -4889,17 +5033,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-iter" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - [[package]] name = "num-rational" version = "0.4.2" @@ -4918,21 +5051,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", - "libm", -] - -[[package]] -name = "num256" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa9b5179e82f0867b23e0b9b822493821f9345561f271364f409c8e4a058367d" -dependencies = [ - "lazy_static", - "num", - "num-derive 0.3.3", - "num-traits", - "serde", - "serde_derive", ] [[package]] @@ -4959,23 +5077,23 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -4989,18 +5107,18 @@ dependencies = [ [[package]] name = "object" -version = "0.36.0" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "cde51589ab56b20a6f686b2c68f7a0bd6add753d697abf720d63f8db3ab7b1ad" [[package]] name = "opaque-debug" @@ -5035,11 +5153,11 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "5e14130c6a98cd258fdcb0fb6d744152343ff729cbfcb28c656a9d12b999fbcd" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.0", "cfg-if", "foreign-types", "libc", @@ -5056,20 +5174,20 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] name = "openssl-probe" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "8bb61ea9811cc39e3c2069f40b8b8e2e70d8569b361f879786cc7ed48b777cdd" dependencies = [ "cc", "libc", @@ -5085,9 +5203,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "orion" -version = "0.17.8" +version = "0.17.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd806049e71da4c4a7880466b37afdc5a4c5b35a398b0d4fd9ff5d278d3b4db9" +checksum = "bf2e0b749a7c5fb3d43f06f19eff59b253b5480fa146533676cea27c3606530b" dependencies = [ "ct-codecs", "fiat-crypto", @@ -5112,9 +5230,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "owo-colors" -version = "3.5.0" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" +checksum = "1036865bb9422d3300cf723f657c2851d0e9ab12567854b1f4eba3d77decf564" [[package]] name = "pairing" @@ -5150,7 +5268,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -5173,7 +5291,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -5183,7 +5301,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" dependencies = [ "base64ct", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -5194,7 +5312,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "346f04948ba92c43e8469c1ee6736c7563d71012b17d40745260fe106aac2166" dependencies = [ "base64ct", - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -5206,7 +5324,7 @@ checksum = "d3e57598f73cc7e1b2ac63c79c517b31a0877cd7c402cdcaa311b5208de7a095" dependencies = [ "ff", "group", - "rand", + "rand 0.8.5", "static_assertions", "subtle", ] @@ -5229,7 +5347,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31f2f4539bffe53fc4b4da301df49d114b845b077bd5727b7fe2bd9d8df2ae68" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.0", ] [[package]] @@ -5257,9 +5375,9 @@ dependencies = [ [[package]] name = "peg" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a625d12ad770914cbf7eff6f9314c3ef803bfe364a1b20bc36ddf56673e71e5" +checksum = "9928cfca101b36ec5163e70049ee5368a8a1c3c6efc9ca9c5f9cc2f816152477" dependencies = [ "peg-macros", "peg-runtime", @@ -5267,9 +5385,9 @@ dependencies = [ [[package]] name = "peg-macros" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f241d42067ed3ab6a4fece1db720838e1418f36d868585a27931f95d6bc03582" +checksum = "6298ab04c202fa5b5d52ba03269fb7b74550b150323038878fe6c372d8280f71" dependencies = [ "peg-runtime", "proc-macro2", @@ -5278,9 +5396,9 @@ dependencies = [ [[package]] name = "peg-runtime" -version = "0.8.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3aeb8f54c078314c2065ee649a7241f46b9d8e418e1a9581ba0546657d7aa3a" +checksum = "132dca9b868d927b35b5dd728167b2dee150eb1ad686008fc71ccb298b776fca" [[package]] name = "pem" @@ -5303,8 +5421,18 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ - "fixedbitset", - "indexmap 2.2.6", + "fixedbitset 0.4.2", + "indexmap", +] + +[[package]] +name = "petgraph" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" +dependencies = [ + "fixedbitset 0.5.7", + "indexmap", ] [[package]] @@ -5319,80 +5447,71 @@ dependencies = [ [[package]] name = "phf" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" dependencies = [ "phf_macros", - "phf_shared 0.11.2", + "phf_shared", ] [[package]] name = "phf_generator" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ - "phf_shared 0.11.2", - "rand", + "phf_shared", + "rand 0.8.5", ] [[package]] name = "phf_macros" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" +checksum = "f84ac04429c13a7ff43785d75ad27569f2951ce0ffd30a3321230db2fc727216" dependencies = [ "phf_generator", - "phf_shared 0.11.2", + "phf_shared", "proc-macro2", "quote", - "syn 2.0.98", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", + "syn 2.0.100", ] [[package]] name = "phf_shared" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" dependencies = [ "siphasher", ] [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -5412,9 +5531,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "poly1305" @@ -5429,9 +5548,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.7.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" +checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" [[package]] name = "postcard" @@ -5454,16 +5573,20 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy 0.8.23", +] [[package]] name = "pq-sys" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a24ff9e4cf6945c988f0db7005d87747bf72864965c3529d259ad155ac41d584" +checksum = "30b51d65ebe1cb1f40641b15abae017fed35ccdda46e3dab1ff8768f625a3222" dependencies = [ + "libc", "vcpkg", ] @@ -5475,12 +5598,12 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "prettyplease" -version = "0.2.20" +version = "0.2.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +checksum = "f1ccf34da56fc294e7d4ccf69a85992b7dfb826b7cf57bac6a70bba3494cc08a" dependencies = [ "proc-macro2", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -5511,11 +5634,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" dependencies = [ - "toml_edit 0.21.1", + "toml_edit", ] [[package]] @@ -5544,34 +5667,34 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" dependencies = [ "unicode-ident", ] [[package]] name = "proptest" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" +checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.0", "lazy_static", "num-traits", - "rand", - "rand_chacha", + "rand 0.8.5", + "rand_chacha 0.3.1", "rand_xorshift", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", "unarray", ] [[package]] name = "prost" -version = "0.13.2" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2ecbe40f08db5c006b5764a2645f7f3f141ce756412ac9e1dd6087e6d32995" +checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" dependencies = [ "bytes", "prost-derive", @@ -5579,43 +5702,42 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.13.2" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8650aabb6c35b860610e9cff5dc1af886c9e25073b7b1712a68972af4281302" +checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" dependencies = [ - "bytes", "heck 0.5.0", - "itertools 0.13.0", + "itertools 0.14.0", "log", "multimap", "once_cell", - "petgraph", + "petgraph 0.7.1", "prettyplease", "prost", "prost-types", "regex", - "syn 2.0.98", + "syn 2.0.100", "tempfile", ] [[package]] name = "prost-derive" -version = "0.13.2" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf0c195eebb4af52c752bec4f52f645da98b6e92077a04110c7f349477ae5ac" +checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" dependencies = [ "anyhow", - "itertools 0.13.0", + "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] name = "prost-types" -version = "0.13.2" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60caa6738c7369b940c3d49246a8d1749323674c65cb13010134f5c9bad5b519" +checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" dependencies = [ "prost", ] @@ -5642,9 +5764,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.38" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" +checksum = "c1f1914ce909e1658d9907913b4b91947430c7d9be598b15a1912935b8c04801" dependencies = [ "proc-macro2", ] @@ -5662,8 +5784,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", + "zerocopy 0.8.23", ] [[package]] @@ -5673,7 +5806,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", ] [[package]] @@ -5685,13 +5828,22 @@ dependencies = [ "getrandom 0.2.15", ] +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.1", +] + [[package]] name = "rand_xorshift" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" dependencies = [ - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -5716,34 +5868,34 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.2" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.0", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom 0.2.15", "libredox", - "thiserror 1.0.61", + "thiserror 1.0.69", ] [[package]] name = "regex" -version = "1.10.5" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", ] [[package]] @@ -5757,13 +5909,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] [[package]] @@ -5774,9 +5926,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rend" @@ -5798,31 +5950,28 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2", + "h2 0.3.26", "http 0.2.12", - "http-body", - "hyper", - "hyper-rustls", - "hyper-tls", + "http-body 0.4.6", + "hyper 0.14.32", + "hyper-rustls 0.24.2", "ipnet", "js-sys", "log", "mime", - "native-tls", "once_cell", "percent-encoding", "pin-project-lite", - "rustls", + "rustls 0.21.12", "rustls-native-certs", - "rustls-pemfile", + "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", - "system-configuration", + "sync_wrapper 0.1.2", + "system-configuration 0.5.1", "tokio", - "tokio-native-tls", - "tokio-rustls", + "tokio-rustls 0.24.1", "tower-service", "url", "wasm-bindgen", @@ -5832,6 +5981,50 @@ dependencies = [ "winreg", ] +[[package]] +name = "reqwest" +version = "0.12.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" +dependencies = [ + "base64 0.22.1", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.4.8", + "http 1.3.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.6.0", + "hyper-rustls 0.27.5", + "hyper-tls", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile 2.2.0", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.2", + "system-configuration 0.6.1", + "tokio", + "tokio-native-tls", + "tower 0.5.2", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-registry", +] + [[package]] name = "rfc6979" version = "0.4.0" @@ -5859,15 +6052,14 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.8" +version = "0.17.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "70ac5d832aa16abd7d1def883a8545280c20a60f523a370aa3a9617c2b8550ee" dependencies = [ "cc", "cfg-if", "getrandom 0.2.15", "libc", - "spin 0.9.8", "untrusted 0.9.0", "windows-sys 0.52.0", ] @@ -5896,7 +6088,7 @@ dependencies = [ "rkyv_derive", "seahash", "tinyvec", - "uuid 1.9.1", + "uuid 1.15.1", ] [[package]] @@ -5942,7 +6134,7 @@ dependencies = [ "borsh", "bytes", "num-traits", - "rand", + "rand 0.8.5", "rkyv", "serde", "serde_json", @@ -5968,24 +6160,24 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.34" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "f7178faa4b75a30e269c71e61c353ce2748cf3d76f0c44c393f4e60abf49b825" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5995,11 +6187,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", - "ring 0.17.8", - "rustls-webpki", + "ring 0.17.13", + "rustls-webpki 0.101.7", "sct", ] +[[package]] +name = "rustls" +version = "0.23.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47796c98c480fce5406ef69d1c76378375492c3b0a0de587be0c1d9feb12f395" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki 0.102.8", + "subtle", + "zeroize", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -6007,7 +6212,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pemfile 1.0.4", "schannel", "security-framework", ] @@ -6021,27 +6226,53 @@ dependencies = [ "base64 0.21.7", ] +[[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.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" + [[package]] name = "rustls-webpki" version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.8", + "ring 0.17.13", + "untrusted 0.9.0", +] + +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring 0.17.13", + "rustls-pki-types", "untrusted 0.9.0", ] [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "salsa20" @@ -6063,42 +6294,42 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.11.3" +version = "2.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" +checksum = "346a3b32eba2640d17a9cb5927056b08f3de90f65b72fe09402c2ad07d684d0b" dependencies = [ "cfg-if", - "derive_more 0.99.18", + "derive_more 1.0.0", "parity-scale-codec", "scale-info-derive", ] [[package]] name = "scale-info-derive" -version = "2.11.3" +version = "2.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" +checksum = "c6630024bf739e2179b91fb424b28898baf819414262c5d376677dbff1fe7ebf" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.100", ] [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "schemars" -version = "0.8.21" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" dependencies = [ "dyn-clone", "schemars_derive", @@ -6108,14 +6339,14 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.21" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -6142,7 +6373,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.8", + "ring 0.17.13", "untrusted 0.9.0", ] @@ -6169,11 +6400,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.0", "core-foundation", "core-foundation-sys", "libc", @@ -6182,9 +6413,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -6192,9 +6423,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.23" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" dependencies = [ "serde", ] @@ -6213,9 +6444,9 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.218" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8dfc9d19bdbf6d17e22319da49161d5d0108e4188e8b680aef6299eed22df60" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" dependencies = [ "serde_derive", ] @@ -6231,22 +6462,22 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.15" +version = "0.11.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" +checksum = "8437fd221bde2d4ca316d61b90e337e9e702b3820b87d63caa9ba6c02bd06d96" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.218" +version = "1.0.219" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f09503e191f4e797cb8aac08e9a4a4695c5edf6a2e70e376d961ddd5c969f82b" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -6257,14 +6488,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] name = "serde_json" -version = "1.0.139" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44f86c3acccc9c65b153fe1b85a3be07fe5515274ec9f0653b4a0875731c72a6" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ "itoa", "memchr", @@ -6274,9 +6505,9 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" +checksum = "59fab13f937fa393d08645bf3a84bdfe86e296747b506ada67bb15f10f218b2a" dependencies = [ "itoa", "serde", @@ -6284,20 +6515,20 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" +checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] name = "serde_spanned" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -6392,6 +6623,12 @@ dependencies = [ "tracing", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -6408,7 +6645,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "digest 0.10.7", - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -6419,21 +6656,21 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "simple_asn1" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" +checksum = "297f631f50729c8c99b84667867963997ec0b50f32b2a7dbcab828ef0541e8bb" dependencies = [ "num-bigint", "num-traits", - "thiserror 1.0.61", + "thiserror 2.0.12", "time", ] [[package]] name = "siphasher" -version = "0.3.11" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" [[package]] name = "slab" @@ -6455,9 +6692,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.2" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" [[package]] name = "smooth-operator" @@ -6476,14 +6713,14 @@ checksum = "867851a695e22b0d1fc85f2f84dba29fef7e5d571f12fb23253e0b213bf190f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -6499,7 +6736,7 @@ dependencies = [ "lalrpop", "lalrpop-util", "phf", - "thiserror 1.0.61", + "thiserror 1.0.69", "unicode-xid", ] @@ -6542,14 +6779,13 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "string_cache" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +checksum = "938d512196766101d333398efde81bc1f37b00cb42c2f8350e5df639f040bbbe" dependencies = [ "new_debug_unreachable", - "once_cell", "parking_lot", - "phf_shared 0.10.0", + "phf_shared", "precomputed-hash", ] @@ -6578,7 +6814,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -6612,12 +6848,12 @@ dependencies = [ "fs2", "hex", "once_cell", - "reqwest", + "reqwest 0.11.27", "semver", "serde", "serde_json", "sha2 0.10.8", - "thiserror 1.0.61", + "thiserror 1.0.69", "url", "zip", ] @@ -6635,9 +6871,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.98" +version = "2.0.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" dependencies = [ "proc-macro2", "quote", @@ -6645,22 +6881,30 @@ dependencies = [ ] [[package]] -name = "syn_derive" -version = "0.1.8" +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "sync_wrapper" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.98", + "futures-core", ] [[package]] -name = "sync_wrapper" -version = "0.1.2" +name = "synstructure" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] [[package]] name = "system-configuration" @@ -6670,7 +6914,18 @@ checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ "bitflags 1.3.2", "core-foundation", - "system-configuration-sys", + "system-configuration-sys 0.5.0", +] + +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags 2.9.0", + "core-foundation", + "system-configuration-sys 0.6.0", ] [[package]] @@ -6683,6 +6938,16 @@ dependencies = [ "libc", ] +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "tap" version = "1.0.1" @@ -6691,14 +6956,16 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.10.1" +version = "3.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "2c317e0a526ee6120d8dabad239c8dadca62b24b6f168914bbbc8e2fb1f0e567" dependencies = [ "cfg-if", "fastrand", + "getrandom 0.3.1", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6741,7 +7008,7 @@ dependencies = [ "serde", "serde_json", "tendermint", - "toml 0.8.14", + "toml", "url", ] @@ -6751,7 +7018,7 @@ version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0cda4a449fc70985a95f892a67286f13afa4e048d90b8d04a2bf6341e88d1c2" dependencies = [ - "derive_more 0.99.18", + "derive_more 0.99.19", "flex-error", "serde", "tendermint", @@ -6790,8 +7057,8 @@ dependencies = [ "getrandom 0.2.15", "peg", "pin-project", - "rand", - "reqwest", + "rand 0.8.5", + "reqwest 0.11.27", "semver", "serde", "serde_bytes", @@ -6801,12 +7068,12 @@ dependencies = [ "tendermint", "tendermint-config", "tendermint-proto", - "thiserror 1.0.61", + "thiserror 1.0.69", "time", "tokio", "tracing", "url", - "uuid 1.9.1", + "uuid 1.15.1", "walkdir", ] @@ -6823,52 +7090,52 @@ dependencies = [ [[package]] name = "terminal_size" -version = "0.3.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" +checksum = "45c6481c4829e4cc63825e62c49186a34538b7b2750b73b266581ffb612fb5ed" dependencies = [ "rustix", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl 1.0.61", + "thiserror-impl 1.0.69", ] [[package]] name = "thiserror" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" dependencies = [ - "thiserror-impl 2.0.11", + "thiserror-impl 2.0.12", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] name = "thiserror-impl" -version = "2.0.11" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -6888,7 +7155,7 @@ checksum = "585e5ef40a784ce60b49c67d762110688d211d395d39e096be204535cf64590e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -6903,9 +7170,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "itoa", @@ -6926,9 +7193,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" dependencies = [ "num-conv", "time-core", @@ -6942,10 +7209,10 @@ checksum = "a30fd743a02bf35236f6faf99adb03089bb77e91c998dac2c2ad76bb424f668c" dependencies = [ "once_cell", "pbkdf2 0.12.2", - "rand", + "rand 0.8.5", "rustc-hash", "sha2 0.10.8", - "thiserror 1.0.61", + "thiserror 1.0.69", "unicode-normalization", "wasm-bindgen", "zeroize", @@ -6960,11 +7227,21 @@ dependencies = [ "crunchy", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" -version = "1.6.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82" +checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" dependencies = [ "tinyvec_macros", ] @@ -6977,32 +7254,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.38.0" +version = "1.44.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "9975ea0f48b5aa3972bf2d888c238182458437cc2a19374b81b25cdf1023fb3a" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -7022,7 +7298,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" dependencies = [ "pin-project", - "rand", + "rand 0.8.5", "tokio", ] @@ -7032,7 +7308,17 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls", + "rustls 0.21.12", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" +dependencies = [ + "rustls 0.23.23", "tokio", ] @@ -7044,18 +7330,18 @@ checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" dependencies = [ "futures-util", "log", - "rustls", + "rustls 0.21.12", "tokio", - "tokio-rustls", + "tokio-rustls 0.24.1", "tungstenite", "webpki-roots", ] [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ "bytes", "futures-core", @@ -7066,56 +7352,36 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - -[[package]] -name = "toml" -version = "0.8.14" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335" +checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.14", + "toml_edit", ] [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap 2.2.6", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.22.14" +version = "0.22.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" +checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" dependencies = [ - "indexmap 2.2.6", + "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.13", + "winnow 0.7.3", ] [[package]] @@ -7129,7 +7395,7 @@ dependencies = [ "prost-build", "prost-types", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -7149,6 +7415,21 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 1.0.2", + "tokio", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-http" version = "0.4.4" @@ -7156,12 +7437,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" dependencies = [ "async-compression", - "bitflags 2.6.0", + "bitflags 2.9.0", "bytes", "futures-core", "futures-util", "http 0.2.12", - "http-body", + "http-body 0.4.6", "http-range-header", "pin-project-lite", "tokio", @@ -7173,21 +7454,21 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "log", "pin-project-lite", @@ -7202,27 +7483,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" dependencies = [ "crossbeam-channel", - "thiserror 1.0.61", + "thiserror 1.0.69", "time", "tracing-subscriber", ] [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", @@ -7251,9 +7532,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "matchers", "nu-ansi-term", @@ -7296,45 +7577,45 @@ dependencies = [ "http 0.2.12", "httparse", "log", - "rand", - "rustls", + "rand 0.8.5", + "rustls 0.21.12", "sha1", - "thiserror 1.0.61", + "thiserror 1.0.69", "url", "utf-8", ] [[package]] name = "typed-builder" -version = "0.19.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06fbd5b8de54c5f7c91f6fe4cebb949be2125d7758e630bb58b1d831dbce600" +checksum = "7e14ed59dc8b7b26cacb2a92bad2e8b1f098806063898ab42a3bd121d7d45e75" dependencies = [ "typed-builder-macro", ] [[package]] name = "typed-builder-macro" -version = "0.19.1" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9534daa9fd3ed0bd911d462a37f172228077e7abf18c18a5f67199d959205f8" +checksum = "560b82d656506509d43abe30e0ba64c56b1953ab3d4fe7ba5902747a7a3cedd5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] name = "typenum" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" [[package]] name = "typewit" -version = "1.9.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fb9ae6a3cafaf0a5d14c2302ca525f9ae8e07a0f0e6949de88d882c37a6e24" +checksum = "cb77c29baba9e4d3a6182d51fa75e3215c7fd1dab8f4ea9d107c716878e55fc0" dependencies = [ "typewit_proc_macros", ] @@ -7377,30 +7658,30 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "universal-hash" @@ -7426,12 +7707,12 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", - "idna 0.5.0", + "idna 1.0.3", "percent-encoding", ] @@ -7451,6 +7732,18 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -7469,12 +7762,12 @@ dependencies = [ [[package]] name = "uuid" -version = "1.9.1" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de17fd2f7da591098415cff336e12965a28061ddace43b59cb3c430179c9439" +checksum = "e0f540e3240398cce6128b64ba83fdbdd86129c16a3aa1a3a252efd66eb3d587" dependencies = [ - "getrandom 0.2.15", - "rand", + "getrandom 0.3.1", + "rand 0.9.0", ] [[package]] @@ -7521,9 +7814,9 @@ dependencies = [ [[package]] name = "valuable" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "vcpkg" @@ -7533,9 +7826,9 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "vergen" -version = "8.3.1" +version = "8.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e27d6bdd219887a9eadd19e1c34f32e47fa332301184935c6d9bca26f3cca525" +checksum = "2990d9ea5967266ea0ccf413a4aa5c42a93dbcfda9cb49a97de6931726b12566" dependencies = [ "anyhow", "cfg-if", @@ -7545,9 +7838,9 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "visibility" @@ -7557,7 +7850,7 @@ checksum = "d674d135b4a8c1d7e813e2f8d1c9a58308aee4a680323066025e53132218bd91" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", ] [[package]] @@ -7596,46 +7889,48 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", + "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -7643,30 +7938,34 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "wasmparser" -version = "0.107.0" +version = "0.121.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29e3ac9b780c7dda0cac7a52a5d6d2d6707cc6e3451c9db209b6c758f40d7acb" +checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" dependencies = [ - "indexmap 1.9.3", + "bitflags 2.9.0", + "indexmap", "semver", ] @@ -7686,9 +7985,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", @@ -7720,9 +8019,9 @@ dependencies = [ "serde", "serde_json", "shared", - "thiserror 1.0.61", + "thiserror 1.0.69", "tokio", - "tower", + "tower 0.4.13", "tower-http", "tracing", "tracing-subscriber", @@ -7750,11 +8049,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -7769,7 +8068,43 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-link" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dccfd733ce2b1753b03b6d3c65edf020262ea35e20ccdf3e288043e6dd620e3" + +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", ] [[package]] @@ -7787,7 +8122,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -7807,18 +8151,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -7829,9 +8173,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -7841,9 +8185,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -7853,15 +8197,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -7871,9 +8215,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -7883,9 +8227,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -7895,9 +8239,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -7907,24 +8251,24 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.5.40" +version = "0.6.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +checksum = "1e90edd2ac1aa278a5c4599b1d89cf03074b610800f866d4026dc199d7929a28" dependencies = [ "memchr", ] [[package]] name = "winnow" -version = "0.6.13" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +checksum = "0e7f4ea97f6f78012141bcdb6a216b2609f0979ada50b20ca5b52dde2eac2bb1" dependencies = [ "memchr", ] @@ -7945,9 +8289,21 @@ version = "0.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.9.0", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "ws_stream_wasm" version = "0.7.4" @@ -7961,7 +8317,7 @@ dependencies = [ "pharos", "rustc_version", "send_wrapper 0.6.0", - "thiserror 1.0.61", + "thiserror 1.0.69", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -7983,7 +8339,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf24c008fe464f5d8f58b8d16a1ab7e930bd73b2a6933ff8704c414b2bed7f92" dependencies = [ "libm", - "rand", + "rand 0.8.5", "serde", ] @@ -7993,6 +8349,30 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", + "synstructure", +] + [[package]] name = "zcash_encoding" version = "0.2.2" @@ -8009,7 +8389,16 @@ version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ - "zerocopy-derive", + "zerocopy-derive 0.7.35", +] + +[[package]] +name = "zerocopy" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd97444d05a4328b90e75e503a34bad781f14e28a823ad3557f0750df1ebcbc6" +dependencies = [ + "zerocopy-derive 0.8.23", ] [[package]] @@ -8020,7 +8409,39 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6352c01d0edd5db859a63e2605f4ea3183ddbd15e2c4a9e7d32184df75e4f154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", + "synstructure", ] [[package]] @@ -8040,7 +8461,29 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.98", + "syn 2.0.100", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", ] [[package]] @@ -8074,11 +8517,11 @@ dependencies = [ [[package]] name = "zstd" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" +checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" dependencies = [ - "zstd-safe 7.1.0", + "zstd-safe 7.2.3", ] [[package]] @@ -8093,18 +8536,18 @@ dependencies = [ [[package]] name = "zstd-safe" -version = "7.1.0" +version = "7.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" +checksum = "f3051792fbdc2e1e143244dc28c60f73d8470e93f3f9cbd0ead44da5ed802722" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.11+zstd.1.5.6" +version = "2.0.14+zstd.1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75652c55c0b6f3e6f12eb786fe1bc960396bf05a1eb3bf1f3691c3610ac2e6d4" +checksum = "8fb060d4926e4ac3a3ad15d864e99ceb5f343c6b34f5bd6d81ae6ed417311be5" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index 90c0cac..a04f1c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,9 +23,9 @@ diesel_migrations = { version = "2.2.0", default-features = false, features = [ futures = "0.3.30" itertools = "0.13.0" lazy_static = "1.4.0" -namada_sdk = { version = "0.47.1", default-features = false, features = ["std", "async-send", "download-params"] } -namada_tx = { version = "0.47.1" } -namada_core = { version = "0.47.1" } +namada_sdk = { git = "https://github.com/anoma/namada", branch = "grarco/fix-masp-events", default-features = false, features = ["std", "async-send", "download-params"] } +namada_tx = { git = "https://github.com/anoma/namada", branch = "grarco/fix-masp-events" } +namada_core = { git = "https://github.com/anoma/namada", branch = "grarco/fix-masp-events" } orm = { path = "orm" } serde = { version = "1.0.138", features = [ "derive" ] } serde_json = "1.0" diff --git a/chain/src/main.rs b/chain/src/main.rs index 53f0cac..3cd5674 100644 --- a/chain/src/main.rs +++ b/chain/src/main.rs @@ -11,11 +11,10 @@ use std::time::Duration; use anyhow::Context; use clap::Parser; +use services::masp::update_witness_map; use shared::error::{IntoMainError, MainError}; use shared::height::{BlockHeight, FollowingHeights}; -use shared::indexed_tx::IndexedTx; use shared::transaction::Transaction; -use shared::tx_index::{MaspTxIndex, TxIndex}; use tendermint_rpc::HttpClient; use tendermint_rpc::client::CompatMode; use tokio::signal; @@ -29,7 +28,6 @@ use crate::entity::chain_state::ChainState; use crate::entity::commitment_tree::CommitmentTree; use crate::entity::tx_notes_index::TxNoteMap; use crate::entity::witness_map::WitnessMap; -use crate::services::masp::update_witness_map; use crate::services::{ cometbft as cometbft_service, db as db_service, rpc as rpc_service, }; @@ -266,27 +264,19 @@ async fn build_and_commit_masp_data_at_height( let num_transactions = block_data.transactions.len(); - for (idx, Transaction { masp_txs, .. }) in + for (indexed_tx, Transaction { masp_tx, .. }) in block_data.transactions.into_iter() { - for (masp_tx_index, masp_tx) in masp_txs.into_iter().enumerate() { - let indexed_tx = IndexedTx { - block_height, - block_index: TxIndex(idx as u32), - masp_tx_index: MaspTxIndex(masp_tx_index), - }; - - update_witness_map( - &commitment_tree, - &mut tx_notes_index, - &witness_map, - indexed_tx, - &masp_tx, - ) - .into_masp_error()?; - - shielded_txs.insert(indexed_tx, masp_tx); - } + update_witness_map( + &commitment_tree, + &mut tx_notes_index, + &witness_map, + indexed_tx, + &masp_tx, + ) + .into_masp_error()?; + + shielded_txs.insert(indexed_tx, masp_tx); } let first_checkpoint = Instant::now(); diff --git a/chain/src/services/masp.rs b/chain/src/services/masp.rs index 90dcd5d..f7454a1 100644 --- a/chain/src/services/masp.rs +++ b/chain/src/services/masp.rs @@ -7,8 +7,6 @@ use crate::entity::commitment_tree::CommitmentTree; use crate::entity::tx_notes_index::TxNoteMap; use crate::entity::witness_map::WitnessMap; -/// Update the merkle tree of witnesses the first time we -/// scan a new MASP transaction. pub fn update_witness_map( commitment_tree: &CommitmentTree, tx_notes_index: &mut TxNoteMap, diff --git a/shared/src/block.rs b/shared/src/block.rs index 2e09fa1..09d006a 100644 --- a/shared/src/block.rs +++ b/shared/src/block.rs @@ -1,18 +1,21 @@ use std::fmt::Display; -use namada_sdk::events::extend::IndexedMaspData; +use namada_sdk::state::TxIndex as NamadaTxIndex; +use namada_tx::Tx as NamadaTx; +use namada_tx::event::MaspEvent; use tendermint_rpc::endpoint::{block, block_results}; use crate::block_results::locate_masp_txs; use crate::header::BlockHeader; use crate::id::Id; +use crate::indexed_tx::IndexedTx; use crate::transaction::Transaction; #[derive(Debug, Clone, Default)] pub struct Block { pub hash: Id, pub header: BlockHeader, - pub transactions: Vec<(usize, Transaction)>, + pub transactions: Vec<(IndexedTx, Transaction)>, } impl Block { @@ -28,16 +31,32 @@ impl Block { transactions: Vec::with_capacity(raw_block.block.data.len()), }; - for IndexedMaspData { + // Cache the last tx seen to avoid multiple deserializations + let mut last_tx: Option<(NamadaTx, NamadaTxIndex)> = None; + + for MaspEvent { tx_index, - masp_refs, + kind: _, + data, } in indexed_masp_txs { - let block_index = tx_index.0 as usize; - let tx_bytes = &raw_block.block.data[block_index]; - let tx = Transaction::from_namada_tx(tx_bytes, &masp_refs.0)?; + let tx = match &last_tx { + Some((tx, idx)) if idx == &tx_index.index => tx, + _ => { + let tx = NamadaTx::try_from_bytes( + raw_block.block.data[tx_index.index.0 as usize] + .as_ref(), + ) + .map_err(|e| e.to_string())?; + last_tx = Some((tx, tx_index.index)); + + &last_tx.as_ref().unwrap().0 + } + }; + + let tx = Transaction::from_namada_tx(tx, &data)?; - block.transactions.push((block_index, tx)); + block.transactions.push((tx_index.into(), tx)); } Ok(block) @@ -53,7 +72,10 @@ impl Display for Block { self.header.height, self.transactions .iter() - .map(|(_, tx)| tx.to_string()) + .map(|(indexed_tx, tx)| format!( + "{}: batch index: {}", + tx, indexed_tx.masp_tx_index + )) .collect::>() ) } diff --git a/shared/src/block_results.rs b/shared/src/block_results.rs index 0f70c3d..cc98553 100644 --- a/shared/src/block_results.rs +++ b/shared/src/block_results.rs @@ -1,18 +1,49 @@ -use namada_sdk::events::extend::{ - IndexedMaspData, MaspDataRefs, ReadFromEventAttributes, -}; +use std::str::FromStr; + +use namada_sdk::events::EventType; +use namada_sdk::events::extend::ReadFromEventAttributes; +use namada_tx::IndexedTx; +use namada_tx::event::{MaspEvent, MaspEventKind, MaspTxRef}; use tendermint_rpc::endpoint::block_results; pub fn locate_masp_txs( raw_block_results: &block_results::Response, -) -> Vec { +) -> Vec { raw_block_results .end_block_events .as_ref() .unwrap_or(&vec![]) .iter() .filter_map(|event| { - MaspDataRefs::read_from_event_attributes(&event.attributes).ok() + // Check if the event is a Masp one + let Ok(kind) = EventType::from_str(&event.kind) else { + return None; + }; + let kind = if kind == namada_tx::event::masp_types::TRANSFER { + MaspEventKind::Transfer + } else if kind == namada_tx::event::masp_types::FEE_PAYMENT { + MaspEventKind::FeePayment + } else { + return None; + }; + + // Extract the data from the event's attributes + let Ok(data) = + MaspTxRef::read_from_event_attributes(&event.attributes) + else { + return None; + }; + let Ok(tx_index) = + IndexedTx::read_from_event_attributes(&event.attributes) + else { + return None; + }; + + Some(MaspEvent { + tx_index, + kind, + data, + }) }) .collect() } diff --git a/shared/src/indexed_tx.rs b/shared/src/indexed_tx.rs index fe1094d..b47b906 100644 --- a/shared/src/indexed_tx.rs +++ b/shared/src/indexed_tx.rs @@ -8,6 +8,16 @@ pub struct IndexedTx { /// The index in the block of the tx pub block_index: TxIndex, /// The index pertaining to the order through - /// which a masp tx is processed in Namada + /// which a masp tx is included in a transaction batch pub masp_tx_index: MaspTxIndex, } + +impl From for IndexedTx { + fn from(value: namada_tx::IndexedTx) -> Self { + Self { + block_height: value.height.0.into(), + block_index: TxIndex(value.index.0), + masp_tx_index: MaspTxIndex(value.batch_index.unwrap() as usize), + } + } +} diff --git a/shared/src/transaction.rs b/shared/src/transaction.rs index 30ad9a9..586118a 100644 --- a/shared/src/transaction.rs +++ b/shared/src/transaction.rs @@ -3,8 +3,8 @@ use std::fmt::Display; use namada_core::hash::Hash; use namada_core::masp_primitives::transaction::Transaction as NamadaMaspTransaction; -use namada_sdk::events::extend::MaspTxRef; use namada_sdk::token::Transfer; +use namada_tx::event::MaspTxRef; use namada_tx::{Data, Section, Tx as NamadaTx}; use crate::id::Id; @@ -12,50 +12,35 @@ use crate::id::Id; #[derive(Debug, Clone)] pub struct Transaction { pub hash: Id, - pub masp_txs: Vec, + // FIXME: would be better to have a vector with all the inner masp txs here + pub masp_tx: NamadaMaspTransaction, } impl Transaction { pub fn from_namada_tx( - nam_tx_bytes: &[u8], - valid_masp_tx_refs: &[MaspTxRef], + transaction: &NamadaTx, + valid_masp_tx_ref: &MaspTxRef, ) -> Result { - let transaction = - NamadaTx::try_from(nam_tx_bytes).map_err(|e| e.to_string())?; let transaction_id = transaction.header_hash(); - let masp_txs = valid_masp_tx_refs.iter().try_fold( - vec![], - |mut acc, masp_tx_ref| { - let masp_tx = match &masp_tx_ref { - MaspTxRef::MaspSection(masp_tx_id) => { - let masp_tx = transaction - .get_masp_section(masp_tx_id) - .ok_or_else(|| { - "Missing expected masp section with id: {id}" - .to_string() - })?; - Cow::Borrowed(masp_tx) - } - MaspTxRef::IbcData(sechash) => { - let masp_tx = - get_masp_tx_from_ibc_data(&transaction, sechash) - .ok_or_else(|| { - "Missing expected data section with hash: \ - {sechash}" - .to_string() - })?; - Cow::Owned(masp_tx) - } - }; - - acc.push(masp_tx.into_owned()); - Result::<_, String>::Ok(acc) - }, - )?; + let masp_tx = match &valid_masp_tx_ref { + MaspTxRef::MaspSection(masp_tx_id) => transaction + .get_masp_section(masp_tx_id) + .ok_or_else(|| { + "Missing expected masp section with id: {id}".to_string() + })? + .to_owned(), + MaspTxRef::IbcData(sechash) => get_masp_tx_from_ibc_data( + transaction, + sechash, + ) + .ok_or_else(|| { + "Missing expected data section with hash: {sechash}".to_string() + })?, + }; Ok(Transaction { - masp_txs, + masp_tx, hash: Id::from(transaction_id), }) } diff --git a/shared/src/tx_index.rs b/shared/src/tx_index.rs index accc31c..b858f63 100644 --- a/shared/src/tx_index.rs +++ b/shared/src/tx_index.rs @@ -1,3 +1,5 @@ +use std::fmt::Display; + use namada_sdk::state::TxIndex as NamadaTxIndex; #[derive(Default, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] @@ -9,6 +11,12 @@ impl From for TxIndex { } } -/// The order in which a masp tx appears in a Namada tx event. +/// The batch index in which a masp tx appears in a Namada tx event. #[derive(Default, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct MaspTxIndex(pub usize); + +impl Display for MaspTxIndex { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", self.0) + } +} From 1acf5d8535539c527539f0e68077d310c9292e9e Mon Sep 17 00:00:00 2001 From: Marco Granelli Date: Thu, 6 Mar 2025 15:58:40 +0100 Subject: [PATCH 08/39] Adds the transaction's indexes to `Transaction` --- chain/src/main.rs | 12 +++++++----- shared/src/block.rs | 12 ++++-------- shared/src/transaction.rs | 11 +++++++++-- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/chain/src/main.rs b/chain/src/main.rs index 3cd5674..5f0b5f7 100644 --- a/chain/src/main.rs +++ b/chain/src/main.rs @@ -255,17 +255,19 @@ async fn build_and_commit_masp_data_at_height( let mut shielded_txs = BTreeMap::new(); let mut tx_notes_index = TxNoteMap::default(); + let num_transactions = block_data.transactions.len(); tracing::info!( %block_height, - num_transactions = block_data.transactions.len(), + num_transactions, "Processing new masp transactions...", ); - let num_transactions = block_data.transactions.len(); - - for (indexed_tx, Transaction { masp_tx, .. }) in - block_data.transactions.into_iter() + for Transaction { + masp_tx, + indexed_tx, + .. + } in block_data.transactions.into_iter() { update_witness_map( &commitment_tree, diff --git a/shared/src/block.rs b/shared/src/block.rs index 09d006a..0ce2a6b 100644 --- a/shared/src/block.rs +++ b/shared/src/block.rs @@ -8,14 +8,13 @@ use tendermint_rpc::endpoint::{block, block_results}; use crate::block_results::locate_masp_txs; use crate::header::BlockHeader; use crate::id::Id; -use crate::indexed_tx::IndexedTx; use crate::transaction::Transaction; #[derive(Debug, Clone, Default)] pub struct Block { pub hash: Id, pub header: BlockHeader, - pub transactions: Vec<(IndexedTx, Transaction)>, + pub transactions: Vec, } impl Block { @@ -54,9 +53,9 @@ impl Block { } }; - let tx = Transaction::from_namada_tx(tx, &data)?; + let tx = Transaction::from_namada_tx(tx, tx_index.into(), &data)?; - block.transactions.push((tx_index.into(), tx)); + block.transactions.push(tx); } Ok(block) @@ -72,10 +71,7 @@ impl Display for Block { self.header.height, self.transactions .iter() - .map(|(indexed_tx, tx)| format!( - "{}: batch index: {}", - tx, indexed_tx.masp_tx_index - )) + .map(|tx| tx.to_string()) .collect::>() ) } diff --git a/shared/src/transaction.rs b/shared/src/transaction.rs index 586118a..1fda68d 100644 --- a/shared/src/transaction.rs +++ b/shared/src/transaction.rs @@ -8,17 +8,19 @@ use namada_tx::event::MaspTxRef; use namada_tx::{Data, Section, Tx as NamadaTx}; use crate::id::Id; +use crate::indexed_tx::IndexedTx; #[derive(Debug, Clone)] pub struct Transaction { pub hash: Id, - // FIXME: would be better to have a vector with all the inner masp txs here + pub indexed_tx: IndexedTx, pub masp_tx: NamadaMaspTransaction, } impl Transaction { pub fn from_namada_tx( transaction: &NamadaTx, + indexed_tx: IndexedTx, valid_masp_tx_ref: &MaspTxRef, ) -> Result { let transaction_id = transaction.header_hash(); @@ -42,13 +44,18 @@ impl Transaction { Ok(Transaction { masp_tx, hash: Id::from(transaction_id), + indexed_tx, }) } } impl Display for Transaction { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "{}", self.hash) + write!( + f, + "Hash: {}, Batch index: {}", + self.hash, self.indexed_tx.masp_tx_index + ) } } From 22a35bf4f34d3711d482a3501784ea7e5f6aa6b1 Mon Sep 17 00:00:00 2001 From: Marco Granelli Date: Fri, 7 Mar 2025 11:25:22 +0100 Subject: [PATCH 09/39] Index information about masp fee payment --- chain/src/main.rs | 9 ++++----- chain/src/services/db.rs | 25 +++++++++++++++++-------- orm/src/schema.rs | 1 + orm/src/tx.rs | 2 ++ shared/src/block.rs | 11 +++++++++-- shared/src/indexed_tx.rs | 31 +++++++++++++++++++++++++++++++ shared/src/transaction.rs | 10 +++++----- webserver/src/response/tx.rs | 12 ++++++++---- webserver/src/service/tx.rs | 13 ++++++++++--- 9 files changed, 87 insertions(+), 27 deletions(-) diff --git a/chain/src/main.rs b/chain/src/main.rs index 5f0b5f7..39e7570 100644 --- a/chain/src/main.rs +++ b/chain/src/main.rs @@ -3,7 +3,6 @@ pub mod config; pub mod entity; pub mod services; -use std::collections::BTreeMap; use std::env; use std::sync::Arc; use std::sync::atomic::{self, AtomicBool}; @@ -253,7 +252,7 @@ async fn build_and_commit_masp_data_at_height( block_data }; - let mut shielded_txs = BTreeMap::new(); + let mut shielded_txs = Vec::new(); let mut tx_notes_index = TxNoteMap::default(); let num_transactions = block_data.transactions.len(); @@ -265,7 +264,7 @@ async fn build_and_commit_masp_data_at_height( for Transaction { masp_tx, - indexed_tx, + masp_indexed_tx, .. } in block_data.transactions.into_iter() { @@ -273,12 +272,12 @@ async fn build_and_commit_masp_data_at_height( &commitment_tree, &mut tx_notes_index, &witness_map, - indexed_tx, + masp_indexed_tx.indexed_tx, &masp_tx, ) .into_masp_error()?; - shielded_txs.insert(indexed_tx, masp_tx); + shielded_txs.push((masp_indexed_tx, masp_tx)); } let first_checkpoint = Instant::now(); diff --git a/chain/src/services/db.rs b/chain/src/services/db.rs index 1f78c9c..fe934d4 100644 --- a/chain/src/services/db.rs +++ b/chain/src/services/db.rs @@ -1,4 +1,4 @@ -use std::collections::{BTreeMap, HashMap}; +use std::collections::HashMap; use anyhow::{Context, anyhow}; use deadpool_diesel::postgres::Object; @@ -21,7 +21,7 @@ use orm::tx::TxInsertDb; use orm::witness::WitnessDb; use shared::error::ContextDbInteractError; use shared::height::BlockHeight; -use shared::indexed_tx::IndexedTx; +use shared::indexed_tx::MaspIndexedTx; use crate::entity::chain_state::ChainState; use crate::entity::commitment_tree::CommitmentTree; @@ -182,7 +182,7 @@ pub async fn commit( commitment_tree: CommitmentTree, witness_map: WitnessMap, notes_index: TxNoteMap, - shielded_txs: BTreeMap, + shielded_txs: Vec<(MaspIndexedTx, Transaction)>, ) -> anyhow::Result<()> { tracing::info!( block_height = %chain_state.block_height, @@ -260,11 +260,20 @@ pub async fn commit( let shielded_txs_db = shielded_txs .iter() - .map(|(index, tx)| TxInsertDb { - block_index: index.block_index.0 as i32, - tx_bytes: tx.serialize_to_vec(), - block_height: index.block_height.0 as i32, - masp_tx_index: index.masp_tx_index.0 as i32, + .map(|(MaspIndexedTx { kind, indexed_tx }, tx)| { + let is_masp_fee_payment = match kind { + shared::indexed_tx::MaspEventKind::FeePayment => true, + shared::indexed_tx::MaspEventKind::Transfer => false, + }; + + TxInsertDb { + block_index: indexed_tx.block_index.0 as i32, + tx_bytes: tx.serialize_to_vec(), + block_height: indexed_tx.block_height.0 as i32, + masp_tx_index: indexed_tx.masp_tx_index.0 + as i32, + is_masp_fee_payment, + } }) .collect::>(); diesel::insert_into(schema::tx::table) diff --git a/orm/src/schema.rs b/orm/src/schema.rs index 29da589..36f96cb 100644 --- a/orm/src/schema.rs +++ b/orm/src/schema.rs @@ -39,6 +39,7 @@ diesel::table! { tx_bytes -> Bytea, block_height -> Int4, masp_tx_index -> Int4, + is_masp_fee_payment -> Bool } } diff --git a/orm/src/tx.rs b/orm/src/tx.rs index bd8a700..0466bf3 100644 --- a/orm/src/tx.rs +++ b/orm/src/tx.rs @@ -12,6 +12,7 @@ pub struct TxDb { pub tx_bytes: Vec, pub block_height: i32, pub masp_tx_index: i32, + pub is_masp_fee_payment: bool, } #[derive(Serialize, Insertable, Clone)] @@ -22,4 +23,5 @@ pub struct TxInsertDb { pub tx_bytes: Vec, pub block_height: i32, pub masp_tx_index: i32, + pub is_masp_fee_payment: bool, } diff --git a/shared/src/block.rs b/shared/src/block.rs index 0ce2a6b..5091b7e 100644 --- a/shared/src/block.rs +++ b/shared/src/block.rs @@ -35,7 +35,7 @@ impl Block { for MaspEvent { tx_index, - kind: _, + kind, data, } in indexed_masp_txs { @@ -53,7 +53,14 @@ impl Block { } }; - let tx = Transaction::from_namada_tx(tx, tx_index.into(), &data)?; + let tx = Transaction::from_namada_tx( + tx, + crate::indexed_tx::MaspIndexedTx { + kind: kind.into(), + indexed_tx: tx_index.into(), + }, + &data, + )?; block.transactions.push(tx); } diff --git a/shared/src/indexed_tx.rs b/shared/src/indexed_tx.rs index b47b906..6d8b7ce 100644 --- a/shared/src/indexed_tx.rs +++ b/shared/src/indexed_tx.rs @@ -1,6 +1,24 @@ use crate::height::BlockHeight; use crate::tx_index::{MaspTxIndex, TxIndex}; +/// MASP event kind +#[derive(Debug, Default, Copy, Clone, PartialOrd, PartialEq, Eq, Ord, Hash)] +pub enum MaspEventKind { + /// A MASP transaction used for fee payment + FeePayment, + /// A general MASP transfer + #[default] + Transfer, +} + +#[derive(Default, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] +pub struct MaspIndexedTx { + /// The masp tx kind, fee-payment or transfer + pub kind: MaspEventKind, + /// The pointer to the inner tx carrying this masp tx + pub indexed_tx: IndexedTx, +} + #[derive(Default, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct IndexedTx { /// The block height of the indexed tx @@ -21,3 +39,16 @@ impl From for IndexedTx { } } } + +impl From for MaspEventKind { + fn from(value: namada_tx::event::MaspEventKind) -> Self { + match value { + namada_tx::event::MaspEventKind::FeePayment => { + MaspEventKind::FeePayment + } + namada_tx::event::MaspEventKind::Transfer => { + MaspEventKind::Transfer + } + } + } +} diff --git a/shared/src/transaction.rs b/shared/src/transaction.rs index 1fda68d..b02bb41 100644 --- a/shared/src/transaction.rs +++ b/shared/src/transaction.rs @@ -8,19 +8,19 @@ use namada_tx::event::MaspTxRef; use namada_tx::{Data, Section, Tx as NamadaTx}; use crate::id::Id; -use crate::indexed_tx::IndexedTx; +use crate::indexed_tx::MaspIndexedTx; #[derive(Debug, Clone)] pub struct Transaction { pub hash: Id, - pub indexed_tx: IndexedTx, + pub masp_indexed_tx: MaspIndexedTx, pub masp_tx: NamadaMaspTransaction, } impl Transaction { pub fn from_namada_tx( transaction: &NamadaTx, - indexed_tx: IndexedTx, + masp_indexed_tx: MaspIndexedTx, valid_masp_tx_ref: &MaspTxRef, ) -> Result { let transaction_id = transaction.header_hash(); @@ -44,7 +44,7 @@ impl Transaction { Ok(Transaction { masp_tx, hash: Id::from(transaction_id), - indexed_tx, + masp_indexed_tx, }) } } @@ -54,7 +54,7 @@ impl Display for Transaction { write!( f, "Hash: {}, Batch index: {}", - self.hash, self.indexed_tx.masp_tx_index + self.hash, self.masp_indexed_tx.indexed_tx.masp_tx_index ) } } diff --git a/webserver/src/response/tx.rs b/webserver/src/response/tx.rs index 49591b6..e3b7cc9 100644 --- a/webserver/src/response/tx.rs +++ b/webserver/src/response/tx.rs @@ -15,12 +15,13 @@ pub struct Tx { #[derive(Clone, Debug, Deserialize, Serialize, Default)] pub struct TxSlot { pub masp_tx_index: u64, + pub is_masp_fee_payment: bool, pub bytes: Vec, } impl TxResponse { pub fn new( - txs: impl IntoIterator)>, u64, u64)>, + txs: impl IntoIterator)>, u64, u64)>, ) -> Self { Self { txs: txs @@ -28,9 +29,12 @@ impl TxResponse { .map(|(batch, block_height, block_index)| Tx { batch: batch .into_iter() - .map(|(masp_tx_index, bytes)| TxSlot { - masp_tx_index, - bytes, + .map(|(masp_tx_index, is_masp_fee_payment, bytes)| { + TxSlot { + masp_tx_index, + is_masp_fee_payment, + bytes, + } }) .collect(), block_height, diff --git a/webserver/src/service/tx.rs b/webserver/src/service/tx.rs index b853742..365dd90 100644 --- a/webserver/src/service/tx.rs +++ b/webserver/src/service/tx.rs @@ -19,8 +19,9 @@ impl TxService { &self, from_block_height: u64, to_block_height: u64, - ) -> anyhow::Result)>, u64, u64)>> - { + ) -> anyhow::Result< + impl IntoIterator)>, u64, u64)>, + > { Ok(self .tx_repo .get_txs(from_block_height as i32, to_block_height as i32) @@ -36,7 +37,13 @@ impl TxService { .into_iter() .map(|((block_height, block_index), tx_batch)| { let tx_batch: Vec<_> = tx_batch - .map(|tx| (tx.masp_tx_index as u64, tx.tx_bytes)) + .map(|tx| { + ( + tx.masp_tx_index as u64, + tx.is_masp_fee_payment, + tx.tx_bytes, + ) + }) .collect(); (tx_batch, block_height as u64, block_index as u64) }) From 6c93461a2951e1fc87bd0f54556b41064afcfc6e Mon Sep 17 00:00:00 2001 From: Marco Granelli Date: Mon, 10 Mar 2025 11:35:56 +0100 Subject: [PATCH 10/39] Fallible extraction of masp events --- shared/src/block.rs | 2 +- shared/src/block_results.rs | 36 +++++++++++++++++------------------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/shared/src/block.rs b/shared/src/block.rs index 5091b7e..17ebc6b 100644 --- a/shared/src/block.rs +++ b/shared/src/block.rs @@ -22,7 +22,7 @@ impl Block { raw_block: block::Response, raw_results: block_results::Response, ) -> Result { - let indexed_masp_txs = locate_masp_txs(&raw_results); + let indexed_masp_txs = locate_masp_txs(&raw_results)?; let mut block = Block { hash: Id::from(raw_block.block_id.hash), diff --git a/shared/src/block_results.rs b/shared/src/block_results.rs index cc98553..52f0674 100644 --- a/shared/src/block_results.rs +++ b/shared/src/block_results.rs @@ -8,42 +8,40 @@ use tendermint_rpc::endpoint::block_results; pub fn locate_masp_txs( raw_block_results: &block_results::Response, -) -> Vec { - raw_block_results +) -> Result, String> { + let maybe_masp_events: Result, String> = raw_block_results .end_block_events .as_ref() .unwrap_or(&vec![]) .iter() - .filter_map(|event| { + .map(|event| { // Check if the event is a Masp one let Ok(kind) = EventType::from_str(&event.kind) else { - return None; + return Ok(None); }; + let kind = if kind == namada_tx::event::masp_types::TRANSFER { MaspEventKind::Transfer } else if kind == namada_tx::event::masp_types::FEE_PAYMENT { MaspEventKind::FeePayment } else { - return None; - }; - - // Extract the data from the event's attributes - let Ok(data) = - MaspTxRef::read_from_event_attributes(&event.attributes) - else { - return None; + return Ok(None); }; - let Ok(tx_index) = + // Extract the data from the event's attributes, propagate errors if + // the masp event does not follow the expected format + let data = MaspTxRef::read_from_event_attributes(&event.attributes) + .map_err(|e| e.to_string())?; + let tx_index = IndexedTx::read_from_event_attributes(&event.attributes) - else { - return None; - }; + .map_err(|e| e.to_string())?; - Some(MaspEvent { + Ok(Some(MaspEvent { tx_index, kind, data, - }) + })) }) - .collect() + .collect(); + + Ok(maybe_masp_events?.into_iter().flatten().collect()) } From 316a7e0a11b3f93c0590b65868a2c4aaf7ccb871 Mon Sep 17 00:00:00 2001 From: Marco Granelli Date: Tue, 11 Mar 2025 17:52:32 +0100 Subject: [PATCH 11/39] Adds masp fee payment information to tx note table --- chain/src/entity/tx_notes_index.rs | 22 +++++++++++++++------- chain/src/main.rs | 2 +- chain/src/services/masp.rs | 4 ++-- orm/src/notes_index.rs | 2 ++ webserver/src/response/notes_index.rs | 5 ++++- webserver/src/service/notes_index.rs | 3 ++- 6 files changed, 26 insertions(+), 12 deletions(-) diff --git a/chain/src/entity/tx_notes_index.rs b/chain/src/entity/tx_notes_index.rs index 4ef40c4..5a0bd67 100644 --- a/chain/src/entity/tx_notes_index.rs +++ b/chain/src/entity/tx_notes_index.rs @@ -1,13 +1,13 @@ use std::collections::BTreeMap; use orm::notes_index::NotesIndexInsertDb; -use shared::indexed_tx::IndexedTx; +use shared::indexed_tx::{IndexedTx, MaspIndexedTx}; #[derive(Default, Clone, Debug)] -pub struct TxNoteMap(BTreeMap); +pub struct TxNoteMap(BTreeMap); impl TxNoteMap { - pub fn insert(&mut self, indexed_tx: IndexedTx, note_pos: usize) { + pub fn insert(&mut self, indexed_tx: MaspIndexedTx, note_pos: usize) { self.0.insert(indexed_tx, note_pos); } @@ -20,10 +20,14 @@ impl TxNoteMap { .iter() .map( |( - &IndexedTx { - block_height, - block_index, - masp_tx_index, + &MaspIndexedTx { + indexed_tx: + IndexedTx { + block_height, + block_index, + masp_tx_index, + }, + kind, }, ¬e_pos, )| NotesIndexInsertDb { @@ -31,6 +35,10 @@ impl TxNoteMap { note_position: note_pos as i32, block_height: block_height.0 as i32, masp_tx_index: masp_tx_index.0 as i32, + is_masp_fee_payment: match kind { + shared::indexed_tx::MaspEventKind::FeePayment => true, + shared::indexed_tx::MaspEventKind::Transfer => false, + }, }, ) .collect() diff --git a/chain/src/main.rs b/chain/src/main.rs index 39e7570..29aedb0 100644 --- a/chain/src/main.rs +++ b/chain/src/main.rs @@ -272,7 +272,7 @@ async fn build_and_commit_masp_data_at_height( &commitment_tree, &mut tx_notes_index, &witness_map, - masp_indexed_tx.indexed_tx, + masp_indexed_tx, &masp_tx, ) .into_masp_error()?; diff --git a/chain/src/services/masp.rs b/chain/src/services/masp.rs index f7454a1..f925b2d 100644 --- a/chain/src/services/masp.rs +++ b/chain/src/services/masp.rs @@ -1,7 +1,7 @@ use namada_core::masp_primitives::ff::PrimeField; use namada_core::masp_primitives::sapling::Node; use namada_sdk::masp_primitives::merkle_tree::IncrementalWitness; -use shared::indexed_tx::IndexedTx; +use shared::indexed_tx::MaspIndexedTx; use crate::entity::commitment_tree::CommitmentTree; use crate::entity::tx_notes_index::TxNoteMap; @@ -11,7 +11,7 @@ pub fn update_witness_map( commitment_tree: &CommitmentTree, tx_notes_index: &mut TxNoteMap, witness_map: &WitnessMap, - indexed_tx: IndexedTx, + indexed_tx: MaspIndexedTx, shielded: &namada_core::masp_primitives::transaction::Transaction, ) -> anyhow::Result<()> { let mut note_pos = commitment_tree.size(); diff --git a/orm/src/notes_index.rs b/orm/src/notes_index.rs index 1d33e40..b6ca5c3 100644 --- a/orm/src/notes_index.rs +++ b/orm/src/notes_index.rs @@ -11,6 +11,7 @@ pub struct NotesIndexDb { pub note_position: i32, pub block_height: i32, pub masp_tx_index: i32, + pub is_masp_fee_payment: bool, } #[derive(Serialize, Insertable, Clone)] @@ -21,4 +22,5 @@ pub struct NotesIndexInsertDb { pub note_position: i32, pub block_height: i32, pub masp_tx_index: i32, + pub is_masp_fee_payment: bool, } diff --git a/webserver/src/response/notes_index.rs b/webserver/src/response/notes_index.rs index fcb7540..2085f6a 100644 --- a/webserver/src/response/notes_index.rs +++ b/webserver/src/response/notes_index.rs @@ -11,10 +11,11 @@ pub struct Note { pub block_index: u64, pub masp_tx_index: u64, pub note_position: u64, + pub is_masp_fee_payment: bool, } impl NotesIndexResponse { - pub fn new(notes_index: Vec<(u64, u64, u64, u64)>) -> Self { + pub fn new(notes_index: Vec<(u64, u64, u64, u64, bool)>) -> Self { Self { notes_index: notes_index .into_iter() @@ -24,12 +25,14 @@ impl NotesIndexResponse { block_index, masp_tx_index, note_position, + is_masp_fee_payment, )| { Note { block_height, block_index, masp_tx_index, note_position, + is_masp_fee_payment, } }, ) diff --git a/webserver/src/service/notes_index.rs b/webserver/src/service/notes_index.rs index ee40b3c..ccc45d7 100644 --- a/webserver/src/service/notes_index.rs +++ b/webserver/src/service/notes_index.rs @@ -18,7 +18,7 @@ impl NotesIndexService { pub async fn get_notes_index( &self, from_block_height: u64, - ) -> anyhow::Result> { + ) -> anyhow::Result> { Ok(self .notes_index_repo .get_notes_index(from_block_height as i32) @@ -30,6 +30,7 @@ impl NotesIndexService { notes_index_entry.block_index as u64, notes_index_entry.masp_tx_index as u64, notes_index_entry.note_position as u64, + notes_index_entry.is_masp_fee_payment, ) }) .collect()) From 41d2637bb4e556b596ea4a2301b9c373cdce8b90 Mon Sep 17 00:00:00 2001 From: Marco Granelli Date: Tue, 11 Mar 2025 17:52:58 +0100 Subject: [PATCH 12/39] Adds migration --- orm/migrations/2025-03-10-142053_masp_fee_payment/down.sql | 4 ++++ orm/migrations/2025-03-10-142053_masp_fee_payment/up.sql | 7 +++++++ orm/src/schema.rs | 3 ++- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 orm/migrations/2025-03-10-142053_masp_fee_payment/down.sql create mode 100644 orm/migrations/2025-03-10-142053_masp_fee_payment/up.sql diff --git a/orm/migrations/2025-03-10-142053_masp_fee_payment/down.sql b/orm/migrations/2025-03-10-142053_masp_fee_payment/down.sql new file mode 100644 index 0000000..08f07ce --- /dev/null +++ b/orm/migrations/2025-03-10-142053_masp_fee_payment/down.sql @@ -0,0 +1,4 @@ +-- This file should undo anything in `up.sql` + +ALTER TABLE tx DROP COLUMN is_masp_fee_payment; +ALTER TABLE notes_index DROP COLUMN is_masp_fee_payment; diff --git a/orm/migrations/2025-03-10-142053_masp_fee_payment/up.sql b/orm/migrations/2025-03-10-142053_masp_fee_payment/up.sql new file mode 100644 index 0000000..0073676 --- /dev/null +++ b/orm/migrations/2025-03-10-142053_masp_fee_payment/up.sql @@ -0,0 +1,7 @@ +-- Your SQL goes here + +ALTER TABLE tx +ADD COLUMN is_masp_fee_payment BOOLEAN NOT NULL DEFAULT false; + +ALTER TABLE notes_index +ADD COLUMN is_masp_fee_payment BOOLEAN NOT NULL DEFAULT false; diff --git a/orm/src/schema.rs b/orm/src/schema.rs index 36f96cb..566bb4c 100644 --- a/orm/src/schema.rs +++ b/orm/src/schema.rs @@ -29,6 +29,7 @@ diesel::table! { block_index -> Int4, block_height -> Int4, masp_tx_index -> Int4, + is_masp_fee_payment -> Bool, } } @@ -39,7 +40,7 @@ diesel::table! { tx_bytes -> Bytea, block_height -> Int4, masp_tx_index -> Int4, - is_masp_fee_payment -> Bool + is_masp_fee_payment -> Bool, } } From 421e441617a27b00ad89a486c244f083eb3b2b93 Mon Sep 17 00:00:00 2001 From: Marco Granelli Date: Tue, 11 Mar 2025 18:25:38 +0100 Subject: [PATCH 13/39] Removes unused dependencies --- Cargo.lock | 3 --- chain/Cargo.toml | 1 - webserver/Cargo.toml | 2 -- 3 files changed, 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 32c354d..ae68c93 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -945,7 +945,6 @@ dependencies = [ "namada_sdk", "orm", "shared", - "tendermint", "tendermint-rpc", "tokio", "tokio-retry", @@ -8011,10 +8010,8 @@ dependencies = [ "clap", "deadpool-diesel", "diesel", - "futures", "itertools 0.13.0", "lazy_static", - "namada_core", "orm", "serde", "serde_json", diff --git a/chain/Cargo.toml b/chain/Cargo.toml index 0bcaadc..193dd84 100644 --- a/chain/Cargo.toml +++ b/chain/Cargo.toml @@ -25,7 +25,6 @@ namada_sdk.workspace = true orm.workspace = true shared.workspace = true tendermint-rpc.workspace = true -tendermint.workspace = true tokio-retry.workspace = true tokio.workspace = true tracing-subscriber.workspace = true diff --git a/webserver/Cargo.toml b/webserver/Cargo.toml index 3f3c01e..d598e3d 100644 --- a/webserver/Cargo.toml +++ b/webserver/Cargo.toml @@ -25,10 +25,8 @@ bincode.workspace = true clap.workspace = true deadpool-diesel.workspace = true diesel.workspace = true -futures.workspace = true itertools.workspace = true lazy_static.workspace = true -namada_core.workspace = true orm.workspace = true serde.workspace = true serde_json.workspace = true From b6af0d743b6f6577d05fea51483587d5443229cb Mon Sep 17 00:00:00 2001 From: Marco Granelli Date: Tue, 11 Mar 2025 18:31:13 +0100 Subject: [PATCH 14/39] Renames `MaspEventKind` to `MaspTxKind` --- chain/src/entity/tx_notes_index.rs | 4 ++-- chain/src/services/db.rs | 8 ++++++-- shared/src/indexed_tx.rs | 14 ++++++-------- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/chain/src/entity/tx_notes_index.rs b/chain/src/entity/tx_notes_index.rs index 5a0bd67..36128f3 100644 --- a/chain/src/entity/tx_notes_index.rs +++ b/chain/src/entity/tx_notes_index.rs @@ -36,8 +36,8 @@ impl TxNoteMap { block_height: block_height.0 as i32, masp_tx_index: masp_tx_index.0 as i32, is_masp_fee_payment: match kind { - shared::indexed_tx::MaspEventKind::FeePayment => true, - shared::indexed_tx::MaspEventKind::Transfer => false, + shared::indexed_tx::MaspTxKind::FeePayment => true, + shared::indexed_tx::MaspTxKind::Transfer => false, }, }, ) diff --git a/chain/src/services/db.rs b/chain/src/services/db.rs index fe934d4..5bc8277 100644 --- a/chain/src/services/db.rs +++ b/chain/src/services/db.rs @@ -262,8 +262,12 @@ pub async fn commit( .iter() .map(|(MaspIndexedTx { kind, indexed_tx }, tx)| { let is_masp_fee_payment = match kind { - shared::indexed_tx::MaspEventKind::FeePayment => true, - shared::indexed_tx::MaspEventKind::Transfer => false, + shared::indexed_tx::MaspTxKind::FeePayment => { + true + } + shared::indexed_tx::MaspTxKind::Transfer => { + false + } }; TxInsertDb { diff --git a/shared/src/indexed_tx.rs b/shared/src/indexed_tx.rs index 6d8b7ce..71bc268 100644 --- a/shared/src/indexed_tx.rs +++ b/shared/src/indexed_tx.rs @@ -1,9 +1,9 @@ use crate::height::BlockHeight; use crate::tx_index::{MaspTxIndex, TxIndex}; -/// MASP event kind +/// The type of a MASP transaction #[derive(Debug, Default, Copy, Clone, PartialOrd, PartialEq, Eq, Ord, Hash)] -pub enum MaspEventKind { +pub enum MaspTxKind { /// A MASP transaction used for fee payment FeePayment, /// A general MASP transfer @@ -14,7 +14,7 @@ pub enum MaspEventKind { #[derive(Default, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct MaspIndexedTx { /// The masp tx kind, fee-payment or transfer - pub kind: MaspEventKind, + pub kind: MaspTxKind, /// The pointer to the inner tx carrying this masp tx pub indexed_tx: IndexedTx, } @@ -40,15 +40,13 @@ impl From for IndexedTx { } } -impl From for MaspEventKind { +impl From for MaspTxKind { fn from(value: namada_tx::event::MaspEventKind) -> Self { match value { namada_tx::event::MaspEventKind::FeePayment => { - MaspEventKind::FeePayment - } - namada_tx::event::MaspEventKind::Transfer => { - MaspEventKind::Transfer + MaspTxKind::FeePayment } + namada_tx::event::MaspEventKind::Transfer => MaspTxKind::Transfer, } } } From 8e45aada09bc0cf9608f09d77a40d4fe111c3ffd Mon Sep 17 00:00:00 2001 From: Marco Granelli Date: Tue, 11 Mar 2025 18:45:32 +0100 Subject: [PATCH 15/39] Updates run script --- chain/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/run.sh b/chain/run.sh index 628078d..708bced 100755 --- a/chain/run.sh +++ b/chain/run.sh @@ -1 +1 @@ -cargo run --release -- --tendermint-url http://127.0.0.1:27657 --database-url postgres://postgres:password@0.0.0.0:5435/namada-masp-indexer --chain-id local.61271083678d6bb47c35eda1 --checksums-filepath ../artifacts/checksums.json \ No newline at end of file +cargo run --release -- --cometbft-url http://127.0.0.1:27657 --database-url postgres://postgres:password@0.0.0.0:5435/masp-indexer From 49ee00aa4c5cf4b6150e14b644b1f347543f57a4 Mon Sep 17 00:00:00 2001 From: Marco Granelli Date: Wed, 12 Mar 2025 16:21:28 +0100 Subject: [PATCH 16/39] Uses `BTreeMap` for the buffer of fetched transactions --- chain/src/main.rs | 5 +++-- chain/src/services/db.rs | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/chain/src/main.rs b/chain/src/main.rs index 29aedb0..be5492c 100644 --- a/chain/src/main.rs +++ b/chain/src/main.rs @@ -3,6 +3,7 @@ pub mod config; pub mod entity; pub mod services; +use std::collections::BTreeMap; use std::env; use std::sync::Arc; use std::sync::atomic::{self, AtomicBool}; @@ -252,7 +253,7 @@ async fn build_and_commit_masp_data_at_height( block_data }; - let mut shielded_txs = Vec::new(); + let mut shielded_txs = BTreeMap::new(); let mut tx_notes_index = TxNoteMap::default(); let num_transactions = block_data.transactions.len(); @@ -277,7 +278,7 @@ async fn build_and_commit_masp_data_at_height( ) .into_masp_error()?; - shielded_txs.push((masp_indexed_tx, masp_tx)); + shielded_txs.insert(masp_indexed_tx, masp_tx); } let first_checkpoint = Instant::now(); diff --git a/chain/src/services/db.rs b/chain/src/services/db.rs index 5bc8277..0b32d0c 100644 --- a/chain/src/services/db.rs +++ b/chain/src/services/db.rs @@ -1,4 +1,4 @@ -use std::collections::HashMap; +use std::collections::{BTreeMap, HashMap}; use anyhow::{Context, anyhow}; use deadpool_diesel::postgres::Object; @@ -182,7 +182,7 @@ pub async fn commit( commitment_tree: CommitmentTree, witness_map: WitnessMap, notes_index: TxNoteMap, - shielded_txs: Vec<(MaspIndexedTx, Transaction)>, + shielded_txs: BTreeMap, ) -> anyhow::Result<()> { tracing::info!( block_height = %chain_state.block_height, From cc64031a3cfb04a7e632beaeb1b1cd3e1cf8f21c Mon Sep 17 00:00:00 2001 From: Marco Granelli Date: Wed, 12 Mar 2025 16:21:58 +0100 Subject: [PATCH 17/39] Corrects partial ordering for `MaspIndexedTx` --- shared/src/indexed_tx.rs | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/shared/src/indexed_tx.rs b/shared/src/indexed_tx.rs index 71bc268..c4ef138 100644 --- a/shared/src/indexed_tx.rs +++ b/shared/src/indexed_tx.rs @@ -1,3 +1,5 @@ +use std::cmp::Ordering; + use crate::height::BlockHeight; use crate::tx_index::{MaspTxIndex, TxIndex}; @@ -11,7 +13,7 @@ pub enum MaspTxKind { Transfer, } -#[derive(Default, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] +#[derive(Default, Copy, Clone, Debug, PartialEq, Eq, Hash)] pub struct MaspIndexedTx { /// The masp tx kind, fee-payment or transfer pub kind: MaspTxKind, @@ -19,6 +21,29 @@ pub struct MaspIndexedTx { pub indexed_tx: IndexedTx, } +impl Ord for MaspIndexedTx { + fn cmp(&self, other: &Self) -> Ordering { + // If txs are in different blocks we just have to compare their block + // heights. If instead txs are in the same block, masp fee paying txs + // take precedence over transfer masp txs. After that we sort them based + // on their indexes + self.indexed_tx + .block_height + .cmp(&other.indexed_tx.block_height) + .then( + self.kind + .cmp(&other.kind) + .then(self.indexed_tx.cmp(&other.indexed_tx)), + ) + } +} + +impl PartialOrd for MaspIndexedTx { + fn partial_cmp(&self, other: &Self) -> Option { + Some(self.cmp(other)) + } +} + #[derive(Default, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct IndexedTx { /// The block height of the indexed tx From 28bc57a8f0ef81a7b97ea5f63ceae873db5ae653 Mon Sep 17 00:00:00 2001 From: Marco Granelli Date: Fri, 14 Mar 2025 11:17:12 +0100 Subject: [PATCH 18/39] Refactors masp fee payment pattern matching --- chain/src/entity/tx_notes_index.rs | 8 ++++---- chain/src/services/db.rs | 12 ++++-------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/chain/src/entity/tx_notes_index.rs b/chain/src/entity/tx_notes_index.rs index 36128f3..506b88e 100644 --- a/chain/src/entity/tx_notes_index.rs +++ b/chain/src/entity/tx_notes_index.rs @@ -35,10 +35,10 @@ impl TxNoteMap { note_position: note_pos as i32, block_height: block_height.0 as i32, masp_tx_index: masp_tx_index.0 as i32, - is_masp_fee_payment: match kind { - shared::indexed_tx::MaspTxKind::FeePayment => true, - shared::indexed_tx::MaspTxKind::Transfer => false, - }, + is_masp_fee_payment: matches!( + kind, + shared::indexed_tx::MaspTxKind::FeePayment + ), }, ) .collect() diff --git a/chain/src/services/db.rs b/chain/src/services/db.rs index 0b32d0c..cc22a53 100644 --- a/chain/src/services/db.rs +++ b/chain/src/services/db.rs @@ -261,14 +261,10 @@ pub async fn commit( let shielded_txs_db = shielded_txs .iter() .map(|(MaspIndexedTx { kind, indexed_tx }, tx)| { - let is_masp_fee_payment = match kind { - shared::indexed_tx::MaspTxKind::FeePayment => { - true - } - shared::indexed_tx::MaspTxKind::Transfer => { - false - } - }; + let is_masp_fee_payment = matches!( + kind, + shared::indexed_tx::MaspTxKind::FeePayment + ); TxInsertDb { block_index: indexed_tx.block_index.0 as i32, From c7af9061ae7444ad7df7507904351ee80e2ff27a Mon Sep 17 00:00:00 2001 From: Marco Granelli Date: Fri, 14 Mar 2025 11:20:08 +0100 Subject: [PATCH 19/39] Brings back new block info log --- chain/src/services/db.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chain/src/services/db.rs b/chain/src/services/db.rs index cc22a53..bc264cc 100644 --- a/chain/src/services/db.rs +++ b/chain/src/services/db.rs @@ -317,5 +317,10 @@ pub async fn commit( ) })?; + tracing::info!( + block_height = %chain_state.block_height, + "Committed new block" + ); + Ok(()) } From 17dcdaf56a494a54b611e40815bae2ac64f8a59e Mon Sep 17 00:00:00 2001 From: Tiago Carvalho Date: Fri, 14 Mar 2025 14:40:17 +0000 Subject: [PATCH 20/39] add missing migrations from master --- .../down.sql | 3 +++ .../up.sql | 12 ++++++++++++ .../down.sql | 2 ++ .../up.sql | 8 ++++++++ 4 files changed, 25 insertions(+) create mode 100644 orm/migrations/2025-03-06-081320_delete_invalid_commitment_trees/down.sql create mode 100644 orm/migrations/2025-03-06-081320_delete_invalid_commitment_trees/up.sql create mode 100644 orm/migrations/2025-03-11-150254_delete_masp_data_up_to_phase3/down.sql create mode 100644 orm/migrations/2025-03-11-150254_delete_masp_data_up_to_phase3/up.sql diff --git a/orm/migrations/2025-03-06-081320_delete_invalid_commitment_trees/down.sql b/orm/migrations/2025-03-06-081320_delete_invalid_commitment_trees/down.sql new file mode 100644 index 0000000..0ff76b5 --- /dev/null +++ b/orm/migrations/2025-03-06-081320_delete_invalid_commitment_trees/down.sql @@ -0,0 +1,3 @@ +-- This file should undo anything in `up.sql` + +SELECT 1; diff --git a/orm/migrations/2025-03-06-081320_delete_invalid_commitment_trees/up.sql b/orm/migrations/2025-03-06-081320_delete_invalid_commitment_trees/up.sql new file mode 100644 index 0000000..dfccd2d --- /dev/null +++ b/orm/migrations/2025-03-06-081320_delete_invalid_commitment_trees/up.sql @@ -0,0 +1,12 @@ +-- Your SQL goes here + +BEGIN; + +DELETE FROM block_index; +UPDATE chain_state SET block_height = 1055117; +DELETE FROM commitment_tree WHERE block_height >= 1055118; +DELETE FROM notes_index WHERE block_height >= 1055118; +DELETE FROM tx WHERE block_height >= 1055118; +DELETE FROM witness WHERE block_height >= 1055118; + +COMMIT; diff --git a/orm/migrations/2025-03-11-150254_delete_masp_data_up_to_phase3/down.sql b/orm/migrations/2025-03-11-150254_delete_masp_data_up_to_phase3/down.sql new file mode 100644 index 0000000..2a3866c --- /dev/null +++ b/orm/migrations/2025-03-11-150254_delete_masp_data_up_to_phase3/down.sql @@ -0,0 +1,2 @@ +-- This file should undo anything in `up.sql` +SELECT 1; diff --git a/orm/migrations/2025-03-11-150254_delete_masp_data_up_to_phase3/up.sql b/orm/migrations/2025-03-11-150254_delete_masp_data_up_to_phase3/up.sql new file mode 100644 index 0000000..e6e89db --- /dev/null +++ b/orm/migrations/2025-03-11-150254_delete_masp_data_up_to_phase3/up.sql @@ -0,0 +1,8 @@ +-- Your SQL goes here + +DELETE FROM block_index; +UPDATE chain_state SET block_height = 1031830; +DELETE FROM commitment_tree WHERE block_height > 1031830; +DELETE FROM notes_index WHERE block_height > 1031830; +DELETE FROM tx WHERE block_height > 1031830; +DELETE FROM witness WHERE block_height > 1031830; From 6879c69ab1a967f4c1f3f504be6e89c953817ece Mon Sep 17 00:00:00 2001 From: Tiago Carvalho Date: Fri, 14 Mar 2025 14:44:30 +0000 Subject: [PATCH 21/39] remove duped log --- chain/src/services/db.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/chain/src/services/db.rs b/chain/src/services/db.rs index bc264cc..cc22a53 100644 --- a/chain/src/services/db.rs +++ b/chain/src/services/db.rs @@ -317,10 +317,5 @@ pub async fn commit( ) })?; - tracing::info!( - block_height = %chain_state.block_height, - "Committed new block" - ); - Ok(()) } From 2b899a9aa3efed5a3ce185aadb3b68311a3b1ab7 Mon Sep 17 00:00:00 2001 From: Tiago Carvalho Date: Fri, 14 Mar 2025 15:14:56 +0000 Subject: [PATCH 22/39] add method to check if transactional is dirty --- shared/src/transactional.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/shared/src/transactional.rs b/shared/src/transactional.rs index 71877de..ca5f182 100644 --- a/shared/src/transactional.rs +++ b/shared/src/transactional.rs @@ -11,6 +11,10 @@ impl Transactional { working_copy: None, } } + + pub const fn is_dirty(&self) -> bool { + self.working_copy.is_some() + } } impl AsRef for Transactional { From 2bc921643fe37344ba61050f36771033dda28e4b Mon Sep 17 00:00:00 2001 From: Tiago Carvalho Date: Fri, 14 Mar 2025 15:37:57 +0000 Subject: [PATCH 23/39] validate masp state --- Cargo.lock | 1 + Cargo.toml | 1 + chain/Cargo.toml | 1 + chain/src/config.rs | 3 ++ chain/src/entity/commitment_tree.rs | 16 +++++++++ chain/src/entity/witness_map.rs | 13 +++++++ chain/src/main.rs | 55 +++++++++++++++++++++++++++-- chain/src/services/cometbft.rs | 22 ++++++++++++ chain/src/services/masp.rs | 29 +++++++++++++++ shared/src/error.rs | 5 +++ 10 files changed, 143 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ae68c93..e4df93e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -944,6 +944,7 @@ dependencies = [ "namada_core", "namada_sdk", "orm", + "rayon", "shared", "tendermint-rpc", "tokio", diff --git a/Cargo.toml b/Cargo.toml index a04f1c9..9879b31 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,6 +27,7 @@ namada_sdk = { git = "https://github.com/anoma/namada", branch = "grarco/fix-mas namada_tx = { git = "https://github.com/anoma/namada", branch = "grarco/fix-masp-events" } namada_core = { git = "https://github.com/anoma/namada", branch = "grarco/fix-masp-events" } orm = { path = "orm" } +rayon = "1.10.0" serde = { version = "1.0.138", features = [ "derive" ] } serde_json = "1.0" shared = { path = "shared" } diff --git a/chain/Cargo.toml b/chain/Cargo.toml index 193dd84..b9fc26c 100644 --- a/chain/Cargo.toml +++ b/chain/Cargo.toml @@ -23,6 +23,7 @@ futures.workspace = true namada_core.workspace = true namada_sdk.workspace = true orm.workspace = true +rayon.workspace = true shared.workspace = true tendermint-rpc.workspace = true tokio-retry.workspace = true diff --git a/chain/src/config.rs b/chain/src/config.rs index 048718a..6026b5a 100644 --- a/chain/src/config.rs +++ b/chain/src/config.rs @@ -16,6 +16,9 @@ pub struct AppConfig { #[clap(long, env)] pub starting_block_height: Option, + #[clap(long, env, default_value_t = 0)] + pub number_of_witness_map_roots_to_check: usize, + #[command(flatten)] pub verbosity: Verbosity, } diff --git a/chain/src/entity/commitment_tree.rs b/chain/src/entity/commitment_tree.rs index d2a3d16..f0805f4 100644 --- a/chain/src/entity/commitment_tree.rs +++ b/chain/src/entity/commitment_tree.rs @@ -28,6 +28,10 @@ impl InnerCommitmentTree { } } + fn is_dirty(&self) -> bool { + self.transactional.is_dirty() + } + fn rollback(&mut self) { self.transactional.rollback(); } @@ -40,6 +44,10 @@ impl InnerCommitmentTree { self.transactional.as_ref().size() } + fn root(&self) -> Node { + self.transactional.as_ref().root() + } + fn get_tree(&self) -> MaspCommitmentTree { self.transactional.as_ref().clone() } @@ -64,6 +72,10 @@ impl CommitmentTree { Self(Arc::new(Mutex::new(InnerCommitmentTree::new(tree)))) } + pub fn is_dirty(&self) -> bool { + self.0.lock().unwrap().is_dirty() + } + pub fn rollback(&self) { self.0.lock().unwrap().rollback() } @@ -72,6 +84,10 @@ impl CommitmentTree { self.0.lock().unwrap().size() } + pub fn root(&self) -> Node { + self.0.lock().unwrap().root() + } + pub fn append(&self, node: Node) -> bool { self.0.lock().unwrap().append(node) } diff --git a/chain/src/entity/witness_map.rs b/chain/src/entity/witness_map.rs index 30e1524..4b41f18 100644 --- a/chain/src/entity/witness_map.rs +++ b/chain/src/entity/witness_map.rs @@ -22,6 +22,15 @@ impl InnerWitnessMap { } } + fn roots(&self, number_of_roots: usize) -> Vec<(usize, Node)> { + self.transactional + .as_ref() + .iter() + .take(number_of_roots) + .map(|(note_index, witness)| (*note_index, witness.root())) + .collect() + } + fn size(&self) -> usize { self.transactional.as_ref().len() } @@ -71,6 +80,10 @@ impl WitnessMap { Self(Arc::new(Mutex::new(InnerWitnessMap::new(witness_map)))) } + pub fn roots(&self, number_of_roots: usize) -> Vec<(usize, Node)> { + self.0.lock().unwrap().roots(number_of_roots) + } + pub fn size(&self) -> usize { self.0.lock().unwrap().size() } diff --git a/chain/src/main.rs b/chain/src/main.rs index be5492c..428af17 100644 --- a/chain/src/main.rs +++ b/chain/src/main.rs @@ -11,7 +11,6 @@ use std::time::Duration; use anyhow::Context; use clap::Parser; -use services::masp::update_witness_map; use shared::error::{IntoMainError, MainError}; use shared::height::{BlockHeight, FollowingHeights}; use shared::transaction::Transaction; @@ -29,7 +28,8 @@ use crate::entity::commitment_tree::CommitmentTree; use crate::entity::tx_notes_index::TxNoteMap; use crate::entity::witness_map::WitnessMap; use crate::services::{ - cometbft as cometbft_service, db as db_service, rpc as rpc_service, + cometbft as cometbft_service, db as db_service, masp as masp_service, + rpc as rpc_service, }; const VERSION_STRING: &str = env!("VERGEN_GIT_SHA"); @@ -43,6 +43,7 @@ async fn main() -> Result<(), MainError> { interval, verbosity, starting_block_height, + number_of_witness_map_roots_to_check, } = AppConfig::parse(); config::install_tracing_subscriber(verbosity); @@ -90,6 +91,7 @@ async fn main() -> Result<(), MainError> { commitment_tree, app_state, chain_state, + number_of_witness_map_roots_to_check, ) }, |_: &MainError| !must_exit(&exit_handle), @@ -200,6 +202,7 @@ async fn load_committed_state( shared::error::ok((last_block_height, commitment_tree, witness_map)) } +#[allow(clippy::too_many_arguments)] async fn build_and_commit_masp_data_at_height( block_height: BlockHeight, exit_handle: &AtomicBool, @@ -208,6 +211,7 @@ async fn build_and_commit_masp_data_at_height( commitment_tree: CommitmentTree, app_state: AppState, chain_state: ChainState, + number_of_witness_map_roots_to_check: usize, ) -> Result<(), MainError> { if must_exit(exit_handle) { return Ok(()); @@ -269,7 +273,7 @@ async fn build_and_commit_masp_data_at_height( .. } in block_data.transactions.into_iter() { - update_witness_map( + masp_service::update_witness_map( &commitment_tree, &mut tx_notes_index, &witness_map, @@ -281,6 +285,14 @@ async fn build_and_commit_masp_data_at_height( shielded_txs.insert(masp_indexed_tx, masp_tx); } + validate_masp_state( + &client, + &commitment_tree, + &witness_map, + number_of_witness_map_roots_to_check, + ) + .await?; + let first_checkpoint = Instant::now(); tracing::info!( @@ -313,3 +325,40 @@ async fn build_and_commit_masp_data_at_height( Ok(()) } + +async fn validate_masp_state( + client: &HttpClient, + commitment_tree: &CommitmentTree, + witness_map: &WitnessMap, + number_of_witness_map_roots_to_check: usize, +) -> Result<(), MainError> { + if commitment_tree.is_dirty() && number_of_witness_map_roots_to_check > 0 { + let tree_root = tokio::task::block_in_place(|| commitment_tree.root()); + + let commitment_tree_check_fut = async { + cometbft_service::query_commitment_tree_anchor_existence( + client, tree_root, + ) + .await + .into_rpc_error() + }; + + let witness_map = witness_map.clone(); + let witness_map_check_fut = async move { + tokio::task::spawn_blocking(move || { + masp_service::query_witness_map_anchor_existence( + &witness_map, + tree_root, + number_of_witness_map_roots_to_check, + ) + .into_masp_error() + }) + .await + .context("Failed to join Tokio task") + .into_tokio_join_error()? + }; + + futures::try_join!(commitment_tree_check_fut, witness_map_check_fut,)?; + } + Ok(()) +} diff --git a/chain/src/services/cometbft.rs b/chain/src/services/cometbft.rs index 77f7abe..ca6dfe0 100644 --- a/chain/src/services/cometbft.rs +++ b/chain/src/services/cometbft.rs @@ -1,4 +1,5 @@ use anyhow::{Context, anyhow}; +use namada_core::masp_primitives::sapling::Node; use shared::block::Block; use shared::height::BlockHeight; use tendermint_rpc::endpoint::{block, block_results}; @@ -35,3 +36,24 @@ async fn query_raw_block_results_at_height( .await .context("Failed to query CometBFT's block results") } + +pub async fn query_commitment_tree_anchor_existence( + client: &HttpClient, + commitment_tree_root: Node, +) -> anyhow::Result<()> { + let anchor_key = namada_sdk::token::storage_key::masp_commitment_anchor_key( + commitment_tree_root, + ); + + if !namada_sdk::rpc::query_has_storage_key(client, &anchor_key) + .await + .context("Failed to check if commitment tree root is in storage")? + { + anyhow::bail!( + "No commitment tree found with the given root: \ + {commitment_tree_root:?}" + ) + } + + Ok(()) +} diff --git a/chain/src/services/masp.rs b/chain/src/services/masp.rs index f925b2d..9023d15 100644 --- a/chain/src/services/masp.rs +++ b/chain/src/services/masp.rs @@ -1,6 +1,7 @@ use namada_core::masp_primitives::ff::PrimeField; use namada_core::masp_primitives::sapling::Node; use namada_sdk::masp_primitives::merkle_tree::IncrementalWitness; +use rayon::prelude::*; use shared::indexed_tx::MaspIndexedTx; use crate::entity::commitment_tree::CommitmentTree; @@ -44,3 +45,31 @@ pub fn update_witness_map( Ok(()) } + +pub fn query_witness_map_anchor_existence( + witness_map: &WitnessMap, + cmt_tree_root: Node, + roots_to_check: usize, +) -> anyhow::Result<()> { + let witness_map_roots = witness_map.roots(roots_to_check); + + if !witness_map_roots.into_par_iter().all( + |(note_index, witness_map_root)| { + if witness_map_root == cmt_tree_root { + true + } else { + tracing::error!( + ?cmt_tree_root, + ?witness_map_root, + %note_index, + "Anchor mismatch" + ); + false + } + }, + ) { + anyhow::bail!("There is an invalid anchor in the witness map"); + } + + Ok(()) +} diff --git a/shared/src/error.rs b/shared/src/error.rs index 1779d16..d5bb9cf 100644 --- a/shared/src/error.rs +++ b/shared/src/error.rs @@ -49,6 +49,11 @@ pub trait IntoMainError: Sized { fn into_masp_error(self) -> Result { self.into_main_error("MASP error") } + + #[inline] + fn into_tokio_join_error(self) -> Result { + self.into_main_error("Tokio join error") + } } impl IntoMainError for anyhow::Result { From 71ec9173ea5dadc26ba8b6a606ce685e81b81d15 Mon Sep 17 00:00:00 2001 From: Tiago Carvalho Date: Fri, 14 Mar 2025 15:56:42 +0000 Subject: [PATCH 24/39] refactor checking time --- chain/src/main.rs | 71 ++++++++++++++++++++++++---------------- chain/src/services/db.rs | 11 +++++++ 2 files changed, 53 insertions(+), 29 deletions(-) diff --git a/chain/src/main.rs b/chain/src/main.rs index 428af17..9dea0ac 100644 --- a/chain/src/main.rs +++ b/chain/src/main.rs @@ -217,8 +217,6 @@ async fn build_and_commit_masp_data_at_height( return Ok(()); } - let start = Instant::now(); - // NB: rollback changes from previous failed commit attempts witness_map.rollback(); commitment_tree.rollback(); @@ -241,7 +239,9 @@ async fn build_and_commit_masp_data_at_height( return Err(MainError); } - let block_data = { + let mut checkpoint = Instant::now(); + + let (block_data, num_transactions) = { tracing::info!( %block_height, "Fetching block data from CometBFT" @@ -250,16 +250,19 @@ async fn build_and_commit_masp_data_at_height( cometbft_service::query_masp_txs_in_block(&client, block_height) .await .into_rpc_error()?; - tracing::info!( - %block_height, - "Acquired block data from CometBFT" - ); - block_data + with_time_taken(&mut checkpoint, |time_taken| { + tracing::info!( + time_taken, + %block_height, + "Acquired block data from CometBFT" + ); + }); + let num_transactions = block_data.transactions.len(); + (block_data, num_transactions) }; let mut shielded_txs = BTreeMap::new(); let mut tx_notes_index = TxNoteMap::default(); - let num_transactions = block_data.transactions.len(); tracing::info!( %block_height, @@ -285,7 +288,17 @@ async fn build_and_commit_masp_data_at_height( shielded_txs.insert(masp_indexed_tx, masp_tx); } + with_time_taken(&mut checkpoint, |time_taken| { + tracing::info!( + %block_height, + num_transactions, + time_taken, + "Processed new masp transactions", + ); + }); + validate_masp_state( + &mut checkpoint, &client, &commitment_tree, &witness_map, @@ -293,16 +306,8 @@ async fn build_and_commit_masp_data_at_height( ) .await?; - let first_checkpoint = Instant::now(); - - tracing::info!( - %block_height, - num_transactions, - time_taken = first_checkpoint.duration_since(start).as_secs_f64(), - "Processed new masp transactions...", - ); - db_service::commit( + &mut checkpoint, &conn_obj, chain_state, commitment_tree, @@ -313,26 +318,19 @@ async fn build_and_commit_masp_data_at_height( .await .into_db_error()?; - let second_checkpoint = Instant::now(); - - tracing::info!( - block_height = %chain_state.block_height, - time_taken = second_checkpoint - .duration_since(first_checkpoint) - .as_secs_f64(), - "Committed new block" - ); - Ok(()) } async fn validate_masp_state( + checkpoint: &mut Instant, client: &HttpClient, commitment_tree: &CommitmentTree, witness_map: &WitnessMap, number_of_witness_map_roots_to_check: usize, ) -> Result<(), MainError> { if commitment_tree.is_dirty() && number_of_witness_map_roots_to_check > 0 { + tracing::info!("Validating MASP state..."); + let tree_root = tokio::task::block_in_place(|| commitment_tree.root()); let commitment_tree_check_fut = async { @@ -358,7 +356,22 @@ async fn validate_masp_state( .into_tokio_join_error()? }; - futures::try_join!(commitment_tree_check_fut, witness_map_check_fut,)?; + futures::try_join!(commitment_tree_check_fut, witness_map_check_fut)?; + + with_time_taken(checkpoint, |time_taken| { + tracing::info!(time_taken, "Validated MASP state"); + }); } + Ok(()) } + +fn with_time_taken(checkpoint: &mut Instant, callback: F) -> T +where + F: FnOnce(f64) -> T, +{ + let last_checkpoint = std::mem::replace(checkpoint, Instant::now()); + let time_taken = last_checkpoint.elapsed().as_secs_f64(); + + callback(time_taken) +} diff --git a/chain/src/services/db.rs b/chain/src/services/db.rs index cc22a53..191ac95 100644 --- a/chain/src/services/db.rs +++ b/chain/src/services/db.rs @@ -22,11 +22,13 @@ use orm::witness::WitnessDb; use shared::error::ContextDbInteractError; use shared::height::BlockHeight; use shared::indexed_tx::MaspIndexedTx; +use tokio::time::Instant; use crate::entity::chain_state::ChainState; use crate::entity::commitment_tree::CommitmentTree; use crate::entity::tx_notes_index::TxNoteMap; use crate::entity::witness_map::WitnessMap; +use crate::with_time_taken; const MIGRATIONS: EmbeddedMigrations = embed_migrations!("../orm/migrations/"); @@ -177,6 +179,7 @@ pub async fn get_last_witness_map(conn: Object) -> anyhow::Result { #[allow(clippy::too_many_arguments)] pub async fn commit( + checkpoint: &mut Instant, conn: &Object, chain_state: ChainState, commitment_tree: CommitmentTree, @@ -317,5 +320,13 @@ pub async fn commit( ) })?; + with_time_taken(checkpoint, |time_taken| { + tracing::info!( + block_height = %chain_state.block_height, + time_taken, + "Committed new block" + ); + }); + Ok(()) } From 1f611da551164e0ae347d3f010a63a94165d2cc3 Mon Sep 17 00:00:00 2001 From: Tiago Carvalho Date: Fri, 14 Mar 2025 16:01:03 +0000 Subject: [PATCH 25/39] update to same version as master --- Cargo.lock | 10 +++++----- Cargo.toml | 2 +- swagger.yml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e4df93e..43389dd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -678,7 +678,7 @@ dependencies = [ [[package]] name = "block-index" -version = "1.0.0" +version = "1.2.1" dependencies = [ "anyhow", "bincode", @@ -932,7 +932,7 @@ dependencies = [ [[package]] name = "chain" -version = "1.0.0" +version = "1.2.1" dependencies = [ "anyhow", "clap", @@ -5216,7 +5216,7 @@ dependencies = [ [[package]] name = "orm" -version = "1.0.0" +version = "1.2.1" dependencies = [ "diesel", "serde", @@ -6611,7 +6611,7 @@ dependencies = [ [[package]] name = "shared" -version = "1.0.0" +version = "1.2.1" dependencies = [ "anyhow", "namada_core", @@ -8001,7 +8001,7 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webserver" -version = "1.0.0" +version = "1.2.1" dependencies = [ "anyhow", "axum", diff --git a/Cargo.toml b/Cargo.toml index 9879b31..a4705ea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ authors = ["Heliax AG "] edition = "2024" license = "GPL-3.0-or-later" readme = "README.md" -version = "1.0.0" +version = "1.2.1" [workspace.dependencies] anyhow = "1.0.75" diff --git a/swagger.yml b/swagger.yml index b820dd4..fd76129 100644 --- a/swagger.yml +++ b/swagger.yml @@ -1,7 +1,7 @@ openapi: '3.0.2' info: title: Masp Indexer - version: '1.1' + version: '1.2.1' servers: - url: https://localhost:5000/api/v1 paths: From 5715e1f902f2ee165c4ae8d2b4f378d1151843f4 Mon Sep 17 00:00:00 2001 From: Tiago Carvalho Date: Fri, 14 Mar 2025 16:01:52 +0000 Subject: [PATCH 26/39] pull in workflow changes from master --- .github/workflows/deploy.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b4577cf..8f810af 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,6 +6,12 @@ on: - "v[0-9]+.[0-9]+.[0-9]+" - "v[0-9]+.[0-9]+.[0-9]+-[a-z]+" +permissions: + packages: write + pages: write + id-token: write + contents: read + jobs: docker: name: Docker From bd959df5b7e58b4918fca7f768572b0b3f9e4920 Mon Sep 17 00:00:00 2001 From: Tiago Carvalho Date: Fri, 21 Mar 2025 13:42:00 +0000 Subject: [PATCH 27/39] update namada lib --- Cargo.lock | 112 +++++++++++++++++++-------------------- Cargo.toml | 6 +-- shared/src/block.rs | 6 +-- shared/src/indexed_tx.rs | 4 +- 4 files changed, 64 insertions(+), 64 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 43389dd..4563902 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4333,8 +4333,8 @@ dependencies = [ [[package]] name = "namada_account" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "borsh", "namada_core", @@ -4345,8 +4345,8 @@ dependencies = [ [[package]] name = "namada_controller" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "namada_core", "smooth-operator", @@ -4355,8 +4355,8 @@ dependencies = [ [[package]] name = "namada_core" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "bech32 0.11.0", "borsh", @@ -4404,8 +4404,8 @@ dependencies = [ [[package]] name = "namada_ethereum_bridge" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "borsh", "ethers", @@ -4432,8 +4432,8 @@ dependencies = [ [[package]] name = "namada_events" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "borsh", "namada_core", @@ -4446,8 +4446,8 @@ dependencies = [ [[package]] name = "namada_gas" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "borsh", "namada_core", @@ -4459,8 +4459,8 @@ dependencies = [ [[package]] name = "namada_governance" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "borsh", "itertools 0.14.0", @@ -4482,8 +4482,8 @@ dependencies = [ [[package]] name = "namada_ibc" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "borsh", "data-encoding", @@ -4517,8 +4517,8 @@ dependencies = [ [[package]] name = "namada_io" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "async-trait", "kdam", @@ -4530,8 +4530,8 @@ dependencies = [ [[package]] name = "namada_macros" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "data-encoding", "proc-macro2", @@ -4542,8 +4542,8 @@ dependencies = [ [[package]] name = "namada_merkle_tree" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "borsh", "eyre", @@ -4557,8 +4557,8 @@ dependencies = [ [[package]] name = "namada_parameters" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "namada_core", "namada_macros", @@ -4572,8 +4572,8 @@ dependencies = [ [[package]] name = "namada_proof_of_stake" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "borsh", "itertools 0.14.0", @@ -4596,16 +4596,16 @@ dependencies = [ [[package]] name = "namada_replay_protection" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "namada_core", ] [[package]] name = "namada_sdk" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "async-trait", "bech32 0.11.0", @@ -4675,8 +4675,8 @@ dependencies = [ [[package]] name = "namada_shielded_token" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "async-trait", "borsh", @@ -4716,8 +4716,8 @@ dependencies = [ [[package]] name = "namada_state" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "borsh", "clru", @@ -4739,8 +4739,8 @@ dependencies = [ [[package]] name = "namada_storage" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "borsh", "itertools 0.14.0", @@ -4758,8 +4758,8 @@ dependencies = [ [[package]] name = "namada_systems" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "namada_core", "namada_events", @@ -4768,8 +4768,8 @@ dependencies = [ [[package]] name = "namada_token" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "borsh", "namada_core", @@ -4786,8 +4786,8 @@ dependencies = [ [[package]] name = "namada_trans_token" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "konst", "namada_core", @@ -4803,8 +4803,8 @@ dependencies = [ [[package]] name = "namada_tx" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "ark-bls12-381", "bitflags 2.9.0", @@ -4832,8 +4832,8 @@ dependencies = [ [[package]] name = "namada_tx_env" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "namada_core", "namada_events", @@ -4842,8 +4842,8 @@ dependencies = [ [[package]] name = "namada_vm" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "borsh", "clru", @@ -4864,8 +4864,8 @@ dependencies = [ [[package]] name = "namada_vote_ext" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "borsh", "namada_core", @@ -4876,8 +4876,8 @@ dependencies = [ [[package]] name = "namada_vp" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "namada_core", "namada_events", @@ -4892,8 +4892,8 @@ dependencies = [ [[package]] name = "namada_vp_env" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "derivative", "masp_primitives", @@ -4907,8 +4907,8 @@ dependencies = [ [[package]] name = "namada_wallet" -version = "0.47.0" -source = "git+https://github.com/anoma/namada?branch=grarco%2Ffix-masp-events#4d9efbd24daa58662e04237dbe2d87528512b762" +version = "0.48.0" +source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" dependencies = [ "bimap", "borsh", diff --git a/Cargo.toml b/Cargo.toml index a4705ea..f055f2c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,9 +23,9 @@ diesel_migrations = { version = "2.2.0", default-features = false, features = [ futures = "0.3.30" itertools = "0.13.0" lazy_static = "1.4.0" -namada_sdk = { git = "https://github.com/anoma/namada", branch = "grarco/fix-masp-events", default-features = false, features = ["std", "async-send", "download-params"] } -namada_tx = { git = "https://github.com/anoma/namada", branch = "grarco/fix-masp-events" } -namada_core = { git = "https://github.com/anoma/namada", branch = "grarco/fix-masp-events" } +namada_sdk = { git = "https://github.com/anoma/namada", rev = "74b5f9b347f34d1c02b2fc2f1b84154393b92b2c", default-features = false, features = ["std", "async-send", "download-params"] } +namada_tx = { git = "https://github.com/anoma/namada", rev = "74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" } +namada_core = { git = "https://github.com/anoma/namada", rev = "74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" } orm = { path = "orm" } rayon = "1.10.0" serde = { version = "1.0.138", features = [ "derive" ] } diff --git a/shared/src/block.rs b/shared/src/block.rs index 17ebc6b..64497b7 100644 --- a/shared/src/block.rs +++ b/shared/src/block.rs @@ -40,14 +40,14 @@ impl Block { } in indexed_masp_txs { let tx = match &last_tx { - Some((tx, idx)) if idx == &tx_index.index => tx, + Some((tx, idx)) if idx == &tx_index.block_index => tx, _ => { let tx = NamadaTx::try_from_bytes( - raw_block.block.data[tx_index.index.0 as usize] + raw_block.block.data[tx_index.block_index.0 as usize] .as_ref(), ) .map_err(|e| e.to_string())?; - last_tx = Some((tx, tx_index.index)); + last_tx = Some((tx, tx_index.block_index)); &last_tx.as_ref().unwrap().0 } diff --git a/shared/src/indexed_tx.rs b/shared/src/indexed_tx.rs index c4ef138..7817157 100644 --- a/shared/src/indexed_tx.rs +++ b/shared/src/indexed_tx.rs @@ -58,8 +58,8 @@ pub struct IndexedTx { impl From for IndexedTx { fn from(value: namada_tx::IndexedTx) -> Self { Self { - block_height: value.height.0.into(), - block_index: TxIndex(value.index.0), + block_height: value.block_height.0.into(), + block_index: TxIndex(value.block_index.0), masp_tx_index: MaspTxIndex(value.batch_index.unwrap() as usize), } } From 8d3a3549f4e1743dd534abdbc41c32bb7310a56b Mon Sep 17 00:00:00 2001 From: Tiago Carvalho Date: Fri, 21 Mar 2025 13:46:59 +0000 Subject: [PATCH 28/39] comment out invalid migrations --- .../up.sql | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/orm/migrations/2025-03-06-081320_delete_invalid_commitment_trees/up.sql b/orm/migrations/2025-03-06-081320_delete_invalid_commitment_trees/up.sql index dfccd2d..e87033e 100644 --- a/orm/migrations/2025-03-06-081320_delete_invalid_commitment_trees/up.sql +++ b/orm/migrations/2025-03-06-081320_delete_invalid_commitment_trees/up.sql @@ -1,12 +1,14 @@ -- Your SQL goes here -BEGIN; +SELECT 1; -DELETE FROM block_index; -UPDATE chain_state SET block_height = 1055117; -DELETE FROM commitment_tree WHERE block_height >= 1055118; -DELETE FROM notes_index WHERE block_height >= 1055118; -DELETE FROM tx WHERE block_height >= 1055118; -DELETE FROM witness WHERE block_height >= 1055118; +-- BEGIN; -COMMIT; +-- DELETE FROM block_index; +-- UPDATE chain_state SET block_height = 1055117; +-- DELETE FROM commitment_tree WHERE block_height >= 1055118; +-- DELETE FROM notes_index WHERE block_height >= 1055118; +-- DELETE FROM tx WHERE block_height >= 1055118; +-- DELETE FROM witness WHERE block_height >= 1055118; + +-- COMMIT; From 4ad068c8a941786157015f8531dd1dc8b9b0880d Mon Sep 17 00:00:00 2001 From: Tiago Carvalho Date: Thu, 3 Apr 2025 09:21:11 +0100 Subject: [PATCH 29/39] apply masp txs in correct order --- chain/src/main.rs | 7 ++----- chain/src/services/masp.rs | 2 ++ shared/src/block.rs | 26 ++++++++++++++++---------- shared/src/transaction.rs | 15 --------------- 4 files changed, 20 insertions(+), 30 deletions(-) diff --git a/chain/src/main.rs b/chain/src/main.rs index 9dea0ac..c7d0db5 100644 --- a/chain/src/main.rs +++ b/chain/src/main.rs @@ -270,11 +270,8 @@ async fn build_and_commit_masp_data_at_height( "Processing new masp transactions...", ); - for Transaction { - masp_tx, - masp_indexed_tx, - .. - } in block_data.transactions.into_iter() + for (masp_indexed_tx, Transaction { masp_tx, .. }) in + block_data.transactions.into_iter() { masp_service::update_witness_map( &commitment_tree, diff --git a/chain/src/services/masp.rs b/chain/src/services/masp.rs index 9023d15..e64cc49 100644 --- a/chain/src/services/masp.rs +++ b/chain/src/services/masp.rs @@ -15,6 +15,8 @@ pub fn update_witness_map( indexed_tx: MaspIndexedTx, shielded: &namada_core::masp_primitives::transaction::Transaction, ) -> anyhow::Result<()> { + tracing::info!(?indexed_tx, "Updating witness map"); + let mut note_pos = commitment_tree.size(); tx_notes_index.insert(indexed_tx, note_pos); diff --git a/shared/src/block.rs b/shared/src/block.rs index 64497b7..ea6751f 100644 --- a/shared/src/block.rs +++ b/shared/src/block.rs @@ -1,3 +1,4 @@ +use std::collections::BTreeMap; use std::fmt::Display; use namada_sdk::state::TxIndex as NamadaTxIndex; @@ -8,13 +9,14 @@ use tendermint_rpc::endpoint::{block, block_results}; use crate::block_results::locate_masp_txs; use crate::header::BlockHeader; use crate::id::Id; +use crate::indexed_tx::MaspIndexedTx; use crate::transaction::Transaction; #[derive(Debug, Clone, Default)] pub struct Block { pub hash: Id, pub header: BlockHeader, - pub transactions: Vec, + pub transactions: BTreeMap, } impl Block { @@ -27,7 +29,7 @@ impl Block { let mut block = Block { hash: Id::from(raw_block.block_id.hash), header: BlockHeader::from(raw_block.block.header), - transactions: Vec::with_capacity(raw_block.block.data.len()), + transactions: BTreeMap::new(), }; // Cache the last tx seen to avoid multiple deserializations @@ -53,16 +55,15 @@ impl Block { } }; - let tx = Transaction::from_namada_tx( - tx, - crate::indexed_tx::MaspIndexedTx { + let tx = Transaction::from_namada_tx(tx, &data)?; + + block.transactions.insert( + MaspIndexedTx { kind: kind.into(), indexed_tx: tx_index.into(), }, - &data, - )?; - - block.transactions.push(tx); + tx, + ); } Ok(block) @@ -78,7 +79,12 @@ impl Display for Block { self.header.height, self.transactions .iter() - .map(|tx| tx.to_string()) + .map(|(masp_indexed_tx, tx)| { + format!( + "Hash: {}, Batch index: {}", + tx.hash, masp_indexed_tx.indexed_tx.masp_tx_index + ) + }) .collect::>() ) } diff --git a/shared/src/transaction.rs b/shared/src/transaction.rs index b02bb41..4817e3a 100644 --- a/shared/src/transaction.rs +++ b/shared/src/transaction.rs @@ -1,5 +1,4 @@ use std::borrow::Cow; -use std::fmt::Display; use namada_core::hash::Hash; use namada_core::masp_primitives::transaction::Transaction as NamadaMaspTransaction; @@ -8,19 +7,16 @@ use namada_tx::event::MaspTxRef; use namada_tx::{Data, Section, Tx as NamadaTx}; use crate::id::Id; -use crate::indexed_tx::MaspIndexedTx; #[derive(Debug, Clone)] pub struct Transaction { pub hash: Id, - pub masp_indexed_tx: MaspIndexedTx, pub masp_tx: NamadaMaspTransaction, } impl Transaction { pub fn from_namada_tx( transaction: &NamadaTx, - masp_indexed_tx: MaspIndexedTx, valid_masp_tx_ref: &MaspTxRef, ) -> Result { let transaction_id = transaction.header_hash(); @@ -44,21 +40,10 @@ impl Transaction { Ok(Transaction { masp_tx, hash: Id::from(transaction_id), - masp_indexed_tx, }) } } -impl Display for Transaction { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!( - f, - "Hash: {}, Batch index: {}", - self.hash, self.masp_indexed_tx.indexed_tx.masp_tx_index - ) - } -} - fn get_masp_tx_from_ibc_data( transaction: &NamadaTx, data_sechash: &Hash, From e4b71ffcb903e5950cf3359ff25f31f71e6adb6b Mon Sep 17 00:00:00 2001 From: Tiago Carvalho Date: Fri, 4 Apr 2025 14:50:14 +0100 Subject: [PATCH 30/39] add migrations to reset masp data --- .../down.sql | 2 ++ .../up.sql | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 orm/migrations/2025-04-04-134858_reset_masp_data_to_migrate_events/down.sql create mode 100644 orm/migrations/2025-04-04-134858_reset_masp_data_to_migrate_events/up.sql diff --git a/orm/migrations/2025-04-04-134858_reset_masp_data_to_migrate_events/down.sql b/orm/migrations/2025-04-04-134858_reset_masp_data_to_migrate_events/down.sql new file mode 100644 index 0000000..2a3866c --- /dev/null +++ b/orm/migrations/2025-04-04-134858_reset_masp_data_to_migrate_events/down.sql @@ -0,0 +1,2 @@ +-- This file should undo anything in `up.sql` +SELECT 1; diff --git a/orm/migrations/2025-04-04-134858_reset_masp_data_to_migrate_events/up.sql b/orm/migrations/2025-04-04-134858_reset_masp_data_to_migrate_events/up.sql new file mode 100644 index 0000000..e6e89db --- /dev/null +++ b/orm/migrations/2025-04-04-134858_reset_masp_data_to_migrate_events/up.sql @@ -0,0 +1,8 @@ +-- Your SQL goes here + +DELETE FROM block_index; +UPDATE chain_state SET block_height = 1031830; +DELETE FROM commitment_tree WHERE block_height > 1031830; +DELETE FROM notes_index WHERE block_height > 1031830; +DELETE FROM tx WHERE block_height > 1031830; +DELETE FROM witness WHERE block_height > 1031830; From b71de5d6669d3058691c8b9ec7591accffe89bac Mon Sep 17 00:00:00 2001 From: yito88 Date: Thu, 20 Mar 2025 00:20:16 +0100 Subject: [PATCH 31/39] sort tx --- webserver/src/repository/tx.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webserver/src/repository/tx.rs b/webserver/src/repository/tx.rs index afc0404..3cebae4 100644 --- a/webserver/src/repository/tx.rs +++ b/webserver/src/repository/tx.rs @@ -62,6 +62,11 @@ impl TxRepositoryTrait for TxRepository { .ge(from_block_height) .and(tx::dsl::block_height.le(to_block_height)), ) + .order_by(( + tx::dsl::block_height.asc(), + tx::dsl::block_index.asc(), + tx::dsl::masp_tx_index.asc(), + )) .select(TxDb::as_select()) .get_results(conn) .with_context(|| { From 18252dee49be663ffba63cc00f734b1e49476b44 Mon Sep 17 00:00:00 2001 From: Tiago Carvalho Date: Fri, 11 Apr 2025 10:50:28 +0100 Subject: [PATCH 32/39] update namada libs --- Cargo.lock | 124 ++++++++++++++++++++++++++--------------------------- Cargo.toml | 6 +-- 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4563902..eb05ed2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4045,9 +4045,9 @@ checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e" [[package]] name = "masp_note_encryption" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b136637896ff0e2a9f18f25464eb8cc75dde909ab616918d3e13ab7401ab89a" +checksum = "cfa6b33e4b4d7eb2ec6d8a6b3db92cd92b63b50b15f226e227188b3ec6a1f92c" dependencies = [ "borsh", "chacha20", @@ -4059,9 +4059,9 @@ dependencies = [ [[package]] name = "masp_primitives" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c3739b3b1a5e767ad88a38c9000cf8014e5fab84b93c4e9415e10a56cede54" +checksum = "57c4482dd67fb614da7840a08b56d387e43ec8a06129e4f7bdba02900f4e3dbc" dependencies = [ "aes", "bip0039", @@ -4091,9 +4091,9 @@ dependencies = [ [[package]] name = "masp_proofs" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "131fd70050405eb3cfd45e704982a1b44fafc9443dbb352d079ccf1c1cda53c9" +checksum = "f07358ecd7aa622deec656874eee2d309dcd9f046f89022105336de73d97b34f" dependencies = [ "bellman", "blake2b_simd", @@ -4333,8 +4333,8 @@ dependencies = [ [[package]] name = "namada_account" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "borsh", "namada_core", @@ -4345,8 +4345,8 @@ dependencies = [ [[package]] name = "namada_controller" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "namada_core", "smooth-operator", @@ -4355,8 +4355,8 @@ dependencies = [ [[package]] name = "namada_core" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "bech32 0.11.0", "borsh", @@ -4404,8 +4404,8 @@ dependencies = [ [[package]] name = "namada_ethereum_bridge" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "borsh", "ethers", @@ -4432,8 +4432,8 @@ dependencies = [ [[package]] name = "namada_events" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "borsh", "namada_core", @@ -4446,8 +4446,8 @@ dependencies = [ [[package]] name = "namada_gas" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "borsh", "namada_core", @@ -4459,8 +4459,8 @@ dependencies = [ [[package]] name = "namada_governance" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "borsh", "itertools 0.14.0", @@ -4482,8 +4482,8 @@ dependencies = [ [[package]] name = "namada_ibc" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "borsh", "data-encoding", @@ -4517,8 +4517,8 @@ dependencies = [ [[package]] name = "namada_io" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "async-trait", "kdam", @@ -4530,8 +4530,8 @@ dependencies = [ [[package]] name = "namada_macros" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "data-encoding", "proc-macro2", @@ -4542,8 +4542,8 @@ dependencies = [ [[package]] name = "namada_merkle_tree" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "borsh", "eyre", @@ -4557,8 +4557,8 @@ dependencies = [ [[package]] name = "namada_parameters" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "namada_core", "namada_macros", @@ -4572,8 +4572,8 @@ dependencies = [ [[package]] name = "namada_proof_of_stake" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "borsh", "itertools 0.14.0", @@ -4596,16 +4596,16 @@ dependencies = [ [[package]] name = "namada_replay_protection" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "namada_core", ] [[package]] name = "namada_sdk" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "async-trait", "bech32 0.11.0", @@ -4675,8 +4675,8 @@ dependencies = [ [[package]] name = "namada_shielded_token" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "async-trait", "borsh", @@ -4716,8 +4716,8 @@ dependencies = [ [[package]] name = "namada_state" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "borsh", "clru", @@ -4739,8 +4739,8 @@ dependencies = [ [[package]] name = "namada_storage" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "borsh", "itertools 0.14.0", @@ -4758,8 +4758,8 @@ dependencies = [ [[package]] name = "namada_systems" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "namada_core", "namada_events", @@ -4768,8 +4768,8 @@ dependencies = [ [[package]] name = "namada_token" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "borsh", "namada_core", @@ -4786,8 +4786,8 @@ dependencies = [ [[package]] name = "namada_trans_token" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "konst", "namada_core", @@ -4803,8 +4803,8 @@ dependencies = [ [[package]] name = "namada_tx" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "ark-bls12-381", "bitflags 2.9.0", @@ -4832,8 +4832,8 @@ dependencies = [ [[package]] name = "namada_tx_env" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "namada_core", "namada_events", @@ -4842,8 +4842,8 @@ dependencies = [ [[package]] name = "namada_vm" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "borsh", "clru", @@ -4864,8 +4864,8 @@ dependencies = [ [[package]] name = "namada_vote_ext" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "borsh", "namada_core", @@ -4876,8 +4876,8 @@ dependencies = [ [[package]] name = "namada_vp" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "namada_core", "namada_events", @@ -4892,8 +4892,8 @@ dependencies = [ [[package]] name = "namada_vp_env" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "derivative", "masp_primitives", @@ -4907,8 +4907,8 @@ dependencies = [ [[package]] name = "namada_wallet" -version = "0.48.0" -source = "git+https://github.com/anoma/namada?rev=74b5f9b347f34d1c02b2fc2f1b84154393b92b2c#74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" +version = "0.149.0" +source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" dependencies = [ "bimap", "borsh", diff --git a/Cargo.toml b/Cargo.toml index f055f2c..250f638 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,9 +23,9 @@ diesel_migrations = { version = "2.2.0", default-features = false, features = [ futures = "0.3.30" itertools = "0.13.0" lazy_static = "1.4.0" -namada_sdk = { git = "https://github.com/anoma/namada", rev = "74b5f9b347f34d1c02b2fc2f1b84154393b92b2c", default-features = false, features = ["std", "async-send", "download-params"] } -namada_tx = { git = "https://github.com/anoma/namada", rev = "74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" } -namada_core = { git = "https://github.com/anoma/namada", rev = "74b5f9b347f34d1c02b2fc2f1b84154393b92b2c" } +namada_sdk = { git = "https://github.com/anoma/namada", tag = "libs-v0.149.0", default-features = false, features = ["std", "async-send", "download-params"] } +namada_tx = { git = "https://github.com/anoma/namada", tag = "libs-v0.149.0" } +namada_core = { git = "https://github.com/anoma/namada", tag = "libs-v0.149.0" } orm = { path = "orm" } rayon = "1.10.0" serde = { version = "1.0.138", features = [ "derive" ] } From fec1693a8e2e0a9c974496b7dd6e6b01760eca77 Mon Sep 17 00:00:00 2001 From: Tiago Carvalho Date: Fri, 11 Apr 2025 10:51:33 +0100 Subject: [PATCH 33/39] bump tendermint-rs --- Cargo.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eb05ed2..0037c7d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5707,7 +5707,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" dependencies = [ "heck 0.5.0", - "itertools 0.14.0", + "itertools 0.11.0", "log", "multimap", "once_cell", @@ -5727,7 +5727,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" dependencies = [ "anyhow", - "itertools 0.14.0", + "itertools 0.11.0", "proc-macro2", "quote", "syn 2.0.100", @@ -6970,9 +6970,9 @@ dependencies = [ [[package]] name = "tendermint" -version = "0.40.1" +version = "0.40.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9703e34d940c2a293804752555107f8dbe2b84ec4c6dd5203831235868105d2" +checksum = "ab2972a56891bc9173eaebdd51290bc848e448aa281881f3a4712bd8fe1899b3" dependencies = [ "bytes", "digest 0.10.7", @@ -7027,9 +7027,9 @@ dependencies = [ [[package]] name = "tendermint-proto" -version = "0.40.1" +version = "0.40.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ae9e1705aa0fa5ecb2c6aa7fb78c2313c4a31158ea5f02048bf318f849352eb" +checksum = "ca44b9eaaa98e8440fbafe5593b8a32a1c395c094ac566b3eb50497f8bd2bee0" dependencies = [ "borsh", "bytes", From 28f7b20069844744a4ae94864689309abd817f1d Mon Sep 17 00:00:00 2001 From: Tiago Carvalho Date: Fri, 11 Apr 2025 11:18:52 +0100 Subject: [PATCH 34/39] bump version --- Cargo.lock | 10 +++++----- Cargo.toml | 2 +- swagger.yml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0037c7d..0348804 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -678,7 +678,7 @@ dependencies = [ [[package]] name = "block-index" -version = "1.2.1" +version = "1.3.0" dependencies = [ "anyhow", "bincode", @@ -932,7 +932,7 @@ dependencies = [ [[package]] name = "chain" -version = "1.2.1" +version = "1.3.0" dependencies = [ "anyhow", "clap", @@ -5216,7 +5216,7 @@ dependencies = [ [[package]] name = "orm" -version = "1.2.1" +version = "1.3.0" dependencies = [ "diesel", "serde", @@ -6611,7 +6611,7 @@ dependencies = [ [[package]] name = "shared" -version = "1.2.1" +version = "1.3.0" dependencies = [ "anyhow", "namada_core", @@ -8001,7 +8001,7 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webserver" -version = "1.2.1" +version = "1.3.0" dependencies = [ "anyhow", "axum", diff --git a/Cargo.toml b/Cargo.toml index 250f638..02e5bc2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ authors = ["Heliax AG "] edition = "2024" license = "GPL-3.0-or-later" readme = "README.md" -version = "1.2.1" +version = "1.3.0" [workspace.dependencies] anyhow = "1.0.75" diff --git a/swagger.yml b/swagger.yml index fd76129..6bc173a 100644 --- a/swagger.yml +++ b/swagger.yml @@ -1,7 +1,7 @@ openapi: '3.0.2' info: title: Masp Indexer - version: '1.2.1' + version: '1.3.0' servers: - url: https://localhost:5000/api/v1 paths: From 75dfb844176e91a58aa704d4d2af20153b3577fe Mon Sep 17 00:00:00 2001 From: Tiago Carvalho Date: Thu, 17 Apr 2025 14:41:46 +0100 Subject: [PATCH 35/39] bump namada libs --- Cargo.lock | 152 +++++++++++++++++++++++++++++++---------------------- Cargo.toml | 6 +-- 2 files changed, 93 insertions(+), 65 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0348804..ffbb722 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4333,8 +4333,9 @@ dependencies = [ [[package]] name = "namada_account" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "825895fe589e6136f495acc8e203218b8ec90fb1736d8a522dca77775e0d5d03" dependencies = [ "borsh", "namada_core", @@ -4345,8 +4346,9 @@ dependencies = [ [[package]] name = "namada_controller" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae91ea4502deaf7053277dd260f6580813410ab37598c36714d8120f5aa03cfc" dependencies = [ "namada_core", "smooth-operator", @@ -4355,8 +4357,9 @@ dependencies = [ [[package]] name = "namada_core" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb6d76951adce81378692fd558650496d87d44ce22767d81538f6c5a97fde847" dependencies = [ "bech32 0.11.0", "borsh", @@ -4404,8 +4407,9 @@ dependencies = [ [[package]] name = "namada_ethereum_bridge" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10d55597c32a4b4167c6e5703a317f666db819da3cb62a21ce96f98d07a05e9f" dependencies = [ "borsh", "ethers", @@ -4432,8 +4436,9 @@ dependencies = [ [[package]] name = "namada_events" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c26d2e8a9c07b9c8365861dcce4b1021e1d657a59faef77fe0f668f8582f5a89" dependencies = [ "borsh", "namada_core", @@ -4446,8 +4451,9 @@ dependencies = [ [[package]] name = "namada_gas" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da478c2bae8624d3ff0551d4f0e9afb27cba202c14e2cf1c64469398767eedb6" dependencies = [ "borsh", "namada_core", @@ -4459,8 +4465,9 @@ dependencies = [ [[package]] name = "namada_governance" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55278f2a221ce7c9cb5f36f894de3556fd5d604f6d94f201de1b0a02da436dd6" dependencies = [ "borsh", "itertools 0.14.0", @@ -4482,8 +4489,9 @@ dependencies = [ [[package]] name = "namada_ibc" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c02af0d9d2dd79946e660de0a3600c5c78747fc6116a982058d6daf6549d475e" dependencies = [ "borsh", "data-encoding", @@ -4517,8 +4525,9 @@ dependencies = [ [[package]] name = "namada_io" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dbeead2685556e21264866ff126e698024737576adb04ca4b834080d739b50a" dependencies = [ "async-trait", "kdam", @@ -4530,8 +4539,9 @@ dependencies = [ [[package]] name = "namada_macros" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bdfb4030ba839bcf6856ba0cdff946edc89a65559413b8b661711ad24536b20" dependencies = [ "data-encoding", "proc-macro2", @@ -4542,8 +4552,9 @@ dependencies = [ [[package]] name = "namada_merkle_tree" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d78772d1334343a6b2e9c969cb5192c4c4165c98178cc335e5b07913227c9c" dependencies = [ "borsh", "eyre", @@ -4557,8 +4568,9 @@ dependencies = [ [[package]] name = "namada_parameters" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f18d0973dc04541b6442512221c63744cff79e5a33799b3a39d3370d7b8fe5a" dependencies = [ "namada_core", "namada_macros", @@ -4572,8 +4584,9 @@ dependencies = [ [[package]] name = "namada_proof_of_stake" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6aade987142f8caf9405f602da90654b08a29ff25f410184dd59ff947050abe0" dependencies = [ "borsh", "itertools 0.14.0", @@ -4596,16 +4609,18 @@ dependencies = [ [[package]] name = "namada_replay_protection" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1b0a3815a0c585ef29b39fa0673d1bb15b293ad1f4c015f3f213a9696a25176" dependencies = [ "namada_core", ] [[package]] name = "namada_sdk" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368031f2c3698b137b6cc8509db9b10752d0544db8e128f31b221e6692ced1a3" dependencies = [ "async-trait", "bech32 0.11.0", @@ -4675,8 +4690,9 @@ dependencies = [ [[package]] name = "namada_shielded_token" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6b930e7e5db8dd0354754055e04a90eac0a826a2d753bba9cfb4780dea547d1" dependencies = [ "async-trait", "borsh", @@ -4716,8 +4732,9 @@ dependencies = [ [[package]] name = "namada_state" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adf640707caf5862fb97f2ad97c09a3a6b7342ae5cebd231f683f2fe9795008c" dependencies = [ "borsh", "clru", @@ -4739,8 +4756,9 @@ dependencies = [ [[package]] name = "namada_storage" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce775658b4b2482b62d7c84a0789a395c726b7f8bd757f356ae0e0174a93265" dependencies = [ "borsh", "itertools 0.14.0", @@ -4758,8 +4776,9 @@ dependencies = [ [[package]] name = "namada_systems" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "363ceed8a89888907e11cac6de01b5621c07c7af2b2d307687726e30929fa98b" dependencies = [ "namada_core", "namada_events", @@ -4768,8 +4787,9 @@ dependencies = [ [[package]] name = "namada_token" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb977f3012fe0e00b6f20e3e033d374ed40c8b9933f4c5eece38039d4959e3a3" dependencies = [ "borsh", "namada_core", @@ -4786,8 +4806,9 @@ dependencies = [ [[package]] name = "namada_trans_token" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f436936b2041d11e5396d2723da10627a6e2dc19f9dce12e560cc426a4a4761" dependencies = [ "konst", "namada_core", @@ -4803,8 +4824,9 @@ dependencies = [ [[package]] name = "namada_tx" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc556a7fcf4ec14b9381128bd796973fd2f845ca27d3119c5ef92f1b532c985d" dependencies = [ "ark-bls12-381", "bitflags 2.9.0", @@ -4832,8 +4854,9 @@ dependencies = [ [[package]] name = "namada_tx_env" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1263a5f67795c2ebbcc53e467469a7d446b982c8b99a67ae5365b956581f338" dependencies = [ "namada_core", "namada_events", @@ -4842,8 +4865,9 @@ dependencies = [ [[package]] name = "namada_vm" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7cb63f9e4042ffd600fcacc8055d9070ef93625ccd227118016aac03a4b3e35" dependencies = [ "borsh", "clru", @@ -4864,8 +4888,9 @@ dependencies = [ [[package]] name = "namada_vote_ext" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bc3356f018b1186dd3a3e7814a732d40487b63351777cf2d64932e7841a6837" dependencies = [ "borsh", "namada_core", @@ -4876,8 +4901,9 @@ dependencies = [ [[package]] name = "namada_vp" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "850a0dd511d2d7cb43aabd1046400af408bb2a1708ce0029ff46d61acaa15cff" dependencies = [ "namada_core", "namada_events", @@ -4892,8 +4918,9 @@ dependencies = [ [[package]] name = "namada_vp_env" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6a2886fa36675cd64ca75390fba2bf7ef6808ce61a4fdb00a155b6f56fb202" dependencies = [ "derivative", "masp_primitives", @@ -4907,8 +4934,9 @@ dependencies = [ [[package]] name = "namada_wallet" -version = "0.149.0" -source = "git+https://github.com/anoma/namada?tag=libs-v0.149.0#6fee8263752d0a5d18dc7fb10c2252394b8ff16c" +version = "0.149.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68df2c006fecfa64b2116b304a49d3219fef1d7d09c8c2c96b35cfdedea3bbc5" dependencies = [ "bimap", "borsh", @@ -5707,7 +5735,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" dependencies = [ "heck 0.5.0", - "itertools 0.11.0", + "itertools 0.14.0", "log", "multimap", "once_cell", @@ -5727,7 +5755,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" dependencies = [ "anyhow", - "itertools 0.11.0", + "itertools 0.14.0", "proc-macro2", "quote", "syn 2.0.100", @@ -7000,9 +7028,9 @@ dependencies = [ [[package]] name = "tendermint-config" -version = "0.40.1" +version = "0.40.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89cc3ea9a39b7ee34eefcff771cc067ecaa0c988c1c5ac08defd878471a06f76" +checksum = "651cb680d41e586bb688cc17ab0b6dfe2e62a959c5742d1351fe0b084cd75d59" dependencies = [ "flex-error", "serde", @@ -7046,9 +7074,9 @@ dependencies = [ [[package]] name = "tendermint-rpc" -version = "0.40.1" +version = "0.40.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835a52aa504c63ec05519e31348d3f4ba2fe79493c588e2cad5323d5e81b161a" +checksum = "9367678af1a9fc6c064fab8b5d05f03c0fc243fe411581c00c7eed83f8ced380" dependencies = [ "async-trait", "bytes", diff --git a/Cargo.toml b/Cargo.toml index 02e5bc2..0887fe3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,9 +23,9 @@ diesel_migrations = { version = "2.2.0", default-features = false, features = [ futures = "0.3.30" itertools = "0.13.0" lazy_static = "1.4.0" -namada_sdk = { git = "https://github.com/anoma/namada", tag = "libs-v0.149.0", default-features = false, features = ["std", "async-send", "download-params"] } -namada_tx = { git = "https://github.com/anoma/namada", tag = "libs-v0.149.0" } -namada_core = { git = "https://github.com/anoma/namada", tag = "libs-v0.149.0" } +namada_sdk = { version = "0.149.1", default-features = false, features = ["std", "async-send", "download-params"] } +namada_tx = "0.149.1" +namada_core = "0.149.1" orm = { path = "orm" } rayon = "1.10.0" serde = { version = "1.0.138", features = [ "derive" ] } From d1d4a20933b596bb9db71a4794f21159b67f0573 Mon Sep 17 00:00:00 2001 From: satan Date: Tue, 29 Apr 2025 11:57:23 +0200 Subject: [PATCH 36/39] Added indexed based api endpoint --- webserver/src/app.rs | 1 + webserver/src/dto/indices.rs | 16 +++++++++ webserver/src/dto/mod.rs | 1 + webserver/src/handler/tx.rs | 17 ++++++++++ webserver/src/repository/tx.rs | 62 ++++++++++++++++++++++++++++++++++ webserver/src/service/tx.rs | 37 ++++++++++++++++++++ 6 files changed, 134 insertions(+) create mode 100644 webserver/src/dto/indices.rs diff --git a/webserver/src/app.rs b/webserver/src/app.rs index 31f0606..7a8fffe 100644 --- a/webserver/src/app.rs +++ b/webserver/src/app.rs @@ -53,6 +53,7 @@ impl ApplicationServer { get(handler::notes_index::get_notes_index), ) .route("/tx", get(handler::tx::get_tx)) + .route("/tx_by_indices", get(handler::tx::get_tx_by_indices)) .route("/height", get(handler::namada_state::get_latest_height)) .route( "/block-index", diff --git a/webserver/src/dto/indices.rs b/webserver/src/dto/indices.rs new file mode 100644 index 0000000..5579058 --- /dev/null +++ b/webserver/src/dto/indices.rs @@ -0,0 +1,16 @@ +use serde::{Deserialize, Serialize}; +use validator::Validate; + +#[derive(Clone, Serialize, Deserialize, Validate)] +pub struct IndexQueryParams { + #[validate(length(min = 1, max = 30))] + pub indices: Vec, +} + +#[derive(Copy, Clone, Serialize, Deserialize, Validate)] +pub struct Index { + #[validate(range(min = 1))] + pub height: u64, + #[validate(range(min = 0))] + pub block_index: u32, +} diff --git a/webserver/src/dto/mod.rs b/webserver/src/dto/mod.rs index fb454bd..97a5669 100644 --- a/webserver/src/dto/mod.rs +++ b/webserver/src/dto/mod.rs @@ -1,3 +1,4 @@ +pub mod indices; pub mod notes_index; pub mod tree; pub mod txs; diff --git a/webserver/src/handler/tx.rs b/webserver/src/handler/tx.rs index 30bb0e3..33d482d 100644 --- a/webserver/src/handler/tx.rs +++ b/webserver/src/handler/tx.rs @@ -4,6 +4,7 @@ use axum_macros::debug_handler; use axum_trace_id::TraceId; use shared::error::InspectWrap; +use crate::dto::indices::IndexQueryParams; use crate::dto::txs::TxQueryParams; use crate::error::tx::TxError; use crate::response::tx::TxResponse; @@ -26,3 +27,19 @@ pub async fn get_tx( Ok(Json(TxResponse::new(txs))) } + +#[debug_handler] +pub async fn get_tx_by_indices( + _trace_id: TraceId, + State(state): State, + Query(query_params): Query, +) -> Result, TxError> { + let txs = state + .tx_service + .get_txs_by_indices(query_params.indices) + .await + .inspect_wrap("get_txs_by_indices", |err| { + TxError::Database(err.to_string()) + })?; + Ok(Json(TxResponse::new(txs))) +} diff --git a/webserver/src/repository/tx.rs b/webserver/src/repository/tx.rs index 3cebae4..21237f7 100644 --- a/webserver/src/repository/tx.rs +++ b/webserver/src/repository/tx.rs @@ -21,6 +21,11 @@ pub trait TxRepositoryTrait { from_block_height: i32, to_block_height: i32, ) -> anyhow::Result>; + + async fn get_txs_by_indices( + &self, + indices: Vec<[i32; 2]>, + ) -> anyhow::Result>; } impl TxRepositoryTrait for TxRepository { @@ -80,4 +85,61 @@ impl TxRepositoryTrait for TxRepository { .await .context_db_interact_error()? } + + async fn get_txs_by_indices( + &self, + indices: Vec<[i32; 2]>, + ) -> anyhow::Result> { + let conn = self.app_state.get_db_connection().await.context( + "Failed to retrieve connection from the pool of database \ + connections", + )?; + let to_block_height = + indices.iter().map(|ix| ix[0]).max().unwrap_or_default(); + + conn.interact(move |conn| { + conn.build_transaction().read_only().run(move |conn| { + let block_height: i32 = chain_state::table + .select(chain_state::dsl::block_height) + .get_result(conn) + .optional() + .with_context(|| { + "Failed to get the latest block height from the \ + database" + })? + .unwrap_or_default(); + if block_height < to_block_height { + anyhow::bail!( + "Requested indices contains {to_block_height}, which \ + exceeds latest block height ({block_height})." + ) + } + let mut query = tx::table.into_boxed(); + for [height, block_index] in &indices { + query = query.or_filter( + tx::dsl::block_height + .eq(height) + .and(tx::dsl::block_index.eq(block_index)), + ); + } + query + .order_by(( + tx::dsl::block_height.asc(), + tx::dsl::block_index.asc(), + tx::dsl::masp_tx_index.asc(), + )) + .select(TxDb::as_select()) + .get_results(conn) + .with_context(|| { + format!( + "Failed to get transations from the database with \ + indices {:?}", + indices + ) + }) + }) + }) + .await + .context_db_interact_error()? + } } diff --git a/webserver/src/service/tx.rs b/webserver/src/service/tx.rs index 365dd90..dbbd0f9 100644 --- a/webserver/src/service/tx.rs +++ b/webserver/src/service/tx.rs @@ -1,6 +1,7 @@ use itertools::Itertools; use crate::appstate::AppState; +use crate::dto::indices::Index; use crate::repository::tx::{TxRepository, TxRepositoryTrait}; #[derive(Clone)] @@ -49,4 +50,40 @@ impl TxService { }) .collect::>()) } + + pub async fn get_txs_by_indices( + &self, + indices: Vec, + ) -> anyhow::Result< + impl IntoIterator)>, u64, u64)>, + > { + Ok(self + .tx_repo + .get_txs_by_indices( + indices + .into_iter() + .map(|ix| [ix.height as i32, ix.block_index as i32]) + .collect(), + ) + .await? + .into_iter() + .chunk_by(|tx| { + // NB: group batched txs by their slot in a block + (tx.block_height, tx.block_index) + }) + .into_iter() + .map(|((block_height, block_index), tx_batch)| { + let tx_batch: Vec<_> = tx_batch + .map(|tx| { + ( + tx.masp_tx_index as u64, + tx.is_masp_fee_payment, + tx.tx_bytes, + ) + }) + .collect(); + (tx_batch, block_height as u64, block_index as u64) + }) + .collect::>()) + } } From 4a59dd48c12b7bab7c536831b49d330ec93e157a Mon Sep 17 00:00:00 2001 From: satan Date: Tue, 29 Apr 2025 14:51:16 +0200 Subject: [PATCH 37/39] Changed the parsing of the index query api endpoint --- webserver/src/dto/indices.rs | 84 ++++++++++++++++++++++++++++++++++++ webserver/src/error/tx.rs | 3 ++ webserver/src/handler/tx.rs | 5 ++- 3 files changed, 90 insertions(+), 2 deletions(-) diff --git a/webserver/src/dto/indices.rs b/webserver/src/dto/indices.rs index 5579058..3000861 100644 --- a/webserver/src/dto/indices.rs +++ b/webserver/src/dto/indices.rs @@ -1,6 +1,9 @@ +use axum::extract::RawQuery; use serde::{Deserialize, Serialize}; use validator::Validate; +use crate::error::tx::TxError; + #[derive(Clone, Serialize, Deserialize, Validate)] pub struct IndexQueryParams { #[validate(length(min = 1, max = 30))] @@ -14,3 +17,84 @@ pub struct Index { #[validate(range(min = 0))] pub block_index: u32, } + +impl TryFrom for IndexQueryParams { + type Error = TxError; + + fn try_from(raw: RawQuery) -> Result { + let Some(query) = raw.0 else { + return Err(Self::Error::RawQuery( + "Received empty indices".to_string(), + )); + }; + + let mut parts = query.split('&'); + let heights = parts + .next() + .ok_or_else(|| { + TxError::RawQuery( + "Indices argument requires heights and block_indices \ + separated by an '&'" + .to_string(), + ) + })? + .strip_prefix("heights=") + .ok_or_else(|| { + TxError::RawQuery( + "Expected argument name `heights=`".to_string(), + ) + })?; + let block_indices = parts + .next() + .ok_or_else(|| { + TxError::RawQuery( + "Indices argument requires heights and block_indices \ + separated by an '&'" + .to_string(), + ) + })? + .strip_prefix("block_indices=") + .ok_or_else(|| { + TxError::RawQuery( + "Expected argument name `block_indices=`".to_string(), + ) + })?; + let heights = heights + .split('.') + .map(|s| { + s.parse::().map_err(|_| { + TxError::RawQuery(format!( + "Could not parse {s} as block height" + )) + }) + }) + .collect::, _>>()?; + let block_indices = block_indices + .split('.') + .map(|s| { + s.parse::().map_err(|_| { + TxError::RawQuery(format!( + "Could not parse {s} as block height" + )) + }) + }) + .collect::, _>>()?; + if heights.len() != block_indices.len() { + Err(TxError::RawQuery( + "Number of block heights and block indices must be equal" + .to_string(), + )) + } else { + Ok(Self { + indices: heights + .into_iter() + .zip(block_indices) + .map(|(h, ix)| Index { + height: h, + block_index: ix, + }) + .collect(), + }) + } + } +} diff --git a/webserver/src/error/tx.rs b/webserver/src/error/tx.rs index 8b69934..52102de 100644 --- a/webserver/src/error/tx.rs +++ b/webserver/src/error/tx.rs @@ -8,12 +8,15 @@ use crate::response::api::ApiErrorResponse; pub enum TxError { #[error("Database error: {0}")] Database(String), + #[error("Error parsine API query: {0}")] + RawQuery(String), } impl IntoResponse for TxError { fn into_response(self) -> Response { let status_code = match &self { TxError::Database(_) => StatusCode::INTERNAL_SERVER_ERROR, + TxError::RawQuery(_) => StatusCode::BAD_REQUEST, }; ApiErrorResponse::send(status_code.as_u16(), Some(self.to_string())) } diff --git a/webserver/src/handler/tx.rs b/webserver/src/handler/tx.rs index 33d482d..adaef3a 100644 --- a/webserver/src/handler/tx.rs +++ b/webserver/src/handler/tx.rs @@ -1,5 +1,5 @@ use axum::Json; -use axum::extract::{Query, State}; +use axum::extract::{Query, RawQuery, State}; use axum_macros::debug_handler; use axum_trace_id::TraceId; use shared::error::InspectWrap; @@ -32,8 +32,9 @@ pub async fn get_tx( pub async fn get_tx_by_indices( _trace_id: TraceId, State(state): State, - Query(query_params): Query, + raw_query: RawQuery, ) -> Result, TxError> { + let query_params = IndexQueryParams::try_from(raw_query)?; let txs = state .tx_service .get_txs_by_indices(query_params.indices) From ead51b8f88415a336f4bf4cf9ef75924bb0adfe8 Mon Sep 17 00:00:00 2001 From: satan Date: Tue, 29 Apr 2025 16:12:40 +0200 Subject: [PATCH 38/39] Small api fixes --- webserver/src/dto/indices.rs | 19 ++++++++++++------- webserver/src/error/tx.rs | 5 ++++- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/webserver/src/dto/indices.rs b/webserver/src/dto/indices.rs index 3000861..84bb4d2 100644 --- a/webserver/src/dto/indices.rs +++ b/webserver/src/dto/indices.rs @@ -74,7 +74,7 @@ impl TryFrom for IndexQueryParams { .map(|s| { s.parse::().map_err(|_| { TxError::RawQuery(format!( - "Could not parse {s} as block height" + "Could not parse {s} as block index" )) }) }) @@ -85,16 +85,21 @@ impl TryFrom for IndexQueryParams { .to_string(), )) } else { - Ok(Self { + let parsed = Self { indices: heights .into_iter() .zip(block_indices) - .map(|(h, ix)| Index { - height: h, - block_index: ix, + .map(|(h, ix)| { + let ix = Index { + height: h, + block_index: ix, + }; + ix.validate().map_err(TxError::Validation).map(|_| ix) }) - .collect(), - }) + .collect::, _>>()?, + }; + parsed.validate().map_err(TxError::Validation)?; + Ok(parsed) } } } diff --git a/webserver/src/error/tx.rs b/webserver/src/error/tx.rs index 52102de..ca59d81 100644 --- a/webserver/src/error/tx.rs +++ b/webserver/src/error/tx.rs @@ -8,8 +8,10 @@ use crate::response::api::ApiErrorResponse; pub enum TxError { #[error("Database error: {0}")] Database(String), - #[error("Error parsine API query: {0}")] + #[error("Error parsing API query: {0}")] RawQuery(String), + #[error("Failed to validate API query: {0}")] + Validation(validator::ValidationErrors), } impl IntoResponse for TxError { @@ -17,6 +19,7 @@ impl IntoResponse for TxError { let status_code = match &self { TxError::Database(_) => StatusCode::INTERNAL_SERVER_ERROR, TxError::RawQuery(_) => StatusCode::BAD_REQUEST, + TxError::Validation(_) => StatusCode::BAD_REQUEST, }; ApiErrorResponse::send(status_code.as_u16(), Some(self.to_string())) } From b7c4fe7360d8735f3c83261953561ac414f6fa61 Mon Sep 17 00:00:00 2001 From: satan Date: Wed, 30 Apr 2025 11:23:20 +0200 Subject: [PATCH 39/39] Cleanup up arg parsing and improved validation --- webserver/src/dto/indices.rs | 88 +++++++++++++++++++++--------------- webserver/src/error/tx.rs | 2 +- 2 files changed, 53 insertions(+), 37 deletions(-) diff --git a/webserver/src/dto/indices.rs b/webserver/src/dto/indices.rs index 84bb4d2..05d31bc 100644 --- a/webserver/src/dto/indices.rs +++ b/webserver/src/dto/indices.rs @@ -1,3 +1,5 @@ +use std::collections::{HashMap, HashSet}; + use axum::extract::RawQuery; use serde::{Deserialize, Serialize}; use validator::Validate; @@ -6,7 +8,7 @@ use crate::error::tx::TxError; #[derive(Clone, Serialize, Deserialize, Validate)] pub struct IndexQueryParams { - #[validate(length(min = 1, max = 30))] + #[validate(length(min = 1))] pub indices: Vec, } @@ -27,38 +29,15 @@ impl TryFrom for IndexQueryParams { "Received empty indices".to_string(), )); }; - - let mut parts = query.split('&'); - let heights = parts - .next() - .ok_or_else(|| { - TxError::RawQuery( - "Indices argument requires heights and block_indices \ - separated by an '&'" - .to_string(), - ) - })? - .strip_prefix("heights=") - .ok_or_else(|| { - TxError::RawQuery( - "Expected argument name `heights=`".to_string(), - ) - })?; - let block_indices = parts - .next() - .ok_or_else(|| { - TxError::RawQuery( - "Indices argument requires heights and block_indices \ - separated by an '&'" - .to_string(), - ) - })? - .strip_prefix("block_indices=") - .ok_or_else(|| { - TxError::RawQuery( - "Expected argument name `block_indices=`".to_string(), - ) - })?; + let args = ArgParser::parse(&query).map_err(TxError::RawQuery)?; + let heights = args.0.get("heights").ok_or_else(|| { + TxError::RawQuery("Expected argument name `heights`".to_string()) + })?; + let block_indices = args.0.get("block_indices").ok_or_else(|| { + TxError::RawQuery( + "Expected argument name `block_indices`".to_string(), + ) + })?; let heights = heights .split('.') .map(|s| { @@ -85,6 +64,7 @@ impl TryFrom for IndexQueryParams { .to_string(), )) } else { + let mut distinct_heights = HashSet::new(); let parsed = Self { indices: heights .into_iter() @@ -94,12 +74,48 @@ impl TryFrom for IndexQueryParams { height: h, block_index: ix, }; - ix.validate().map_err(TxError::Validation).map(|_| ix) + distinct_heights.insert(h); + ix.validate() + .map_err(|e| TxError::Validation(e.to_string())) + .map(|_| ix) }) .collect::, _>>()?, }; - parsed.validate().map_err(TxError::Validation)?; - Ok(parsed) + if distinct_heights.len() > 30 { + Err(TxError::Validation( + "Cannot request more than 30 unique block heights" + .to_string(), + )) + } else { + parsed + .validate() + .map_err(|e| TxError::Validation(e.to_string()))?; + Ok(parsed) + } + } + } +} + +#[derive(Default)] +struct ArgParser<'a>(HashMap<&'a str, &'a str>); + +impl<'b> ArgParser<'b> { + fn parse<'a>(input: &'a str) -> Result, String> + where + 'a: 'b, + { + let mut args = Self::default(); + for kv_pair in input.split('&') { + if let Ok([k, v]) = + <[&str; 2]>::try_from(kv_pair.split('=').collect::>()) + { + args.0.insert(k, v); + } else { + return Err("Could not parse one of the arguments with \ + expected format key=value" + .to_string()); + } } + Ok(args) } } diff --git a/webserver/src/error/tx.rs b/webserver/src/error/tx.rs index ca59d81..819cb1a 100644 --- a/webserver/src/error/tx.rs +++ b/webserver/src/error/tx.rs @@ -11,7 +11,7 @@ pub enum TxError { #[error("Error parsing API query: {0}")] RawQuery(String), #[error("Failed to validate API query: {0}")] - Validation(validator::ValidationErrors), + Validation(String), } impl IntoResponse for TxError {