diff --git a/.cargo/config b/.cargo/config.toml similarity index 60% rename from .cargo/config rename to .cargo/config.toml index 404305d73c..ca86dd1a99 100644 --- a/.cargo/config +++ b/.cargo/config.toml @@ -1,3 +1,4 @@ [build] # Enable Tokio's `tracing` support for `tokio-console` -rustflags = ["--cfg", "tokio_unstable"] \ No newline at end of file +rustflags = ["--cfg", "tokio_unstable"] + diff --git a/.changelog/unreleased/bug-fixes/ibc-relayer-cli/3893-fix-min-gas-price-healthcheck.md b/.changelog/unreleased/bug-fixes/ibc-relayer-cli/3893-fix-min-gas-price-healthcheck.md new file mode 100644 index 0000000000..abe83a3a1a --- /dev/null +++ b/.changelog/unreleased/bug-fixes/ibc-relayer-cli/3893-fix-min-gas-price-healthcheck.md @@ -0,0 +1,2 @@ +- Fixed `minimum-gas-prices` health-check messages and make it more verbose and legible + ([\#3893](https://github.com/informalsystems/hermes/issues/3893)) diff --git a/.changelog/unreleased/bug-fixes/ibc-relayer-cli/3910-fix-subscribe-bug.md b/.changelog/unreleased/bug-fixes/ibc-relayer-cli/3910-fix-subscribe-bug.md new file mode 100644 index 0000000000..065ca533fe --- /dev/null +++ b/.changelog/unreleased/bug-fixes/ibc-relayer-cli/3910-fix-subscribe-bug.md @@ -0,0 +1,2 @@ +- Set `compat_mode` for pull mode in `hermes listen` command + ([\#3910](https://github.com/informalsystems/hermes/issues/3910)) \ No newline at end of file diff --git a/.changelog/unreleased/features/ibc-relayer/3894-continue-event-sourcing.md b/.changelog/unreleased/features/ibc-relayer/3894-continue-event-sourcing.md new file mode 100644 index 0000000000..9fcff6427e --- /dev/null +++ b/.changelog/unreleased/features/ibc-relayer/3894-continue-event-sourcing.md @@ -0,0 +1,6 @@ +- Improve reliabily of event source in `pull` mode by proceeding to next block even if Hermes cannot parse the current block. + Add new configuration option to `event_source` setting: `max_retries` defines how many times Hermes should attempt to pull a block over RPC. + ```toml + event_source = { mode = 'pull', interval = '1s', max_retries = 4 } + ``` + ([\#3894](https://github.com/informalsystems/hermes/issues/3894)) diff --git a/.changelog/unreleased/improvements/ibc-relayer-cli/3913-config-auto-pull.md b/.changelog/unreleased/improvements/ibc-relayer-cli/3913-config-auto-pull.md new file mode 100644 index 0000000000..c19c7f34d6 --- /dev/null +++ b/.changelog/unreleased/improvements/ibc-relayer-cli/3913-config-auto-pull.md @@ -0,0 +1,2 @@ +- Use RPC (pull) event source instead of WebSocket (push) when generating configuration with `hermes config auto` + ([\#3913](https://github.com/informalsystems/hermes/issues/3913)) diff --git a/.changelog/v1.8.1/bug-fixes/ibc-relayer/3770-non-utf8-packet-data.md b/.changelog/v1.8.1/bug-fixes/ibc-relayer/3770-non-utf8-packet-data.md new file mode 100644 index 0000000000..eae49f1583 --- /dev/null +++ b/.changelog/v1.8.1/bug-fixes/ibc-relayer/3770-non-utf8-packet-data.md @@ -0,0 +1,6 @@ +- Allow relaying ICS-04 packets with non-UTF-8 payloads ([\#3770](https://github.com/informalsystems/hermes/issues/3770)) + Hermes does not assume anymore that an ICS-04 packet data is valid UTF-8, + by using the `packet_data_hex` attribute when assembling a packet from events, instead of the deprecated `packet_data` attribute. + Relying on the `packet_data` attribute enforces a UTF-8 encoded payload (eg. JSON), disallowing eg. Protobuf-encoded payloads. + The `packet_data` attribute [has been deprecated][0] in favor of `packet_data_hex` since IBC-Go v1.0.0. + [0]: https://github.com/cosmos/ibc-go/blob/fadf8f2b0ab184798d021d220d877e00c7634e26/CHANGELOG.md?plain=1#L1417 diff --git a/.changelog/v1.8.1/bug-fixes/ibc-relayer/3831-better-compat-check.md b/.changelog/v1.8.1/bug-fixes/ibc-relayer/3831-better-compat-check.md new file mode 100644 index 0000000000..b533e98fe6 --- /dev/null +++ b/.changelog/v1.8.1/bug-fixes/ibc-relayer/3831-better-compat-check.md @@ -0,0 +1,2 @@ +- Improve reliability of compatibility check and fix parsing of expected modules + versions ([\#3831](https://github.com/informalsystems/hermes/issues/3831)) \ No newline at end of file diff --git a/.changelog/v1.8.1/features/ibc-relayer/3754-filter-packet-clearing.md b/.changelog/v1.8.1/features/ibc-relayer/3754-filter-packet-clearing.md new file mode 100644 index 0000000000..bdf29e069e --- /dev/null +++ b/.changelog/v1.8.1/features/ibc-relayer/3754-filter-packet-clearing.md @@ -0,0 +1,5 @@ +- Add a per-chain configuration `excluded_sequences` allowing + users to specify a list of packet sequences which will not be + cleared. + This configuration has no impact on standard packet relaying. + ([\#3754](https://github.com/informalsystems/hermes/issues/3754)) \ No newline at end of file diff --git a/.changelog/v1.8.1/features/ibc-relayer/3811-relayer-memo-overwrite.md b/.changelog/v1.8.1/features/ibc-relayer/3811-relayer-memo-overwrite.md new file mode 100644 index 0000000000..6a3a649a9e --- /dev/null +++ b/.changelog/v1.8.1/features/ibc-relayer/3811-relayer-memo-overwrite.md @@ -0,0 +1,3 @@ +- Add a per-chain configuration `memo_overwrite` allowing users + to overwrite the relayer memo used for each transaction + ([\#3811](https://github.com/informalsystems/hermes/issues/3811)) \ No newline at end of file diff --git a/.changelog/v1.8.1/features/ibc-telemetry/3845-add-simulate-errors-metric.md b/.changelog/v1.8.1/features/ibc-telemetry/3845-add-simulate-errors-metric.md new file mode 100644 index 0000000000..7e83a36b32 --- /dev/null +++ b/.changelog/v1.8.1/features/ibc-telemetry/3845-add-simulate-errors-metric.md @@ -0,0 +1,11 @@ +- Added a new Prometheus metric `simulate_errors` for tracking when a transaction simulation fails, with the following labels: + * `recoverable` (can the execution continue if this happened?) + * `account` (account from which the tx was sent) + * `error_description` (description of the error) + ([\#3845](https://github.com/informalsystems/hermes/issues/3845)) + + ``` + # HELP simulate_errors_total Number of errors observed by Hermes when simulating a Tx + # TYPE simulate_errors_total counter + simulate_errors_total{account="osmo17ndx5qfku28ymxgmq6zq4a6d02dvpfjjul0hyh",error_description="Unknown error",recoverable="false",service_name="unknown_service",otel_scope_name="hermes",otel_scope_version=""} 4 + ``` diff --git a/.changelog/v1.8.1/improvements/3814-grpc-syncing.md b/.changelog/v1.8.1/improvements/3814-grpc-syncing.md new file mode 100644 index 0000000000..877555aa43 --- /dev/null +++ b/.changelog/v1.8.1/improvements/3814-grpc-syncing.md @@ -0,0 +1,3 @@ +- Add syncing check for gRPC node ([#3814]) + +[#3814]: https://github.com/informalsystems/ibc-rs/issues/3814 diff --git a/.changelog/v1.8.1/improvements/3814-status-use-client-latest-height.md b/.changelog/v1.8.1/improvements/3814-status-use-client-latest-height.md new file mode 100644 index 0000000000..bf06bc6f8d --- /dev/null +++ b/.changelog/v1.8.1/improvements/3814-status-use-client-latest-height.md @@ -0,0 +1,3 @@ +- Use the consensus state at client latest height in status CLI ([#3814]) + +[#3814]: https://github.com/informalsystems/ibc-rs/issues/3814 diff --git a/.changelog/v1.8.1/improvements/ibc-relayer/3530-out-of-gas-error-log.md b/.changelog/v1.8.1/improvements/ibc-relayer/3530-out-of-gas-error-log.md new file mode 100644 index 0000000000..f1742da3ed --- /dev/null +++ b/.changelog/v1.8.1/improvements/ibc-relayer/3530-out-of-gas-error-log.md @@ -0,0 +1,4 @@ +- Improve the log diagnostic when an out of gas error is thrown. + And a new entry related to gas error has been added to the Hermes + guide. + ([\#3530](https://github.com/informalsystems/hermes/issues/3530)) \ No newline at end of file diff --git a/.changelog/v1.8.1/improvements/ibc-relayer/3540-ordered-channels-resilience.md b/.changelog/v1.8.1/improvements/ibc-relayer/3540-ordered-channels-resilience.md new file mode 100644 index 0000000000..88899c96f5 --- /dev/null +++ b/.changelog/v1.8.1/improvements/ibc-relayer/3540-ordered-channels-resilience.md @@ -0,0 +1,6 @@ +- Improve resilience when relaying on ordered channels. + When relaying packets on an ordered channel, Hermes will now attempt + to detect whether the next message to send has the sequence number + expected on that channel. If there is a mismatch, then Hermes will trigger a packet + clear on the channel to unblock it before resuming operations on that channel. + ([\#3540](https://github.com/informalsystems/hermes/issues/3540)) diff --git a/.changelog/v1.8.1/improvements/ibc-relayer/3792-legacy-simulation.md b/.changelog/v1.8.1/improvements/ibc-relayer/3792-legacy-simulation.md new file mode 100644 index 0000000000..f09d5088c1 --- /dev/null +++ b/.changelog/v1.8.1/improvements/ibc-relayer/3792-legacy-simulation.md @@ -0,0 +1,2 @@ +- Recover from gas simulation failures on legacy chains. + ([\#3792](https://github.com/informalsystems/hermes/issues/3792)) diff --git a/.changelog/v1.8.1/summary.md b/.changelog/v1.8.1/summary.md new file mode 100644 index 0000000000..40908d602b --- /dev/null +++ b/.changelog/v1.8.1/summary.md @@ -0,0 +1,19 @@ +*March 6th, 2024* + +This release improves reliability when relaying, more enhanced configuration and improved monitoring. + +Reliability has been improved: +* It is now possible to relay ICS-04 packets with non-UTF-8 payloads +* Packet sequences are now verified for ordered channels before trying to relay + +Additional per-chain configurations have been added: +* `excluded_sequences` used to skip problematic packets when clearing +* `memo_overwrite` allowing users to overwrite the relayer memo when chains have a +strict limit for the size of the memo + +Monitoring issues improvements: +* A new metric `simulate_errors` which counts the number of failed simulated transactions +* Out of gas error diagnostic gives more information and a dedicated entry to the guide has been added +* Failed gas simulation will not be considered as unrecoverable for legacy chains +* The compatibility check during the health-check has been improved will assess more correctly the versions + for Ibc-Go and Cosmos SDK diff --git a/.changelog/v1.8.2/bug-fixes/ibc-relayer-cli/3889-clear-packet-cli-fix.md b/.changelog/v1.8.2/bug-fixes/ibc-relayer-cli/3889-clear-packet-cli-fix.md new file mode 100644 index 0000000000..6470abd610 --- /dev/null +++ b/.changelog/v1.8.2/bug-fixes/ibc-relayer-cli/3889-clear-packet-cli-fix.md @@ -0,0 +1,3 @@ +- Correctly use the counterparty channel and port IDs when clearing the packets + from the destination chain to the source chain in the `packet clear` command + ([\#3889](https://github.com/informalsystems/hermes/issues/3889)) \ No newline at end of file diff --git a/.changelog/v1.8.2/bug-fixes/ibc-relayer/3880-health-check-fix.md b/.changelog/v1.8.2/bug-fixes/ibc-relayer/3880-health-check-fix.md new file mode 100644 index 0000000000..e6106fa10a --- /dev/null +++ b/.changelog/v1.8.2/bug-fixes/ibc-relayer/3880-health-check-fix.md @@ -0,0 +1,2 @@ +- Fix parsing of IBC-Go version in health check and improve health check + reporting ([\#3880](https://github.com/informalsystems/hermes/issues/3880)) \ No newline at end of file diff --git a/.changelog/v1.8.2/features/ibc-integration-test/3887-test-with-injective.md b/.changelog/v1.8.2/features/ibc-integration-test/3887-test-with-injective.md new file mode 100644 index 0000000000..5a9981b4e5 --- /dev/null +++ b/.changelog/v1.8.2/features/ibc-integration-test/3887-test-with-injective.md @@ -0,0 +1,2 @@ +- Add Injective chain to the chains running the integration tests in the CI. + ([\#3887](https://github.com/informalsystems/hermes/issues/3887)) \ No newline at end of file diff --git a/.changelog/v1.8.2/improvements/ibc-relayer/3864-handshake-retry.md b/.changelog/v1.8.2/improvements/ibc-relayer/3864-handshake-retry.md new file mode 100644 index 0000000000..45f5e18c86 --- /dev/null +++ b/.changelog/v1.8.2/improvements/ibc-relayer/3864-handshake-retry.md @@ -0,0 +1,3 @@ +- Change connection and channel handshake retry strategy + to retry at most 10 times (5 times per block max) + ([\#3864](https://github.com/informalsystems/hermes/issues/3864)) \ No newline at end of file diff --git a/.changelog/v1.8.2/summary.md b/.changelog/v1.8.2/summary.md new file mode 100644 index 0000000000..fba1f2ac82 --- /dev/null +++ b/.changelog/v1.8.2/summary.md @@ -0,0 +1,6 @@ +*March 12th, 2024* + +This release fixes the two following bugs and improves the connection and channel handshake retry mechanism: + +* Fix erroneous warnings for incompatible version of IBC-Go during health checks, ensuring accurate compatibility reporting +* Fix a bug in the `clear packets` command which caused packet clearing to fail with an "counterparty channel not found" error diff --git a/.github/ISSUE_TEMPLATE/release-template.md b/.github/ISSUE_TEMPLATE/release-template.md index 1a80ba309f..960b3364ab 100644 --- a/.github/ISSUE_TEMPLATE/release-template.md +++ b/.github/ISSUE_TEMPLATE/release-template.md @@ -20,3 +20,4 @@ v without deliberation - [ ] Create a new release in the changelog, using [`unclog`](https://github.com/informalsystems/unclog) - If doing a release candidate (`rc`) version, then skip the `unclog release` step - [ ] Reassign unfinished issues of previous milestone to the next milestone +- [ ] Notify the comms team about the pending new release by tagging [@isa-belch](https://github.com/isa-belch) as a reviewer here diff --git a/.github/codespell/codespell.ini b/.github/codespell/codespell.ini index 681ebbd0f1..a41c2174cf 100644 --- a/.github/codespell/codespell.ini +++ b/.github/codespell/codespell.ini @@ -1,3 +1,3 @@ [codespell] -skip = *.js,*.ts,*.css,*.svg,*.html,*.json,./target,./tools/integration-test/data,./tools/check-guide/target,./ci/misbehaviour/data +skip = *.js,*.ts,*.css,*.svg,*.html,*.json,./target,./tools/integration-test/data,./tools/check-guide/target,./ci/misbehaviour/data,Cargo.lock ignore-words = .github/codespell/words.txt diff --git a/.github/workflows/audit.yaml b/.github/workflows/audit.yaml index e6ad8d0de2..0b43a2a2e5 100644 --- a/.github/workflows/audit.yaml +++ b/.github/workflows/audit.yaml @@ -15,5 +15,7 @@ jobs: path: ~/.cargo/bin key: ${{ runner.os }}-cargo-audit-v0.11.2 - uses: actions-rs/audit-check@v1.2.0 + env: + RUSTFLAGS: --cfg tokio_unstable with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/cargo-doc.yaml b/.github/workflows/cargo-doc.yaml index 447a84341b..3cdeba2fd1 100644 --- a/.github/workflows/cargo-doc.yaml +++ b/.github/workflows/cargo-doc.yaml @@ -16,6 +16,9 @@ on: - Cargo.lock - crates/** +env: + RUSTFLAGS: --cfg tokio_unstable + # Cancel previous runs of this workflow when a new commit is added to the PR, branch or tag concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -26,23 +29,24 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly-2023-07-13 - override: true - + - name: Install rust toolchain + # The script for rustdoc build requires nightly toolchain. + uses: dtolnay/rust-toolchain@nightly + # Loading cache takes ~15s, but saves us minutes of build. + - name: Load rust cache + uses: astriaorg/buildjet-rust-cache@v2.5.1 - name: Build API documentation uses: actions-rs/cargo@v1 env: - RUSTDOCFLAGS: "--cfg docsrs" + RUSTDOCFLAGS: "--enable-index-page -Zunstable-options --cfg docsrs" with: command: doc - args: --all-features - - - name: Push API documentation to GitHub Pages - if: github.ref == 'refs/heads/main' - uses: peaceiris/actions-gh-pages@v3 - with: - deploy_key: ${{ secrets.IBC_RS_DOC_PRIVATE_KEY }} - external_repository: informalsystems/hermes-api-doc - publish_dir: ./target/doc + args: --all-features --no-deps + # Disabled on penumbra hermes fork + # - name: Push API documentation to GitHub Pages + # if: github.ref == 'refs/heads/main' + # uses: peaceiris/actions-gh-pages@v3 + # with: + # deploy_key: ${{ secrets.IBC_RS_DOC_PRIVATE_KEY }} + # external_repository: informalsystems/hermes-api-doc + # publish_dir: ./target/doc diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 6ad483e50d..a543abec29 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -17,6 +17,6 @@ jobs: - uses: actions/checkout@v4 - uses: codespell-project/actions-codespell@v2 with: - skip: '*.js,*.ts,*.css,*.svg,*.html,*.json,./target,./tools/integration-test/data,./tools/check-guide/target,./ci/misbehaviour/data' + skip: '*.js,*.ts,*.css,*.svg,*.html,*.json,./target,./tools/integration-test/data,./tools/check-guide/target,./ci/misbehaviour/data,Cargo.lock' ignore_words_file: .github/codespell/words.txt diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5b3ac9891e..bd2c49c0f2 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -31,6 +31,10 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY_IMAGE }} + tags: | + type=ref,event=tag + type=ref,event=branch + type=semver,pattern={{version}} - name: Set up QEMU uses: docker/setup-qemu-action@v3 @@ -91,6 +95,10 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY_IMAGE }} + tags: | + type=ref,event=tag + type=ref,event=branch + type=semver,pattern={{version}} - name: Login to Docker Hub uses: docker/login-action@v3 diff --git a/.github/workflows/guide-templates.yaml b/.github/workflows/guide-templates.yaml index 5f84e7748d..e31d91bc28 100644 --- a/.github/workflows/guide-templates.yaml +++ b/.github/workflows/guide-templates.yaml @@ -17,6 +17,9 @@ on: - tools/check-guide/** - guide/src/templates/** +env: + RUSTFLAGS: --cfg tokio_unstable + # Cancel previous runs of this workflow when a new commit is added to the PR, branch or tag concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -28,10 +31,9 @@ jobs: timeout-minutes: 60 steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable - override: true - name: Check templates run: bash scripts/auto_gen_templates.sh --mode "check" - uses: actions-rs/cargo@v1 diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index 93223aa70b..f661e7928f 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -31,6 +31,7 @@ env: RUST_BACKTRACE: short CARGO_NET_RETRY: 10 RUSTUP_MAX_RETRIES: 10 + RUSTFLAGS: --cfg tokio_unstable # Cancel previous runs of this workflow when a new commit is added to the PR, branch or tag concurrency: @@ -39,7 +40,7 @@ concurrency: jobs: integration-test: - runs-on: ubuntu-20.04 + runs-on: buildjet-16vcpu-ubuntu-2204 timeout-minutes: 180 strategy: fail-fast: false @@ -95,23 +96,23 @@ jobs: account_prefix: migaloo native_token: stake features: '' + - package: injective + command: injectived + account_prefix: inj + native_token: stake + features: forward-packet,fee-grant steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v25 - with: - install_url: https://nixos-nix-install-tests.cachix.org/serve/vij683ly7sl95nnhb67bdjjfabclr85m/install - install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' - extra_nix_config: | - experimental-features = nix-command flakes - - uses: cachix/cachix-action@v14 - with: - name: cosmos - - uses: actions-rs/toolchain@v1 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + with: + extra-conf: | + substituters = https://cache.nixos.org https://cosmosnix-store.s3.us-east-2.amazonaws.com + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cosmosnix.store-1:O28HneR1MPtgY3WYruWFuXCimRPwY7em5s0iynkQxdk= + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable - override: true - - uses: Swatinem/rust-cache@v2 - uses: actions-rs/cargo@v1 with: command: test @@ -137,20 +138,15 @@ jobs: timeout-minutes: 60 steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v25 - with: - install_url: https://nixos-nix-install-tests.cachix.org/serve/vij683ly7sl95nnhb67bdjjfabclr85m/install - install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' - extra_nix_config: | - experimental-features = nix-command flakes - - uses: cachix/cachix-action@v14 - with: - name: cosmos - - uses: actions-rs/toolchain@v1 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + with: + extra-conf: | + substituters = https://cache.nixos.org https://cosmosnix-store.s3.us-east-2.amazonaws.com + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cosmosnix.store-1:O28HneR1MPtgY3WYruWFuXCimRPwY7em5s0iynkQxdk= + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable - override: true - - uses: Swatinem/rust-cache@v2 - uses: actions-rs/cargo@v1 with: command: test @@ -181,20 +177,15 @@ jobs: account_prefix: cosmos,neutron steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v25 - with: - install_url: https://nixos-nix-install-tests.cachix.org/serve/vij683ly7sl95nnhb67bdjjfabclr85m/install - install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' - extra_nix_config: | - experimental-features = nix-command flakes - - uses: cachix/cachix-action@v14 - with: - name: cosmos - - uses: actions-rs/toolchain@v1 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + with: + extra-conf: | + substituters = https://cache.nixos.org https://cosmosnix-store.s3.us-east-2.amazonaws.com + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cosmosnix.store-1:O28HneR1MPtgY3WYruWFuXCimRPwY7em5s0iynkQxdk= + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable - override: true - - uses: Swatinem/rust-cache@v2 - uses: actions-rs/cargo@v1 with: command: test @@ -227,20 +218,15 @@ jobs: account_prefix: cosmos,stride steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v25 - with: - install_url: https://nixos-nix-install-tests.cachix.org/serve/vij683ly7sl95nnhb67bdjjfabclr85m/install - install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' - extra_nix_config: | - experimental-features = nix-command flakes - - uses: cachix/cachix-action@v14 - with: - name: cosmos - - uses: actions-rs/toolchain@v1 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + with: + extra-conf: | + substituters = https://cache.nixos.org https://cosmosnix-store.s3.us-east-2.amazonaws.com + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cosmosnix.store-1:O28HneR1MPtgY3WYruWFuXCimRPwY7em5s0iynkQxdk= + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable - override: true - - uses: Swatinem/rust-cache@v2 - uses: actions-rs/cargo@v1 with: command: test @@ -273,20 +259,15 @@ jobs: account_prefix: cosmos,stride steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v25 - with: - install_url: https://nixos-nix-install-tests.cachix.org/serve/vij683ly7sl95nnhb67bdjjfabclr85m/install - install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' - extra_nix_config: | - experimental-features = nix-command flakes - - uses: cachix/cachix-action@v14 - with: - name: cosmos - - uses: actions-rs/toolchain@v1 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + with: + extra-conf: | + substituters = https://cache.nixos.org https://cosmosnix-store.s3.us-east-2.amazonaws.com + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cosmosnix.store-1:O28HneR1MPtgY3WYruWFuXCimRPwY7em5s0iynkQxdk= + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable - override: true - - uses: Swatinem/rust-cache@v2 - uses: actions-rs/cargo@v1 with: command: test @@ -320,20 +301,15 @@ jobs: native_token: utia,stake steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v25 - with: - install_url: https://nixos-nix-install-tests.cachix.org/serve/vij683ly7sl95nnhb67bdjjfabclr85m/install - install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' - extra_nix_config: | - experimental-features = nix-command flakes - - uses: cachix/cachix-action@v14 - with: - name: cosmos - - uses: actions-rs/toolchain@v1 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + with: + extra-conf: | + substituters = https://cache.nixos.org https://cosmosnix-store.s3.us-east-2.amazonaws.com + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cosmosnix.store-1:O28HneR1MPtgY3WYruWFuXCimRPwY7em5s0iynkQxdk= + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable - override: true - - uses: Swatinem/rust-cache@v2 - uses: actions-rs/cargo@v1 with: command: test @@ -362,20 +338,15 @@ jobs: - gaia6 steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v25 - with: - install_url: https://nixos-nix-install-tests.cachix.org/serve/vij683ly7sl95nnhb67bdjjfabclr85m/install - install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' - extra_nix_config: | - experimental-features = nix-command flakes - - uses: cachix/cachix-action@v14 - with: - name: cosmos - - uses: actions-rs/toolchain@v1 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + with: + extra-conf: | + substituters = https://cache.nixos.org https://cosmosnix-store.s3.us-east-2.amazonaws.com + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cosmosnix.store-1:O28HneR1MPtgY3WYruWFuXCimRPwY7em5s0iynkQxdk= + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable - override: true - - uses: Swatinem/rust-cache@v2 - uses: actions-rs/cargo@v1 with: command: test diff --git a/.github/workflows/misbehaviour.yml b/.github/workflows/misbehaviour.yml index 629ce08faf..cdd5c5f3d8 100644 --- a/.github/workflows/misbehaviour.yml +++ b/.github/workflows/misbehaviour.yml @@ -29,6 +29,7 @@ env: RUST_BACKTRACE: short CARGO_NET_RETRY: 10 RUSTUP_MAX_RETRIES: 10 + RUSTFLAGS: --cfg tokio_unstable # Cancel previous runs of this workflow when a new commit is added to the PR, branch or tag concurrency: @@ -49,16 +50,13 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install Nix - uses: cachix/install-nix-action@v25 - with: - extra_nix_config: | - experimental-features = nix-command flakes - - name: Use cachix cache - uses: cachix/cachix-action@v14 - with: - name: cosmos + uses: DeterminateSystems/nix-installer-action@main + with: + extra-conf: | + substituters = https://cache.nixos.org https://cosmosnix-store.s3.us-east-2.amazonaws.com + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cosmosnix.store-1:O28HneR1MPtgY3WYruWFuXCimRPwY7em5s0iynkQxdk= - name: Install sconfig - uses: jaxxstorm/action-install-gh-release@v1.10.0 + uses: jaxxstorm/action-install-gh-release@v1.11.0 with: repo: freshautomations/sconfig platform: linux @@ -67,7 +65,7 @@ jobs: rename-to: sconfig chmod: 0755 - name: Install stoml - uses: jaxxstorm/action-install-gh-release@v1.10.0 + uses: jaxxstorm/action-install-gh-release@v1.11.0 with: repo: freshautomations/stoml platform: linux @@ -76,12 +74,9 @@ jobs: rename-to: stoml chmod: 0755 - name: Install Rust - uses: actions-rs/toolchain@v1 + uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable - override: true - - name: Use Rust cache - uses: Swatinem/rust-cache@v2 - name: Build Hermes uses: actions-rs/cargo@v1 with: @@ -103,16 +98,13 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install Nix - uses: cachix/install-nix-action@v25 - with: - extra_nix_config: | - experimental-features = nix-command flakes - - name: Use cachix cache - uses: cachix/cachix-action@v14 - with: - name: cosmos + uses: DeterminateSystems/nix-installer-action@main + with: + extra-conf: | + substituters = https://cache.nixos.org https://cosmosnix-store.s3.us-east-2.amazonaws.com + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cosmosnix.store-1:O28HneR1MPtgY3WYruWFuXCimRPwY7em5s0iynkQxdk= - name: Install sconfig - uses: jaxxstorm/action-install-gh-release@v1.10.0 + uses: jaxxstorm/action-install-gh-release@v1.11.0 with: repo: freshautomations/sconfig platform: linux @@ -121,7 +113,7 @@ jobs: rename-to: sconfig chmod: 0755 - name: Install stoml - uses: jaxxstorm/action-install-gh-release@v1.10.0 + uses: jaxxstorm/action-install-gh-release@v1.11.0 with: repo: freshautomations/stoml platform: linux @@ -130,12 +122,9 @@ jobs: rename-to: stoml chmod: 0755 - name: Install Rust - uses: actions-rs/toolchain@v1 + uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable - override: true - - name: Use Rust cache - uses: Swatinem/rust-cache@v2 - name: Build Hermes uses: actions-rs/cargo@v1 with: @@ -157,16 +146,13 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install Nix - uses: cachix/install-nix-action@v25 - with: - extra_nix_config: | - experimental-features = nix-command flakes - - name: Use cachix cache - uses: cachix/cachix-action@v14 - with: - name: cosmos + uses: DeterminateSystems/nix-installer-action@main + with: + extra-conf: | + substituters = https://cache.nixos.org https://cosmosnix-store.s3.us-east-2.amazonaws.com + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cosmosnix.store-1:O28HneR1MPtgY3WYruWFuXCimRPwY7em5s0iynkQxdk= - name: Install sconfig - uses: jaxxstorm/action-install-gh-release@v1.10.0 + uses: jaxxstorm/action-install-gh-release@v1.11.0 with: repo: freshautomations/sconfig platform: linux @@ -175,7 +161,7 @@ jobs: rename-to: sconfig chmod: 0755 - name: Install stoml - uses: jaxxstorm/action-install-gh-release@v1.10.0 + uses: jaxxstorm/action-install-gh-release@v1.11.0 with: repo: freshautomations/stoml platform: linux @@ -184,12 +170,9 @@ jobs: rename-to: stoml chmod: 0755 - name: Install Rust - uses: actions-rs/toolchain@v1 + uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable - override: true - - name: Use Rust cache - uses: Swatinem/rust-cache@v2 - name: Build Hermes uses: actions-rs/cargo@v1 with: @@ -212,16 +195,13 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install Nix - uses: cachix/install-nix-action@v25 - with: - extra_nix_config: | - experimental-features = nix-command flakes - - name: Use cachix cache - uses: cachix/cachix-action@v14 - with: - name: cosmos + uses: DeterminateSystems/nix-installer-action@main + with: + extra-conf: | + substituters = https://cache.nixos.org https://cosmosnix-store.s3.us-east-2.amazonaws.com + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cosmosnix.store-1:O28HneR1MPtgY3WYruWFuXCimRPwY7em5s0iynkQxdk= - name: Install sconfig - uses: jaxxstorm/action-install-gh-release@v1.10.0 + uses: jaxxstorm/action-install-gh-release@v1.11.0 with: repo: freshautomations/sconfig platform: linux @@ -230,7 +210,7 @@ jobs: rename-to: sconfig chmod: 0755 - name: Install stoml - uses: jaxxstorm/action-install-gh-release@v1.10.0 + uses: jaxxstorm/action-install-gh-release@v1.11.0 with: repo: freshautomations/stoml platform: linux @@ -239,12 +219,9 @@ jobs: rename-to: stoml chmod: 0755 - name: Install Rust - uses: actions-rs/toolchain@v1 + uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable - override: true - - name: Use Rust cache - uses: Swatinem/rust-cache@v2 - name: Build Hermes uses: actions-rs/cargo@v1 with: diff --git a/.github/workflows/multi-chains.yaml b/.github/workflows/multi-chains.yaml index bfb75fc399..af11054a30 100644 --- a/.github/workflows/multi-chains.yaml +++ b/.github/workflows/multi-chains.yaml @@ -37,6 +37,7 @@ env: RUST_BACKTRACE: short CARGO_NET_RETRY: 10 RUSTUP_MAX_RETRIES: 10 + RUSTFLAGS: --cfg tokio_unstable # Cancel previous runs of this workflow when a new commit is added to the PR, branch or tag concurrency: @@ -80,23 +81,21 @@ jobs: - package: wasmd command: wasmd account_prefix: wasm + - package: injective + command: injectived + account_prefix: inj steps: - uses: actions/checkout@v4 - - uses: cachix/install-nix-action@v25 - with: - install_url: https://nixos-nix-install-tests.cachix.org/serve/vij683ly7sl95nnhb67bdjjfabclr85m/install - install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve' - extra_nix_config: | - experimental-features = nix-command flakes - - uses: cachix/cachix-action@v14 - with: - name: cosmos - - uses: actions-rs/toolchain@v1 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + with: + extra-conf: | + substituters = https://cache.nixos.org https://cosmosnix-store.s3.us-east-2.amazonaws.com + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cosmosnix.store-1:O28HneR1MPtgY3WYruWFuXCimRPwY7em5s0iynkQxdk= + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable - override: true - - uses: Swatinem/rust-cache@v2 - uses: actions-rs/cargo@v1 with: command: test diff --git a/.github/workflows/publish-dry-run.yml b/.github/workflows/publish-dry-run.yml index 9689c0d1f0..2f22b4d851 100644 --- a/.github/workflows/publish-dry-run.yml +++ b/.github/workflows/publish-dry-run.yml @@ -11,10 +11,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable - override: true - uses: katyo/publish-crates@v2 with: dry-run: true diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 29b0e03d40..42106466c5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -11,10 +11,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable - override: true - uses: katyo/publish-crates@v2 with: registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 49acf5017c..39e1c1c3c5 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -27,6 +27,7 @@ env: RUST_BACKTRACE: short CARGO_NET_RETRY: 10 RUSTUP_MAX_RETRIES: 10 + RUSTFLAGS: -D warnings --cfg tokio_unstable # Cancel previous runs of this workflow when a new commit is added to the PR, branch or tag concurrency: @@ -38,10 +39,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable - override: true - uses: actions-rs/cargo@v1 with: command: fmt @@ -51,12 +51,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable components: clippy - override: true - - uses: Swatinem/rust-cache@v2 - uses: actions-rs/clippy-check@v1 with: name: clippy-all-features @@ -67,12 +65,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable components: clippy - override: true - - uses: Swatinem/rust-cache@v2 - uses: actions-rs/clippy-check@v1 with: name: clippy-no-default-features @@ -84,11 +80,9 @@ jobs: timeout-minutes: 30 steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v1 with: toolchain: stable - override: true - - uses: Swatinem/rust-cache@v2 - name: Install cargo-nextest run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin - uses: actions-rs/cargo@v1 @@ -100,13 +94,27 @@ jobs: command: nextest args: run --all-features --no-fail-fast --workspace --exclude ibc-integration-test --no-capture + msrv: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + - name: Install cargo-binstall + uses: taiki-e/install-action@cargo-binstall + - name: Install cargo-msrv + run: cargo binstall --no-confirm --force cargo-msrv@0.16.0-beta.20 + - name: Check MSRV + run: cargo msrv verify --output-format minimal --manifest-path crates/relayer-cli/Cargo.toml -- 'cargo check --all-features' + # test-coverage: # runs-on: ubuntu-latest # steps: # - uses: actions/checkout@v4 # with: # fetch-depth: 0 - # - uses: actions-rs/toolchain@v1 + # - uses: actions-rust-lang/setup-rust-toolchain@v1 # with: # toolchain: stable # override: true diff --git a/CHANGELOG.md b/CHANGELOG.md index e9328dfc7d..cdd396a273 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,108 @@ # CHANGELOG +## v1.8.2 + +*March 12th, 2024* + +This release fixes the two following bugs and improves the connection and channel handshake retry mechanism: + +* Fix erroneous warnings for incompatible version of IBC-Go during health checks, ensuring accurate compatibility reporting +* Fix a bug in the `clear packets` command which caused packet clearing to fail with an "counterparty channel not found" error + +### BUG FIXES + +- [Relayer CLI](relayer-cli) + - Correctly use the counterparty channel and port IDs when clearing the packets + from the destination chain to the source chain in the `packet clear` command + ([\#3889](https://github.com/informalsystems/hermes/issues/3889)) +- [Relayer](relayer) + - Fix parsing of IBC-Go version in health check and improve health check + reporting ([\#3880](https://github.com/informalsystems/hermes/issues/3880)) + +### FEATURES + +- [Integration Test Framework](tools/test-framework) + - Add Injective chain to the chains running the integration tests in the CI. + ([\#3887](https://github.com/informalsystems/hermes/issues/3887)) + +### IMPROVEMENTS + +- [Relayer](relayer) + - Change connection and channel handshake retry strategy + to retry at most 10 times (5 times per block max) + ([\#3864](https://github.com/informalsystems/hermes/issues/3864)) + +## v1.8.1 + +*March 7th, 2024* + +This v1.8.1 release brings better reliability when relaying, more enhanced configuration and improved monitoring. + +Reliability has been improved: +* It is now possible to relay ICS-04 packets with non-UTF-8 payloads +* Packet sequences are now verified for ordered channels before trying to relay + +Additional per-chain configurations have been added: +* `excluded_sequences` used to skip problematic packets when clearing +* `memo_overwrite` allowing users to overwrite the relayer memo when chains have a strict limit for the size of the memo. + +Monitoring issues improvements: +* A new metric `simulate_errors` which counts the number of failed simulated transactions +* Out of gas error diagnostic gives more information and a dedicated entry to the guide has been added +* Failed gas simulation will not be considered as unrecoverable for legacy chains. +* The compatibility check during the health-check has been improved will assess more correctly the versions for Ibc-Go and Cosmos SDK + +Special thanks to our contributors for their valuable additions to this release: + +* Sergey (@freak12techno) for adding the `simulate_errors` metric ([#3845]) +* Martin Dyring-Andersen (@mdyring) for adding recovery from failed gas simulation for legacy chains ([#3792]) + +### BUG FIXES + +- Allow relaying ICS-04 packets with non-UTF-8 payloads ([\#3770](https://github.com/informalsystems/hermes/issues/3770)) + Hermes does not assume anymore that an ICS-04 packet data is valid UTF-8, + by using the `packet_data_hex` attribute when assembling a packet from events, instead of the deprecated `packet_data` attribute. + Relying on the `packet_data` attribute enforces a UTF-8 encoded payload (eg. JSON), disallowing eg. Protobuf-encoded payloads. + The `packet_data` attribute [has been deprecated][0] in favor of `packet_data_hex` since IBC-Go v1.0.0. +- Improve reliability of compatibility check and fix parsing of expected modules versions ([\#3831](https://github.com/informalsystems/hermes/issues/3831)) + +[0]: https://github.com/cosmos/ibc-go/blob/fadf8f2b0ab184798d021d220d877e00c7634e26/CHANGELOG.md?plain=1#L1417 + +### FEATURES + +- Add a per-chain configuration `excluded_sequences` allowing users to specify a list of packet sequences which will not be cleared. + This configuration has no impact on standard packet relaying. + ([\#3754](https://github.com/informalsystems/hermes/issues/3754)) +- Add a per-chain configuration `memo_overwrite` allowing users to overwrite the relayer memo used for each transaction + ([\#3811](https://github.com/informalsystems/hermes/issues/3811)) +- Added a new Prometheus metric `simulate_errors` for tracking when a transaction simulation fails, with the following labels: + ([\#3845](https://github.com/informalsystems/hermes/issues/3845)) + * `recoverable` (can the execution continue if this happened?) + * `account` (account from which the tx was sent) + * `error_description` (description of the error) + + ``` + # HELP simulate_errors_total Number of errors observed by Hermes when simulating a Tx + # TYPE simulate_errors_total counter + simulate_errors_total{account="osmo17ndx5qfku28ymxgmq6zq4a6d02dvpfjjul0hyh",error_description="Unknown error",recoverable="false",service_name="unknown_service",otel_scope_name="hermes",otel_scope_version=""} 4 + ``` + +### IMPROVEMENTS + +- Use the consensus state at client latest height in status CLI ([#3814](https://github.com/informalsystems/ibc-rs/issues/3814)) +- Add syncing check for gRPC node ([#3814](https://github.com/informalsystems/ibc-rs/issues/3814)) +- Improve the log diagnostic when an out of gas error is thrown. + And a new entry related to gas error has been added to the Hermes guide. + ([\#3530](https://github.com/informalsystems/hermes/issues/3530)) +- Improve resilience when relaying on ordered channels. + When relaying packets on an ordered channel, Hermes will now attempt + to detect whether the next message to send has the sequence number + expected on that channel. If there is a mismatch, then Hermes will trigger a packet + clear on the channel to unblock it before resuming operations on that channel. + ([\#3540](https://github.com/informalsystems/hermes/issues/3540)) +- Recover from gas simulation failures on legacy chains. + ([\#3792](https://github.com/informalsystems/hermes/issues/3792)) + ## v1.8.0 *January 23rd, 2024* diff --git a/Cargo.lock b/Cargo.lock index ba685fec7a..183f77dd0d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -35,7 +35,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a3473aa652e90865a06b723102aaa4a54a7d9f2092dbf4582497a61d0537d3f" dependencies = [ "ident_case", - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "syn 1.0.109", "synstructure", @@ -78,9 +78,9 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.7" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if 1.0.0", "once_cell", @@ -90,9 +90,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] @@ -177,15 +177,15 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.80" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "arc-swap" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" [[package]] name = "ark-bls12-377" @@ -287,7 +287,7 @@ checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ "num-bigint", "num-traits", - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "syn 1.0.109", ] @@ -369,7 +369,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "syn 1.0.109", ] @@ -418,22 +418,22 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "astria-core" version = "0.1.0" -source = "git+https://github.com/astriaorg/astria?rev=112a66d6f9bb6638cce4935c949834e1d35416bb#112a66d6f9bb6638cce4935c949834e1d35416bb" +source = "git+https://github.com/astriaorg/astria?rev=b8c981796cba3a2fd89bc659e00161d682734e62#b8c981796cba3a2fd89bc659e00161d682734e62" dependencies = [ "astria-merkle", + "base64 0.21.7", "bytes", + "celestia-tendermint", "ed25519-consensus", - "hex", - "ibc-types", - "indexmap 2.2.5", - "penumbra-ibc", - "penumbra-proto", - "prost 0.12.3", - "prost-types", + "ibc-types 0.12.0", + "indexmap 2.2.6", + "pbjson-types", + "penumbra-ibc 0.69.1", + "penumbra-proto 0.69.1", + "prost 0.12.4", "sha2 0.10.8", - "tendermint 0.32.0", - "tendermint 0.34.1", - "tendermint-proto 0.34.1", + "tendermint", + "tendermint-proto", "thiserror", "tracing", ] @@ -441,7 +441,7 @@ dependencies = [ [[package]] name = "astria-merkle" version = "0.1.0" -source = "git+https://github.com/astriaorg/astria?rev=112a66d6f9bb6638cce4935c949834e1d35416bb#112a66d6f9bb6638cce4935c949834e1d35416bb" +source = "git+https://github.com/astriaorg/astria?rev=b8c981796cba3a2fd89bc659e00161d682734e62#b8c981796cba3a2fd89bc659e00161d682734e62" dependencies = [ "sha2 0.10.8", ] @@ -449,17 +449,20 @@ dependencies = [ [[package]] name = "astria-sequencer-client" version = "0.1.0" -source = "git+https://github.com/astriaorg/astria?rev=112a66d6f9bb6638cce4935c949834e1d35416bb#112a66d6f9bb6638cce4935c949834e1d35416bb" +source = "git+https://github.com/astriaorg/astria?rev=b8c981796cba3a2fd89bc659e00161d682734e62#b8c981796cba3a2fd89bc659e00161d682734e62" dependencies = [ "astria-core", "async-trait", "futures", + "futures-util", "hex", - "prost 0.12.3", - "tendermint 0.34.1", - "tendermint-proto 0.34.1", + "prost 0.12.4", + "tendermint", + "tendermint-proto", "tendermint-rpc", "thiserror", + "tokio", + "tokio-stream", "tracing", ] @@ -480,20 +483,20 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] @@ -534,9 +537,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "axum" @@ -589,9 +592,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line", "cc", @@ -666,12 +669,12 @@ dependencies = [ "lazycell", "peeking_take_while", "prettyplease", - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] @@ -694,9 +697,9 @@ dependencies = [ [[package]] name = "bitcoin" -version = "0.31.1" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd00f3c09b5f21fb357abe32d29946eb8bb7a0862bae62c0b5e4a692acbbe73c" +checksum = "6c85783c2fe40083ea54a33aa2f0ba58831d90fcd190f5bdc47e74e84d2a96ae" dependencies = [ "bech32 0.10.0-beta", "bitcoin-internals", @@ -735,9 +738,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "bitmaps" @@ -793,9 +796,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" dependencies = [ "arrayref", "arrayvec 0.7.4", @@ -828,10 +831,20 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" dependencies = [ - "borsh-derive", + "borsh-derive 0.10.3", "hashbrown 0.13.2", ] +[[package]] +name = "borsh" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0901fc8eb0aca4c83be0106d6f2db17d86a08dfc2c25f0e84464bf381158add6" +dependencies = [ + "borsh-derive 1.4.0", + "cfg_aliases", +] + [[package]] name = "borsh-derive" version = "0.10.3" @@ -841,17 +854,31 @@ dependencies = [ "borsh-derive-internal", "borsh-schema-derive-internal", "proc-macro-crate 0.1.5", - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "syn 1.0.109", ] +[[package]] +name = "borsh-derive" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51670c3aa053938b0ee3bd67c3817e471e626151131b934038e83c5bf8de48f5" +dependencies = [ + "once_cell", + "proc-macro-crate 3.1.0", + "proc-macro2 1.0.79", + "quote", + "syn 2.0.58", + "syn_derive", +] + [[package]] name = "borsh-derive-internal" version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "syn 1.0.109", ] @@ -862,16 +889,16 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "syn 1.0.109", ] [[package]] name = "bs58" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" dependencies = [ "sha2 0.10.8", "tinyvec", @@ -879,9 +906,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.3" +version = "3.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea184aa71bb362a1157c896979544cc23974e08fd265f29ea96b59f0b4a555b" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" [[package]] name = "byte-slice-cast" @@ -913,9 +940,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" dependencies = [ "serde", ] @@ -948,9 +975,9 @@ checksum = "e6e9e01327e6c86e92ec72b1c798d4a94810f147209bbe3ffab6a86954937a6f" [[package]] name = "cargo-platform" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "694c8807f2ae16faecc43dc17d74b3eb042482789fd0eb64b39a2e04e087053f" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" dependencies = [ "serde", ] @@ -970,13 +997,61 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.88" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02f341c093d19155a6e41631ce5971aac4e9a868262212153124c15fa22d1cdc" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" dependencies = [ + "jobserver", "libc", ] +[[package]] +name = "celestia-tendermint" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95f93b5cbbd62b6cfde961889bf05d5fe19e70d8500c4465694306ed2695ac23" +dependencies = [ + "bytes", + "celestia-tendermint-proto", + "digest 0.10.7", + "ed25519", + "ed25519-consensus", + "flex-error", + "futures", + "num-traits", + "once_cell", + "prost 0.12.4", + "prost-types", + "serde", + "serde_bytes", + "serde_json", + "serde_repr", + "sha2 0.10.8", + "signature", + "subtle", + "subtle-encoding", + "time", + "zeroize", +] + +[[package]] +name = "celestia-tendermint-proto" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8f7d49c1ececa30a4587c5fe8a4035b786b78a3253ed0f9636de591b3dc2b37" +dependencies = [ + "bytes", + "flex-error", + "num-derive", + "num-traits", + "prost 0.12.4", + "prost-types", + "serde", + "serde_bytes", + "subtle-encoding", + "time", +] + [[package]] name = "cexpr" version = "0.6.0" @@ -998,6 +1073,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" + [[package]] name = "chacha20" version = "0.8.2" @@ -1025,9 +1106,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.34" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" +checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1098,9 +1179,9 @@ version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro-error 1.0.4", - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "syn 1.0.109", ] @@ -1116,15 +1197,15 @@ dependencies = [ [[package]] name = "cnidarium" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.69.1" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.69.1#b3e62ece950a55f25982c962c88dcfec0b603174" dependencies = [ "anyhow", "async-trait", - "borsh", + "borsh 0.10.3", "futures", "hex", - "ibc-types", + "ibc-types 0.12.0", "ics23 0.11.1", "jmt 0.9.0", "metrics", @@ -1136,22 +1217,67 @@ dependencies = [ "sha2 0.10.8", "smallvec", "tempfile", - "tendermint 0.34.1", + "tendermint", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "cnidarium" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" +dependencies = [ + "anyhow", + "async-trait", + "borsh 1.4.0", + "futures", + "hex", + "ibc-proto 0.41.0", + "ibc-types 0.12.0", + "ics23 0.11.1", + "jmt 0.10.0", + "metrics", + "once_cell", + "parking_lot", + "pbjson", + "pin-project", + "prost 0.12.4", + "regex", + "rocksdb", + "serde", + "sha2 0.10.8", + "smallvec", + "tempfile", + "tendermint", "tokio", "tokio-stream", + "tonic", "tracing", ] [[package]] name = "cnidarium-component" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.69.1" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.69.1#b3e62ece950a55f25982c962c88dcfec0b603174" +dependencies = [ + "anyhow", + "async-trait", + "cnidarium 0.69.1", + "hex", + "tendermint", +] + +[[package]] +name = "cnidarium-component" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "async-trait", - "cnidarium", + "cnidarium 0.71.0", "hex", - "tendermint 0.34.1", + "tendermint", ] [[package]] @@ -1162,9 +1288,9 @@ checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" [[package]] name = "color-eyre" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a667583cca8c4f8436db8de46ea8233c42a7d9ae424a82d338f2e4675229204" +checksum = "55146f5e46f237f7423d74111267d4597b59b0dad0ffaf7303bce9945d843ad5" dependencies = [ "backtrace", "color-spantrace", @@ -1236,7 +1362,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1d1429e3bd78171c65aa010eabcdf8f863ba3254728dbfb0ad4b1545beac15c" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "syn 1.0.109", ] @@ -1378,9 +1504,9 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] @@ -1414,10 +1540,10 @@ checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "strsim", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] @@ -1428,7 +1554,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] @@ -1510,8 +1636,22 @@ dependencies = [ [[package]] name = "decaf377-fmd" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.69.1" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.69.1#b3e62ece950a55f25982c962c88dcfec0b603174" +dependencies = [ + "ark-ff", + "ark-serialize", + "bitvec", + "blake2b_simd 1.0.2", + "decaf377 0.5.0", + "rand_core", + "thiserror", +] + +[[package]] +name = "decaf377-fmd" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "ark-ff", "ark-serialize", @@ -1524,8 +1664,8 @@ dependencies = [ [[package]] name = "decaf377-frost" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "ark-ff", @@ -1534,14 +1674,28 @@ dependencies = [ "decaf377-rdsa", "frost-core", "frost-rerandomized", - "penumbra-proto", + "penumbra-proto 0.71.0", + "rand_core", +] + +[[package]] +name = "decaf377-ka" +version = "0.69.1" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.69.1#b3e62ece950a55f25982c962c88dcfec0b603174" +dependencies = [ + "ark-ff", + "decaf377 0.5.0", + "hex", "rand_core", + "thiserror", + "zeroize", + "zeroize_derive", ] [[package]] name = "decaf377-ka" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "ark-ff", "decaf377 0.5.0", @@ -1572,9 +1726,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", "zeroize", @@ -1602,7 +1756,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "syn 1.0.109", ] @@ -1613,7 +1767,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a2c35ab6e03642397cdda1dd58abbc05d418aef8e36297f336d5aba060fe8df" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "syn 1.0.109", ] @@ -1624,7 +1778,7 @@ version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "syn 1.0.109", ] @@ -1690,9 +1844,9 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] @@ -1835,9 +1989,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c012a26a7f605efc424dd53697843a72be7dc86ad2d01f7814337794a12231d" +checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" dependencies = [ "anstream", "anstyle", @@ -1918,9 +2072,9 @@ checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" [[package]] name = "fastrand" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" [[package]] name = "ff" @@ -1934,9 +2088,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1676f435fc1dadde4d03e43f5d62b259e1ce5f40bd4ffb21db2b42ebe59c1382" +checksum = "c007b1ae3abe1cb6f85a16305acd418b7ca6343b953633fee2b76d8f108b830f" [[package]] name = "fixed-hash" @@ -1962,7 +2116,6 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" dependencies = [ - "anyhow", "eyre", "paste", ] @@ -2085,9 +2238,9 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] @@ -2145,7 +2298,7 @@ checksum = "784f84eebc366e15251c4a8c3acee82a6a6f427949776ecb88377362a9621738" dependencies = [ "proc-macro-error 0.4.12", "proc-macro-hack", - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "syn 1.0.109", ] @@ -2212,16 +2365,16 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "729f9bd3449d77e7831a18abfb7ba2f99ee813dfd15b8c2167c9a54ba20aa99d" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "syn 1.0.109", ] [[package]] name = "h2" -version = "0.3.24" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -2229,7 +2382,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.5", + "indexmap 2.2.6", "slab", "tokio", "tokio-util 0.7.10", @@ -2330,6 +2483,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -2372,20 +2531,11 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "http" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", @@ -2403,6 +2553,12 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "http-range-header" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" + [[package]] name = "httparse" version = "1.8.0" @@ -2506,13 +2662,13 @@ dependencies = [ [[package]] name = "ibc-chain-registry" -version = "0.27.0" +version = "0.27.2" dependencies = [ "async-trait", "flex-error", "futures", "http", - "ibc-proto", + "ibc-proto 0.42.2", "ibc-relayer-types", "itertools 0.10.5", "reqwest", @@ -2525,21 +2681,21 @@ dependencies = [ [[package]] name = "ibc-integration-test" -version = "0.27.0" +version = "0.27.2" dependencies = [ "byte-unit", "http", "ibc-relayer", "ibc-relayer-types", "ibc-test-framework", - "prost 0.12.3", + "prost 0.12.4", "serde", "serde_json", "tempfile", - "tendermint 0.34.1", + "tendermint", "tendermint-rpc", "time", - "toml 0.8.10", + "toml 0.8.12", "tonic", ] @@ -2554,16 +2710,34 @@ dependencies = [ "flex-error", "ics23 0.11.1", "informalsystems-pbjson 0.7.0", - "prost 0.12.3", + "prost 0.12.4", + "serde", + "subtle-encoding", + "tendermint-proto", + "tonic", +] + +[[package]] +name = "ibc-proto" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1a6f2bbf7e1d12f98d8d54d9114231b865418d0f8b619c0873180eafdee07fd" +dependencies = [ + "base64 0.21.7", + "bytes", + "flex-error", + "ics23 0.11.1", + "informalsystems-pbjson 0.7.0", + "prost 0.12.4", "serde", "subtle-encoding", - "tendermint-proto 0.34.1", + "tendermint-proto", "tonic", ] [[package]] name = "ibc-relayer" -version = "0.27.0" +version = "0.27.2" dependencies = [ "anyhow", "astria-core", @@ -2590,10 +2764,10 @@ dependencies = [ "http", "humantime", "humantime-serde", - "ibc-proto", + "ibc-proto 0.42.2", "ibc-relayer-types", "ibc-telemetry", - "ibc-types", + "ibc-types 0.13.0", "itertools 0.10.5", "jmt 0.6.0", "moka", @@ -2601,16 +2775,18 @@ dependencies = [ "num-rational", "once_cell", "pbjson-types", - "penumbra-asset", + "penumbra-asset 0.71.0", "penumbra-custody", "penumbra-fee", - "penumbra-ibc", - "penumbra-keys", - "penumbra-proto", + "penumbra-ibc 0.69.1", + "penumbra-ibc 0.71.0", + "penumbra-keys 0.71.0", + "penumbra-proto 0.69.1", + "penumbra-proto 0.71.0", "penumbra-transaction", "penumbra-view", "penumbra-wallet", - "prost 0.12.3", + "prost 0.12.4", "regex", "reqwest", "retry", @@ -2625,11 +2801,11 @@ dependencies = [ "signature", "strum", "subtle-encoding", - "tendermint 0.34.1", + "tendermint", "tendermint-light-client", "tendermint-light-client-detector", "tendermint-light-client-verifier", - "tendermint-proto 0.34.1", + "tendermint-proto", "tendermint-rpc", "tendermint-testgen", "test-log", @@ -2638,7 +2814,8 @@ dependencies = [ "tiny-keccak", "tokio", "tokio-stream", - "toml 0.8.10", + "tokio-util 0.7.10", + "toml 0.8.12", "tonic", "tracing", "tracing-subscriber 0.3.18", @@ -2647,7 +2824,7 @@ dependencies = [ [[package]] name = "ibc-relayer-cli" -version = "1.8.0" +version = "1.8.2" dependencies = [ "abscissa_core", "clap", @@ -2677,7 +2854,7 @@ dependencies = [ "serial_test", "signal-hook", "subtle-encoding", - "tendermint 0.34.1", + "tendermint", "tendermint-light-client-verifier", "tendermint-rpc", "time", @@ -2688,7 +2865,7 @@ dependencies = [ [[package]] name = "ibc-relayer-rest" -version = "0.27.0" +version = "0.27.2" dependencies = [ "axum", "crossbeam-channel 0.5.12", @@ -2697,32 +2874,32 @@ dependencies = [ "reqwest", "serde", "tokio", - "toml 0.8.10", + "toml 0.8.12", "tracing", ] [[package]] name = "ibc-relayer-types" -version = "0.27.0" +version = "0.27.2" dependencies = [ "bytes", "derive_more", "env_logger", "flex-error", - "ibc-proto", + "ibc-proto 0.42.2", "ics23 0.11.1", "itertools 0.10.5", "num-rational", "primitive-types", - "prost 0.12.3", + "prost 0.12.4", "regex", "serde", "serde_derive", "serde_json", "subtle-encoding", - "tendermint 0.34.1", + "tendermint", "tendermint-light-client-verifier", - "tendermint-proto 0.34.1", + "tendermint-proto", "tendermint-rpc", "tendermint-testgen", "test-log", @@ -2734,7 +2911,7 @@ dependencies = [ [[package]] name = "ibc-telemetry" -version = "0.27.0" +version = "0.27.2" dependencies = [ "axum", "dashmap", @@ -2746,14 +2923,14 @@ dependencies = [ "prometheus", "serde", "serde_json", - "tendermint 0.34.1", + "tendermint", "tokio", "tracing", ] [[package]] name = "ibc-test-framework" -version = "0.27.0" +version = "0.27.2" dependencies = [ "color-eyre", "crossbeam-channel 0.5.12", @@ -2762,13 +2939,13 @@ dependencies = [ "hdpath", "hex", "http", - "ibc-proto", + "ibc-proto 0.42.2", "ibc-relayer", "ibc-relayer-cli", "ibc-relayer-types", "itertools 0.10.5", "once_cell", - "prost 0.12.3", + "prost 0.12.4", "rand", "semver", "serde", @@ -2778,7 +2955,7 @@ dependencies = [ "subtle-encoding", "tendermint-rpc", "tokio", - "toml 0.8.10", + "toml 0.8.12", "tonic", "tracing", "tracing-subscriber 0.3.18", @@ -2790,16 +2967,34 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba606d86e2015991f86a129935dbaeacd94beab72fb90a733c1b1ea76be708a2" dependencies = [ - "ibc-types-core-channel", - "ibc-types-core-client", - "ibc-types-core-commitment", - "ibc-types-core-connection", - "ibc-types-domain-type", - "ibc-types-identifier", - "ibc-types-lightclients-tendermint", - "ibc-types-path", - "ibc-types-timestamp", - "ibc-types-transfer", + "ibc-types-core-channel 0.12.0", + "ibc-types-core-client 0.12.0", + "ibc-types-core-commitment 0.12.0", + "ibc-types-core-connection 0.12.0", + "ibc-types-domain-type 0.12.0", + "ibc-types-identifier 0.12.0", + "ibc-types-lightclients-tendermint 0.12.0", + "ibc-types-path 0.12.0", + "ibc-types-timestamp 0.12.0", + "ibc-types-transfer 0.12.0", +] + +[[package]] +name = "ibc-types" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcf499b03078fe945b03d0167cba4a3db3014d893f2732f12243be82b323d31" +dependencies = [ + "ibc-types-core-channel 0.13.0", + "ibc-types-core-client 0.13.0", + "ibc-types-core-commitment 0.13.0", + "ibc-types-core-connection 0.13.0", + "ibc-types-domain-type 0.13.0", + "ibc-types-identifier 0.13.0", + "ibc-types-lightclients-tendermint 0.13.0", + "ibc-types-path 0.13.0", + "ibc-types-timestamp 0.13.0", + "ibc-types-transfer 0.13.0", ] [[package]] @@ -2812,143 +3007,151 @@ dependencies = [ "bytes", "derive_more", "displaydoc", - "ibc-proto", - "ibc-types-core-client", - "ibc-types-core-commitment", - "ibc-types-core-connection", - "ibc-types-domain-type", - "ibc-types-identifier", - "ibc-types-timestamp", + "ibc-proto 0.41.0", + "ibc-types-core-client 0.12.0", + "ibc-types-core-commitment 0.12.0", + "ibc-types-core-connection 0.12.0", + "ibc-types-domain-type 0.12.0", + "ibc-types-identifier 0.12.0", + "ibc-types-timestamp 0.12.0", "ics23 0.11.1", "num-traits", "proc-macro2 0.1.10", - "prost 0.12.3", + "prost 0.12.4", "safe-regex", "serde", "serde_json", "sha2 0.10.8", "subtle-encoding", - "tendermint 0.34.1", - "tendermint-proto 0.34.1", + "tendermint", + "tendermint-proto", "time", "tracing", ] [[package]] -name = "ibc-types-core-client" -version = "0.12.0" +name = "ibc-types-core-channel" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4db9d4b136b9e84ccf581fec02bb9ebc4478ac0f145c526760ed4310b98741e7" +checksum = "bad6293fe787300f0f0ca1b77bffe19788aea1a3af7d258168f79d310965c02a" dependencies = [ "anyhow", "bytes", "derive_more", "displaydoc", - "ibc-proto", - "ibc-types-domain-type", - "ibc-types-identifier", - "ibc-types-timestamp", + "ibc-proto 0.42.2", + "ibc-types-core-client 0.13.0", + "ibc-types-core-commitment 0.13.0", + "ibc-types-core-connection 0.13.0", + "ibc-types-domain-type 0.13.0", + "ibc-types-identifier 0.13.0", + "ibc-types-timestamp 0.13.0", "ics23 0.11.1", "num-traits", - "prost 0.12.3", + "proc-macro2 0.1.10", + "prost 0.12.4", + "safe-regex", "serde", "serde_json", "sha2 0.10.8", "subtle-encoding", - "tendermint 0.34.1", - "tendermint-proto 0.34.1", + "tendermint", + "tendermint-proto", "time", + "tracing", ] [[package]] -name = "ibc-types-core-commitment" +name = "ibc-types-core-client" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e2c527e14707dd0b2c7e6e2f6f62b0655c83154ae3eb1504e441d9d8f454ac6" +checksum = "4db9d4b136b9e84ccf581fec02bb9ebc4478ac0f145c526760ed4310b98741e7" dependencies = [ "anyhow", "bytes", "derive_more", "displaydoc", - "dyn-clone", - "erased-serde", - "hex", - "ibc-proto", - "ibc-types-domain-type", - "ibc-types-identifier", - "ibc-types-timestamp", + "ibc-proto 0.41.0", + "ibc-types-domain-type 0.12.0", + "ibc-types-identifier 0.12.0", + "ibc-types-timestamp 0.12.0", "ics23 0.11.1", "num-traits", - "primitive-types", - "prost 0.12.3", - "safe-regex", + "prost 0.12.4", "serde", "serde_json", "sha2 0.10.8", "subtle-encoding", - "tendermint 0.34.1", - "tendermint-light-client-verifier", - "tendermint-proto 0.34.1", + "tendermint", + "tendermint-proto", "time", - "tracing", - "uint", ] [[package]] -name = "ibc-types-core-connection" -version = "0.12.0" +name = "ibc-types-core-client" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a8a326c00e9ba48059407478c826237fe39cc90dd2b47182484192926904fe7" +checksum = "24ac5b54e5d75ad0fbbcf7aa345d4b759e7d10fff7dd3698b183f7e7b6a067aa" dependencies = [ "anyhow", "bytes", "derive_more", "displaydoc", - "ibc-proto", - "ibc-types-core-client", - "ibc-types-core-commitment", - "ibc-types-domain-type", - "ibc-types-identifier", - "ibc-types-timestamp", + "ibc-proto 0.42.2", + "ibc-types-domain-type 0.13.0", + "ibc-types-identifier 0.13.0", + "ibc-types-timestamp 0.13.0", "ics23 0.11.1", "num-traits", - "prost 0.12.3", - "safe-regex", + "prost 0.12.4", "serde", "serde_json", "sha2 0.10.8", "subtle-encoding", - "tendermint 0.34.1", - "tendermint-proto 0.34.1", + "tendermint", + "tendermint-proto", "time", ] [[package]] -name = "ibc-types-domain-type" +name = "ibc-types-core-commitment" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3abc9619b9dd7201804f45fc7f335dda72d2e4d6f82d96e8fe3abf4585e6101b" +checksum = "7e2c527e14707dd0b2c7e6e2f6f62b0655c83154ae3eb1504e441d9d8f454ac6" dependencies = [ "anyhow", "bytes", - "prost 0.12.3", -] - -[[package]] -name = "ibc-types-identifier" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "405880cf06fef65f51c5c91b7efbdcbc8d7eba0ac16b43538b36ebd17f21edea" -dependencies = [ + "derive_more", "displaydoc", + "dyn-clone", + "erased-serde", + "hex", + "ibc-proto 0.41.0", + "ibc-types-domain-type 0.12.0", + "ibc-types-identifier 0.12.0", + "ibc-types-timestamp 0.12.0", + "ics23 0.11.1", + "num-traits", + "primitive-types", + "prost 0.12.4", + "safe-regex", "serde", + "serde_json", + "sha2 0.10.8", + "subtle-encoding", + "tendermint", + "tendermint-light-client-verifier", + "tendermint-proto", + "time", + "tracing", + "uint", ] [[package]] -name = "ibc-types-lightclients-tendermint" -version = "0.12.0" +name = "ibc-types-core-commitment" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab22446058bd5afa50d64f8519a9107bbc5101ee65373df896314f52afa0fc6" +checksum = "029431ff7dfd85736b1d951ae84ab1ecd38b1e0de0cf503c8bcc7b7b8b1ff4ef" dependencies = [ "anyhow", "bytes", @@ -2956,67 +3159,277 @@ dependencies = [ "displaydoc", "dyn-clone", "erased-serde", - "ibc-proto", - "ibc-types-core-client", - "ibc-types-core-commitment", - "ibc-types-core-connection", - "ibc-types-domain-type", - "ibc-types-identifier", - "ibc-types-timestamp", + "hex", + "ibc-proto 0.42.2", + "ibc-types-domain-type 0.13.0", + "ibc-types-identifier 0.13.0", + "ibc-types-timestamp 0.13.0", "ics23 0.11.1", "num-traits", "primitive-types", - "prost 0.12.3", + "prost 0.12.4", "safe-regex", "serde", "serde_json", "sha2 0.10.8", "subtle-encoding", - "tendermint 0.34.1", + "tendermint", "tendermint-light-client-verifier", - "tendermint-proto 0.34.1", + "tendermint-proto", "time", "tracing", "uint", ] [[package]] -name = "ibc-types-path" +name = "ibc-types-core-connection" version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a29e6fd8871fdced76402a3008219abf8773e527a46f120e0d76d6a3bb9706c1" +checksum = "5a8a326c00e9ba48059407478c826237fe39cc90dd2b47182484192926904fe7" dependencies = [ + "anyhow", "bytes", "derive_more", "displaydoc", - "ibc-types-core-channel", - "ibc-types-core-client", - "ibc-types-core-connection", + "ibc-proto 0.41.0", + "ibc-types-core-client 0.12.0", + "ibc-types-core-commitment 0.12.0", + "ibc-types-domain-type 0.12.0", + "ibc-types-identifier 0.12.0", + "ibc-types-timestamp 0.12.0", + "ics23 0.11.1", "num-traits", - "prost 0.12.3", + "prost 0.12.4", + "safe-regex", "serde", "serde_json", + "sha2 0.10.8", "subtle-encoding", - "tendermint 0.34.1", - "tendermint-proto 0.34.1", + "tendermint", + "tendermint-proto", "time", ] [[package]] -name = "ibc-types-timestamp" -version = "0.12.0" +name = "ibc-types-core-connection" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d2e763838dbef62ca8a1344b4dd5b3919d685b4c61874183724644c912237a" +checksum = "593fff2c4b4cfdb48e38c0dd89d7f2c0d11cda51bca4f72e5fd0ee646e9f0d6e" dependencies = [ + "anyhow", "bytes", + "derive_more", "displaydoc", + "ibc-proto 0.42.2", + "ibc-types-core-client 0.13.0", + "ibc-types-core-commitment 0.13.0", + "ibc-types-domain-type 0.13.0", + "ibc-types-identifier 0.13.0", + "ibc-types-timestamp 0.13.0", + "ics23 0.11.1", "num-traits", - "prost 0.12.3", + "prost 0.12.4", + "safe-regex", + "serde", + "serde_json", + "sha2 0.10.8", + "subtle-encoding", + "tendermint", + "tendermint-proto", + "time", +] + +[[package]] +name = "ibc-types-domain-type" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3abc9619b9dd7201804f45fc7f335dda72d2e4d6f82d96e8fe3abf4585e6101b" +dependencies = [ + "anyhow", + "bytes", + "prost 0.12.4", +] + +[[package]] +name = "ibc-types-domain-type" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "777a22b16fcf9891d845ea9d6f69883f4cd490bbfc7ca74030910f51760a400b" +dependencies = [ + "anyhow", + "bytes", + "prost 0.12.4", +] + +[[package]] +name = "ibc-types-identifier" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "405880cf06fef65f51c5c91b7efbdcbc8d7eba0ac16b43538b36ebd17f21edea" +dependencies = [ + "displaydoc", + "serde", +] + +[[package]] +name = "ibc-types-identifier" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61a082a67bbf2dacb5584d8cb121f25af587e4400b12cbb3efb9b398cdb8a3cc" +dependencies = [ + "displaydoc", + "serde", +] + +[[package]] +name = "ibc-types-lightclients-tendermint" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab22446058bd5afa50d64f8519a9107bbc5101ee65373df896314f52afa0fc6" +dependencies = [ + "anyhow", + "bytes", + "derive_more", + "displaydoc", + "dyn-clone", + "erased-serde", + "ibc-proto 0.41.0", + "ibc-types-core-client 0.12.0", + "ibc-types-core-commitment 0.12.0", + "ibc-types-core-connection 0.12.0", + "ibc-types-domain-type 0.12.0", + "ibc-types-identifier 0.12.0", + "ibc-types-timestamp 0.12.0", + "ics23 0.11.1", + "num-traits", + "primitive-types", + "prost 0.12.4", + "safe-regex", "serde", "serde_json", + "sha2 0.10.8", "subtle-encoding", - "tendermint 0.34.1", - "tendermint-proto 0.34.1", + "tendermint", + "tendermint-light-client-verifier", + "tendermint-proto", + "time", + "tracing", + "uint", +] + +[[package]] +name = "ibc-types-lightclients-tendermint" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1444a7fb929e83d3250a1f969cd211abbbbaaba929285d628474327875bc20" +dependencies = [ + "anyhow", + "bytes", + "derive_more", + "displaydoc", + "dyn-clone", + "erased-serde", + "ibc-proto 0.42.2", + "ibc-types-core-client 0.13.0", + "ibc-types-core-commitment 0.13.0", + "ibc-types-core-connection 0.13.0", + "ibc-types-domain-type 0.13.0", + "ibc-types-identifier 0.13.0", + "ibc-types-timestamp 0.13.0", + "ics23 0.11.1", + "num-traits", + "primitive-types", + "prost 0.12.4", + "safe-regex", + "serde", + "serde_json", + "sha2 0.10.8", + "subtle-encoding", + "tendermint", + "tendermint-light-client-verifier", + "tendermint-proto", + "time", + "tracing", + "uint", +] + +[[package]] +name = "ibc-types-path" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a29e6fd8871fdced76402a3008219abf8773e527a46f120e0d76d6a3bb9706c1" +dependencies = [ + "bytes", + "derive_more", + "displaydoc", + "ibc-types-core-channel 0.12.0", + "ibc-types-core-client 0.12.0", + "ibc-types-core-connection 0.12.0", + "num-traits", + "prost 0.12.4", + "serde", + "serde_json", + "subtle-encoding", + "tendermint", + "tendermint-proto", + "time", +] + +[[package]] +name = "ibc-types-path" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fef66d01d7a58d9b4161ef165b68b6aa5963b7170150f07c9870738560290abf" +dependencies = [ + "bytes", + "derive_more", + "displaydoc", + "ibc-types-core-channel 0.13.0", + "ibc-types-core-client 0.13.0", + "ibc-types-core-connection 0.13.0", + "num-traits", + "prost 0.12.4", + "serde", + "serde_json", + "subtle-encoding", + "tendermint", + "tendermint-proto", + "time", +] + +[[package]] +name = "ibc-types-timestamp" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d2e763838dbef62ca8a1344b4dd5b3919d685b4c61874183724644c912237a" +dependencies = [ + "bytes", + "displaydoc", + "num-traits", + "prost 0.12.4", + "serde", + "serde_json", + "subtle-encoding", + "tendermint", + "tendermint-proto", + "time", +] + +[[package]] +name = "ibc-types-timestamp" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cad40bbb3c5e821c6fd77946afd16fb6abe15d8f81bfdbac39b045ae450eb314" +dependencies = [ + "bytes", + "displaydoc", + "num-traits", + "prost 0.12.4", + "serde", + "serde_json", + "subtle-encoding", + "tendermint", + "tendermint-proto", "time", ] @@ -3030,6 +3443,16 @@ dependencies = [ "serde", ] +[[package]] +name = "ibc-types-transfer" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d95292e7b895363ccd4eea820e6bcd6f95ae1225d7342cc3b73fe2be594c9f75" +dependencies = [ + "displaydoc", + "serde", +] + [[package]] name = "ibig" version = "0.3.6" @@ -3071,7 +3494,7 @@ dependencies = [ "bytes", "hex", "informalsystems-pbjson 0.7.0", - "prost 0.12.3", + "prost 0.12.4", "ripemd", "serde", "sha2 0.10.8", @@ -3133,7 +3556,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "syn 1.0.109", ] @@ -3157,9 +3580,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.5" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown 0.14.3", @@ -3219,11 +3642,20 @@ 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 = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jmt" @@ -3232,7 +3664,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1a302f0defd323b833c9848c20ab40c3156128f50d7bf8eebeed2ef58167258" dependencies = [ "anyhow", - "borsh", + "borsh 0.10.3", "hashbrown 0.13.2", "hex", "ics23 0.10.2", @@ -3253,7 +3685,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2950721a65dff82492e30fe67076127135d0d710aa0140f21efafda2aee7849" dependencies = [ "anyhow", - "borsh", + "borsh 0.10.3", + "digest 0.10.7", + "hashbrown 0.13.2", + "hex", + "ics23 0.11.1", + "itertools 0.10.5", + "mirai-annotations", + "num-derive", + "num-traits", + "serde", + "sha2 0.10.8", + "thiserror", + "tracing", +] + +[[package]] +name = "jmt" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9a3bf1a303934c6f75533bd3a563730a0730f9361023c49ed6aee9fcb5b98f8" +dependencies = [ + "anyhow", + "borsh 1.4.0", "digest 0.10.7", "hashbrown 0.13.2", "hex", @@ -3268,11 +3722,20 @@ dependencies = [ "tracing", ] +[[package]] +name = "jobserver" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -3318,23 +3781,22 @@ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libloading" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c571b676ddfc9a8c12f1f3d3085a7b163966a8fd8098a90640953ce5f6170161" +checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if 1.0.0", - "windows-sys 0.48.0", + "windows-targets 0.52.4", ] [[package]] name = "libredox" -version = "0.0.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "libc", - "redox_syscall", ] [[package]] @@ -3366,9 +3828,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.15" +version = "1.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037731f5d3aaa87a5675e895b63ddff1a87624bc29f77004ea829809654e48f6" +checksum = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9" dependencies = [ "cc", "pkg-config", @@ -3445,9 +3907,9 @@ checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "merlin" @@ -3463,9 +3925,9 @@ dependencies = [ [[package]] name = "metrics" -version = "0.22.1" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd71d9db2e4287c3407fa04378b8c2ee570aebe0854431562cdd89ca091854f4" +checksum = "2be3cbd384d4e955b231c895ce10685e3d8260c5ccffae898c96c723b0772835" dependencies = [ "ahash", "portable-atomic", @@ -3494,9 +3956,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "wasi", @@ -3532,9 +3994,9 @@ dependencies = [ [[package]] name = "multimap" -version = "0.8.3" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" +checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" [[package]] name = "nom" @@ -3603,7 +4065,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "syn 1.0.109", ] @@ -3686,9 +4148,9 @@ dependencies = [ [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl-probe" @@ -3792,7 +4254,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ "proc-macro-crate 2.0.0", - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "syn 1.0.109", ] @@ -3842,9 +4304,9 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2580e33f2292d34be285c5bc3dba5259542b083cfad6037b6d70345f24dcb735" dependencies = [ - "heck", + "heck 0.4.1", "itertools 0.11.0", - "prost 0.12.3", + "prost 0.12.4", "prost-types", ] @@ -3858,7 +4320,7 @@ dependencies = [ "chrono", "pbjson", "pbjson-build", - "prost 0.12.3", + "prost 0.12.4", "prost-build", "serde", ] @@ -3905,7 +4367,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46e61cce859b76d19090f62da50a9fe92bab7c2a5f09e183763559a2ac392c90" dependencies = [ "peg-runtime", - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", ] @@ -3917,8 +4379,8 @@ checksum = "36bae92c60fa2398ce4678b98b2c4b5a7c61099961ca1fa305aec04a9ad28922" [[package]] name = "penumbra-app" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "ark-ff", @@ -3928,21 +4390,21 @@ dependencies = [ "bincode", "bitvec", "blake2b_simd 1.0.2", - "cnidarium", - "cnidarium-component", + "cnidarium 0.71.0", + "cnidarium-component 0.71.0", "decaf377 0.5.0", "decaf377-rdsa", "futures", "hex", - "ibc-proto", - "ibc-types", + "ibc-proto 0.41.0", + "ibc-types 0.12.0", "ics23 0.11.1", "im", - "jmt 0.9.0", + "jmt 0.10.0", "metrics", "once_cell", "parking_lot", - "penumbra-asset", + "penumbra-asset 0.71.0", "penumbra-community-pool", "penumbra-compact-block", "penumbra-dex", @@ -3951,19 +4413,20 @@ dependencies = [ "penumbra-funding", "penumbra-genesis", "penumbra-governance", - "penumbra-ibc", - "penumbra-keys", - "penumbra-num", + "penumbra-ibc 0.71.0", + "penumbra-keys 0.71.0", + "penumbra-num 0.71.0", "penumbra-proof-params", - "penumbra-proto", - "penumbra-sct", + "penumbra-proto 0.71.0", + "penumbra-sct 0.71.0", "penumbra-shielded-pool", "penumbra-stake", - "penumbra-tct", + "penumbra-tct 0.71.0", + "penumbra-tendermint-proxy", "penumbra-tower-trace", "penumbra-transaction", - "penumbra-txhash", - "prost 0.12.3", + "penumbra-txhash 0.71.0", + "prost 0.12.4", "rand_chacha", "regex", "serde", @@ -3972,23 +4435,64 @@ dependencies = [ "serde_with", "sha2 0.10.8", "tempfile", - "tendermint 0.34.1", + "tendermint", "tendermint-light-client-verifier", - "tendermint-proto 0.34.1", + "tendermint-proto", "tokio", "tokio-util 0.7.10", "tonic", + "tonic-reflection", + "tonic-web", "tower", "tower-abci", "tower-actor", "tower-service", "tracing", + "url", +] + +[[package]] +name = "penumbra-asset" +version = "0.69.1" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.69.1#b3e62ece950a55f25982c962c88dcfec0b603174" +dependencies = [ + "anyhow", + "ark-ff", + "ark-r1cs-std", + "ark-relations", + "ark-serialize", + "ark-std", + "base64 0.21.7", + "bech32 0.8.1", + "blake2b_simd 1.0.2", + "bytes", + "decaf377 0.5.0", + "decaf377-fmd 0.69.1", + "decaf377-rdsa", + "derivative", + "ethnum", + "hex", + "ibig", + "num-bigint", + "once_cell", + "pbjson-types", + "penumbra-num 0.69.1", + "penumbra-proto 0.69.1", + "poseidon377", + "rand", + "rand_core", + "regex", + "serde", + "serde_with", + "sha2 0.10.8", + "thiserror", + "tracing", ] [[package]] name = "penumbra-asset" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "ark-ff", @@ -4001,7 +4505,7 @@ dependencies = [ "blake2b_simd 1.0.2", "bytes", "decaf377 0.5.0", - "decaf377-fmd", + "decaf377-fmd 0.71.0", "decaf377-rdsa", "derivative", "ethnum", @@ -4009,8 +4513,9 @@ dependencies = [ "ibig", "num-bigint", "once_cell", - "penumbra-num", - "penumbra-proto", + "pbjson-types", + "penumbra-num 0.71.0", + "penumbra-proto 0.71.0", "poseidon377", "rand", "rand_core", @@ -4024,48 +4529,48 @@ dependencies = [ [[package]] name = "penumbra-community-pool" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "ark-ff", "async-trait", "base64 0.21.7", "blake2b_simd 1.0.2", - "cnidarium", - "cnidarium-component", + "cnidarium 0.71.0", + "cnidarium-component 0.71.0", "futures", "hex", "metrics", "once_cell", "pbjson-types", - "penumbra-asset", - "penumbra-keys", - "penumbra-num", - "penumbra-proto", - "penumbra-sct", + "penumbra-asset 0.71.0", + "penumbra-keys 0.71.0", + "penumbra-num 0.71.0", + "penumbra-proto 0.71.0", + "penumbra-sct 0.71.0", "penumbra-shielded-pool", - "penumbra-txhash", - "prost 0.12.3", + "penumbra-txhash 0.71.0", + "prost 0.12.4", "serde", "sha2 0.10.8", - "tendermint 0.34.1", + "tendermint", "tendermint-light-client-verifier", "tracing", ] [[package]] name = "penumbra-compact-block" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "ark-ff", "async-trait", "blake2b_simd 1.0.2", "bytes", - "cnidarium", - "cnidarium-component", + "cnidarium 0.71.0", + "cnidarium-component 0.71.0", "decaf377-rdsa", "futures", "im", @@ -4074,17 +4579,17 @@ dependencies = [ "penumbra-dex", "penumbra-fee", "penumbra-governance", - "penumbra-ibc", + "penumbra-ibc 0.71.0", "penumbra-proof-params", - "penumbra-proto", - "penumbra-sct", + "penumbra-proto 0.71.0", + "penumbra-sct 0.71.0", "penumbra-shielded-pool", "penumbra-stake", - "penumbra-tct", + "penumbra-tct 0.71.0", "rand", "rand_core", "serde", - "tendermint 0.34.1", + "tendermint", "tokio", "tokio-stream", "tonic", @@ -4093,8 +4598,8 @@ dependencies = [ [[package]] name = "penumbra-custody" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "ark-ff", @@ -4105,16 +4610,18 @@ dependencies = [ "chacha20poly1305", "decaf377 0.5.0", "decaf377-frost", - "decaf377-ka", + "decaf377-ka 0.71.0", "decaf377-rdsa", "ed25519-consensus", "futures", "hex", - "penumbra-keys", - "penumbra-proto", + "penumbra-governance", + "penumbra-keys 0.71.0", + "penumbra-proto 0.71.0", + "penumbra-stake", "penumbra-transaction", - "penumbra-txhash", - "prost 0.12.3", + "penumbra-txhash 0.71.0", + "prost 0.12.4", "rand_core", "serde", "serde_json", @@ -4126,8 +4633,8 @@ dependencies = [ [[package]] name = "penumbra-dex" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "ark-ff", @@ -4141,11 +4648,11 @@ dependencies = [ "base64 0.21.7", "bincode", "blake2b_simd 1.0.2", - "cnidarium", - "cnidarium-component", + "cnidarium 0.71.0", + "cnidarium-component 0.71.0", "decaf377 0.5.0", - "decaf377-fmd", - "decaf377-ka", + "decaf377-fmd 0.71.0", + "decaf377-ka 0.71.0", "decaf377-rdsa", "futures", "hex", @@ -4154,25 +4661,25 @@ dependencies = [ "once_cell", "parking_lot", "pbjson-types", - "penumbra-asset", + "penumbra-asset 0.71.0", "penumbra-fee", - "penumbra-keys", - "penumbra-num", + "penumbra-keys 0.71.0", + "penumbra-num 0.71.0", "penumbra-proof-params", - "penumbra-proto", - "penumbra-sct", + "penumbra-proto 0.71.0", + "penumbra-sct 0.71.0", "penumbra-shielded-pool", - "penumbra-tct", - "penumbra-txhash", + "penumbra-tct 0.71.0", + "penumbra-txhash 0.71.0", "poseidon377", - "prost 0.12.3", + "prost 0.12.4", "rand_core", "regex", "serde", "serde_json", "sha2 0.10.8", "tap", - "tendermint 0.34.1", + "tendermint", "tendermint-light-client-verifier", "thiserror", "tokio", @@ -4182,85 +4689,86 @@ dependencies = [ [[package]] name = "penumbra-distributions" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "async-trait", - "cnidarium", - "cnidarium-component", - "penumbra-asset", - "penumbra-num", - "penumbra-proto", - "penumbra-sct", - "serde", - "tendermint 0.34.1", + "cnidarium 0.71.0", + "cnidarium-component 0.71.0", + "penumbra-asset 0.71.0", + "penumbra-num 0.71.0", + "penumbra-proto 0.71.0", + "penumbra-sct 0.71.0", + "serde", + "tendermint", "tracing", ] [[package]] name = "penumbra-fee" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "ark-ff", "async-trait", "blake2b_simd 1.0.2", "bytes", - "cnidarium", - "cnidarium-component", + "cnidarium 0.71.0", + "cnidarium-component 0.71.0", "decaf377 0.5.0", "decaf377-rdsa", "metrics", - "penumbra-asset", - "penumbra-num", - "penumbra-proto", + "penumbra-asset 0.71.0", + "penumbra-num 0.71.0", + "penumbra-proto 0.71.0", "rand", "rand_core", "serde", - "tendermint 0.34.1", + "tendermint", "tonic", "tracing", ] [[package]] name = "penumbra-funding" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "async-trait", - "cnidarium", - "cnidarium-component", + "cnidarium 0.71.0", + "cnidarium-component 0.71.0", "futures", "metrics", - "penumbra-asset", + "penumbra-asset 0.71.0", "penumbra-community-pool", "penumbra-distributions", - "penumbra-proto", - "penumbra-sct", + "penumbra-proto 0.71.0", + "penumbra-sct 0.71.0", "penumbra-shielded-pool", "penumbra-stake", "serde", - "tendermint 0.34.1", + "tendermint", "tracing", ] [[package]] name = "penumbra-genesis" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "penumbra-community-pool", + "penumbra-dex", "penumbra-distributions", "penumbra-fee", "penumbra-funding", "penumbra-governance", - "penumbra-ibc", - "penumbra-proto", - "penumbra-sct", + "penumbra-ibc 0.71.0", + "penumbra-proto 0.71.0", + "penumbra-sct 0.71.0", "penumbra-shielded-pool", "penumbra-stake", "serde", @@ -4268,8 +4776,8 @@ dependencies = [ [[package]] name = "penumbra-governance" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "ark-ff", @@ -4283,38 +4791,39 @@ dependencies = [ "base64 0.21.7", "blake2b_simd 1.0.2", "bytes", - "cnidarium", - "cnidarium-component", + "cnidarium 0.71.0", + "cnidarium-component 0.71.0", "decaf377 0.5.0", "decaf377-rdsa", "futures", - "ibc-types", + "ibc-types 0.12.0", "im", "metrics", "once_cell", "pbjson-types", - "penumbra-asset", + "penumbra-asset 0.71.0", "penumbra-community-pool", + "penumbra-dex", "penumbra-distributions", "penumbra-fee", "penumbra-funding", - "penumbra-ibc", - "penumbra-keys", - "penumbra-num", + "penumbra-ibc 0.71.0", + "penumbra-keys 0.71.0", + "penumbra-num 0.71.0", "penumbra-proof-params", - "penumbra-proto", - "penumbra-sct", + "penumbra-proto 0.71.0", + "penumbra-sct 0.71.0", "penumbra-shielded-pool", "penumbra-stake", - "penumbra-tct", - "penumbra-txhash", + "penumbra-tct 0.71.0", + "penumbra-txhash 0.71.0", "rand", "rand_chacha", "rand_core", "regex", "serde", "tap", - "tendermint 0.34.1", + "tendermint", "thiserror", "tokio", "tonic", @@ -4323,42 +4832,77 @@ dependencies = [ [[package]] name = "penumbra-ibc" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.69.1" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.69.1#b3e62ece950a55f25982c962c88dcfec0b603174" dependencies = [ "anyhow", "ark-ff", "async-trait", "base64 0.21.7", "blake2b_simd 1.0.2", - "cnidarium", + "cnidarium 0.69.1", "hex", - "ibc-proto", - "ibc-types", + "ibc-proto 0.41.0", + "ibc-types 0.12.0", "ics23 0.11.1", "metrics", "num-traits", "once_cell", "pbjson-types", - "penumbra-asset", - "penumbra-num", - "penumbra-proto", - "penumbra-sct", - "penumbra-txhash", - "prost 0.12.3", + "penumbra-asset 0.69.1", + "penumbra-num 0.69.1", + "penumbra-proto 0.69.1", + "penumbra-sct 0.69.1", + "penumbra-txhash 0.69.1", + "prost 0.12.4", "serde", "serde_json", "sha2 0.10.8", - "tendermint 0.34.1", + "tendermint", "tendermint-light-client-verifier", "tower", "tracing", ] +[[package]] +name = "penumbra-ibc" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" +dependencies = [ + "anyhow", + "ark-ff", + "async-trait", + "base64 0.21.7", + "blake2b_simd 1.0.2", + "cnidarium 0.71.0", + "hex", + "ibc-proto 0.41.0", + "ibc-types 0.12.0", + "ics23 0.11.1", + "metrics", + "num-traits", + "once_cell", + "pbjson-types", + "penumbra-asset 0.71.0", + "penumbra-num 0.71.0", + "penumbra-proto 0.71.0", + "penumbra-sct 0.71.0", + "penumbra-txhash 0.71.0", + "prost 0.12.4", + "serde", + "serde_json", + "sha2 0.10.8", + "tendermint", + "tendermint-light-client-verifier", + "tonic", + "tower", + "tracing", +] + [[package]] name = "penumbra-keys" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.69.1" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.69.1#b3e62ece950a55f25982c962c88dcfec0b603174" dependencies = [ "aes", "anyhow", @@ -4374,8 +4918,8 @@ dependencies = [ "bytes", "chacha20poly1305", "decaf377 0.5.0", - "decaf377-fmd", - "decaf377-ka", + "decaf377-fmd 0.69.1", + "decaf377-ka 0.69.1", "decaf377-rdsa", "derivative", "ethnum", @@ -4385,11 +4929,91 @@ dependencies = [ "ibig", "num-bigint", "once_cell", - "pbkdf2 0.12.2", - "penumbra-asset", - "penumbra-proto", - "penumbra-tct", - "poseidon377", + "pbkdf2 0.12.2", + "penumbra-asset 0.69.1", + "penumbra-proto 0.69.1", + "penumbra-tct 0.69.1", + "poseidon377", + "rand", + "rand_core", + "regex", + "serde", + "sha2 0.10.8", + "thiserror", + "tracing", +] + +[[package]] +name = "penumbra-keys" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" +dependencies = [ + "aes", + "anyhow", + "ark-ff", + "ark-r1cs-std", + "ark-relations", + "ark-serialize", + "ark-std", + "base64 0.21.7", + "bech32 0.8.1", + "bip32", + "blake2b_simd 1.0.2", + "bytes", + "chacha20poly1305", + "decaf377 0.5.0", + "decaf377-fmd 0.71.0", + "decaf377-ka 0.71.0", + "decaf377-rdsa", + "derivative", + "ethnum", + "f4jumble", + "hex", + "hmac", + "ibig", + "num-bigint", + "once_cell", + "pbkdf2 0.12.2", + "penumbra-asset 0.71.0", + "penumbra-proto 0.71.0", + "penumbra-tct 0.71.0", + "poseidon377", + "rand", + "rand_core", + "regex", + "serde", + "sha2 0.10.8", + "thiserror", + "tracing", +] + +[[package]] +name = "penumbra-num" +version = "0.69.1" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.69.1#b3e62ece950a55f25982c962c88dcfec0b603174" +dependencies = [ + "anyhow", + "ark-ff", + "ark-groth16", + "ark-r1cs-std", + "ark-relations", + "ark-serialize", + "ark-snark", + "ark-std", + "base64 0.21.7", + "bech32 0.8.1", + "blake2b_simd 1.0.2", + "bytes", + "decaf377 0.5.0", + "decaf377-fmd 0.69.1", + "decaf377-rdsa", + "derivative", + "ethnum", + "hex", + "ibig", + "num-bigint", + "once_cell", + "penumbra-proto 0.69.1", "rand", "rand_core", "regex", @@ -4401,8 +5025,8 @@ dependencies = [ [[package]] name = "penumbra-num" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "ark-ff", @@ -4417,7 +5041,7 @@ dependencies = [ "blake2b_simd 1.0.2", "bytes", "decaf377 0.5.0", - "decaf377-fmd", + "decaf377-fmd 0.71.0", "decaf377-rdsa", "derivative", "ethnum", @@ -4425,7 +5049,7 @@ dependencies = [ "ibig", "num-bigint", "once_cell", - "penumbra-proto", + "penumbra-proto 0.71.0", "rand", "rand_core", "regex", @@ -4437,8 +5061,8 @@ dependencies = [ [[package]] name = "penumbra-proof-params" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "ark-ec", @@ -4463,30 +5087,61 @@ dependencies = [ [[package]] name = "penumbra-proto" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.69.1" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.69.1#b3e62ece950a55f25982c962c88dcfec0b603174" +dependencies = [ + "anyhow", + "async-trait", + "bech32 0.8.1", + "bytes", + "cnidarium 0.69.1", + "decaf377-fmd 0.69.1", + "decaf377-rdsa", + "futures", + "hex", + "http-body", + "ibc-proto 0.41.0", + "ibc-types 0.12.0", + "ics23 0.11.1", + "pbjson", + "pbjson-types", + "pin-project", + "prost 0.12.4", + "serde", + "serde_json", + "subtle-encoding", + "tendermint", + "tonic", + "tower", + "tracing", +] + +[[package]] +name = "penumbra-proto" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "async-trait", "bech32 0.8.1", "bytes", - "cnidarium", - "decaf377-fmd", + "cnidarium 0.71.0", + "decaf377-fmd 0.71.0", "decaf377-rdsa", "futures", "hex", "http-body", - "ibc-proto", - "ibc-types", + "ibc-proto 0.41.0", + "ibc-types 0.12.0", "ics23 0.11.1", "pbjson", "pbjson-types", "pin-project", - "prost 0.12.3", + "prost 0.12.4", "serde", "serde_json", "subtle-encoding", - "tendermint 0.34.1", + "tendermint", "tonic", "tower", "tracing", @@ -4494,8 +5149,42 @@ dependencies = [ [[package]] name = "penumbra-sct" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.69.1" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.69.1#b3e62ece950a55f25982c962c88dcfec0b603174" +dependencies = [ + "anyhow", + "ark-ff", + "ark-r1cs-std", + "ark-relations", + "ark-serialize", + "async-trait", + "bincode", + "blake2b_simd 1.0.2", + "bytes", + "cnidarium 0.69.1", + "cnidarium-component 0.69.1", + "decaf377 0.5.0", + "decaf377-rdsa", + "hex", + "im", + "metrics", + "once_cell", + "penumbra-keys 0.69.1", + "penumbra-proto 0.69.1", + "penumbra-tct 0.69.1", + "poseidon377", + "rand", + "rand_core", + "serde", + "tendermint", + "tonic", + "tracing", +] + +[[package]] +name = "penumbra-sct" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "ark-ff", @@ -4506,30 +5195,30 @@ dependencies = [ "bincode", "blake2b_simd 1.0.2", "bytes", - "cnidarium", - "cnidarium-component", + "cnidarium 0.71.0", + "cnidarium-component 0.71.0", "decaf377 0.5.0", "decaf377-rdsa", "hex", "im", "metrics", "once_cell", - "penumbra-keys", - "penumbra-proto", - "penumbra-tct", + "penumbra-keys 0.71.0", + "penumbra-proto 0.71.0", + "penumbra-tct 0.71.0", "poseidon377", "rand", "rand_core", "serde", - "tendermint 0.34.1", + "tendermint", "tonic", "tracing", ] [[package]] name = "penumbra-shielded-pool" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "ark-ff", @@ -4543,34 +5232,34 @@ dependencies = [ "blake2b_simd 1.0.2", "bytes", "chacha20poly1305", - "cnidarium", - "cnidarium-component", + "cnidarium 0.71.0", + "cnidarium-component 0.71.0", "decaf377 0.5.0", - "decaf377-fmd", - "decaf377-ka", + "decaf377-fmd 0.71.0", + "decaf377-ka 0.71.0", "decaf377-rdsa", "hex", - "ibc-types", + "ibc-types 0.12.0", "im", "metrics", "once_cell", - "penumbra-asset", - "penumbra-ibc", - "penumbra-keys", - "penumbra-num", + "penumbra-asset 0.71.0", + "penumbra-ibc 0.71.0", + "penumbra-keys 0.71.0", + "penumbra-num 0.71.0", "penumbra-proof-params", - "penumbra-proto", - "penumbra-sct", - "penumbra-tct", - "penumbra-txhash", + "penumbra-proto 0.71.0", + "penumbra-sct 0.71.0", + "penumbra-tct 0.71.0", + "penumbra-txhash 0.71.0", "poseidon377", - "prost 0.12.3", + "prost 0.12.4", "rand", "rand_core", "serde", "serde_json", "tap", - "tendermint 0.34.1", + "tendermint", "thiserror", "tonic", "tracing", @@ -4578,8 +5267,8 @@ dependencies = [ [[package]] name = "penumbra-stake" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "ark-ff", @@ -4593,8 +5282,8 @@ dependencies = [ "base64 0.21.7", "bech32 0.8.1", "bitvec", - "cnidarium", - "cnidarium-component", + "cnidarium 0.71.0", + "cnidarium-component 0.71.0", "decaf377 0.5.0", "decaf377-rdsa", "futures", @@ -4602,17 +5291,17 @@ dependencies = [ "im", "metrics", "once_cell", - "penumbra-asset", + "penumbra-asset 0.71.0", "penumbra-community-pool", "penumbra-distributions", - "penumbra-keys", - "penumbra-num", + "penumbra-keys 0.71.0", + "penumbra-num 0.71.0", "penumbra-proof-params", - "penumbra-proto", - "penumbra-sct", + "penumbra-proto 0.71.0", + "penumbra-sct 0.71.0", "penumbra-shielded-pool", - "penumbra-tct", - "penumbra-txhash", + "penumbra-tct 0.71.0", + "penumbra-txhash 0.71.0", "rand_chacha", "rand_core", "regex", @@ -4620,7 +5309,8 @@ dependencies = [ "serde_unit_struct", "serde_with", "sha2 0.10.8", - "tendermint 0.34.1", + "tap", + "tendermint", "tokio", "tonic", "tracing", @@ -4628,8 +5318,36 @@ dependencies = [ [[package]] name = "penumbra-tct" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.69.1" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.69.1#b3e62ece950a55f25982c962c88dcfec0b603174" +dependencies = [ + "ark-ed-on-bls12-377", + "ark-ff", + "ark-r1cs-std", + "ark-relations", + "ark-serialize", + "async-trait", + "blake2b_simd 1.0.2", + "decaf377 0.5.0", + "derivative", + "futures", + "hash_hasher", + "hex", + "im", + "once_cell", + "parking_lot", + "penumbra-proto 0.69.1", + "poseidon377", + "rand", + "serde", + "thiserror", + "tracing", +] + +[[package]] +name = "penumbra-tct" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "ark-ed-on-bls12-377", "ark-ff", @@ -4646,7 +5364,7 @@ dependencies = [ "im", "once_cell", "parking_lot", - "penumbra-proto", + "penumbra-proto 0.71.0", "poseidon377", "rand", "serde", @@ -4654,10 +5372,42 @@ dependencies = [ "tracing", ] +[[package]] +name = "penumbra-tendermint-proxy" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" +dependencies = [ + "anyhow", + "chrono", + "futures", + "hex", + "http", + "metrics", + "pbjson-types", + "penumbra-proto 0.71.0", + "penumbra-transaction", + "pin-project", + "pin-project-lite", + "sha2 0.10.8", + "tendermint", + "tendermint-config", + "tendermint-light-client-verifier", + "tendermint-proto", + "tendermint-rpc", + "tokio", + "tokio-stream", + "tokio-util 0.7.10", + "tonic", + "tower", + "tower-service", + "tracing", + "url", +] + [[package]] name = "penumbra-tower-trace" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "futures", "hex", @@ -4665,8 +5415,8 @@ dependencies = [ "pin-project", "pin-project-lite", "sha2 0.10.8", - "tendermint 0.34.1", - "tendermint-proto 0.34.1", + "tendermint", + "tendermint-proto", "tokio", "tokio-stream", "tokio-util 0.7.10", @@ -4678,8 +5428,8 @@ dependencies = [ [[package]] name = "penumbra-transaction" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "ark-ff", @@ -4690,31 +5440,31 @@ dependencies = [ "bytes", "chacha20poly1305", "decaf377 0.5.0", - "decaf377-fmd", - "decaf377-ka", + "decaf377-fmd 0.71.0", + "decaf377-ka 0.71.0", "decaf377-rdsa", "derivative", "hex", - "ibc-proto", - "ibc-types", + "ibc-proto 0.41.0", + "ibc-types 0.12.0", "num-bigint", "once_cell", "pbjson-types", - "penumbra-asset", + "penumbra-asset 0.71.0", "penumbra-community-pool", "penumbra-dex", "penumbra-fee", "penumbra-governance", - "penumbra-ibc", - "penumbra-keys", - "penumbra-num", + "penumbra-ibc 0.71.0", + "penumbra-keys 0.71.0", + "penumbra-num 0.71.0", "penumbra-proof-params", - "penumbra-proto", - "penumbra-sct", + "penumbra-proto 0.71.0", + "penumbra-sct 0.71.0", "penumbra-shielded-pool", "penumbra-stake", - "penumbra-tct", - "penumbra-txhash", + "penumbra-tct 0.71.0", + "penumbra-txhash 0.71.0", "poseidon377", "rand", "rand_core", @@ -4729,21 +5479,34 @@ dependencies = [ [[package]] name = "penumbra-txhash" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.69.1" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.69.1#b3e62ece950a55f25982c962c88dcfec0b603174" +dependencies = [ + "anyhow", + "blake2b_simd 1.0.2", + "hex", + "penumbra-proto 0.69.1", + "penumbra-tct 0.69.1", + "serde", +] + +[[package]] +name = "penumbra-txhash" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "blake2b_simd 1.0.2", "hex", - "penumbra-proto", - "penumbra-tct", + "penumbra-proto 0.71.0", + "penumbra-tct 0.71.0", "serde", ] [[package]] name = "penumbra-view" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "ark-std", @@ -4757,12 +5520,12 @@ dependencies = [ "futures", "genawaiter", "hex", - "ibc-types", + "ibc-types 0.12.0", "metrics", "once_cell", "parking_lot", "penumbra-app", - "penumbra-asset", + "penumbra-asset 0.71.0", "penumbra-community-pool", "penumbra-compact-block", "penumbra-dex", @@ -4770,16 +5533,16 @@ dependencies = [ "penumbra-fee", "penumbra-funding", "penumbra-governance", - "penumbra-ibc", - "penumbra-keys", - "penumbra-num", - "penumbra-proto", - "penumbra-sct", + "penumbra-ibc 0.71.0", + "penumbra-keys 0.71.0", + "penumbra-num 0.71.0", + "penumbra-proto 0.71.0", + "penumbra-sct 0.71.0", "penumbra-shielded-pool", "penumbra-stake", - "penumbra-tct", + "penumbra-tct 0.71.0", "penumbra-transaction", - "prost 0.12.3", + "prost 0.12.4", "r2d2", "r2d2_sqlite", "rand", @@ -4787,7 +5550,7 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.8", - "tendermint 0.34.1", + "tendermint", "tokio", "tokio-stream", "tonic", @@ -4798,8 +5561,8 @@ dependencies = [ [[package]] name = "penumbra-wallet" -version = "0.68.1" -source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.68.1#c462e9a6cc86a37d42a9d75f1ab9ceb0e3789f77" +version = "0.71.0" +source = "git+https://github.com/penumbra-zone/penumbra?tag=v0.71.0#b0c8cc44734401e36d3496f17a2ea99a0b1944d1" dependencies = [ "anyhow", "ark-std", @@ -4808,16 +5571,17 @@ dependencies = [ "decaf377 0.5.0", "hex", "penumbra-app", - "penumbra-asset", + "penumbra-asset 0.71.0", "penumbra-custody", "penumbra-dex", "penumbra-fee", "penumbra-governance", - "penumbra-keys", - "penumbra-num", - "penumbra-proto", + "penumbra-keys 0.71.0", + "penumbra-num 0.71.0", + "penumbra-proto 0.71.0", + "penumbra-sct 0.71.0", "penumbra-stake", - "penumbra-tct", + "penumbra-tct 0.71.0", "penumbra-transaction", "penumbra-view", "pin-project", @@ -4844,34 +5608,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.2.5", + "indexmap 2.2.6", ] [[package]] name = "pin-project" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -4897,9 +5661,9 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "platforms" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" +checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" [[package]] name = "poly1305" @@ -5009,12 +5773,12 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prettyplease" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +checksum = "8d3928fb5db768cb86f891ff014f0144589297e3c6a1aba6ed7cecfdace270c7" dependencies = [ - "proc-macro2 1.0.78", - "syn 2.0.52", + "proc-macro2 1.0.79", + "syn 2.0.58", ] [[package]] @@ -5047,6 +5811,15 @@ dependencies = [ "toml_edit 0.20.7", ] +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit 0.21.1", +] + [[package]] name = "proc-macro-error" version = "0.4.12" @@ -5054,7 +5827,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18f33027081eba0a6d8aba6d1b1c3a3be58cbb12106341c2d5759fcd9b5277e7" dependencies = [ "proc-macro-error-attr 0.4.12", - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "syn 1.0.109", "version_check", @@ -5067,7 +5840,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr 1.0.4", - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "syn 1.0.109", "version_check", @@ -5079,7 +5852,7 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a5b4b77fdb63c1eca72173d68d24501c54ab1269409f6b672c85deb18af69de" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "syn 1.0.109", "syn-mid", @@ -5092,7 +5865,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "version_check", ] @@ -5114,9 +5887,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" dependencies = [ "unicode-ident", ] @@ -5148,34 +5921,33 @@ dependencies = [ [[package]] name = "prost" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" +checksum = "d0f5d036824e4761737860779c906171497f6d55681139d8312388f8fe398922" dependencies = [ "bytes", - "prost-derive 0.12.3", + "prost-derive 0.12.4", ] [[package]] name = "prost-build" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" +checksum = "80b776a1b2dc779f5ee0641f8ade0125bc1298dd41a9a0c16d8bd57b42d222b1" dependencies = [ "bytes", - "heck", - "itertools 0.11.0", + "heck 0.5.0", + "itertools 0.12.1", "log", "multimap", "once_cell", "petgraph", "prettyplease", - "prost 0.12.3", + "prost 0.12.4", "prost-types", "regex", - "syn 2.0.52", + "syn 2.0.58", "tempfile", - "which", ] [[package]] @@ -5186,31 +5958,31 @@ checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", "itertools 0.10.5", - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "syn 1.0.109", ] [[package]] name = "prost-derive" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" +checksum = "19de2de2a00075bf566bee3bd4db014b11587e84184d3f7a791bc17f1a8e9e48" dependencies = [ "anyhow", - "itertools 0.11.0", - "proc-macro2 1.0.78", + "itertools 0.12.1", + "proc-macro2 1.0.79", "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] name = "prost-types" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" +checksum = "3235c33eb02c1f1e212abdbe34c78b264b038fb58ca612664343271e36e55ffe" dependencies = [ - "prost 0.12.3", + "prost 0.12.4", ] [[package]] @@ -5225,16 +5997,16 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "memchr", "unicase", ] [[package]] name = "quanta" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca0b7bac0b97248c40bb77288fc52029cf1459c0461ea1b05ee32ccf011de2c" +checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5" dependencies = [ "crossbeam-utils 0.8.19", "libc", @@ -5251,7 +6023,7 @@ version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", ] [[package]] @@ -5327,14 +6099,14 @@ version = "11.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d86a7c4638d42c44551f4791a20e687dbb4c3de1f33c43dd71e355cd429def1" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", ] [[package]] name = "rayon" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -5361,9 +6133,9 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ "getrandom", "libredox", @@ -5372,14 +6144,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.3" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.5", - "regex-syntax 0.8.2", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", ] [[package]] @@ -5393,13 +6165,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -5410,15 +6182,15 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "reqwest" -version = "0.11.24" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "base64 0.21.7", "bytes", @@ -5511,7 +6283,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "549b9d036d571d42e6e85d1c1425e2ac83491075078ca9a15be021c56b1641f2" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "fallible-iterator", "fallible-streaming-iterator", "hashlink", @@ -5548,11 +6320,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.31" +version = "0.38.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "errno", "libc", "linux-raw-sys", @@ -5634,18 +6406,18 @@ dependencies = [ [[package]] name = "safe-regex" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15289bf322e0673d52756a18194167f2378ec1a15fe884af6e2d2cb934822b0" +checksum = "e6ab4bc484ef480a9ce79b381efd7b6767700f514d47bc599036e9d6f7f3c49d" dependencies = [ "safe-regex-macro", ] [[package]] name = "safe-regex-compiler" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fba76fae590a2aa665279deb1f57b5098cbace01a0c5e60e262fcf55f7c51542" +checksum = "6d71f8c78bffb07962595e1bfa5ed11d24dd855eedc50b6a735f5ef648ce621b" dependencies = [ "safe-proc-macro2", "safe-quote", @@ -5653,9 +6425,9 @@ dependencies = [ [[package]] name = "safe-regex-macro" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c2e96b5c03f158d1b16ba79af515137795f4ad4e8de3f790518aae91f1d127" +checksum = "0909ab4b77511df24201cd66541d6a028887c77ecc065f277c68a12a663274ef" dependencies = [ "safe-proc-macro2", "safe-regex-compiler", @@ -5751,9 +6523,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -5764,9 +6536,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" dependencies = [ "core-foundation-sys", "libc", @@ -5815,16 +6587,16 @@ version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] name = "serde_json" -version = "1.0.114" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" dependencies = [ "itoa", "ryu", @@ -5833,9 +6605,9 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd154a240de39fdebcf5775d2675c204d7c13cf39a4c697be6493c8e734337c" +checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" dependencies = [ "itoa", "serde", @@ -5847,9 +6619,9 @@ version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] @@ -5877,7 +6649,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f1b15838534b38fb67ffe60033fe3ffad48f916c175e8baa0400e0cdb958dec" dependencies = [ "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] @@ -5894,15 +6666,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.6.1" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15d167997bd841ec232f5b2b8e0e26606df2e7caa4c31b95ea9ca52b200bd270" +checksum = "ee80b0e361bbf88fd2f6e242ccd19cfda072cb0faa6ae694ecee08199938569a" dependencies = [ "base64 0.21.7", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.2.5", + "indexmap 2.2.6", "serde", "serde_derive", "serde_json", @@ -5912,23 +6684,23 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.6.1" +version = "3.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "865f9743393e638991566a8b7a479043c2c8da94a33e0a31f18214c9cae0a64d" +checksum = "6561dc161a9224638a31d876ccdfefbc1df91d3f3a8342eddb35f055d48c7655" dependencies = [ "darling", - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] name = "serde_yaml" -version = "0.9.32" +version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd075d994154d4a774f95b51fb96bdc2832b0ea48425c92546073816cda1f2f" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.5", + "indexmap 2.2.6", "itoa", "ryu", "serde", @@ -5965,9 +6737,9 @@ version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b93fb4adc70021ac1b47f7d45e8cc4169baaa7ea58483bc5b721d19a26202212" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] @@ -6107,9 +6879,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" @@ -6173,11 +6945,11 @@ version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ - "heck", - "proc-macro2 1.0.78", + "heck 0.4.1", + "proc-macro2 1.0.79", "quote", "rustversion", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] @@ -6207,18 +6979,18 @@ version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "unicode-ident", ] [[package]] name = "syn" -version = "2.0.52" +version = "2.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" +checksum = "44cfb93f38070beee36b3fef7d4f5a16f27751d94b187b666a5cc5e9b0d30687" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "unicode-ident", ] @@ -6229,11 +7001,23 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea305d57546cc8cd04feb14b62ec84bf17f50e3f7b12560d7bfa9265f39d9ed" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "syn 1.0.109", ] +[[package]] +name = "syn_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" +dependencies = [ + "proc-macro-error 1.0.4", + "proc-macro2 1.0.79", + "quote", + "syn 2.0.58", +] + [[package]] name = "sync_wrapper" version = "0.1.2" @@ -6246,7 +7030,7 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", "syn 1.0.109", "unicode-xid 0.2.4", @@ -6297,34 +7081,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "tendermint" -version = "0.32.0" -source = "git+https://github.com/eigerco/celestia-tendermint-rs?rev=bbe7de8#bbe7de8c777f0c44b338f4bf26f0f6efb18e87f0" -dependencies = [ - "bytes", - "digest 0.10.7", - "ed25519", - "ed25519-consensus", - "flex-error", - "futures", - "num-traits", - "once_cell", - "prost 0.12.3", - "prost-types", - "serde", - "serde_bytes", - "serde_json", - "serde_repr", - "sha2 0.10.8", - "signature", - "subtle", - "subtle-encoding", - "tendermint-proto 0.32.0", - "time", - "zeroize", -] - [[package]] name = "tendermint" version = "0.34.1" @@ -6340,7 +7096,7 @@ dependencies = [ "k256", "num-traits", "once_cell", - "prost 0.12.3", + "prost 0.12.4", "prost-types", "ripemd", "serde", @@ -6351,7 +7107,7 @@ dependencies = [ "signature", "subtle", "subtle-encoding", - "tendermint-proto 0.34.1", + "tendermint-proto", "time", "zeroize", ] @@ -6365,7 +7121,7 @@ dependencies = [ "flex-error", "serde", "serde_json", - "tendermint 0.34.1", + "tendermint", "toml 0.5.11", "url", ] @@ -6387,7 +7143,7 @@ dependencies = [ "serde_derive", "serde_json", "static_assertions", - "tendermint 0.34.1", + "tendermint", "tendermint-light-client-verifier", "tendermint-rpc", "time", @@ -6410,9 +7166,9 @@ dependencies = [ "serde_derive", "serde_json", "static_assertions", - "tendermint 0.34.1", + "tendermint", "tendermint-light-client", - "tendermint-proto 0.34.1", + "tendermint-proto", "tendermint-rpc", "time", "tracing", @@ -6427,24 +7183,7 @@ dependencies = [ "derive_more", "flex-error", "serde", - "tendermint 0.34.1", - "time", -] - -[[package]] -name = "tendermint-proto" -version = "0.32.0" -source = "git+https://github.com/eigerco/celestia-tendermint-rs?rev=bbe7de8#bbe7de8c777f0c44b338f4bf26f0f6efb18e87f0" -dependencies = [ - "bytes", - "flex-error", - "num-derive", - "num-traits", - "prost 0.12.3", - "prost-types", - "serde", - "serde_bytes", - "subtle-encoding", + "tendermint", "time", ] @@ -6458,7 +7197,7 @@ dependencies = [ "flex-error", "num-derive", "num-traits", - "prost 0.12.3", + "prost 0.12.4", "prost-types", "serde", "serde_bytes", @@ -6488,9 +7227,9 @@ dependencies = [ "serde_json", "subtle", "subtle-encoding", - "tendermint 0.34.1", + "tendermint", "tendermint-config", - "tendermint-proto 0.34.1", + "tendermint-proto", "thiserror", "time", "tokio", @@ -6512,7 +7251,7 @@ dependencies = [ "serde_json", "simple-error", "tempfile", - "tendermint 0.34.1", + "tendermint", "time", ] @@ -6542,9 +7281,9 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8f546451eaa38373f549093fe9fd05e7d2bade739e2ddf834b9968621d60107" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] @@ -6555,22 +7294,22 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "thiserror" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.57" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] @@ -6659,9 +7398,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.36.0" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ "backtrace", "bytes", @@ -6693,9 +7432,9 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] @@ -6710,9 +7449,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", "pin-project-lite", @@ -6759,14 +7498,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.10" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a9aad4a3066010876e8dcf5a8a06e70a558751117a145c6ce2b82c2e2054290" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.6", + "toml_edit 0.22.9", ] [[package]] @@ -6784,18 +7523,29 @@ version = "0.20.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70f427fce4d84c72b5b732388bf4a9f4531b53f74e2887e3ecb2481f68f66d81" dependencies = [ - "indexmap 2.2.5", + "indexmap 2.2.6", + "toml_datetime", + "winnow 0.5.40", +] + +[[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.6" +version = "0.22.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1b5fd4128cc8d3e0cb74d4ed9a9cc7c7284becd4df68f5f940e1ad123606f6" +checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" dependencies = [ - "indexmap 2.2.5", + "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", @@ -6820,7 +7570,7 @@ dependencies = [ "hyper-timeout", "percent-encoding", "pin-project", - "prost 0.12.3", + "prost 0.12.4", "rustls", "rustls-native-certs", "rustls-pemfile", @@ -6833,6 +7583,39 @@ dependencies = [ "tracing", ] +[[package]] +name = "tonic-reflection" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fa37c513df1339d197f4ba21d28c918b9ef1ac1768265f11ecb6b7f1cba1b76" +dependencies = [ + "prost 0.12.4", + "prost-types", + "tokio", + "tokio-stream", + "tonic", +] + +[[package]] +name = "tonic-web" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fddb2a37b247e6adcb9f239f4e5cefdcc5ed526141a416b943929f13aea2cce" +dependencies = [ + "base64 0.21.7", + "bytes", + "http", + "http-body", + "hyper", + "pin-project", + "tokio-stream", + "tonic", + "tower-http", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "tower" version = "0.4.13" @@ -6863,9 +7646,9 @@ dependencies = [ "bytes", "futures", "pin-project", - "prost 0.12.3", - "tendermint 0.34.1", - "tendermint-proto 0.34.1", + "prost 0.12.4", + "tendermint", + "tendermint-proto", "tokio", "tokio-stream", "tokio-util 0.6.10", @@ -6888,6 +7671,24 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower-http" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" +dependencies = [ + "bitflags 2.5.0", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-range-header", + "pin-project-lite", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-layer" version = "0.3.2" @@ -6918,9 +7719,9 @@ version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] @@ -7128,9 +7929,9 @@ dependencies = [ [[package]] name = "unsafe-libyaml" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" [[package]] name = "untrusted" @@ -7175,9 +7976,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" dependencies = [ "getrandom", "rand", @@ -7207,9 +8008,9 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3fd98999db9227cf28e59d83e1f120f42bc233d4b152e8fab9bc87d5bb1e0f8" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] @@ -7223,9 +8024,9 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -7248,9 +8049,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -7258,24 +8059,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", - "syn 2.0.52", + "syn 2.0.58", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.41" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -7285,9 +8086,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -7295,45 +8096,33 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", - "syn 2.0.52", + "syn 2.0.58", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "web-sys" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", ] -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - [[package]] name = "winapi" version = "0.3.9" @@ -7558,9 +8347,9 @@ version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] @@ -7578,16 +8367,16 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ - "proc-macro2 1.0.78", + "proc-macro2 1.0.79", "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +version = "2.0.10+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index c651008bfc..fa9e451476 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,10 +13,137 @@ members = [ "tools/test-framework", ] -exclude = [ - "tools/check-guide", - "tools/query-events", -] +exclude = ["tools/check-guide", "tools/query-events"] + +[workspace.dependencies] +# Hermes dependencies +ibc-relayer-cli = { version = "1.8.2", path = "crates/relayer-cli" } +ibc-relayer = { version = "0.27.2", path = "crates/relayer" } +ibc-relayer-rest = { version = "0.27.2", path = "crates/relayer-rest" } +ibc-relayer-types = { version = "0.27.2", path = "crates/relayer-types" } +ibc-chain-registry = { version = "0.27.2", path = "crates/chain-registry" } +ibc-telemetry = { version = "0.27.2", path = "crates/telemetry" } +ibc-test-framework = { version = "0.27.2", path = "tools/test-framework" } +ibc-integration-test = { version = "0.27.2", path = "tools/integration-test" } + +# Tendermint dependencies +tendermint = { version = "0.34.0", default-features = false } +tendermint-light-client = { version = "0.34.0", default-features = false } +tendermint-light-client-detector = { version = "0.34.0", default-features = false } +tendermint-light-client-verifier = { version = "0.34.0", default-features = false } +tendermint-proto = "0.34.1" +tendermint-rpc = "0.34.0" +tendermint-testgen = "0.34.0" + +# Astria dependencies +astria-core = { git = "https://github.com/astriaorg/astria", rev = "b8c981796cba3a2fd89bc659e00161d682734e62" } +astria-sequencer-client = { git = "https://github.com/astriaorg/astria", rev = "b8c981796cba3a2fd89bc659e00161d682734e62", features = [ + "http", +] } + +# Penumbra dependencies +penumbra-asset = { git = "https://github.com/penumbra-zone/penumbra", tag = "v0.71.0" } +penumbra-custody = { git = "https://github.com/penumbra-zone/penumbra", tag = "v0.71.0" } +penumbra-fee = { git = "https://github.com/penumbra-zone/penumbra", tag = "v0.71.0" } +penumbra-ibc = { git = "https://github.com/penumbra-zone/penumbra", tag = "v0.71.0" } +# Astria is on v0.69.1 right now +penumbra-ibc-astria = { git = "https://github.com/penumbra-zone/penumbra", package = "penumbra-ibc", tag = "v0.69.1" } +penumbra-proto-astria = { git = "https://github.com/penumbra-zone/penumbra", package = "penumbra-proto", tag = "v0.69.1", features = [ + "box-grpc", + "rpc", +] } +penumbra-keys = { git = "https://github.com/penumbra-zone/penumbra", tag = "v0.71.0" } +penumbra-proto = { git = "https://github.com/penumbra-zone/penumbra", tag = "v0.71.0", features = [ + "box-grpc", + "rpc", +] } +penumbra-transaction = { git = "https://github.com/penumbra-zone/penumbra", tag = "v0.71.0" } +penumbra-wallet = { git = "https://github.com/penumbra-zone/penumbra", tag = "v0.71.0" } +penumbra-view = { git = "https://github.com/penumbra-zone/penumbra", tag = "v0.71.0" } + +# Other dependencies +abscissa_core = "=0.6.0" +anyhow = "1.0" +async-stream = "0.3.5" +async-trait = "0.1.79" +axum = "0.6.18" +bech32 = "0.9.1" +bitcoin = "0.31.1" +bs58 = "0.5.0" +byte-unit = { version = "4.0.19", default-features = false } +bytes = "1.4.0" +clap = "3.2" +clap_complete = "3.2" +color-eyre = "0.6" +console = "0.15.5" +crossbeam-channel = "0.5.12" +dashmap = "5.4.0" +derive_more = { version = "0.99.17", default-features = false } +dialoguer = "0.11.0" +digest = "0.10.6" +dirs-next = "2.0.0" +ed25519 = "2.2.2" +ed25519-consensus = "2.1.0" +ed25519-dalek = "2.0.0" +ed25519-dalek-bip32 = "0.3.0" +env_logger = "0.11.1" +eyre = "0.6.12" +flex-error = { version = "0.4.4", default-features = false } +futures = "0.3.27" +generic-array = "0.14.7" +hdpath = "0.6.3" +hex = "0.4.3" +http = "0.2.9" +humantime = "2.1.0" +humantime-serde = "1.1.1" +ibc-proto = "0.42.2" +ibc-types = "0.13.0" +ics23 = "0.11.1" +itertools = "0.10.5" +jmt = "0.6" +moka = "0.12.5" +num-bigint = "0.4" +num-rational = "0.4.1" +once_cell = "1.19.0" +oneline-eyre = "0.1" +opentelemetry = "0.19.0" +opentelemetry-prometheus = "0.12.0" +pbjson-types = "0.6.0" +primitive-types = { version = "0.12.1", default-features = false } +prometheus = "0.13.2" +prost = "0.12" +rand = "0.8.5" +regex = "1.9.5" +reqwest = { version = "0.11.16", default-features = false } +retry = { version = "2.0.0", default-features = false } +ripemd = "0.1.3" +secp256k1 = "0.28.2" +semver = "1.0.21" +serde = "1.0.197" +serde_derive = "1.0.104" +serde_json = "1.0.111" +serde_yaml = "0.9.31" +serial_test = "3.0.0" +sha2 = "0.10.6" +signal-hook = "0.3.17" +signature = "2.1.0" +strum = "0.25" +subtle-encoding = "0.5.1" +tempfile = "3.10.1" +test-log = "0.2.14" +thiserror = "1.0.57" +time = "0.3" +tiny-bip39 = "1.0.0" +tiny-keccak = { version = "2.0.2", default-features = false } +tokio = { version = "1.3", features = ["full", "rt-multi-thread", "tracing"] } +tokio-stream = "0.1.8" +tokio-util = { version = "0.7" } +toml = "0.8.8" +tonic = "0.10" +tracing = { version = "0.1.36", default-features = false } +tracing-subscriber = "0.3.14" +uint = "0.9" +uuid = "1.7.0" [profile.release] overflow-checks = true diff --git a/README.md b/README.md index b816b659e0..287ad0c845 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,14 @@ # Hermes IBC relayer +![hermes-banner](https://github.com/informalsystems/hermes/assets/1757002/0878ab2a-1c6f-4137-a089-66352f948407) + [![Cosmos ecosystem][cosmos-shield]][cosmos-link] [![Build Status][build-image]][build-link] [![Integration tests][test-image]][test-link] [![Apache 2.0 Licensed][license-image]][license-link] ![Rust Stable][rustc-image] -![Rust 1.71+][rustc-version] +![Rust 1.77.1+][rustc-version] Rust implementation of an Inter-Blockchain Communication (IBC) relayer. @@ -46,7 +48,7 @@ The repository also includes [TLA+ specifications](docs/spec). ## Requirements -The crates in this project require Rust `1.71.0`. +The crates in this project require Rust `1.77.1`. ## Hermes Guide @@ -121,7 +123,7 @@ Unless required by applicable law or agreed to in writing, software distributed [license-image]: https://img.shields.io/badge/license-Apache_2.0-blue.svg [license-link]: https://github.com/informalsystems/hermes/blob/master/LICENSE [rustc-image]: https://img.shields.io/badge/rustc-stable-blue.svg -[rustc-version]: https://img.shields.io/badge/rustc-1.71+-blue.svg +[rustc-version]: https://img.shields.io/badge/rustc-1.77.1+-blue.svg [cosmos-shield]: https://img.shields.io/static/v1?label=&labelColor=1B1E36&color=1B1E36&message=cosmos%20ecosystem&style=for-the-badge&logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI0LjMuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAyNTAwIDI1MDAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDI1MDAgMjUwMDsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MHtmaWxsOiM2RjczOTA7fQoJLnN0MXtmaWxsOiNCN0I5Qzg7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMTI1Mi42LDE1OS41Yy0xMzQuOSwwLTI0NC4zLDQ4OS40LTI0NC4zLDEwOTMuMXMxMDkuNCwxMDkzLjEsMjQ0LjMsMTA5My4xczI0NC4zLTQ4OS40LDI0NC4zLTEwOTMuMQoJUzEzODcuNSwxNTkuNSwxMjUyLjYsMTU5LjV6IE0xMjY5LjQsMjI4NGMtMTUuNCwyMC42LTMwLjksNS4xLTMwLjksNS4xYy02Mi4xLTcyLTkzLjItMjA1LjgtOTMuMi0yMDUuOAoJYy0xMDguNy0zNDkuOC04Mi44LTExMDAuOC04Mi44LTExMDAuOGM1MS4xLTU5Ni4yLDE0NC03MzcuMSwxNzUuNi03NjguNGM2LjctNi42LDE3LjEtNy40LDI0LjctMmM0NS45LDMyLjUsODQuNCwxNjguNSw4NC40LDE2OC41CgljMTEzLjYsNDIxLjgsMTAzLjMsODE3LjksMTAzLjMsODE3LjljMTAuMywzNDQuNy01Ni45LDczMC41LTU2LjksNzMwLjVDMTM0MS45LDIyMjIuMiwxMjY5LjQsMjI4NCwxMjY5LjQsMjI4NHoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTIyMDAuNyw3MDguNmMtNjcuMi0xMTcuMS01NDYuMSwzMS42LTEwNzAsMzMycy04OTMuNSw2MzguOS04MjYuMyw3NTUuOXM1NDYuMS0zMS42LDEwNzAtMzMyCglTMjI2Ny44LDgyNS42LDIyMDAuNyw3MDguNkwyMjAwLjcsNzA4LjZ6IE0zNjYuNCwxNzgwLjRjLTI1LjctMy4yLTE5LjktMjQuNC0xOS45LTI0LjRjMzEuNi04OS43LDEzMi0xODMuMiwxMzItMTgzLjIKCWMyNDkuNC0yNjguNCw5MTMuOC02MTkuNyw5MTMuOC02MTkuN2M1NDIuNS0yNTIuNCw3MTEuMS0yNDEuOCw3NTMuOC0yMzBjOS4xLDIuNSwxNSwxMS4yLDE0LDIwLjZjLTUuMSw1Ni0xMDQuMiwxNTctMTA0LjIsMTU3CgljLTMwOS4xLDMwOC42LTY1Ny44LDQ5Ni44LTY1Ny44LDQ5Ni44Yy0yOTMuOCwxODAuNS02NjEuOSwzMTQuMS02NjEuOSwzMTQuMUM0NTYsMTgxMi42LDM2Ni40LDE3ODAuNCwzNjYuNCwxNzgwLjRMMzY2LjQsMTc4MC40CglMMzY2LjQsMTc4MC40eiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjE5OC40LDE4MDAuNGM2Ny43LTExNi44LTMwMC45LTQ1Ni44LTgyMy03NTkuNVMzNzQuNCw1ODcuOCwzMDYuOCw3MDQuN3MzMDAuOSw0NTYuOCw4MjMuMyw3NTkuNQoJUzIxMzAuNywxOTE3LjQsMjE5OC40LDE4MDAuNHogTTM1MS42LDc0OS44Yy0xMC0yMy43LDExLjEtMjkuNCwxMS4xLTI5LjRjOTMuNS0xNy42LDIyNC43LDIyLjYsMjI0LjcsMjIuNgoJYzM1Ny4yLDgxLjMsOTk0LDQ4MC4yLDk5NCw0ODAuMmM0OTAuMywzNDMuMSw1NjUuNSw0OTQuMiw1NzYuOCw1MzcuMWMyLjQsOS4xLTIuMiwxOC42LTEwLjcsMjIuNGMtNTEuMSwyMy40LTE4OC4xLTExLjUtMTg4LjEtMTEuNQoJYy00MjIuMS0xMTMuMi03NTkuNi0zMjAuNS03NTkuNi0zMjAuNWMtMzAzLjMtMTYzLjYtNjAzLjItNDE1LjMtNjAzLjItNDE1LjNjLTIyNy45LTE5MS45LTI0NS0yODUuNC0yNDUtMjg1LjRMMzUxLjYsNzQ5Ljh6Ii8+CjxjaXJjbGUgY2xhc3M9InN0MSIgY3g9IjEyNTAiIGN5PSIxMjUwIiByPSIxMjguNiIvPgo8ZWxsaXBzZSBjbGFzcz0ic3QxIiBjeD0iMTc3Ny4zIiBjeT0iNzU2LjIiIHJ4PSI3NC42IiByeT0iNzcuMiIvPgo8ZWxsaXBzZSBjbGFzcz0ic3QxIiBjeD0iNTUzIiBjeT0iMTAxOC41IiByeD0iNzQuNiIgcnk9Ijc3LjIiLz4KPGVsbGlwc2UgY2xhc3M9InN0MSIgY3g9IjEwOTguMiIgY3k9IjE5NjUiIHJ4PSI3NC42IiByeT0iNzcuMiIvPgo8L3N2Zz4K [cosmos-link]: https://cosmos.network diff --git a/clippy.toml b/clippy.toml index 8f7dac5dc3..2a31231778 100644 --- a/clippy.toml +++ b/clippy.toml @@ -1 +1 @@ -msrv = "1.71.0" +msrv = "1.77.1" diff --git a/config.toml b/config.toml index f45e2289cf..897814008d 100644 --- a/config.toml +++ b/config.toml @@ -189,11 +189,12 @@ grpc_addr = 'http://127.0.0.1:9090' # b) Pull: for polling for IBC events via the `/block_results` RPC endpoint. # -# `{ mode = 'pull', interval = '1s' }` +# `{ mode = 'pull', interval = '1s', max_retries = 4 }` # # where # # - `interval` is the interval at which to poll for blocks. Default: 1s +# - `max_retries` is the maximum number of retries to collect events for each block. Default: 4 # # This mode should only be used in situations where Hermes misses events that it should be # receiving, such as when relaying for CosmWasm-enabled chains which emit IBC events without @@ -369,6 +370,13 @@ trust_threshold = '2/3' # operational debugging information, e.g., relayer build version. memo_prefix = '' +# If this is set to a string, it will overwrite the memo used by Hermes for each transaction +# it submits to this chain. +# Default: not set. +# This is used for chains which have a very small character limit for the memo, +# and the additional information appended by Hermes would overflow that limit. +# memo_overwrite = '' + # This section specifies the filters for policy based relaying. # # Default: no policy / filters, allow all packets on all channels. @@ -433,6 +441,18 @@ memo_prefix = '' # This will override the global clear interval for this chain only, allowing different intervals for each chain. # clear_interval = 50 +# Specify packet sequences which should not be cleared, per channel. +# +# For each channel, specify a list of sequences which should not be cleared, eg. +# +# excluded_sequences = [ +# ['channel-0', [1, 2, 3]], +# ['channel-1', [4, 5, 6]] +# ] +# +# Default: No filter +# excluded_sequences = [] + [[chains]] id = 'ibc-1' rpc_addr = 'http://127.0.0.1:26557' diff --git a/crates/chain-registry/Cargo.toml b/crates/chain-registry/Cargo.toml index d64dcf5f9e..164395dc1f 100644 --- a/crates/chain-registry/Cargo.toml +++ b/crates/chain-registry/Cargo.toml @@ -1,28 +1,28 @@ [package] name = "ibc-chain-registry" -version = "0.27.0" +version = "0.27.2" edition = "2021" license = "Apache-2.0" keywords = ["cosmos", "ibc", "relayer", "chain", "registry"] repository = "https://github.com/informalsystems/hermes" authors = ["Informal Systems "] -rust-version = "1.71" +rust-version = "1.77.1" description = """ Service to fetch data from the chain-registry """ [dependencies] -ibc-relayer-types = { version = "0.27.0", path = "../relayer-types" } -ibc-proto = { version = "0.41.0", features = ["serde"] } -tendermint-rpc = { version = "0.34.0", features = ["http-client", "websocket-client"] } +ibc-relayer-types = { workspace = true } +ibc-proto = { workspace = true, features = ["serde"] } +tendermint-rpc = { workspace = true, features = ["http-client", "websocket-client"] } -async-trait = "0.1.72" -flex-error = { version = "0.4.4", default-features = false } -futures = { version = "0.3.27", features = ["executor"] } -http = "0.2" -itertools = "0.10.5" -reqwest = { version = "0.11.13", features = ["rustls-tls-native-roots", "json"], default-features = false } -serde = "1.0.195" -serde_json = "1" -tokio = "1.17.0" -tracing = "0.1.36" +async-trait = { workspace = true } +flex-error = { workspace = true } +futures = { workspace = true, features = ["executor"] } +http = { workspace = true } +itertools = { workspace = true } +reqwest = { workspace = true, features = ["rustls-tls-native-roots", "json"] } +serde = { workspace = true } +serde_json = { workspace = true } +tokio = { workspace = true } +tracing = { workspace = true } diff --git a/crates/chain-registry/src/asset_list.rs b/crates/chain-registry/src/asset_list.rs index 8c695f1685..fc7b3115da 100644 --- a/crates/chain-registry/src/asset_list.rs +++ b/crates/chain-registry/src/asset_list.rs @@ -45,6 +45,8 @@ pub struct LogoURIs { } impl Fetchable for AssetList { + const DESC: &'static str = "asset list"; + fn path(resource: &str) -> PathBuf { [resource, "assetlist.json"].iter().collect() } diff --git a/crates/chain-registry/src/chain.rs b/crates/chain-registry/src/chain.rs index ae4eee7061..c806461b64 100644 --- a/crates/chain-registry/src/chain.rs +++ b/crates/chain-registry/src/chain.rs @@ -154,6 +154,8 @@ pub struct Grpc { } impl Fetchable for ChainData { + const DESC: &'static str = "chain data"; + fn path(resource: &str) -> PathBuf { [resource, "chain.json"].iter().collect() } diff --git a/crates/chain-registry/src/error.rs b/crates/chain-registry/src/error.rs index 366eb843e4..328b89e49a 100644 --- a/crates/chain-registry/src/error.rs +++ b/crates/chain-registry/src/error.rs @@ -1,11 +1,7 @@ use std::path::PathBuf; use flex_error::{define_error, TraceError}; -use http; use itertools::Itertools; -use reqwest; -use serde_json; -use tendermint_rpc; use tokio::{task::JoinError, time::error::Elapsed}; define_error! { @@ -77,7 +73,7 @@ define_error! { .iter() .join(", "); - format!("Error finding a healthy endpoint after {} retries. Endpoints: {endpoints}", e.retries) + format!("Did not find a healthy endpoint after {} retries. Endpoints: {endpoints}", e.retries) }, UriParseError diff --git a/crates/chain-registry/src/fetchable.rs b/crates/chain-registry/src/fetchable.rs index 2c5ccacb07..8310a550d0 100644 --- a/crates/chain-registry/src/fetchable.rs +++ b/crates/chain-registry/src/fetchable.rs @@ -17,6 +17,8 @@ pub trait Fetchable where Self: DeserializeOwned, { + const DESC: &'static str; + /// The path of the fetchable resource. fn path(resource: &str) -> PathBuf; diff --git a/crates/chain-registry/src/paths.rs b/crates/chain-registry/src/paths.rs index f812aad1b4..b41b9e1d43 100644 --- a/crates/chain-registry/src/paths.rs +++ b/crates/chain-registry/src/paths.rs @@ -59,6 +59,8 @@ pub enum Tag { } impl Fetchable for IBCPath { + const DESC: &'static str = "IBC path"; + fn path(resource: &str) -> PathBuf { ["_IBC", resource].iter().collect() } diff --git a/crates/chain-registry/src/querier.rs b/crates/chain-registry/src/querier.rs index 1654ef4b3e..ab67af90af 100644 --- a/crates/chain-registry/src/querier.rs +++ b/crates/chain-registry/src/querier.rs @@ -8,14 +8,10 @@ use async_trait::async_trait; use futures::{stream::FuturesUnordered, StreamExt}; use http::Uri; use ibc_proto::cosmos::bank::v1beta1::query_client::QueryClient; -use tendermint_rpc::{Client, SubscriptionClient, Url, WebSocketClient}; -use tokio::time::{timeout, Duration}; +use tendermint_rpc::{Client, HttpClient, HttpClientUrl, Url}; use tracing::{debug, info}; -use crate::{ - error::RegistryError, - formatter::{SimpleWebSocketFormatter, UriFormatter}, -}; +use crate::error::RegistryError; /// `QueryTypes` represents the basic types required to query a node pub trait QueryTypes { @@ -72,8 +68,8 @@ pub trait QueryContext: QueryTypes { // ----------------- RPC ------------------ -/// `SimpleHermesRpcQuerier` retrieves `HermesConfigData` by querying a list of RPC endpoints through their WebSocket API -/// and returns the result of the first endpoint to answer. +/// `SimpleHermesRpcQuerier` retrieves `HermesConfigData` by querying a list of RPC endpoints +/// through their RPC API and returns the result of the first endpoint to answer. pub struct SimpleHermesRpcQuerier; /// Data which must be retrieved from RPC endpoints for Hermes @@ -81,7 +77,6 @@ pub struct SimpleHermesRpcQuerier; pub struct HermesConfigData { pub rpc_address: Url, pub max_block_size: u64, - pub websocket: Url, // max_block_time should also be retrieved from the RPC // however it looks like it is not in the genesis file anymore } @@ -100,46 +95,31 @@ impl QueryContext for SimpleHermesRpcQuerier { RegistryError::no_healthy_rpc(chain_name) } - /// Convert the RPC url to a WebSocket url, query the endpoint, return the data from the RPC. - async fn query(rpc: Self::QueryInput) -> Result { - let websocket_addr = SimpleWebSocketFormatter::parse_or_build_address(rpc.as_str())?; + /// Query the endpoint, return the data from the RPC. + async fn query(rpc_url: Self::QueryInput) -> Result { + info!("Querying RPC server at {rpc_url}"); - info!("Querying WebSocket server at {websocket_addr}"); + let url = HttpClientUrl::from_str(&rpc_url) + .map_err(|e| RegistryError::tendermint_url_parse_error(rpc_url.clone(), e))?; - let (client, driver) = timeout( - Duration::from_secs(5), - WebSocketClient::new(websocket_addr.clone()), - ) - .await - .map_err(|e| RegistryError::websocket_time_out_error(websocket_addr.to_string(), e))? - .map_err(|e| RegistryError::websocket_connect_error(websocket_addr.to_string(), e))?; - - let driver_handle = tokio::spawn(driver.run()); + let client = HttpClient::builder(url) + .build() + .map_err(|e| RegistryError::rpc_connect_error(rpc_url.clone(), e))?; let latest_consensus_params = match client.latest_consensus_params().await { Ok(response) => response.consensus_params.block.max_bytes, Err(e) => { return Err(RegistryError::rpc_consensus_params_error( - websocket_addr.to_string(), + rpc_url.to_string(), e, )) } }; - client.close().map_err(|e| { - RegistryError::websocket_conn_close_error(websocket_addr.to_string(), e) - })?; - - driver_handle - .await - .map_err(|e| RegistryError::join_error("chain_data_join".to_string(), e))? - .map_err(|e| RegistryError::websocket_driver_error(websocket_addr.to_string(), e))?; - Ok(HermesConfigData { - rpc_address: Url::from_str(&rpc) - .map_err(|e| RegistryError::tendermint_url_parse_error(rpc, e))?, + rpc_address: Url::from_str(&rpc_url) + .map_err(|e| RegistryError::tendermint_url_parse_error(rpc_url, e))?, max_block_size: latest_consensus_params, - websocket: websocket_addr, }) } } diff --git a/crates/relayer-cli/Cargo.toml b/crates/relayer-cli/Cargo.toml index 8087507ffb..03b0f7bc01 100644 --- a/crates/relayer-cli/Cargo.toml +++ b/crates/relayer-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-relayer-cli" -version = "1.8.0" +version = "1.8.2" edition = "2021" license = "Apache-2.0" readme = "README.md" @@ -8,7 +8,7 @@ keywords = ["blockchain", "consensus", "cosmos", "ibc", "tendermint"] homepage = "https://hermes.informal.systems/" repository = "https://github.com/informalsystems/hermes" authors = ["Informal Systems "] -rust-version = "1.71" +rust-version = "1.77.1" description = """ Hermes is an IBC Relayer written in Rust """ @@ -25,53 +25,43 @@ telemetry = ["ibc-relayer/telemetry", "ibc-telemetry"] rest-server = ["ibc-relayer-rest"] [dependencies] -ibc-relayer-types = { version = "0.27.0", path = "../relayer-types" } -ibc-relayer = { version = "0.27.0", path = "../relayer" } -ibc-telemetry = { version = "0.27.0", path = "../telemetry", optional = true } -ibc-relayer-rest = { version = "0.27.0", path = "../relayer-rest", optional = true } -ibc-chain-registry = { version = "0.27.0" , path = "../chain-registry" } +ibc-relayer-types = { workspace = true } +ibc-relayer = { workspace = true } +ibc-telemetry = { workspace = true, optional = true } +ibc-relayer-rest = { workspace = true, optional = true } +ibc-chain-registry = { workspace = true } -clap = { version = "3.2", features = ["cargo"] } -clap_complete = "3.2" -color-eyre = "0.6" -console = "0.15.5" -crossbeam-channel = "0.5.11" -dialoguer = "0.11.0" -dirs-next = "2.0.0" -eyre = "0.6.8" -flex-error = { version = "0.4.4", default-features = false, features = ["std", "eyre_tracer"] } -futures = "0.3.27" -hdpath = "0.6.3" -http = "0.2" -humantime = "2.1" -itertools = "0.10.5" -oneline-eyre = "0.1" -regex = "1.9.5" -serde = { version = "1.0", features = ["serde_derive"] } -serde_json = "1" -signal-hook = "0.3.17" -subtle-encoding = "0.5" -tokio = { version = "1.0", features = ["full"] } -tracing = "0.1.36" -tracing-subscriber = { version = "0.3.14", features = ["fmt", "env-filter", "json"]} -time = "0.3" -[dependencies.tendermint] -version = "0.34.0" -features = ["secp256k1"] - -[dependencies.tendermint-rpc] -version = "0.34.0" -features = ["http-client", "websocket-client"] - -[dependencies.tendermint-light-client-verifier] -version = "0.34.0" - -[dependencies.abscissa_core] -version = "=0.6.0" -features = ["options"] +abscissa_core = { workspace = true, features = ["options"] } +clap = { workspace = true, features = ["cargo"] } +clap_complete = { workspace = true } +color-eyre = { workspace = true } +console = { workspace = true } +crossbeam-channel = { workspace = true } +dialoguer = { workspace = true } +dirs-next = { workspace = true } +eyre = { workspace = true } +flex-error = { workspace = true, features = ["std", "eyre_tracer"] } +futures = { workspace = true } +hdpath = { workspace = true } +http = { workspace = true } +humantime = { workspace = true } +itertools = { workspace = true } +oneline-eyre = { workspace = true } +regex = { workspace = true } +serde = { workspace = true, features = ["serde_derive"] } +serde_json = { workspace = true } +signal-hook = { workspace = true } +subtle-encoding = { workspace = true } +tendermint-light-client-verifier = { workspace = true } +tendermint-rpc = { workspace = true, features = ["http-client", "websocket-client"] } +tendermint = { workspace = true, features = ["secp256k1"] } +time = { workspace = true } +tokio = { workspace = true, features = ["full"] } +tracing = { workspace = true } +tracing-subscriber = { workspace = true, features = ["fmt", "env-filter", "json"] } [dev-dependencies] -abscissa_core = { version = "=0.6.0", features = ["testing"] } -once_cell = "1.19" -regex = "1.9" -serial_test = "3.0.0" +abscissa_core = { workspace = true, features = ["testing"] } +once_cell = { workspace = true } +regex = { workspace = true } +serial_test = { workspace = true } diff --git a/crates/relayer-cli/src/application.rs b/crates/relayer-cli/src/application.rs index 0238e54bab..48bfcc3a81 100644 --- a/crates/relayer-cli/src/application.rs +++ b/crates/relayer-cli/src/application.rs @@ -165,7 +165,7 @@ impl Application for CliApp { let terminal = Terminal::new(self.term_colors(command)); let config_path = command.config_path(); - self.config_path = config_path.clone(); + self.config_path.clone_from(&config_path); let config = config_path .map(|path| self.load_config(&path)) diff --git a/crates/relayer-cli/src/bin/hermes/main.rs b/crates/relayer-cli/src/bin/hermes/main.rs index 061ec33720..567bd4dd09 100644 --- a/crates/relayer-cli/src/bin/hermes/main.rs +++ b/crates/relayer-cli/src/bin/hermes/main.rs @@ -1,6 +1,6 @@ //! Main entry point for Cli -#![deny(warnings, missing_docs, trivial_casts, unused_qualifications)] +#![deny(warnings, missing_docs, trivial_casts)] #![forbid(unsafe_code)] use ibc_relayer_cli::{application::APPLICATION, components::enable_ansi}; diff --git a/crates/relayer-cli/src/chain_registry.rs b/crates/relayer-cli/src/chain_registry.rs index 357e2b5cf2..61b1401a09 100644 --- a/crates/relayer-cli/src/chain_registry.rs +++ b/crates/relayer-cli/src/chain_registry.rs @@ -1,6 +1,10 @@ //! Contains functions to generate a relayer config for a given chain -use std::{collections::HashMap, fmt::Display, marker::Send}; +use std::{ + collections::{BTreeMap, HashMap}, + fmt::Display, + marker::Send, +}; use futures::future::join_all; use http::Uri; @@ -28,7 +32,7 @@ use ibc_relayer::{ use tendermint_rpc::Url; use tokio::task::{JoinError, JoinHandle}; -use tracing::trace; +use tracing::{error, trace}; const MAX_HEALTHY_QUERY_RETRIES: u8 = 5; @@ -114,11 +118,6 @@ where ) .await?; - let websocket_address = - rpc_data.websocket.clone().try_into().map_err(|e| { - RegistryError::websocket_url_parse_error(rpc_data.websocket.to_string(), e) - })?; - let avg_gas_price = if let Some(fee_token) = chain_data.fees.fee_tokens.first() { fee_token.average_gas_price } else { @@ -136,9 +135,9 @@ where id: chain_data.chain_id, rpc_addr: rpc_data.rpc_address, grpc_addr: grpc_address, - event_source: EventSourceMode::Push { - url: websocket_address, - batch_delay: default::batch_delay(), + event_source: EventSourceMode::Pull { + interval: default::poll_interval(), + max_retries: default::max_retries(), }, rpc_timeout: default::rpc_timeout(), trusted_node: default::trusted_node(), @@ -164,6 +163,7 @@ where client_refresh_rate: default::client_refresh_rate(), ccv_consumer_chain: false, memo_prefix: Memo::default(), + memo_overwrite: None, proof_specs: Default::default(), trust_threshold: TrustThreshold::default(), gas_price: GasPrice { @@ -176,6 +176,7 @@ where extension_options: Vec::new(), compat_mode: None, clear_interval: None, + excluded_sequences: BTreeMap::new(), })) } @@ -194,6 +195,7 @@ where for i in 0..retries { let query_response = QuerierType::query_healthy(chain_name.to_string(), endpoints.clone()).await; + match query_response { Ok(r) => { return Ok(r); @@ -203,13 +205,13 @@ where } } } - Err(RegistryError::unhealthy_endpoints( - endpoints - .iter() - .map(|endpoint| endpoint.to_string()) - .collect(), - retries, - )) + + let endpoints = endpoints + .iter() + .map(|endpoint| endpoint.to_string()) + .collect(); + + Err(RegistryError::unhealthy_endpoints(endpoints, retries)) } /// Fetches the specified resources from the Cosmos chain registry, using the specified commit hash @@ -217,15 +219,21 @@ where /// Returns a vector of handles that need to be awaited in order to access the fetched data, or the /// error that occurred while fetching. async fn get_handles( - resources: &[String], + chain_ids: &[String], commit: &Option, -) -> Vec>> { - let handles = resources +) -> Vec<(String, JoinHandle>)> { + let handles = chain_ids .iter() - .map(|resource| { - let resource = resource.to_string(); + .map(|chain_id| { let commit = commit.clone(); - tokio::spawn(async move { T::fetch(resource, commit).await }) + let handle = { + let chain_id = chain_id.to_string(); + tokio::spawn(async move { + tracing::info!("{chain_id}: Fetching {}...", T::DESC); + T::fetch(chain_id, commit).await + }) + }; + (chain_id.to_string(), handle) }) .collect(); handles @@ -234,14 +242,18 @@ async fn get_handles( /// Given a vector of handles, awaits them and returns a vector of results. Any errors /// that occurred are mapped to a `RegistryError`. async fn get_data_from_handles( - handles: Vec>>, + handles: Vec<(String, JoinHandle>)>, error_task: &str, -) -> Result>, RegistryError> { - join_all(handles) +) -> Result)>, RegistryError> { + let (names, tasks): (Vec<_>, Vec<_>) = handles.into_iter().unzip(); + + let results = join_all(tasks) .await .into_iter() .collect::, JoinError>>() - .map_err(|e| RegistryError::join_error(error_task.to_string(), e)) + .map_err(|e| RegistryError::join_error(error_task.to_string(), e))?; + + Ok(names.into_iter().zip(results).collect()) } /// Fetches a list of ChainConfigs specified by the given slice of chain names. These @@ -264,17 +276,17 @@ async fn get_data_from_handles( pub async fn get_configs( chains: &[String], commit: Option, -) -> Result>, RegistryError> { - let n = chains.len(); - - if n == 0 { - return Ok(Vec::new()); +) -> Result>, RegistryError> { + if chains.is_empty() { + return Ok(HashMap::new()); } // Spawn tasks to fetch data from the chain-registry let chain_data_handle = get_handles::(chains, &commit).await; let asset_lists_handle = get_handles::(chains, &commit).await; + let n = chains.len(); + let mut path_handles = Vec::with_capacity(n * (n - 1) / 2); for i in 0..n { @@ -294,43 +306,65 @@ pub async fn get_configs( let asset_list_results = get_data_from_handles::(asset_lists_handle, "asset_handle_join").await?; - let chain_data_array: Vec = chain_data_results + let chain_data_array: Vec<(String, ChainData)> = chain_data_results .into_iter() - .filter_map(|chain_data| chain_data.ok()) + .filter_map(|(name, data)| match data { + Ok(data) => Some((name, data)), + Err(e) => { + error!("Error while fetching chain data for chain {name}: {e}"); + None + } + }) .collect(); - let asset_lists: Vec = asset_list_results + + let asset_lists: Vec<(String, AssetList)> = asset_list_results .into_iter() - .filter_map(|asset_list| asset_list.ok()) + .filter_map(|(name, assets)| match assets { + Ok(assets) => Some((name, assets)), + Err(e) => { + error!("Error while fetching asset list for chain {name}: {e}"); + None + } + }) .collect(); let path_data: Result, JoinError> = join_all(path_handles).await.into_iter().collect(); - let path_data: Vec = path_data + let path_data: Vec<_> = path_data .map_err(|e| RegistryError::join_error("path_handle_join".to_string(), e))? .into_iter() - .filter_map(|path| path.ok()) + .filter_map(|path| match path { + Ok(path) => Some(path), + Err(e) => { + error!("Error while fetching path data: {e}"); + None + } + }) .collect(); let mut packet_filters = construct_packet_filters(path_data); // Construct ChainConfig - let config_handles: Vec>> = chain_data_array + let config_handles: Vec<_> = chain_data_array .into_iter() .zip(asset_lists.into_iter()) - .zip(chains.iter()) - .map(|((chain_data, assets), chain_name)| { - let packet_filter = packet_filters.remove(chain_name); - tokio::spawn(async move { - hermes_config::< - GrpcHealthCheckQuerier, - SimpleHermesRpcQuerier, - SimpleGrpcFormatter, - >(chain_data, assets, packet_filter) - .await - }) + .map(|((chain_name, chain_data), (_, assets))| { + let packet_filter = packet_filters.remove(&chain_name); + let handle = tokio::spawn(hermes_config::< + GrpcHealthCheckQuerier, + SimpleHermesRpcQuerier, + SimpleGrpcFormatter, + >(chain_data, assets, packet_filter)); + + (chain_name, handle) }) .collect(); - get_data_from_handles::(config_handles, "config_handle_join").await + let result = get_data_from_handles::(config_handles, "config_handle_join") + .await? + .into_iter() + .collect(); + + Ok(result) } /// Concurrent RPC and GRPC queries are likely to fail. @@ -356,7 +390,7 @@ mod tests { async fn should_have_no_filter(test_chains: &[String]) -> Result<(), RegistryError> { let configs = get_configs(test_chains, Some(TEST_COMMIT.to_owned())).await?; - for config in configs { + for (_name, config) in configs { match config { Ok(config) => { assert_eq!( @@ -364,10 +398,7 @@ mod tests { ChannelPolicy::AllowAll ); } - Err(e) => panic!( - "Encountered an unexpected error in chain registry test: {}", - e - ), + Err(e) => panic!("Encountered an unexpected error in chain registry test: {e}"), } } @@ -386,7 +417,7 @@ mod tests { let configs = get_configs(test_chains, Some(TEST_COMMIT.to_owned())).await?; - for config in configs { + for (_name, config) in configs { match config { Ok(config) => match &config.packet_filter().channel_policy { ChannelPolicy::Allow(channel_filter) => { diff --git a/crates/relayer-cli/src/commands.rs b/crates/relayer-cli/src/commands.rs index 055231ffbf..dda273f4c8 100644 --- a/crates/relayer-cli/src/commands.rs +++ b/crates/relayer-cli/src/commands.rs @@ -151,7 +151,11 @@ impl Configurable for CliCmd { for ccfg in config.chains.iter_mut() { #[allow(irrefutable_let_patterns)] if let ChainConfig::CosmosSdk(ref mut cosmos_ccfg) = ccfg { - cosmos_ccfg.memo_prefix.apply_suffix(&suffix); + if let Some(memo) = &cosmos_ccfg.memo_overwrite { + cosmos_ccfg.memo_prefix = memo.clone(); + } else { + cosmos_ccfg.memo_prefix.apply_suffix(&suffix); + } } } diff --git a/crates/relayer-cli/src/commands/clear.rs b/crates/relayer-cli/src/commands/clear.rs index 02a6634060..f8efb03df2 100644 --- a/crates/relayer-cli/src/commands/clear.rs +++ b/crates/relayer-cli/src/commands/clear.rs @@ -1,8 +1,12 @@ +use eyre::eyre; use std::ops::RangeInclusive; use abscissa_core::{clap::Parser, config::Override, Command, FrameworkErrorKind, Runnable}; use ibc_relayer::{ - chain::handle::{BaseChainHandle, ChainHandle}, + chain::{ + handle::{BaseChainHandle, ChainHandle}, + requests::{IncludeProof, QueryChannelRequest, QueryHeight}, + }, config::Config, link::{error::LinkError, Link, LinkParameters}, util::seq_range::parse_seq_range, @@ -146,27 +150,84 @@ impl Runnable for ClearPacketsCmd { } } - let mut ev_list = vec![]; + let (channel, _) = match chains.src.query_channel( + QueryChannelRequest { + port_id: self.port_id.clone(), + channel_id: self.channel_id.clone(), + height: QueryHeight::Latest, + }, + IncludeProof::No, + ) { + Ok(channel) => channel, + Err(e) => Output::error(e).exit(), + }; + + let exclude_src_sequences = config + .find_chain(&chains.src.id()) + .map(|chain_config| chain_config.excluded_sequences(&self.channel_id).to_vec()) + .unwrap_or_default(); + + let exclude_dst_sequences = + if let Some(counterparty_channel_id) = channel.counterparty().channel_id() { + config + .find_chain(&chains.dst.id()) + .map(|chain_config| { + chain_config + .excluded_sequences(counterparty_channel_id) + .to_vec() + }) + .unwrap_or_default() + } else { + Vec::new() + }; // Construct links in both directions. - let opts = LinkParameters { + let fwd_opts = LinkParameters { src_port_id: self.port_id.clone(), src_channel_id: self.channel_id.clone(), max_memo_size: config.mode.packets.ics20_max_memo_size, max_receiver_size: config.mode.packets.ics20_max_receiver_size, + exclude_src_sequences, }; - let fwd_link = match Link::new_from_opts(chains.src.clone(), chains.dst, opts, false, false) - { + let counterparty_channel_id = match channel.counterparty().channel_id() { + Some(channel_id) => channel_id.clone(), + None => Output::error(eyre!( + "Channel `{}` and port `{}` does not have a counterparty channel id", + self.channel_id, + self.port_id + )) + .exit(), + }; + + // Construct links in both directions. + let reverse_opts = LinkParameters { + src_port_id: channel.counterparty().port_id().clone(), + src_channel_id: counterparty_channel_id, + max_memo_size: config.mode.packets.ics20_max_memo_size, + max_receiver_size: config.mode.packets.ics20_max_receiver_size, + exclude_src_sequences: exclude_dst_sequences, + }; + + let fwd_link = match Link::new_from_opts( + chains.src.clone(), + chains.dst.clone(), + fwd_opts, + false, + false, + ) { Ok(link) => link, Err(e) => Output::error(e).exit(), }; - let rev_link = match fwd_link.reverse(false, false) { + let rev_link = match Link::new_from_opts(chains.dst, chains.src, reverse_opts, false, false) + { Ok(link) => link, Err(e) => Output::error(e).exit(), }; + let mut ev_list = vec![]; + // Schedule RecvPacket messages for pending packets in both directions or, // if packet sequences are provided, only on the specified chain. // This may produce pending acks which will be processed in the next phase. diff --git a/crates/relayer-cli/src/commands/config/auto.rs b/crates/relayer-cli/src/commands/config/auto.rs index 33679be8e1..3638da2ba2 100644 --- a/crates/relayer-cli/src/commands/config/auto.rs +++ b/crates/relayer-cli/src/commands/config/auto.rs @@ -3,7 +3,7 @@ use std::{collections::HashSet, path::PathBuf}; use abscissa_core::{clap::Parser, Command, Runnable}; use ibc_relayer::config::{store, ChainConfig, Config}; use itertools::Itertools; -use tracing::{info, warn}; +use tracing::{error, info, warn}; use crate::{chain_registry::get_configs, conclude::Output}; @@ -77,18 +77,17 @@ impl Runnable for AutoCmd { // Extract keys and sort chains by name let names_and_keys = extract_chains_and_keys(&self.chain_names); - let sorted_names = names_and_keys + + let chain_names = names_and_keys .iter() - .map(|n| &n.0) + .map(|(n, _)| n) .cloned() .collect::>(); - let sorted_names_set: HashSet = HashSet::from_iter(sorted_names.iter().cloned()); - let commit = self.commit.clone(); // Fetch chain configs from the chain registry - let config_results = runtime.block_on(get_configs(&sorted_names, commit)); + let config_results = runtime.block_on(get_configs(&chain_names, commit)); if let Err(e) = config_results { let config = Config::default(); @@ -109,22 +108,32 @@ impl Runnable for AutoCmd { } }; - let mut chain_configs: Vec = config_results + let mut chain_configs: Vec<(String, ChainConfig)> = config_results .unwrap() .into_iter() - .filter_map(|r| r.ok()) + .filter_map(|(name, config)| match config { + Ok(config) => Some((name, config)), + Err(e) => { + error!("Failed to generate chain config for chain '{name}': {e}"); + None + } + }) .collect(); // Determine which chains were not fetched - let fetched_chains_set = HashSet::from_iter(chain_configs.iter().map(|c| c.id().name())); - let missing_chains_set: HashSet<_> = - sorted_names_set.difference(&fetched_chains_set).collect(); + let fetched_chains_set: HashSet<_> = + HashSet::from_iter(chain_configs.iter().map(|(name, _)| name).cloned()); + let expected_chains_set: HashSet<_> = HashSet::from_iter(chain_names.iter().cloned()); + + let missing_chains_set: HashSet<_> = expected_chains_set + .difference(&fetched_chains_set) + .collect(); let configs_and_keys = chain_configs .iter_mut() - .zip(names_and_keys.iter().map(|n| &n.1).cloned()); + .zip(names_and_keys.iter().map(|(_, keys)| keys).cloned()); - for (chain_config, key_option) in configs_and_keys { + for ((_name, chain_config), key_option) in configs_and_keys { // If a key is provided, use it if let Some(key_name) = key_option { info!("{}: uses key \"{}\"", &chain_config.id(), &key_name); @@ -144,7 +153,7 @@ impl Runnable for AutoCmd { } let config = Config { - chains: chain_configs, + chains: chain_configs.into_iter().map(|(_, c)| c).collect(), ..Config::default() }; diff --git a/crates/relayer-cli/src/commands/evidence.rs b/crates/relayer-cli/src/commands/evidence.rs index f6b15c3bad..e2adf4b9a1 100644 --- a/crates/relayer-cli/src/commands/evidence.rs +++ b/crates/relayer-cli/src/commands/evidence.rs @@ -6,7 +6,6 @@ use std::{ time::Duration, }; -use abscissa_core::{clap::Parser, Command, Runnable}; use ibc_relayer::{ chain::{ cosmos::CosmosSdkChain, diff --git a/crates/relayer-cli/src/commands/fee/transfer.rs b/crates/relayer-cli/src/commands/fee/transfer.rs index 58d471a659..ea5d0523a7 100644 --- a/crates/relayer-cli/src/commands/fee/transfer.rs +++ b/crates/relayer-cli/src/commands/fee/transfer.rs @@ -1,8 +1,6 @@ use core::time::Duration; -use abscissa_core::{ - clap::Parser, config::Override, Command, FrameworkError, FrameworkErrorKind, Runnable, -}; +use abscissa_core::{clap::Parser, config::Override, FrameworkError, FrameworkErrorKind}; use eyre::eyre; use ibc_relayer::{ chain::handle::ChainHandle, diff --git a/crates/relayer-cli/src/commands/health.rs b/crates/relayer-cli/src/commands/health.rs index 7a4758f051..ce5e976dbc 100644 --- a/crates/relayer-cli/src/commands/health.rs +++ b/crates/relayer-cli/src/commands/health.rs @@ -1,4 +1,3 @@ -use abscissa_core::{clap::Parser, Command, Runnable}; use ibc_relayer::chain::{endpoint::HealthCheck::*, handle::ChainHandle}; use crate::{ diff --git a/crates/relayer-cli/src/commands/listen.rs b/crates/relayer-cli/src/commands/listen.rs index a5b44d0a16..566d5c3076 100644 --- a/crates/relayer-cli/src/commands/listen.rs +++ b/crates/relayer-cli/src/commands/listen.rs @@ -5,7 +5,7 @@ use core::{ }; use std::thread; -use abscissa_core::{application::fatal_error, clap::Parser, Runnable}; +use abscissa_core::application::fatal_error; use eyre::eyre; use ibc_relayer::{ chain::handle::Subscription, @@ -154,10 +154,14 @@ fn subscribe( *batch_delay, rt, ), - EventSourceMode::Pull { interval } => EventSource::rpc( + EventSourceMode::Pull { + interval, + max_retries, + } => EventSource::rpc( chain_config.id().clone(), HttpClient::new(config.rpc_addr.clone())?, *interval, + *max_retries, rt, ), }?; @@ -176,10 +180,14 @@ fn subscribe( *batch_delay, rt, ), - EventSourceMode::Pull { interval } => EventSource::rpc( + EventSourceMode::Pull { + interval, + max_retries, + } => EventSource::rpc( chain_config.id().clone(), HttpClient::new(config.rpc_addr.clone())?, *interval, + *max_retries, rt, ), }?; diff --git a/crates/relayer-cli/src/commands/logs/reset.rs b/crates/relayer-cli/src/commands/logs/reset.rs index 901d9c6ba9..f6fa6c0ec8 100644 --- a/crates/relayer-cli/src/commands/logs/reset.rs +++ b/crates/relayer-cli/src/commands/logs/reset.rs @@ -1,5 +1,3 @@ -use abscissa_core::{clap::Parser, Command, Runnable}; - use crate::{components::default_directive, prelude::*, tracing_handle::send_command}; #[derive(Clone, Command, Debug, Parser, PartialEq, Eq)] diff --git a/crates/relayer-cli/src/commands/misbehaviour.rs b/crates/relayer-cli/src/commands/misbehaviour.rs index 63fc55c66c..06417e4d4b 100644 --- a/crates/relayer-cli/src/commands/misbehaviour.rs +++ b/crates/relayer-cli/src/commands/misbehaviour.rs @@ -1,6 +1,5 @@ use std::ops::Deref; -use abscissa_core::{clap::Parser, Command, Runnable}; use eyre::eyre; use ibc_relayer::{ chain::{ diff --git a/crates/relayer-cli/src/commands/query/channel.rs b/crates/relayer-cli/src/commands/query/channel.rs index 2502983d20..e61338e89b 100644 --- a/crates/relayer-cli/src/commands/query/channel.rs +++ b/crates/relayer-cli/src/commands/query/channel.rs @@ -1,4 +1,3 @@ -use abscissa_core::{clap::Parser, Command, Runnable}; use ibc_relayer::chain::{ handle::ChainHandle, requests::{IncludeProof, QueryChannelRequest, QueryHeight}, diff --git a/crates/relayer-cli/src/commands/query/channel_ends.rs b/crates/relayer-cli/src/commands/query/channel_ends.rs index 0f372ab8d3..d00abbcdd1 100644 --- a/crates/relayer-cli/src/commands/query/channel_ends.rs +++ b/crates/relayer-cli/src/commands/query/channel_ends.rs @@ -1,4 +1,3 @@ -use abscissa_core::{clap::Parser, Command, Runnable}; use eyre::eyre; use ibc_relayer::{ chain::{ diff --git a/crates/relayer-cli/src/commands/query/channels.rs b/crates/relayer-cli/src/commands/query/channels.rs index 97b2e4075f..3c42792c1d 100644 --- a/crates/relayer-cli/src/commands/query/channels.rs +++ b/crates/relayer-cli/src/commands/query/channels.rs @@ -1,6 +1,5 @@ use core::fmt::{Debug, Error, Formatter}; -use abscissa_core::{clap::Parser, Runnable}; use eyre::eyre; use ibc_relayer::{ chain::{ diff --git a/crates/relayer-cli/src/commands/query/client.rs b/crates/relayer-cli/src/commands/query/client.rs index 722f1e181a..8a2beda9cd 100644 --- a/crates/relayer-cli/src/commands/query/client.rs +++ b/crates/relayer-cli/src/commands/query/client.rs @@ -1,5 +1,4 @@ use abscissa_core::{clap::Parser, Command, Runnable}; -use color_eyre::eyre::eyre; use ibc_relayer::chain::{ handle::ChainHandle, requests::{ @@ -322,24 +321,10 @@ fn client_status( return Ok(Status::Frozen); } - let consensus_state_heights = - chain.query_consensus_state_heights(QueryConsensusStateHeightsRequest { - client_id: client_id.clone(), - pagination: Some(PageRequest::all()), - })?; - - let latest_consensus_height = consensus_state_heights.last().copied().ok_or_else(|| { - eyre!( - "no consensus state found for client '{}' on chain '{}'", - client_id, - chain.id() - ) - })?; - let (latest_consensus_state, _) = chain.query_consensus_state( QueryConsensusStateRequest { client_id: client_id.clone(), - consensus_height: latest_consensus_height, + consensus_height: client_state.latest_height(), query_height: QueryHeight::Latest, }, IncludeProof::No, diff --git a/crates/relayer-cli/src/commands/query/clients.rs b/crates/relayer-cli/src/commands/query/clients.rs index 242b12213f..79be5c285b 100644 --- a/crates/relayer-cli/src/commands/query/clients.rs +++ b/crates/relayer-cli/src/commands/query/clients.rs @@ -1,4 +1,3 @@ -use abscissa_core::{clap::Parser, Command, Runnable}; use ibc_relayer::chain::{ handle::ChainHandle, requests::{PageRequest, QueryClientStatesRequest}, diff --git a/crates/relayer-cli/src/commands/query/connection.rs b/crates/relayer-cli/src/commands/query/connection.rs index 10c27d61d3..abc1510c57 100644 --- a/crates/relayer-cli/src/commands/query/connection.rs +++ b/crates/relayer-cli/src/commands/query/connection.rs @@ -1,4 +1,3 @@ -use abscissa_core::{clap::Parser, Command, Runnable}; use ibc_relayer::chain::{ handle::ChainHandle, requests::{ diff --git a/crates/relayer-cli/src/commands/query/connections.rs b/crates/relayer-cli/src/commands/query/connections.rs index 63bf6cc94b..217903cbee 100644 --- a/crates/relayer-cli/src/commands/query/connections.rs +++ b/crates/relayer-cli/src/commands/query/connections.rs @@ -1,4 +1,3 @@ -use abscissa_core::{clap::Parser, Runnable}; use ibc_relayer::chain::{ handle::ChainHandle, requests::{ diff --git a/crates/relayer-cli/src/commands/query/packet/ack.rs b/crates/relayer-cli/src/commands/query/packet/ack.rs index 7353acd594..34a5bd19af 100644 --- a/crates/relayer-cli/src/commands/query/packet/ack.rs +++ b/crates/relayer-cli/src/commands/query/packet/ack.rs @@ -1,4 +1,3 @@ -use abscissa_core::{clap::Parser, Command, Runnable}; use ibc_relayer::chain::{ handle::ChainHandle, requests::{IncludeProof, QueryHeight, QueryPacketAcknowledgementRequest}, diff --git a/crates/relayer-cli/src/commands/query/packet/acks.rs b/crates/relayer-cli/src/commands/query/packet/acks.rs index afa493321b..9bc1ddfb49 100644 --- a/crates/relayer-cli/src/commands/query/packet/acks.rs +++ b/crates/relayer-cli/src/commands/query/packet/acks.rs @@ -1,4 +1,3 @@ -use abscissa_core::{clap::Parser, Command, Runnable}; use ibc_relayer::chain::{counterparty::acknowledgements_on_chain, handle::BaseChainHandle}; use ibc_relayer_types::core::ics24_host::identifier::{ChainId, ChannelId, PortId}; diff --git a/crates/relayer-cli/src/commands/query/packet/commitment.rs b/crates/relayer-cli/src/commands/query/packet/commitment.rs index 26e49d56b1..f6d6a94b10 100644 --- a/crates/relayer-cli/src/commands/query/packet/commitment.rs +++ b/crates/relayer-cli/src/commands/query/packet/commitment.rs @@ -1,4 +1,3 @@ -use abscissa_core::{clap::Parser, Command, Runnable}; use ibc_relayer::chain::{ handle::ChainHandle, requests::{IncludeProof, QueryHeight, QueryPacketCommitmentRequest}, diff --git a/crates/relayer-cli/src/commands/query/packet/commitments.rs b/crates/relayer-cli/src/commands/query/packet/commitments.rs index 648770e762..7ab6272cd0 100644 --- a/crates/relayer-cli/src/commands/query/packet/commitments.rs +++ b/crates/relayer-cli/src/commands/query/packet/commitments.rs @@ -1,4 +1,3 @@ -use abscissa_core::{clap::Parser, Command, Runnable}; use ibc_relayer::chain::counterparty::commitments_on_chain; use ibc_relayer_types::core::ics24_host::identifier::{ChainId, ChannelId, PortId}; diff --git a/crates/relayer-cli/src/commands/query/packet/pending.rs b/crates/relayer-cli/src/commands/query/packet/pending.rs index ed6a679e04..3a46b49636 100644 --- a/crates/relayer-cli/src/commands/query/packet/pending.rs +++ b/crates/relayer-cli/src/commands/query/packet/pending.rs @@ -1,6 +1,5 @@ use core::fmt; -use abscissa_core::{clap::Parser, Command, Runnable}; use ibc_relayer::chain::{ counterparty::{channel_on_destination, pending_packet_summary, PendingPackets}, handle::{BaseChainHandle, ChainHandle}, diff --git a/crates/relayer-cli/src/commands/query/packet/pending_acks.rs b/crates/relayer-cli/src/commands/query/packet/pending_acks.rs index aef53a7511..da80aa1b36 100644 --- a/crates/relayer-cli/src/commands/query/packet/pending_acks.rs +++ b/crates/relayer-cli/src/commands/query/packet/pending_acks.rs @@ -1,4 +1,3 @@ -use abscissa_core::{clap::Parser, Command, Runnable}; use ibc_relayer::{ chain::{counterparty::unreceived_acknowledgements, handle::BaseChainHandle}, path::PathIdentifiers, diff --git a/crates/relayer-cli/src/commands/query/packet/pending_sends.rs b/crates/relayer-cli/src/commands/query/packet/pending_sends.rs index 4cbbc81179..c9c8c12899 100644 --- a/crates/relayer-cli/src/commands/query/packet/pending_sends.rs +++ b/crates/relayer-cli/src/commands/query/packet/pending_sends.rs @@ -1,4 +1,3 @@ -use abscissa_core::{clap::Parser, Command, Runnable}; use ibc_relayer::{ chain::{counterparty::unreceived_packets, handle::BaseChainHandle}, path::PathIdentifiers, diff --git a/crates/relayer-cli/src/commands/start.rs b/crates/relayer-cli/src/commands/start.rs index 6ca38f9df7..fc2abafc8a 100644 --- a/crates/relayer-cli/src/commands/start.rs +++ b/crates/relayer-cli/src/commands/start.rs @@ -1,6 +1,5 @@ use std::{error::Error, io}; -use abscissa_core::{clap::Parser, Command, Runnable}; use crossbeam_channel::Sender; use ibc_relayer::{ chain::handle::{CachingChainHandle, ChainHandle}, diff --git a/crates/relayer-cli/src/commands/tx/channel.rs b/crates/relayer-cli/src/commands/tx/channel.rs index 2d7f625e3c..3911d8279c 100644 --- a/crates/relayer-cli/src/commands/tx/channel.rs +++ b/crates/relayer-cli/src/commands/tx/channel.rs @@ -1,6 +1,5 @@ #![allow(clippy::redundant_closure_call)] -use abscissa_core::{clap::Parser, Command, Runnable}; use ibc_relayer::{ chain::{ handle::ChainHandle, diff --git a/crates/relayer-cli/src/commands/tx/connection.rs b/crates/relayer-cli/src/commands/tx/connection.rs index 89803dc16e..67fe9a7251 100644 --- a/crates/relayer-cli/src/commands/tx/connection.rs +++ b/crates/relayer-cli/src/commands/tx/connection.rs @@ -1,6 +1,5 @@ #![allow(clippy::redundant_closure_call)] -use abscissa_core::{clap::Parser, Command, Runnable}; use ibc_relayer::connection::{Connection, ConnectionSide}; use ibc_relayer_types::{ core::ics24_host::identifier::{ChainId, ClientId, ConnectionId}, diff --git a/crates/relayer-cli/src/commands/tx/packet.rs b/crates/relayer-cli/src/commands/tx/packet.rs index bc63a045cd..df9773d2f9 100644 --- a/crates/relayer-cli/src/commands/tx/packet.rs +++ b/crates/relayer-cli/src/commands/tx/packet.rs @@ -1,6 +1,5 @@ use std::ops::RangeInclusive; -use abscissa_core::{clap::Parser, Command, Runnable}; use ibc_relayer::{ chain::handle::ChainHandle, link::{Link, LinkParameters}, @@ -90,7 +89,11 @@ impl Runnable for TxPacketRecvCmd { src_channel_id: self.src_channel_id.clone(), max_memo_size: config.mode.packets.ics20_max_memo_size, max_receiver_size: config.mode.packets.ics20_max_receiver_size, + + // Packets are only excluded when clearing + exclude_src_sequences: vec![], }; + let link = match Link::new_from_opts(chains.src, chains.dst, opts, false, false) { Ok(link) => link, Err(e) => Output::error(e).exit(), @@ -187,7 +190,11 @@ impl Runnable for TxPacketAckCmd { src_channel_id: self.src_channel_id.clone(), max_memo_size: config.mode.packets.ics20_max_memo_size, max_receiver_size: config.mode.packets.ics20_max_receiver_size, + + // Packets are only excluded when clearing + exclude_src_sequences: vec![], }; + let link = match Link::new_from_opts(chains.src, chains.dst, opts, false, false) { Ok(link) => link, Err(e) => Output::error(e).exit(), diff --git a/crates/relayer-cli/src/commands/tx/transfer.rs b/crates/relayer-cli/src/commands/tx/transfer.rs index 5f2933718a..c218b05b8e 100644 --- a/crates/relayer-cli/src/commands/tx/transfer.rs +++ b/crates/relayer-cli/src/commands/tx/transfer.rs @@ -1,6 +1,6 @@ use core::time::Duration; -use abscissa_core::{clap::Parser, config::Override, Command, FrameworkErrorKind, Runnable}; +use abscissa_core::{config::Override, FrameworkErrorKind}; use eyre::eyre; use ibc_relayer::{ chain::handle::ChainHandle, diff --git a/crates/relayer-cli/src/commands/tx/upgrade.rs b/crates/relayer-cli/src/commands/tx/upgrade.rs index a8931c6cad..977262aa4b 100644 --- a/crates/relayer-cli/src/commands/tx/upgrade.rs +++ b/crates/relayer-cli/src/commands/tx/upgrade.rs @@ -1,6 +1,5 @@ use core::time::Duration; -use abscissa_core::{clap::Parser, Command, Runnable}; use ibc_relayer::upgrade_chain::{ build_and_send_ibc_upgrade_proposal, requires_legacy_upgrade_proposal, UpgradePlanOptions, }; diff --git a/crates/relayer-cli/src/conclude.rs b/crates/relayer-cli/src/conclude.rs index af279e0402..4ea674a1a8 100644 --- a/crates/relayer-cli/src/conclude.rs +++ b/crates/relayer-cli/src/conclude.rs @@ -171,7 +171,7 @@ impl Output { /// Builder-style method for attaching a result to an output object. pub fn with_result(mut self, result: R) -> Self where - R: Serialize + core::fmt::Debug + 'static, + R: Serialize + fmt::Debug + 'static, { if json() { self.result = Result::Json(serialize_result(result)); @@ -192,7 +192,7 @@ impl Output { /// input `result`. pub fn success(result: R) -> Self where - R: Serialize + core::fmt::Debug + 'static, + R: Serialize + fmt::Debug + 'static, { Output::with_success().with_result(result) } @@ -236,7 +236,7 @@ impl Output { } /// Helper to serialize a result into a `serde_json::Value`. -fn serialize_result(res: impl Serialize + core::fmt::Debug) -> serde_json::Value { +fn serialize_result(res: impl Serialize + fmt::Debug) -> serde_json::Value { let last_resort = format!("{res:#?}"); match serde_json::to_value(res) { diff --git a/crates/relayer-cli/src/entry.rs b/crates/relayer-cli/src/entry.rs index cdcbc41551..a550bdb6d7 100644 --- a/crates/relayer-cli/src/entry.rs +++ b/crates/relayer-cli/src/entry.rs @@ -1,5 +1,3 @@ -#![allow(unused_qualifications)] // Fix for warning in `ValueEnum` generated code - //! Definition of the entrypoint for the Hermes CLI. use std::{path::PathBuf, process}; diff --git a/crates/relayer-cli/src/lib.rs b/crates/relayer-cli/src/lib.rs index ff28651be7..5185118d69 100644 --- a/crates/relayer-cli/src/lib.rs +++ b/crates/relayer-cli/src/lib.rs @@ -13,12 +13,7 @@ // Tip: Deny warnings with `RUSTFLAGS="-D warnings"` environment variable in CI #![forbid(unsafe_code)] -#![deny( - rust_2018_idioms, - trivial_casts, - unused_lifetimes, - unused_qualifications -)] +#![deny(rust_2018_idioms, trivial_casts, unused_lifetimes)] #![allow(deprecated)] extern crate alloc; diff --git a/crates/relayer-cli/src/prelude.rs b/crates/relayer-cli/src/prelude.rs index fac61533bc..0f7169652a 100644 --- a/crates/relayer-cli/src/prelude.rs +++ b/crates/relayer-cli/src/prelude.rs @@ -4,8 +4,10 @@ //! which are generally useful and should be available in every module with //! `use crate::prelude::*; +pub use abscissa_core::clap::Parser; /// Abscissa core prelude pub use abscissa_core::prelude::*; +pub use abscissa_core::Command; /// Application state accessors pub use crate::application::{app_config, app_reader}; diff --git a/crates/relayer-cli/tests/acceptance.rs b/crates/relayer-cli/tests/acceptance.rs index c50c4b0866..208164e0bf 100644 --- a/crates/relayer-cli/tests/acceptance.rs +++ b/crates/relayer-cli/tests/acceptance.rs @@ -10,13 +10,7 @@ // Tip: Deny warnings with `RUSTFLAGS="-D warnings"` environment variable in CI #![forbid(unsafe_code)] -#![warn( - missing_docs, - rust_2018_idioms, - trivial_casts, - unused_lifetimes, - unused_qualifications -)] +#![warn(missing_docs, rust_2018_idioms, trivial_casts, unused_lifetimes)] use abscissa_core::testing::prelude::*; use once_cell::sync::Lazy; diff --git a/crates/relayer-rest/Cargo.toml b/crates/relayer-rest/Cargo.toml index 1f891a77ef..c23285bc46 100644 --- a/crates/relayer-rest/Cargo.toml +++ b/crates/relayer-rest/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-relayer-rest" -version = "0.27.0" +version = "0.27.2" authors = ["Informal Systems "] edition = "2021" license = "Apache-2.0" @@ -8,21 +8,21 @@ readme = "README.md" keywords = ["ibc", "rest", "api", "cosmos", "tendermint"] homepage = "https://hermes.informal.systems/" repository = "https://github.com/informalsystems/hermes" -rust-version = "1.71" +rust-version = "1.77.1" description = """ Rust implementation of a RESTful API server for Hermes """ [dependencies] -ibc-relayer-types = { version = "0.27.0", path = "../relayer-types" } -ibc-relayer = { version = "0.27.0", path = "../relayer" } +ibc-relayer-types = { workspace = true } +ibc-relayer = { workspace = true } -crossbeam-channel = "0.5" -serde = "1.0" -tracing = "0.1" -axum = "0.6" -tokio = "1.26" +axum = { workspace = true } +crossbeam-channel = { workspace = true } +serde = { workspace = true } +tokio = { workspace = true } +tracing = { workspace = true } [dev-dependencies] -reqwest = { version = "0.11.16", features = ["json"], default-features = false } -toml = "0.8.8" +reqwest = { workspace = true, features = ["json"] } +toml = { workspace = true } diff --git a/crates/relayer-rest/README.md b/crates/relayer-rest/README.md index ee66cb6870..f2fe30da45 100644 --- a/crates/relayer-rest/README.md +++ b/crates/relayer-rest/README.md @@ -6,7 +6,7 @@ [![End to End testing][e2e-image]][e2e-link] [![Apache 2.0 Licensed][license-image]][license-link] ![Rust Stable][rustc-image] -![Rust 1.71+][rustc-version] +![Rust 1.77.1+][rustc-version] This is the repository for the IBC REST server for use in the Hermes IBC relayer. @@ -39,4 +39,4 @@ Unless required by applicable law or agreed to in writing, software distributed [license-image]: https://img.shields.io/badge/license-Apache2.0-blue.svg [license-link]: https://github.com/informalsystems/hermes/blob/master/LICENSE [rustc-image]: https://img.shields.io/badge/rustc-stable-blue.svg -[rustc-version]: https://img.shields.io/badge/rustc-1.71+-blue.svg +[rustc-version]: https://img.shields.io/badge/rustc-1.77.1+-blue.svg diff --git a/crates/relayer-rest/tests/mock.rs b/crates/relayer-rest/tests/mock.rs index ebdb268144..c2fd28dea2 100644 --- a/crates/relayer-rest/tests/mock.rs +++ b/crates/relayer-rest/tests/mock.rs @@ -62,7 +62,7 @@ async fn version() { let rest_api_version = VersionInfo { name: "ibc-relayer-rest".to_string(), - version: "0.27.0".to_string(), + version: "0.27.2".to_string(), }; let result: JsonResult<_, ()> = JsonResult::Success(vec![version.clone(), rest_api_version]); diff --git a/crates/relayer-types/Cargo.toml b/crates/relayer-types/Cargo.toml index 38cb6d710e..623d8d98d7 100644 --- a/crates/relayer-types/Cargo.toml +++ b/crates/relayer-types/Cargo.toml @@ -1,13 +1,13 @@ [package] name = "ibc-relayer-types" -version = "0.27.0" +version = "0.27.2" edition = "2021" license = "Apache-2.0" readme = "README.md" keywords = ["blockchain", "consensus", "cosmos", "ibc", "tendermint"] repository = "https://github.com/informalsystems/hermes" authors = ["Informal Systems "] -rust-version = "1.71" +rust-version = "1.77.1" description = """ Implementation of the Inter-Blockchain Communication Protocol (IBC). This crate comprises the main data structures and on-chain logic. @@ -23,43 +23,31 @@ clock = [] mocks = ["tendermint-testgen", "clock"] [dependencies] -# Proto definitions for all IBC-related interfaces, e.g., connections or channels. -ibc-proto = { version = "0.41.0", features = ["serde"] } -ics23 = { version = "0.11.0", features = ["std", "host-functions"] } -time = { version = "0.3" } -serde_derive = { version = "1.0.104" } -serde = { version = "1.0" } -serde_json = { version = "1" } -prost = { version = "0.12" } -bytes = { version = "1.4.0" } -subtle-encoding = { version = "0.5" } -flex-error = { version = "0.4.4" } -derive_more = { version = "0.99.17", default-features = false, features = ["from", "into", "display"] } -uint = { version = "0.9" } -itertools = { version = "0.10.3" } -primitive-types = { version = "0.12.1", default-features = false, features = ["serde_no_std"] } -num-rational = "0.4.1" -regex = "1" - -[dependencies.tendermint] -version = "0.34.0" -features = ["clock"] - -[dependencies.tendermint-proto] -version = "0.34.0" - -[dependencies.tendermint-light-client-verifier] -version = "0.34.0" -features = ["rust-crypto"] - -[dependencies.tendermint-testgen] -version = "0.34.0" -optional = true +bytes = { workspace = true } +derive_more = { workspace = true, features = ["from", "into", "display"] } +flex-error = { workspace = true } +ibc-proto = { workspace = true, features = ["serde"] } +ics23 = { workspace = true, features = ["std", "host-functions"] } +itertools = { workspace = true } +num-rational = { workspace = true } +primitive-types = { workspace = true, features = ["serde_no_std"] } +prost = { workspace = true } +regex = { workspace = true } +serde = { workspace = true } +serde_derive = { workspace = true } +serde_json = { workspace = true } +subtle-encoding = { workspace = true } +tendermint-light-client-verifier = { workspace = true, features = ["rust-crypto"] } +tendermint-proto = { workspace = true } +tendermint-testgen = { workspace = true, optional = true } +tendermint = { workspace = true, features = ["clock"] } +time = { workspace = true } +uint = { workspace = true } [dev-dependencies] -env_logger = "0.11.1" -tracing = { version = "0.1.36", default-features = false } -tracing-subscriber = { version = "0.3.14", features = ["fmt", "env-filter", "json"] } -test-log = { version = "0.2.14", features = ["trace"] } -tendermint-rpc = { version = "0.34.0", features = ["http-client", "websocket-client"] } -tendermint-testgen = { version = "0.34.0" } # Needed for generating (synthetic) light blocks. +env_logger = { workspace = true } +tendermint-rpc = { workspace = true, features = ["http-client", "websocket-client"] } +tendermint-testgen = { workspace = true } # Needed for generating (synthetic) light blocks. +test-log = { workspace = true, features = ["trace"] } +tracing = { workspace = true } +tracing-subscriber = { workspace = true, features = ["fmt", "env-filter", "json"] } diff --git a/crates/relayer-types/src/applications/ics27_ica/error.rs b/crates/relayer-types/src/applications/ics27_ica/error.rs index 5a2054421e..8127c9557c 100644 --- a/crates/relayer-types/src/applications/ics27_ica/error.rs +++ b/crates/relayer-types/src/applications/ics27_ica/error.rs @@ -7,11 +7,15 @@ define_error! { Error { Owner [ SignerError ] - | _ | { "failed to parse owner" }, + | _ | { "failed to parse owner" }, InvalidConnectionIdentifier [ ValidationError ] - | _ | { "connection identifier error" }, + | _ | { "connection identifier error" }, + + InvalidOrdering + { ordering: i32 } + | e | { format_args!("invalid ordering: {}", e.ordering) }, InvalidPacketData | _ | { "packet data is None" }, diff --git a/crates/relayer-types/src/applications/ics27_ica/msgs/register.rs b/crates/relayer-types/src/applications/ics27_ica/msgs/register.rs index 7847e28c0c..e492a24f98 100644 --- a/crates/relayer-types/src/applications/ics27_ica/msgs/register.rs +++ b/crates/relayer-types/src/applications/ics27_ica/msgs/register.rs @@ -7,7 +7,7 @@ use serde::{Deserialize, Serialize}; use crate::{ applications::ics27_ica::error::Error, core::{ - ics04_channel::version::Version, + ics04_channel::{channel::Ordering, version::Version}, ics24_host::{error::ValidationError, identifier::ConnectionId}, }, signer::Signer, @@ -22,6 +22,7 @@ pub struct MsgRegisterInterchainAccount { pub owner: Signer, pub connection_id: ConnectionId, pub version: Version, + pub ordering: Ordering, } impl Msg for MsgRegisterInterchainAccount { @@ -50,6 +51,8 @@ impl TryFrom for MsgRegisterInterchainAccount { .parse() .map_err(Error::invalid_connection_identifier)?, version: value.version.into(), + ordering: Ordering::from_i32(value.ordering) + .map_err(|_| Error::invalid_ordering(value.ordering))?, }) } } @@ -60,6 +63,65 @@ impl From for RawMsgRegisterInterchainAccount { owner: value.owner.to_string(), connection_id: value.connection_id.to_string(), version: value.version.to_string(), + ordering: value.ordering as i32, + } + } +} + +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, prost::Message)] +pub struct LegacyRawMsgRegisterInterchainAccount { + #[prost(string, tag = "1")] + pub owner: String, + #[prost(string, tag = "2")] + pub connection_id: String, + #[prost(string, tag = "3")] + pub version: String, +} + +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +pub struct LegacyMsgRegisterInterchainAccount { + pub owner: Signer, + pub connection_id: ConnectionId, + pub version: Version, +} + +impl Msg for LegacyMsgRegisterInterchainAccount { + type ValidationError = ValidationError; + type Raw = LegacyRawMsgRegisterInterchainAccount; + + fn route(&self) -> String { + crate::keys::ROUTER_KEY.to_string() + } + + fn type_url(&self) -> String { + TYPE_URL.to_string() + } +} + +impl Protobuf for LegacyMsgRegisterInterchainAccount {} + +impl TryFrom for LegacyMsgRegisterInterchainAccount { + type Error = Error; + + fn try_from(value: LegacyRawMsgRegisterInterchainAccount) -> Result { + Ok(LegacyMsgRegisterInterchainAccount { + owner: value.owner.parse().map_err(Error::owner)?, + connection_id: value + .connection_id + .parse() + .map_err(Error::invalid_connection_identifier)?, + version: value.version.into(), + }) + } +} + +impl From for LegacyRawMsgRegisterInterchainAccount { + fn from(value: LegacyMsgRegisterInterchainAccount) -> Self { + LegacyRawMsgRegisterInterchainAccount { + owner: value.owner.to_string(), + connection_id: value.connection_id.to_string(), + version: value.version.to_string(), } } } diff --git a/crates/relayer-types/src/applications/transfer/packet.rs b/crates/relayer-types/src/applications/transfer/packet.rs index ff93868dff..a7ba9c8bde 100644 --- a/crates/relayer-types/src/applications/transfer/packet.rs +++ b/crates/relayer-types/src/applications/transfer/packet.rs @@ -1,8 +1,4 @@ -use std::{ - convert::TryFrom, - str::FromStr, - string::{String, ToString}, -}; +use std::str::FromStr; use ibc_proto::ibc::applications::transfer::v2::FungibleTokenPacketData as RawPacketData; use serde::{Deserialize, Serialize}; diff --git a/crates/relayer-types/src/clients/ics07_tendermint/client_state.rs b/crates/relayer-types/src/clients/ics07_tendermint/client_state.rs index 2eeb46fadb..edf6efbb1d 100644 --- a/crates/relayer-types/src/clients/ics07_tendermint/client_state.rs +++ b/crates/relayer-types/src/clients/ics07_tendermint/client_state.rs @@ -1,7 +1,4 @@ -use std::{ - convert::{TryFrom, TryInto}, - time::Duration, -}; +use std::time::Duration; use ibc_proto::{ google::protobuf::Any, diff --git a/crates/relayer-types/src/core/ics02_client/client_state.rs b/crates/relayer-types/src/core/ics02_client/client_state.rs index 814922861b..69781e7bcd 100644 --- a/crates/relayer-types/src/core/ics02_client/client_state.rs +++ b/crates/relayer-types/src/core/ics02_client/client_state.rs @@ -1,8 +1,5 @@ use core::fmt::Debug; -use std::{ - marker::{Send, Sync}, - time::Duration, -}; +use std::time::Duration; use crate::{ core::{ics02_client::client_type::ClientType, ics24_host::identifier::ChainId}, diff --git a/crates/relayer-types/src/core/ics02_client/consensus_state.rs b/crates/relayer-types/src/core/ics02_client/consensus_state.rs index 6211e442f9..877df6c1a3 100644 --- a/crates/relayer-types/src/core/ics02_client/consensus_state.rs +++ b/crates/relayer-types/src/core/ics02_client/consensus_state.rs @@ -1,7 +1,4 @@ -use core::{ - fmt::Debug, - marker::{Send, Sync}, -}; +use core::fmt::Debug; use crate::{ core::{ics02_client::client_type::ClientType, ics23_commitment::commitment::CommitmentRoot}, diff --git a/crates/relayer-types/src/core/ics02_client/trust_threshold.rs b/crates/relayer-types/src/core/ics02_client/trust_threshold.rs index 682c8669a7..58987d9046 100644 --- a/crates/relayer-types/src/core/ics02_client/trust_threshold.rs +++ b/crates/relayer-types/src/core/ics02_client/trust_threshold.rs @@ -3,7 +3,6 @@ //! range `[0, 1)`. use std::{ - convert::TryFrom, fmt::{Display, Error as FmtError, Formatter}, str::FromStr, }; diff --git a/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_try.rs b/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_try.rs index bc9bc3a3e4..58063aee72 100644 --- a/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_try.rs +++ b/crates/relayer-types/src/core/ics03_connection/msgs/conn_open_try.rs @@ -1,8 +1,4 @@ -use std::{ - convert::{TryFrom, TryInto}, - str::FromStr, - time::Duration, -}; +use std::{str::FromStr, time::Duration}; use ibc_proto::{ google::protobuf::Any, diff --git a/crates/relayer-types/src/core/ics04_channel/channel.rs b/crates/relayer-types/src/core/ics04_channel/channel.rs index e0a46ccaf9..ed523d21a9 100644 --- a/crates/relayer-types/src/core/ics04_channel/channel.rs +++ b/crates/relayer-types/src/core/ics04_channel/channel.rs @@ -49,6 +49,7 @@ impl TryFrom for IdentifiedChannelEnd { counterparty: value.counterparty, connection_hops: value.connection_hops, version: value.version, + upgrade_sequence: value.upgrade_sequence, }; Ok(IdentifiedChannelEnd { @@ -74,6 +75,7 @@ impl From for RawIdentifiedChannel { version: value.channel_end.version.to_string(), port_id: value.port_id.to_string(), channel_id: value.channel_id.to_string(), + upgrade_sequence: value.channel_end.upgrade_sequence, } } } @@ -85,14 +87,15 @@ pub struct ChannelEnd { pub remote: Counterparty, pub connection_hops: Vec, pub version: Version, + pub upgrade_sequence: u64, } impl Display for ChannelEnd { fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), FmtError> { write!( f, - "ChannelEnd {{ state: {}, ordering: {}, remote: {}, connection_hops: {}, version: {} }}", - self.state, self.ordering, self.remote, PrettySlice(&self.connection_hops), self.version + "ChannelEnd {{ state: {}, ordering: {}, remote: {}, connection_hops: {}, version: {}, upgrade_sequence: {} }}", + self.state, self.ordering, self.remote, PrettySlice(&self.connection_hops), self.version, self.upgrade_sequence ) } } @@ -105,6 +108,7 @@ impl Default for ChannelEnd { remote: Counterparty::default(), connection_hops: Vec::new(), version: Version::default(), + upgrade_sequence: 0, } } } @@ -145,6 +149,7 @@ impl TryFrom for ChannelEnd { remote, connection_hops, version, + value.upgrade_sequence, )) } } @@ -161,6 +166,7 @@ impl From for RawChannel { .map(|v| v.as_str().to_string()) .collect(), version: value.version.to_string(), + upgrade_sequence: value.upgrade_sequence, } } } @@ -173,6 +179,7 @@ impl ChannelEnd { remote: Counterparty, connection_hops: Vec, version: Version, + upgrade_sequence: u64, ) -> Self { Self { state, @@ -180,6 +187,7 @@ impl ChannelEnd { remote, connection_hops, version, + upgrade_sequence, } } @@ -466,6 +474,7 @@ pub mod test_util { counterparty: Some(get_dummy_raw_counterparty()), connection_hops: vec![ConnectionId::default().to_string()], version: "ics20".to_string(), // The version is not validated. + upgrade_sequence: 0, } } } diff --git a/crates/relayer-types/src/core/ics04_channel/error.rs b/crates/relayer-types/src/core/ics04_channel/error.rs index 961131302a..2e65663f2f 100644 --- a/crates/relayer-types/src/core/ics04_channel/error.rs +++ b/crates/relayer-types/src/core/ics04_channel/error.rs @@ -195,6 +195,14 @@ define_error! { e.given_sequence, e.next_sequence) }, + InvalidPacketData + { + data: String, + } + | e | { + format_args!("Invalid packet data, not a valid hex-encoded string: {}", e.data) + }, + LowPacketHeight { chain_height: Height, diff --git a/crates/relayer-types/src/core/ics04_channel/events.rs b/crates/relayer-types/src/core/ics04_channel/events.rs index d67ae0c51f..9471211b16 100644 --- a/crates/relayer-types/src/core/ics04_channel/events.rs +++ b/crates/relayer-types/src/core/ics04_channel/events.rs @@ -26,7 +26,7 @@ pub const COUNTERPARTY_PORT_ID_ATTRIBUTE_KEY: &str = "counterparty_port_id"; /// Packet event attribute keys pub const PKT_SEQ_ATTRIBUTE_KEY: &str = "packet_sequence"; -pub const PKT_DATA_ATTRIBUTE_KEY: &str = "packet_data"; +pub const PKT_DATA_ATTRIBUTE_KEY: &str = "packet_data_hex"; pub const PKT_SRC_PORT_ATTRIBUTE_KEY: &str = "packet_src_port"; pub const PKT_SRC_CHANNEL_ATTRIBUTE_KEY: &str = "packet_src_channel"; pub const PKT_DST_PORT_ATTRIBUTE_KEY: &str = "packet_dst_port"; diff --git a/crates/relayer-types/src/core/ics04_channel/msgs/chan_close_confirm.rs b/crates/relayer-types/src/core/ics04_channel/msgs/chan_close_confirm.rs index ee7c52ec7b..672b6281c0 100644 --- a/crates/relayer-types/src/core/ics04_channel/msgs/chan_close_confirm.rs +++ b/crates/relayer-types/src/core/ics04_channel/msgs/chan_close_confirm.rs @@ -24,6 +24,7 @@ pub struct MsgChannelCloseConfirm { pub channel_id: ChannelId, pub proofs: Proofs, pub signer: Signer, + pub counterparty_upgrade_sequence: u64, } impl MsgChannelCloseConfirm { @@ -33,6 +34,7 @@ impl MsgChannelCloseConfirm { channel_id, proofs, signer, + counterparty_upgrade_sequence: 0, } } } @@ -77,6 +79,7 @@ impl TryFrom for MsgChannelCloseConfirm { channel_id: raw_msg.channel_id.parse().map_err(Error::identifier)?, proofs, signer: raw_msg.signer.parse().map_err(Error::signer)?, + counterparty_upgrade_sequence: raw_msg.counterparty_upgrade_sequence, }) } } @@ -89,6 +92,7 @@ impl From for RawMsgChannelCloseConfirm { proof_init: domain_msg.proofs.object_proof().clone().into(), proof_height: Some(domain_msg.proofs.height().into()), signer: domain_msg.signer.to_string(), + counterparty_upgrade_sequence: domain_msg.counterparty_upgrade_sequence, } } } @@ -116,6 +120,7 @@ pub mod test_util { revision_height: proof_height, }), signer: get_dummy_bech32_account(), + counterparty_upgrade_sequence: 0, } } } diff --git a/crates/relayer-types/src/core/ics04_channel/msgs/timeout_on_close.rs b/crates/relayer-types/src/core/ics04_channel/msgs/timeout_on_close.rs index ccc0ce13a0..9a76eb9270 100644 --- a/crates/relayer-types/src/core/ics04_channel/msgs/timeout_on_close.rs +++ b/crates/relayer-types/src/core/ics04_channel/msgs/timeout_on_close.rs @@ -21,6 +21,7 @@ pub struct MsgTimeoutOnClose { pub next_sequence_recv: Sequence, pub proofs: Proofs, pub signer: Signer, + pub counterparty_upgrade_sequence: u64, } impl MsgTimeoutOnClose { @@ -35,6 +36,7 @@ impl MsgTimeoutOnClose { next_sequence_recv, proofs, signer, + counterparty_upgrade_sequence: 0, } } } @@ -89,6 +91,7 @@ impl TryFrom for MsgTimeoutOnClose { next_sequence_recv: Sequence::from(raw_msg.next_sequence_recv), signer: raw_msg.signer.parse().map_err(Error::signer)?, proofs, + counterparty_upgrade_sequence: raw_msg.counterparty_upgrade_sequence, }) } } @@ -105,6 +108,7 @@ impl From for RawMsgTimeoutOnClose { proof_height: Some(domain_msg.proofs.height().into()), next_sequence_recv: domain_msg.next_sequence_recv.into(), signer: domain_msg.signer.to_string(), + counterparty_upgrade_sequence: domain_msg.counterparty_upgrade_sequence, } } } @@ -224,6 +228,7 @@ pub mod test_util { }), next_sequence_recv: 1, signer: get_dummy_bech32_account(), + counterparty_upgrade_sequence: 0, } } } diff --git a/crates/relayer-types/src/core/ics04_channel/packet_id.rs b/crates/relayer-types/src/core/ics04_channel/packet_id.rs index e998811cdf..3278ad447a 100644 --- a/crates/relayer-types/src/core/ics04_channel/packet_id.rs +++ b/crates/relayer-types/src/core/ics04_channel/packet_id.rs @@ -1,4 +1,4 @@ -use std::{convert::TryFrom, str::FromStr}; +use std::str::FromStr; use ibc_proto::ibc::core::channel::v1::PacketId as ProtoPacketId; diff --git a/crates/relayer-types/src/core/ics23_commitment/commitment.rs b/crates/relayer-types/src/core/ics23_commitment/commitment.rs index 9fe5d555e2..9967c93f9b 100644 --- a/crates/relayer-types/src/core/ics23_commitment/commitment.rs +++ b/crates/relayer-types/src/core/ics23_commitment/commitment.rs @@ -1,4 +1,4 @@ -use std::{convert::TryFrom, fmt}; +use std::fmt; use ibc_proto::ibc::core::commitment::v1::MerkleProof as RawMerkleProof; use serde::{Deserialize, Serialize}; diff --git a/crates/relayer-types/src/core/ics23_commitment/merkle.rs b/crates/relayer-types/src/core/ics23_commitment/merkle.rs index 5fdafa12c4..0b34fa29a4 100644 --- a/crates/relayer-types/src/core/ics23_commitment/merkle.rs +++ b/crates/relayer-types/src/core/ics23_commitment/merkle.rs @@ -100,7 +100,7 @@ impl MerkleProof { ) { return Err(Error::verification_failure()); } - value = subroot.clone(); + value.clone_from(&subroot); } _ => return Err(Error::invalid_merkle_proof()), } diff --git a/crates/relayer-types/src/core/ics24_host/identifier.rs b/crates/relayer-types/src/core/ics24_host/identifier.rs index e1ab7113d3..c39c02930d 100644 --- a/crates/relayer-types/src/core/ics24_host/identifier.rs +++ b/crates/relayer-types/src/core/ics24_host/identifier.rs @@ -1,5 +1,5 @@ use std::{ - convert::{From, Infallible}, + convert::Infallible, fmt::{Debug, Display, Error as FmtError, Formatter}, str::FromStr, }; diff --git a/crates/relayer-types/src/events.rs b/crates/relayer-types/src/events.rs index dd7ec33dd2..497f0c89b3 100644 --- a/crates/relayer-types/src/events.rs +++ b/crates/relayer-types/src/events.rs @@ -1,6 +1,5 @@ use std::{ borrow::Cow, - convert::TryFrom, fmt::{Display, Error as FmtError, Formatter}, str::FromStr, }; @@ -74,9 +73,9 @@ define_error! { [ TraceError ] | _ | { "error decoding protobuf" }, - SubtleEncoding - [ TraceError ] - | _ | { "error decoding hex" }, + InvalidPacketData + { data: String } + | e | { format_args!("error decoding hex-encoded packet data: {}", e.data) }, MissingActionString | _ | { "missing action string" }, diff --git a/crates/relayer-types/src/lib.rs b/crates/relayer-types/src/lib.rs index 7684e0b41a..61f3b14cbc 100644 --- a/crates/relayer-types/src/lib.rs +++ b/crates/relayer-types/src/lib.rs @@ -4,11 +4,9 @@ #![allow(clippy::large_enum_variant)] #![deny( - // warnings, trivial_casts, trivial_numeric_casts, unused_import_braces, - unused_qualifications, rust_2018_idioms )] #![forbid(unsafe_code)] @@ -60,7 +58,7 @@ pub mod utils; mod serializers; /// Re-export of ICS 002 Height domain type -pub type Height = crate::core::ics02_client::height::Height; +pub type Height = core::ics02_client::height::Height; #[cfg(test)] mod test; diff --git a/crates/relayer-types/src/mock/client_state.rs b/crates/relayer-types/src/mock/client_state.rs index ab36271537..ea3f598da8 100644 --- a/crates/relayer-types/src/mock/client_state.rs +++ b/crates/relayer-types/src/mock/client_state.rs @@ -52,6 +52,8 @@ impl From for RawMockClientState { height: Some(value.header.height().into()), timestamp: value.header.timestamp.nanoseconds(), }), + frozen: false, + trusting_period: 14 * 24 * 60 * 60, } } } diff --git a/crates/relayer/Cargo.toml b/crates/relayer/Cargo.toml index 6997cfe01c..4769379132 100644 --- a/crates/relayer/Cargo.toml +++ b/crates/relayer/Cargo.toml @@ -1,16 +1,17 @@ [package] -name = "ibc-relayer" -version = "0.27.0" + +version = "0.27.2" edition = "2021" +rust-version = "1.77.1" +description = """ + Implementation of an IBC Relayer in Rust, as a library +""" +name = "ibc-relayer" license = "Apache-2.0" readme = "README.md" keywords = ["blockchain", "consensus", "cosmos", "ibc", "tendermint"] repository = "https://github.com/informalsystems/hermes" authors = ["Informal Systems "] -rust-version = "1.71" -description = """ - Implementation of an IBC Relayer in Rust, as a library -""" [package.metadata.docs.rs] all-features = true @@ -20,136 +21,101 @@ default = ["flex-error/std", "flex-error/eyre_tracer"] telemetry = ["ibc-telemetry"] [dependencies] -ibc-proto = { version = "0.41.0", features = ["serde"] } -ibc-telemetry = { version = "0.27.0", path = "../telemetry", optional = true } -ibc-relayer-types = { version = "0.27.0", path = "../relayer-types", features = [ - "mocks", +ibc-proto = { workspace = true, features = ["serde"] } +ibc-telemetry = { workspace = true, optional = true } +ibc-relayer-types = { workspace = true, features = ["clock"] } + +astria-core = { workspace = true } +astria-sequencer-client = { workspace = true } +anyhow = { workspace = true } +async-stream = { workspace = true } +bech32 = { workspace = true } +bitcoin = { workspace = true, features = ["serde"] } +bs58 = { workspace = true } +byte-unit = { workspace = true, features = ["serde"] } +bytes = { workspace = true } +crossbeam-channel = { workspace = true } +digest = { workspace = true } +dirs-next = { workspace = true } +ed25519 = { workspace = true } +ed25519-consensus = { workspace = true } +ed25519-dalek = { workspace = true, features = ["serde"] } +ed25519-dalek-bip32 = { workspace = true } +flex-error = { workspace = true } +futures = { workspace = true } +generic-array = { workspace = true } +hdpath = { workspace = true } +hex = { workspace = true } +http = { workspace = true } +humantime = { workspace = true } +humantime-serde = { workspace = true } +ibc-types = { workspace = true } +itertools = { workspace = true } +jmt = { workspace = true } +moka = { workspace = true, features = ["sync"] } +num-bigint = { workspace = true, features = ["serde"] } +num-rational = { workspace = true, features = ["num-bigint", "serde"] } +once_cell = { workspace = true } +pbjson-types = { workspace = true } +penumbra-asset = { workspace = true } +penumbra-custody = { workspace = true } +penumbra-fee = { workspace = true } +penumbra-ibc = { workspace = true } +penumbra-ibc-astria = { workspace = true } +penumbra-keys = { workspace = true } +penumbra-proto = { workspace = true } +penumbra-proto-astria = { workspace = true } +penumbra-transaction = { workspace = true } +penumbra-view = { workspace = true } +penumbra-wallet = { workspace = true } +prost = { workspace = true } +regex = { workspace = true } +reqwest = { workspace = true, features = ["rustls-tls-native-roots", "json"] } +retry = { workspace = true } +ripemd = { workspace = true } +secp256k1 = { workspace = true, features = ["rand-std"] } +semver = { workspace = true } +serde = { workspace = true } +serde_derive = { workspace = true } +serde_json = { workspace = true } +sha2 = { workspace = true } +signature = { workspace = true } +strum = { workspace = true, features = ["derive"] } +subtle-encoding = { workspace = true } +tendermint = { workspace = true, features = ["secp256k1"] } +tendermint-light-client = { workspace = true, features = [ + "rpc-client", + "secp256k1", + "unstable", ] } - -astria-core = { git = "https://github.com/astriaorg/astria", rev = "112a66d6f9bb6638cce4935c949834e1d35416bb" } -astria-sequencer-client = { git = "https://github.com/astriaorg/astria", rev = "112a66d6f9bb6638cce4935c949834e1d35416bb", features = [ - "http", +tendermint-light-client-detector = { workspace = true } +tendermint-light-client-verifier = { workspace = true } +tendermint-proto = { workspace = true } +tendermint-rpc = { workspace = true, features = [ + "http-client", + "websocket-client", ] } -ed25519-consensus = "2.1.0" -ibc-types = "0.12.0" -jmt = "0.6" -pbjson-types = "0.6" - -subtle-encoding = "0.5" -humantime-serde = "1.1.1" -serde = "1.0" -serde_derive = "1.0" -thiserror = "1.0.56" -toml = "0.8" -tracing = "0.1.36" -tokio = { version = "1.0", features = ["rt-multi-thread", "time", "sync"] } -serde_json = { version = "1" } -bytes = "1.4.0" -prost = { version = "0.12" } -tonic = { version = "0.10", features = ["tls", "tls-roots"] } -futures = "0.3.27" -crossbeam-channel = "0.5.11" -hex = "0.4" -bitcoin = { version = "0.31.1", features = ["serde"] } -tiny-bip39 = "1.0.0" -hdpath = "0.6.3" -sha2 = "0.10.6" -tiny-keccak = { version = "2.0.2", features = [ - "keccak", -], default-features = false } -ripemd = "0.1.3" -bech32 = "0.9.1" -itertools = "0.10.5" -dirs-next = "2.0.0" -retry = { version = "2.0.0", default-features = false } -async-stream = "0.3.5" -http = "0.2.9" -reqwest = { version = "0.11", features = [ - "rustls-tls-native-roots", - "json", -], default-features = false } -flex-error = { version = "0.4.4", default-features = false } -signature = "2.1.0" -anyhow = "1.0" -semver = "1.0" -humantime = "2.1.0" -regex = "1" -moka = { version = "0.12.0", features = ["sync"] } -uuid = { version = "1.7.0", features = ["v4"] } -bs58 = "0.5.0" -digest = "0.10.6" -ed25519 = "2.2.2" -ed25519-dalek = { version = "2.0.0", features = ["serde"] } -ed25519-dalek-bip32 = "0.3.0" -generic-array = "0.14.7" -secp256k1 = { version = "0.28.1", features = ["rand-std"] } -strum = { version = "0.25", features = ["derive"] } -tokio-stream = "0.1.14" -once_cell = "1.19.0" -tracing-subscriber = { version = "0.3.14", features = [ +thiserror = { workspace = true } +tiny-bip39 = { workspace = true } +tiny-keccak = { workspace = true, features = ["keccak"] } +tokio = { workspace = true, features = ["full", "rt-multi-thread", "tracing"] } +tokio-stream = { workspace = true } +tokio-util = { workspace = true } +toml = { workspace = true } +tonic = { workspace = true, features = ["tls", "tls-roots"] } +tracing = { workspace = true } +tracing-subscriber = { workspace = true, features = [ "fmt", "env-filter", "json", ] } - -# Penumbra dependencies -penumbra-custody = { git = "https://github.com/penumbra-zone/penumbra", tag = "v0.68.1" } -penumbra-view = { git = "https://github.com/penumbra-zone/penumbra", tag = "v0.68.1" } -penumbra-proto = { git = "https://github.com/penumbra-zone/penumbra", tag = "v0.68.1", features = [ - "box-grpc", - "rpc", -] } -penumbra-wallet = { git = "https://github.com/penumbra-zone/penumbra", tag = "v0.68.1" } -penumbra-fee = { git = "https://github.com/penumbra-zone/penumbra", tag = "v0.68.1" } -penumbra-transaction = { git = "https://github.com/penumbra-zone/penumbra", tag = "v0.68.1" } -penumbra-keys = { git = "https://github.com/penumbra-zone/penumbra", tag = "v0.68.1" } -penumbra-ibc = { git = "https://github.com/penumbra-zone/penumbra", tag = "v0.68.1" } -penumbra-asset = { git = "https://github.com/penumbra-zone/penumbra", tag = "v0.68.1" } - -[dependencies.byte-unit] -version = "4.0.19" -default-features = false -features = ["serde"] - -[dependencies.num-bigint] -version = "0.4" -features = ["serde"] - -[dependencies.num-rational] -version = "0.4.1" -features = ["num-bigint", "serde"] - -[dependencies.tendermint] -version = "0.34.0" -features = ["secp256k1"] - -[dependencies.tendermint-proto] -version = "0.34.0" - -[dependencies.tendermint-rpc] -version = "0.34.0" -features = ["http-client", "websocket-client"] - -[dependencies.tendermint-light-client] -version = "0.34.0" -default-features = false -features = ["rpc-client", "secp256k1", "unstable"] - -[dependencies.tendermint-light-client-detector] -version = "0.34.0" -default-features = false - -[dependencies.tendermint-light-client-verifier] -version = "0.34.0" -default-features = false +uuid = { workspace = true, features = ["v4"] } [dev-dependencies] -ibc-relayer-types = { version = "0.27.0", path = "../relayer-types", features = [ - "mocks", -] } -serial_test = "3.0.0" -env_logger = "0.11.1" -test-log = { version = "0.2.14", features = ["trace"] } +ibc-relayer-types = { workspace = true, features = ["mocks"] } +serial_test = { workspace = true } +env_logger = { workspace = true } +test-log = { workspace = true, features = ["trace"] } # Needed for generating (synthetic) light blocks. -tendermint-testgen = { version = "0.34.0" } +tendermint-testgen = { workspace = true } diff --git a/crates/relayer/src/chain/astria/endpoint.rs b/crates/relayer/src/chain/astria/endpoint.rs index 6c4c312add..6f9576e42e 100644 --- a/crates/relayer/src/chain/astria/endpoint.rs +++ b/crates/relayer/src/chain/astria/endpoint.rs @@ -165,10 +165,14 @@ impl AstriaEndpoint { *batch_delay, self.rt.clone(), ), - Mode::Pull { interval } => EventSource::rpc( + Mode::Pull { + interval, + max_retries, + } => EventSource::rpc( self.id().clone(), self.sequencer_client.clone(), *interval, + *max_retries, self.rt.clone(), ), } @@ -180,16 +184,16 @@ impl AstriaEndpoint { async fn broadcast_messages(&mut self, tracked_msgs: TrackedMsgs) -> Result { use astria_core::{ - generated::sequencer::v1alpha1::Ics20Withdrawal as RawIcs20Withdrawal, - sequencer::v1alpha1::{ + generated::sequencer::v1::Ics20Withdrawal as RawIcs20Withdrawal, + sequencer::v1::{ transaction::{action::Ics20Withdrawal, Action}, Address, UnsignedTransaction, }, }; use astria_sequencer_client::SequencerClientExt as _; use ibc_relayer_types::applications::transfer::msgs::ASTRIA_WITHDRAWAL_TYPE_URL; - use penumbra_ibc::IbcRelay; - use penumbra_proto::core::component::ibc::v1::IbcRelay as RawIbcRelay; + use penumbra_ibc_astria::IbcRelay; + use penumbra_proto_astria::core::component::ibc::v1::IbcRelay as RawIbcRelay; let msg_len = tracked_msgs.msgs.len(); let mut actions: Vec = Vec::with_capacity(msg_len); @@ -531,7 +535,7 @@ impl ChainEndpoint for AstriaEndpoint { _key_name: Option<&str>, denom: Option<&str>, ) -> Result { - use astria_core::sequencer::v1alpha1::account::AssetBalance; + use astria_core::sequencer::v1::account::AssetBalance; use astria_sequencer_client::{Address, SequencerClientExt as _}; let signing_key: ed25519_consensus::SigningKey = @@ -541,8 +545,7 @@ impl ChainEndpoint for AstriaEndpoint { .block_on(self.sequencer_client.get_latest_balance(address)) .map_err(|e| Error::other(Box::new(e)))?; - let denom = - denom.unwrap_or(astria_core::sequencer::v1alpha1::asset::DEFAULT_NATIVE_ASSET_DENOM); + let denom = denom.unwrap_or(astria_core::sequencer::v1::asset::DEFAULT_NATIVE_ASSET_DENOM); let balance: Vec = balance .balances diff --git a/crates/relayer/src/chain/cosmos.rs b/crates/relayer/src/chain/cosmos.rs index 55f757d6c1..00eb767d73 100644 --- a/crates/relayer/src/chain/cosmos.rs +++ b/crates/relayer/src/chain/cosmos.rs @@ -1,16 +1,19 @@ use alloc::sync::Arc; -use core::{ - convert::{TryFrom, TryInto}, - future::Future, - str::FromStr, - time::Duration, -}; +use core::{future::Future, str::FromStr, time::Duration}; use std::{cmp::Ordering, thread}; use bytes::{Buf, Bytes}; use futures::future::join_all; use ibc_proto::{ - cosmos::{base::node::v1beta1::ConfigResponse, staking::v1beta1::Params as StakingParams}, + cosmos::{ + base::{ + node::v1beta1::ConfigResponse, + tendermint::v1beta1::{ + service_client::ServiceClient, GetSyncingRequest, GetSyncingResponse, + }, + }, + staking::v1beta1::Params as StakingParams, + }, ibc::apps::fee::v1::{QueryIncentivizedPacketRequest, QueryIncentivizedPacketResponse}, interchain_security::ccv::v1::ConsumerParams as CcvConsumerParams, Protobuf, @@ -120,6 +123,7 @@ use crate::{ compat_mode::compat_mode_from_version, pretty::{ PrettyIdentifiedChannel, PrettyIdentifiedClientState, PrettyIdentifiedConnection, + PrettySlice, }, }, }; @@ -155,6 +159,7 @@ pub mod wait; /// /// [tm-37-max]: https://github.com/tendermint/tendermint/blob/v0.37.0-rc1/types/params.go#L79 pub const BLOCK_MAX_BYTES_MAX_FRACTION: f64 = 0.9; + pub struct CosmosSdkChain { config: config::CosmosSdkConfig, tx_config: TxConfig, @@ -301,19 +306,23 @@ impl CosmosSdkChain { )); } - // Query /genesis RPC endpoint to retrieve the `max_expected_time_per_block` value - // to use as `max_block_time`. + // Query /genesis RPC endpoint to retrieve the `max_expected_time_per_block` value to use as `max_block_time`. // If it is not found, keep the configured `max_block_time`. match self.block_on(self.rpc_client.genesis::()) { Ok(genesis_reponse) => { let old_max_block_time = self.config.max_block_time; - self.config.max_block_time = + let new_max_block_time = Duration::from_nanos(genesis_reponse.app_state.max_expected_time_per_block()); - info!( - "Updated `max_block_time` using /genesis endpoint. Old value: `{}s`, new value: `{}s`", - old_max_block_time.as_secs(), - self.config.max_block_time.as_secs() - ); + + if old_max_block_time.as_secs() != new_max_block_time.as_secs() { + self.config.max_block_time = new_max_block_time; + + info!( + "Updated `max_block_time` using /genesis endpoint. Old value: `{}s`, new value: `{}s`", + old_max_block_time.as_secs(), + self.config.max_block_time.as_secs() + ); + } } Err(e) => { warn!( @@ -344,10 +353,14 @@ impl CosmosSdkChain { *batch_delay, self.rt.clone(), ), - Mode::Pull { interval } => EventSource::rpc( + Mode::Pull { + interval, + max_retries, + } => EventSource::rpc( self.config.id.clone(), self.rpc_client.clone(), *interval, + *max_retries, self.rt.clone(), ), } @@ -490,7 +503,7 @@ impl CosmosSdkChain { } /// The minimum gas price that this node accepts - pub fn min_gas_price(&self) -> Result, Error> { + pub fn min_gas_price(&self) -> Result>, Error> { crate::time!( "min_gas_price", { @@ -498,10 +511,9 @@ impl CosmosSdkChain { } ); - let min_gas_price: Vec = - self.query_config_params()?.map_or(vec![], |cfg_response| { - parse_gas_prices(cfg_response.minimum_gas_price) - }); + let min_gas_price: Option> = self + .query_config_params()? + .map(|cfg_response| parse_gas_prices(cfg_response.minimum_gas_price)); Ok(min_gas_price) } @@ -641,27 +653,97 @@ impl CosmosSdkChain { /// /// Returns an error if the node is still syncing and has not caught up, /// ie. if `sync_info.catching_up` is `true`. - fn chain_status(&self) -> Result { + fn chain_rpc_status(&self) -> Result { crate::time!( - "chain_status", + "chain_rpc_status", { "src_chain": self.config().id.to_string(), } ); - crate::telemetry!(query, self.id(), "status"); + crate::telemetry!(query, self.id(), "rpc_status"); let status = self .block_on(self.rpc_client.status()) .map_err(|e| Error::rpc(self.config.rpc_addr.clone(), e))?; if status.sync_info.catching_up { + Err(Error::chain_not_caught_up( + self.config.rpc_addr.to_string(), + self.config().id.clone(), + )) + } else { + Ok(status) + } + } + + /// Query the chain syncing status via a gRPC query. + /// + /// Returns an error if the node is still syncing and has not caught up, + /// ie. if `sync_info.syncing` is `true`. + fn chain_grpc_status(&self) -> Result { + crate::time!( + "chain_grpc_status", + { + "src_chain": self.config().id.to_string(), + } + ); + crate::telemetry!(query, self.id(), "grpc_status"); + + let grpc_addr = self.grpc_addr.clone(); + let grpc_addr_string = grpc_addr.to_string(); + + let mut client = self + .block_on(ServiceClient::connect(grpc_addr.clone())) + .map_err(Error::grpc_transport)?; + + let request = tonic::Request::new(GetSyncingRequest {}); + + let sync_info = self + .block_on(client.get_syncing(request)) + .map_err(|e| Error::grpc_status(e, "get_syncing".to_string()))? + .into_inner(); + + if sync_info.syncing { + Err(Error::chain_not_caught_up( + grpc_addr_string, + self.config().id.clone(), + )) + } else { + Ok(sync_info) + } + } + + /// Query the chain status of the RPC and gRPC nodes. + /// + /// Returns an error if any of the node is still syncing and has not caught up. + fn chain_status(&self) -> Result { + crate::time!( + "chain_status", + { + "src_chain": self.config().id.to_string(), + } + ); + crate::telemetry!(query, self.id(), "status"); + + let rpc_status = self.chain_rpc_status()?; + + if rpc_status.sync_info.catching_up { return Err(Error::chain_not_caught_up( self.config.rpc_addr.to_string(), self.config().id.clone(), )); } - Ok(status) + let grpc_status = self.chain_grpc_status()?; + + if grpc_status.syncing { + return Err(Error::chain_not_caught_up( + self.config.grpc_addr.to_string(), + self.config().id.clone(), + )); + } + + Ok(rpc_status) } /// Query the chain's latest height @@ -1005,17 +1087,17 @@ impl ChainEndpoint for CosmosSdkChain { /// further checks. fn health_check(&mut self) -> Result { if let Err(e) = do_health_check(self) { - warn!("Health checkup for chain '{}' failed", self.id()); - warn!(" Reason: {}", e.detail()); - warn!(" Some Hermes features may not work in this mode!"); + warn!("health check failed for chain '{}'", self.id()); + warn!("reason: {}", e.detail()); + warn!("some Hermes features may not work in this mode!"); return Ok(HealthCheck::Unhealthy(Box::new(e))); } if let Err(e) = self.validate_params() { - warn!("Hermes might be misconfigured for chain '{}'", self.id()); - warn!(" Reason: {}", e.detail()); - warn!(" Some Hermes features may not work in this mode!"); + warn!("found potential misconfiguration for chain '{}'", self.id()); + warn!("reason: {}", e.detail()); + warn!("some Hermes features may not work in this mode!"); return Ok(HealthCheck::Unhealthy(Box::new(e))); } @@ -2371,6 +2453,17 @@ fn do_health_check(chain: &CosmosSdkChain) -> Result<(), Error> { let grpc_address = chain.grpc_addr.to_string(); let rpc_address = chain.config.rpc_addr.to_string(); + if !chain.config.excluded_sequences.is_empty() { + for (channel_id, seqs) in chain.config.excluded_sequences.iter() { + if !seqs.is_empty() { + warn!( + "chain '{chain_id}' will not clear packets on channel '{channel_id}' with sequences: {}. \ + Ignore this warning if this configuration is correct.", PrettySlice(seqs) + ); + } + } + } + chain.block_on(chain.rpc_client.health()).map_err(|e| { Error::health_check_json_rpc( chain_id.clone(), @@ -2396,44 +2489,50 @@ fn do_health_check(chain: &CosmosSdkChain) -> Result<(), Error> { } let relayer_gas_price = &chain.config.gas_price; - let node_min_gas_prices = chain.min_gas_price()?; - - if !node_min_gas_prices.is_empty() { - let mut found_matching_denom = false; - - for price in node_min_gas_prices { - match relayer_gas_price.partial_cmp(&price) { - Some(Ordering::Less) => return Err(Error::gas_price_too_low(chain_id.clone())), - Some(_) => { - found_matching_denom = true; - break; + let node_min_gas_prices_result = chain.min_gas_price()?; + + match node_min_gas_prices_result { + Some(node_min_gas_prices) if !node_min_gas_prices.is_empty() => { + let mut found_matching_denom = false; + + for price in node_min_gas_prices { + match relayer_gas_price.partial_cmp(&price) { + Some(Ordering::Less) => return Err(Error::gas_price_too_low(chain_id.clone())), + Some(_) => { + found_matching_denom = true; + break; + } + None => continue, } - None => continue, } - } - if !found_matching_denom { - warn!( - "Chain '{}' has no minimum gas price of denomination '{}' \ - that is strictly less than the `gas_price` specified for \ - that chain in the Hermes configuration. \ - This is usually a sign of misconfiguration, please check your chain and Hermes configurations", - chain_id, relayer_gas_price.denom - ); + if !found_matching_denom { + warn!( + "chain '{}' has no minimum gas price of denomination '{}' \ + that is strictly less than the `gas_price` specified for that chain in the Hermes configuration. \ + This is usually a sign of misconfiguration, please check your chain and Hermes configurations", + chain_id, relayer_gas_price.denom + ); + } } - } else { - warn!( - "Chain '{}' has no minimum gas price value configured for denomination '{}'. \ - This is usually a sign of misconfiguration, please check your chain and \ - relayer configurations", + + Some(_) => warn!( + "chain '{}' has no minimum gas price value configured for denomination '{}'. \ + This is usually a sign of misconfiguration, please check your chain and relayer configurations", chain_id, relayer_gas_price.denom - ); + ), + + None => warn!( + "chain '{}' does not implement the `cosmos.base.node.v1beta1.Service/Params` endpoint. \ + It is impossible to check whether the chain's minimum-gas-prices matches the ones specified in config", + chain_id, + ), } let version_specs = chain.block_on(fetch_version_specs(&chain.config.id, &chain.grpc_addr))?; if let Err(diagnostic) = compatibility::run_diagnostic(&version_specs) { - return Err(Error::sdk_module_version( + return Err(Error::compat_check_failed( chain_id.clone(), grpc_address, diagnostic.to_string(), diff --git a/crates/relayer/src/chain/cosmos/compatibility.rs b/crates/relayer/src/chain/cosmos/compatibility.rs index 990fc0b60a..f997081d92 100644 --- a/crates/relayer/src/chain/cosmos/compatibility.rs +++ b/crates/relayer/src/chain/cosmos/compatibility.rs @@ -24,12 +24,18 @@ const IBC_GO_MODULE_VERSION_REQ: &str = ">=4.1.1, <9"; #[derive(Error, Debug)] pub enum Diagnostic { + #[error("SDK module version not found, required {requirements}")] + MissingSdkModuleVersion { requirements: String }, + + #[error("IBC-Go module version not found, required {requirements}")] + MissingIbcGoModuleVersion { requirements: String }, + #[error( "SDK module at version '{found}' does not meet compatibility requirements {requirements}" )] MismatchingSdkModuleVersion { requirements: String, found: String }, - #[error("Ibc-Go module at version '{found}' does not meet compatibility requirements {requirements}")] + #[error("IBC-Go module at version '{found}' does not meet compatibility requirements {requirements}")] MismatchingIbcGoModuleVersion { requirements: String, found: String }, } @@ -44,40 +50,44 @@ pub enum Diagnostic { /// Sdk module by name, as well as the constants /// [`SDK_MODULE_VERSION_REQ`] and [`IBC_GO_MODULE_VERSION_REQ`] /// for establishing compatibility requirements. -pub(crate) fn run_diagnostic(v: &version::Specs) -> Result<(), Diagnostic> { - debug!("running diagnostic on version info {}", v); +pub(crate) fn run_diagnostic(specs: &version::Specs) -> Result<(), Diagnostic> { + debug!("running diagnostic on version specs: {specs}"); - sdk_diagnostic(&v.cosmos_sdk)?; - ibc_go_diagnostic(v.ibc_go.as_ref())?; + sdk_diagnostic(specs.cosmos_sdk.as_ref())?; + ibc_go_diagnostic(specs.ibc_go.as_ref())?; Ok(()) } -fn sdk_diagnostic(version: &semver::Version) -> Result<(), Diagnostic> { +fn sdk_diagnostic(version: Option<&semver::Version>) -> Result<(), Diagnostic> { // Parse the SDK requirements into a semver let sdk_reqs = semver::VersionReq::parse(SDK_MODULE_VERSION_REQ) .expect("parsing the SDK module requirements into semver"); - // Finally, check the version requirements - match sdk_reqs.matches(version) { - true => Ok(()), - false => Err(Diagnostic::MismatchingSdkModuleVersion { + match version { + None => Err(Diagnostic::MissingSdkModuleVersion { requirements: SDK_MODULE_VERSION_REQ.to_string(), - found: version.to_string(), }), + + Some(version) => match sdk_reqs.matches(version) { + true => Ok(()), + false => Err(Diagnostic::MismatchingSdkModuleVersion { + requirements: SDK_MODULE_VERSION_REQ.to_string(), + found: version.to_string(), + }), + }, } } -fn ibc_go_diagnostic(version_info: Option<&semver::Version>) -> Result<(), Diagnostic> { +fn ibc_go_diagnostic(version: Option<&semver::Version>) -> Result<(), Diagnostic> { // Parse the IBC-go module requirements into a semver let ibc_reqs = semver::VersionReq::parse(IBC_GO_MODULE_VERSION_REQ) .expect("parsing the IBC-Go module requirements into semver"); - // Find the Ibc-Go module - match version_info { - // If binary lacks the ibc-go dependency it is _not_ an error, - // we support chains without the standalone ibc-go module. - None => Ok(()), + match version { + None => Err(Diagnostic::MissingIbcGoModuleVersion { + requirements: IBC_GO_MODULE_VERSION_REQ.to_string(), + }), Some(version) => match ibc_reqs.matches(version) { true => Ok(()), false => Err(Diagnostic::MismatchingIbcGoModuleVersion { diff --git a/crates/relayer/src/chain/cosmos/config.rs b/crates/relayer/src/chain/cosmos/config.rs index b0c0850a4f..8aa79cc849 100644 --- a/crates/relayer/src/chain/cosmos/config.rs +++ b/crates/relayer/src/chain/cosmos/config.rs @@ -1,9 +1,12 @@ use core::time::Duration; +use std::collections::BTreeMap; use std::path::PathBuf; use byte_unit::Byte; use ibc_relayer_types::core::{ - ics23_commitment::specs::ProofSpecs, ics24_host::identifier::ChainId, + ics04_channel::packet::Sequence, + ics23_commitment::specs::ProofSpecs, + ics24_host::identifier::{ChainId, ChannelId}, }; use serde_derive::{Deserialize, Serialize}; use tendermint_rpc::Url; @@ -110,6 +113,9 @@ pub struct CosmosSdkConfig { #[serde(default)] pub memo_prefix: Memo, + #[serde(default)] + pub memo_overwrite: Option, + // This is an undocumented and hidden config to make the relayer wait for // DeliverTX before sending the next transaction when sending messages in // multiple batches. We will instruct relayer operators to turn this on @@ -147,6 +153,8 @@ pub struct CosmosSdkConfig { pub extension_options: Vec, pub compat_mode: Option, pub clear_interval: Option, + #[serde(default)] + pub excluded_sequences: BTreeMap>, } impl CosmosSdkConfig { diff --git a/crates/relayer/src/chain/cosmos/encode.rs b/crates/relayer/src/chain/cosmos/encode.rs index e77651de6b..5e26696717 100644 --- a/crates/relayer/src/chain/cosmos/encode.rs +++ b/crates/relayer/src/chain/cosmos/encode.rs @@ -120,7 +120,7 @@ pub fn sign_tx( fn encode_key_bytes(key_pair: &Secp256k1KeyPair) -> Result, Error> { let mut pk_buf = Vec::new(); - prost::Message::encode(&key_pair.public_key.serialize().to_vec(), &mut pk_buf) + Message::encode(&key_pair.public_key.serialize().to_vec(), &mut pk_buf) .map_err(|e| Error::protobuf_encode("PublicKey".into(), e))?; Ok(pk_buf) @@ -142,7 +142,7 @@ fn encode_sign_doc( // A protobuf serialization of a SignDoc let mut signdoc_buf = Vec::new(); - prost::Message::encode(&sign_doc, &mut signdoc_buf).unwrap(); + Message::encode(&sign_doc, &mut signdoc_buf).unwrap(); let signed = key_pair.sign(&signdoc_buf).map_err(Error::key_base)?; @@ -178,7 +178,7 @@ fn encode_signer_info( fn encode_tx_raw(tx_raw: TxRaw) -> Result, Error> { let mut tx_bytes = Vec::new(); - prost::Message::encode(&tx_raw, &mut tx_bytes) + Message::encode(&tx_raw, &mut tx_bytes) .map_err(|e| Error::protobuf_encode("Transaction".to_string(), e))?; Ok(tx_bytes) @@ -206,7 +206,7 @@ fn auth_info_and_bytes(signer_info: SignerInfo, fee: Fee) -> Result<(AuthInfo, V // A protobuf serialization of a AuthInfo let mut auth_buf = Vec::new(); - prost::Message::encode(&auth_info, &mut auth_buf) + Message::encode(&auth_info, &mut auth_buf) .map_err(|e| Error::protobuf_encode(String::from("AuthInfo"), e))?; Ok((auth_info, auth_buf)) @@ -229,7 +229,7 @@ fn tx_body_and_bytes( // A protobuf serialization of a TxBody let mut body_buf = Vec::new(); - prost::Message::encode(&body, &mut body_buf) + Message::encode(&body, &mut body_buf) .map_err(|e| Error::protobuf_encode(String::from("TxBody"), e))?; Ok((body, body_buf)) diff --git a/crates/relayer/src/chain/cosmos/estimate.rs b/crates/relayer/src/chain/cosmos/estimate.rs index 504770aa69..0f7b604108 100644 --- a/crates/relayer/src/chain/cosmos/estimate.rs +++ b/crates/relayer/src/chain/cosmos/estimate.rs @@ -17,16 +17,30 @@ use crate::{ config::types::Memo, error::Error, keyring::Secp256k1KeyPair, + telemetry, util::pretty::PrettyFee, }; +pub enum EstimatedGas { + Simulated(u64), + Default(u64), +} + +impl EstimatedGas { + pub fn get_amount(&self) -> u64 { + match self { + Self::Simulated(amount) | Self::Default(amount) => *amount, + } + } +} + pub async fn estimate_tx_fees( config: &TxConfig, key_pair: &Secp256k1KeyPair, account: &Account, tx_memo: &Memo, messages: &[Any], -) -> Result { +) -> Result<(Fee, EstimatedGas), Error> { let gas_config = &config.gas_config; debug!( @@ -49,16 +63,17 @@ pub async fn estimate_tx_fees( signatures: signed_tx.signatures, }; - let estimated_fee = estimate_fee_with_tx( + let estimated_fee_and_gas = estimate_fee_with_tx( gas_config, &config.grpc_address, &config.rpc_address, &config.chain_id, tx, + account, ) .await?; - Ok(estimated_fee) + Ok(estimated_fee_and_gas) } async fn estimate_fee_with_tx( @@ -67,7 +82,8 @@ async fn estimate_fee_with_tx( rpc_address: &Url, chain_id: &ChainId, tx: Tx, -) -> Result { + account: &Account, +) -> Result<(Fee, EstimatedGas), Error> { let estimated_gas = { crate::time!( "estimate_gas_with_tx", @@ -76,32 +92,35 @@ async fn estimate_fee_with_tx( } ); - estimate_gas_with_tx(gas_config, grpc_address, tx).await + estimate_gas_with_tx(gas_config, grpc_address, tx, account).await }?; - if estimated_gas > gas_config.max_gas { + let estimated_gas_amount = estimated_gas.get_amount(); + + if estimated_gas_amount > gas_config.max_gas { debug!( - id = %chain_id, estimated = ?estimated_gas, max = ?gas_config.max_gas, + id = %chain_id, estimated = ?estimated_gas_amount, max = ?gas_config.max_gas, "send_tx: estimated gas is higher than max gas" ); return Err(Error::tx_simulate_gas_estimate_exceeded( chain_id.clone(), - estimated_gas, + estimated_gas_amount, gas_config.max_gas, )); } - let adjusted_fee = gas_amount_to_fee(gas_config, estimated_gas, chain_id, rpc_address).await; + let adjusted_fee = + gas_amount_to_fee(gas_config, estimated_gas_amount, chain_id, rpc_address).await; debug!( id = %chain_id, "send_tx: using {} gas, fee {}", - estimated_gas, + estimated_gas_amount, PrettyFee(&adjusted_fee) ); - Ok(adjusted_fee) + Ok((adjusted_fee, estimated_gas)) } /// Try to simulate the given tx in order to estimate how much gas will be needed to submit it. @@ -116,7 +135,8 @@ async fn estimate_gas_with_tx( gas_config: &GasConfig, grpc_address: &Uri, tx: Tx, -) -> Result { + _account: &Account, +) -> Result { let simulated_gas = send_tx_simulate(grpc_address, tx) .await .map(|sr| sr.gas_info); @@ -130,7 +150,7 @@ async fn estimate_gas_with_tx( gas_info.gas_used ); - Ok(gas_info.gas_used) + Ok(EstimatedGas::Simulated(gas_info.gas_used)) } Ok(None) => { @@ -139,7 +159,7 @@ async fn estimate_gas_with_tx( gas_config.default_gas ); - Ok(gas_config.default_gas) + Ok(EstimatedGas::Default(gas_config.default_gas)) } // If there is a chance that the tx will be accepted once actually submitted, we fall @@ -151,7 +171,14 @@ async fn estimate_gas_with_tx( e.detail() ); - Ok(gas_config.default_gas) + telemetry!( + simulate_errors, + &_account.address.to_string(), + true, + get_error_text(&e), + ); + + Ok(EstimatedGas::Default(gas_config.default_gas)) } Err(e) => { @@ -159,6 +186,14 @@ async fn estimate_gas_with_tx( "failed to simulate tx. propagating error to caller: {}", e.detail() ); + + telemetry!( + simulate_errors, + &_account.address.to_string(), + false, + get_error_text(&e), + ); + // Propagate the error, the retrying mechanism at caller may catch & retry. Err(e) } @@ -175,7 +210,18 @@ fn can_recover_from_simulation_failure(e: &Error) -> bool { detail.is_client_state_height_too_low() || detail.is_account_sequence_mismatch_that_can_be_ignored() || detail.is_out_of_order_packet_sequence_error() + || detail.is_empty_tx_error() } _ => false, } } + +#[cfg(feature = "telemetry")] +fn get_error_text(e: &Error) -> String { + use crate::error::ErrorDetail::*; + + match e.detail() { + GrpcStatus(detail) => detail.status.code().to_string(), + detail => detail.to_string(), + } +} diff --git a/crates/relayer/src/chain/cosmos/query/custom.rs b/crates/relayer/src/chain/cosmos/query/custom.rs index c1faa20395..9e7afdbcca 100644 --- a/crates/relayer/src/chain/cosmos/query/custom.rs +++ b/crates/relayer/src/chain/cosmos/query/custom.rs @@ -1,7 +1,7 @@ -use hex; use ibc_relayer_types::applications::ics31_icq::{ error::Error as CrossChainQueryError, response::CrossChainQueryResponse, }; + use tendermint_rpc::{Client, HttpClient}; use crate::{chain::requests::CrossChainQueryRequest, error::Error}; @@ -10,7 +10,7 @@ pub async fn cross_chain_query_via_rpc( client: &HttpClient, cross_chain_query_request: CrossChainQueryRequest, ) -> Result { - let hex_decoded_request = hex::decode(cross_chain_query_request.request) + let hex_decoded_request = hex::decode(cross_chain_query_request.request.to_lowercase()) .map_err(|_| Error::ics31(CrossChainQueryError::parse()))?; let response = client diff --git a/crates/relayer/src/chain/cosmos/retry.rs b/crates/relayer/src/chain/cosmos/retry.rs index aaf4753d56..913f51ea0f 100644 --- a/crates/relayer/src/chain/cosmos/retry.rs +++ b/crates/relayer/src/chain/cosmos/retry.rs @@ -104,7 +104,7 @@ async fn do_send_tx_with_account_sequence_retry( // NOTE: The error code could potentially overlap between Cosmos SDK and Ibc-go channel // error codes. This is currently not the case of incorrect account sequence error //which is the Cosmos SDK code 32 and Ibc-go channel errors only go up to 25. - Ok(ref response) if response.code == Code::from(INCORRECT_ACCOUNT_SEQUENCE_ERR) => { + Ok((ref response, _)) if response.code == Code::from(INCORRECT_ACCOUNT_SEQUENCE_ERR) => { warn!( ?response, "failed to broadcast tx because of a mismatched account sequence number, \ @@ -126,7 +126,7 @@ async fn do_send_tx_with_account_sequence_retry( // Gas estimation succeeded and broadcast_tx_sync was either successful or has failed with // an unrecoverable error. - Ok(response) => { + Ok((response, estimated_gas)) => { debug!("gas estimation succeeded"); // Gas estimation and broadcast_tx_sync were successful. @@ -156,7 +156,7 @@ async fn do_send_tx_with_account_sequence_retry( // Log the error. error!( ?response, - diagnostic = ?sdk_error_from_tx_sync_error_code(code.into()), + diagnostic = ?sdk_error_from_tx_sync_error_code(code.into(), estimated_gas), "failed to broadcast tx with unrecoverable error" ); @@ -196,7 +196,10 @@ async fn refresh_account_and_retry_send_tx_with_account_sequence( // Retry after delay thread::sleep(Duration::from_millis(ACCOUNT_SEQUENCE_RETRY_DELAY)); - estimate_fee_and_send_tx(rpc_client, config, key_pair, account, tx_memo, messages).await + let (estimate_result, _) = + estimate_fee_and_send_tx(rpc_client, config, key_pair, account, tx_memo, messages).await?; + + Ok(estimate_result) } /// Determine whether the given error yielded by `tx_simulate` diff --git a/crates/relayer/src/chain/cosmos/tx.rs b/crates/relayer/src/chain/cosmos/tx.rs index 1005b43dfe..d1712c5c4f 100644 --- a/crates/relayer/src/chain/cosmos/tx.rs +++ b/crates/relayer/src/chain/cosmos/tx.rs @@ -2,7 +2,7 @@ use ibc_proto::{cosmos::tx::v1beta1::Fee, google::protobuf::Any}; use ibc_relayer_types::events::IbcEvent; use tendermint_rpc::{endpoint::broadcast::tx_sync::Response, Client, HttpClient, Url}; -use super::batch::send_batched_messages_and_wait_commit; +use super::{batch::send_batched_messages_and_wait_commit, estimate::EstimatedGas}; use crate::{ chain::cosmos::{ encode::sign_and_encode_tx, @@ -24,13 +24,16 @@ pub async fn estimate_fee_and_send_tx( account: &Account, tx_memo: &Memo, messages: &[Any], -) -> Result { - let fee = estimate_tx_fees(config, key_pair, account, tx_memo, messages).await?; +) -> Result<(Response, EstimatedGas), Error> { + let (fee, estimated_gas) = + estimate_tx_fees(config, key_pair, account, tx_memo, messages).await?; - send_tx_with_fee( + let tx_result = send_tx_with_fee( rpc_client, config, key_pair, account, tx_memo, messages, &fee, ) - .await + .await?; + + Ok((tx_result, estimated_gas)) } async fn send_tx_with_fee( @@ -86,7 +89,7 @@ pub async fn simple_send_tx( .await? .into(); - let response = estimate_fee_and_send_tx( + let (response, _) = estimate_fee_and_send_tx( rpc_client, config, key_pair, diff --git a/crates/relayer/src/chain/cosmos/types/events/channel.rs b/crates/relayer/src/chain/cosmos/types/events/channel.rs index 78f3310d1a..08c480a511 100644 --- a/crates/relayer/src/chain/cosmos/types/events/channel.rs +++ b/crates/relayer/src/chain/cosmos/types/events/channel.rs @@ -72,11 +72,7 @@ macro_rules! impl_try_from_raw_obj_for_packet { type Error = EventError; fn try_from(obj: RawObject<'_>) -> Result { - let data_str: String = extract_attribute(&obj, &format!("{}.{}", obj.action, PKT_DATA_ATTRIBUTE_KEY))?; - - let mut packet = Packet::try_from(obj)?; - packet.data = Vec::from(data_str.as_str().as_bytes()); - + let packet = Packet::try_from(obj)?; Ok(Self { packet }) } })+ @@ -95,13 +91,10 @@ impl TryFrom> for WriteAcknowledgement { type Error = EventError; fn try_from(obj: RawObject<'_>) -> Result { - let data_str: String = - extract_attribute(&obj, &format!("{}.{}", obj.action, PKT_DATA_ATTRIBUTE_KEY))?; let ack = extract_attribute(&obj, &format!("{}.{}", obj.action, PKT_ACK_ATTRIBUTE_KEY))? .into_bytes(); - let mut packet = Packet::try_from(obj)?; - packet.data = Vec::from(data_str.as_bytes()); + let packet = Packet::try_from(obj)?; Ok(Self { packet, ack }) } @@ -123,7 +116,14 @@ pub fn parse_timeout_height(s: &str) -> Result { impl TryFrom> for Packet { type Error = EventError; + fn try_from(obj: RawObject<'_>) -> Result { + let data_str = + extract_attribute(&obj, &format!("{}.{}", obj.action, PKT_DATA_ATTRIBUTE_KEY))?; + + let data = hex::decode(data_str.to_lowercase()) + .map_err(|_| EventError::invalid_packet_data(data_str))?; + Ok(Packet { sequence: extract_attribute( &obj, @@ -131,31 +131,37 @@ impl TryFrom> for Packet { )? .parse() .map_err(EventError::channel)?, + source_port: extract_attribute( &obj, &format!("{}.{}", obj.action, PKT_SRC_PORT_ATTRIBUTE_KEY), )? .parse() .map_err(EventError::parse)?, + source_channel: extract_attribute( &obj, &format!("{}.{}", obj.action, PKT_SRC_CHANNEL_ATTRIBUTE_KEY), )? .parse() .map_err(EventError::parse)?, + destination_port: extract_attribute( &obj, &format!("{}.{}", obj.action, PKT_DST_PORT_ATTRIBUTE_KEY), )? .parse() .map_err(EventError::parse)?, + destination_channel: extract_attribute( &obj, &format!("{}.{}", obj.action, PKT_DST_CHANNEL_ATTRIBUTE_KEY), )? .parse() .map_err(EventError::parse)?, - data: vec![], + + data, + timeout_height: { let timeout_height_str = extract_attribute( &obj, diff --git a/crates/relayer/src/chain/cosmos/version.rs b/crates/relayer/src/chain/cosmos/version.rs index fd2bba9280..217ff688d3 100644 --- a/crates/relayer/src/chain/cosmos/version.rs +++ b/crates/relayer/src/chain/cosmos/version.rs @@ -5,7 +5,7 @@ use core::fmt::{Display, Error as FmtError, Formatter}; use flex_error::define_error; -use ibc_proto::cosmos::base::tendermint::v1beta1::VersionInfo; +use ibc_proto::cosmos::base::tendermint::v1beta1::{Module, VersionInfo}; use tracing::trace; /// Specifies the SDK, IBC-go, and Tendermint modules path, as expected @@ -21,69 +21,63 @@ use tracing::trace; /// sum: "h1:yaD4PyOx0LnyfiWasC5egg1U76lT83GRxjJjupPo7Gk=", /// }, /// ``` -const SDK_MODULE_NAME: &str = "cosmos/cosmos-sdk"; -const IBC_GO_MODULE_NAME: &str = "cosmos/ibc-go"; -const TENDERMINT_MODULE_NAME: &str = "tendermint/tendermint"; -const COMET_MODULE_NAME: &str = "cometbft/cometbft"; +const SDK_MODULE_NAME: &str = "github.com/cosmos/cosmos-sdk"; +const IBC_GO_MODULE_PREFIX: &str = "github.com/cosmos/ibc-go/v"; +const TENDERMINT_MODULE_NAME: &str = "github.com/tendermint/tendermint"; +const COMET_MODULE_NAME: &str = "github.com/cometbft/cometbft"; -/// Captures the version(s) specification of different -/// modules of a network. -/// -/// Assumes that the network runs on Cosmos SDK. -/// Stores both the SDK version as well as -/// the IBC-go module version (if existing). -#[derive(Debug)] +#[derive(Clone, Debug, PartialEq, Eq)] +pub enum ConsensusVersion { + Tendermint(semver::Version), + Comet(semver::Version), +} + +/// Captures the version(s) specification of different modules of a network. +#[derive(Clone, Debug, PartialEq, Eq)] pub struct Specs { - pub cosmos_sdk: semver::Version, + pub cosmos_sdk: Option, pub ibc_go: Option, - pub tendermint: Option, - pub comet: Option, + pub consensus: Option, } impl Display for Specs { fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), FmtError> { - let ibc_go = self - .ibc_go + let cosmos_sdk = self + .cosmos_sdk .as_ref() .map(|v| v.to_string()) .unwrap_or_else(|| "UNKNOWN".to_string()); - let tendermint = self - .tendermint + let ibc_go = self + .ibc_go .as_ref() .map(|v| v.to_string()) .unwrap_or_else(|| "UNKNOWN".to_string()); - let comet = self - .comet - .as_ref() - .map(|v| v.to_string()) - .unwrap_or_else(|| "UNKNOWN".to_string()); + let consensus = match self.consensus { + Some(ConsensusVersion::Tendermint(ref v)) => format!("Tendermint {v}"), + Some(ConsensusVersion::Comet(ref v)) => format!("CometBFT {v}"), + None => "Tendermint: UNKNOWN, CometBFT: UNKNOWN".to_string(), + }; write!( f, - "Cosmos SDK {}, IBC-Go {}, Tendermint {}, CometBFT {}", - self.cosmos_sdk, ibc_go, tendermint, comet + "Cosmos SDK {}, IBC-Go {}, {}", + cosmos_sdk, ibc_go, consensus ) } } define_error! { Error { - SdkModuleNotFound - { - address: String, - app: AppInfo, - } - |e| { format!("failed to find the SDK module dependency ('{}') for application {}", e.address, e.app) }, - ConsensusModuleNotFound { tendermint: String, comet: String, app: AppInfo, } - |e| { format!("failed to find the Tendermint ('{}') or CometBFT ('{}') dependency for application {}", e.tendermint, e.comet, e.app) }, + |e| { format!("failed to find the Tendermint ('{}') or CometBFT ('{}') dependency for application {}", + e.tendermint, e.comet, e.app) }, VersionParsingFailed { @@ -107,8 +101,14 @@ impl TryFrom for Specs { let tendermint_version = parse_tendermint_version(&raw_version)?; let comet_version = parse_comet_version(&raw_version)?; + let consensus_version = match (tendermint_version, comet_version) { + (_, Some(comet)) => Some(ConsensusVersion::Comet(comet)), + (Some(tendermint), _) => Some(ConsensusVersion::Tendermint(tendermint)), + _ => None, + }; + // Ensure that either Tendermint or CometBFT are being used. - if tendermint_version.is_none() && comet_version.is_none() { + if consensus_version.is_none() { return Err(Error::consensus_module_not_found( TENDERMINT_MODULE_NAME.to_string(), COMET_MODULE_NAME.to_string(), @@ -120,77 +120,50 @@ impl TryFrom for Specs { application = %raw_version.app_name, version = %raw_version.version, git_commit = %raw_version.git_commit, - sdk_version = %sdk_version, + sdk_version = ?sdk_version, ibc_go_status = ?ibc_go_version, - tendermint_version = ?tendermint_version, - comet_version = ?comet_version, + consensus_version = ?consensus_version, "parsed version specification" ); Ok(Self { cosmos_sdk: sdk_version, ibc_go: ibc_go_version, - tendermint: tendermint_version, - comet: comet_version, + consensus: consensus_version, }) } } -fn parse_sdk_version(version_info: &VersionInfo) -> Result { - let module = version_info - .build_deps - .iter() - .find(|&m| m.path.contains(SDK_MODULE_NAME)) - .ok_or_else(|| { - Error::sdk_module_not_found(SDK_MODULE_NAME.to_string(), AppInfo::from(version_info)) - })?; - - // The raw version number has a leading 'v', trim it out; - let plain_version = module.version.trim_start_matches('v'); - - // Parse the module version - let mut version = semver::Version::parse(plain_version).map_err(|e| { - Error::version_parsing_failed( - module.path.clone(), - module.version.clone(), - e.to_string(), - AppInfo::from(version_info), - ) - })?; - - // Remove the pre-release version to ensure we treat pre-releases of the SDK - // as their normal version, eg. 0.42.0-rc2 should satisfy >=0.41.3, <= 0.42.6. - version.pre = semver::Prerelease::EMPTY; - - Ok(version) +fn parse_sdk_version(version_info: &VersionInfo) -> Result, Error> { + parse_optional_version(version_info, |m| m.path == SDK_MODULE_NAME) } fn parse_ibc_go_version(version_info: &VersionInfo) -> Result, Error> { - parse_optional_version(version_info, IBC_GO_MODULE_NAME) + parse_optional_version(version_info, |m| m.path.starts_with(IBC_GO_MODULE_PREFIX)) } fn parse_tendermint_version(version_info: &VersionInfo) -> Result, Error> { - parse_optional_version(version_info, TENDERMINT_MODULE_NAME) + parse_optional_version(version_info, |m| m.path == TENDERMINT_MODULE_NAME) } fn parse_comet_version(version_info: &VersionInfo) -> Result, Error> { - parse_optional_version(version_info, COMET_MODULE_NAME) + parse_optional_version(version_info, |m| m.path == COMET_MODULE_NAME) } fn parse_optional_version( version_info: &VersionInfo, - module_name: &str, + predicate: impl Fn(&Module) -> bool, ) -> Result, Error> { - match version_info - .build_deps - .iter() - .find(|&m| m.path.contains(module_name)) - { + let module = version_info.build_deps.iter().find(|&m| predicate(m)); + + match module { None => Ok(None), + Some(module) => { let plain_version = module.version.trim_start_matches('v'); semver::Version::parse(plain_version) + // Discard the pre-release version, if any .map(|mut version| { version.pre = semver::Prerelease::EMPTY; Some(version) @@ -209,7 +182,7 @@ fn parse_optional_version( /// Helper struct to capture all the reported information of an /// IBC application, e.g., `gaiad`. -#[derive(Clone, Debug)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct AppInfo { app_name: String, version: String, @@ -231,3 +204,171 @@ impl From<&VersionInfo> for AppInfo { } } } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn cosmoshub() { + let version_info = VersionInfo { + name: "gaia".to_string(), + app_name: "gaiad".to_string(), + version: "v14.2.0".to_string(), + git_commit: "3aa6e5058b4cbb4729300b239abfabd9a5b5691f".to_string(), + build_tags: "netgo,ledger".to_string(), + go_version: "go version go1.20.3 linux/amd64".to_string(), + cosmos_sdk_version: "v0.45.16".to_string(), + build_deps: vec![ + Module { + path: "github.com/cometbft/cometbft-db".to_string(), + version: "v0.7.0".to_string(), + sum: "h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0ucsbo=".to_string(), + }, + Module { + path: "github.com/confio/ics23/go".to_string(), + version: "v0.9.0".to_string(), + sum: "h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4=".to_string(), + }, + Module { + path: "github.com/cosmos/cosmos-db".to_string(), + version: "v0.0.0-20221226095112-f3c38ecb5e32".to_string(), + sum: "h1:zlCp9n3uwQieELltZWHRmwPmPaZ8+XoL2Sj+A2YJlr8=".to_string(), + }, + Module { + path: "github.com/cosmos/cosmos-proto".to_string(), + version: "v1.0.0-beta.1".to_string(), + sum: "h1:iDL5qh++NoXxG8hSy93FdYJut4XfgbShIocllGaXx/0=".to_string(), + }, + Module { + path: "github.com/cosmos/cosmos-sdk".to_string(), + version: "v0.45.16".to_string(), + sum: "".to_string(), + }, + Module { + path: "github.com/cosmos/go-bip39".to_string(), + version: "v1.0.0".to_string(), + sum: "h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY=".to_string(), + }, + Module { + path: "github.com/cosmos/iavl".to_string(), + version: "v0.19.5".to_string(), + sum: "h1:rGA3hOrgNxgRM5wYcSCxgQBap7fW82WZgY78V9po/iY=".to_string(), + }, + Module { + path: "github.com/tendermint/tendermint".to_string(), + version: "v0.34.27".to_string(), + sum: "".to_string(), + }, + Module { + path: "github.com/cosmos/ibc-go/v4".to_string(), + version: "v4.4.2".to_string(), + sum: "h1:PG4Yy0/bw6Hvmha3RZbc53KYzaCwuB07Ot4GLyzcBvo=".to_string(), + }, + Module { + path: "github.com/cosmos/interchain-security/v2".to_string(), + version: "v2.0.0".to_string(), + sum: "".to_string(), + }, + ], + }; + + let app_info = AppInfo::from(&version_info); + + assert_eq!( + app_info, + AppInfo { + app_name: "gaiad".to_string(), + version: "v14.2.0".to_string(), + git_commit: "3aa6e5058b4cbb4729300b239abfabd9a5b5691f".to_string() + } + ); + + let specs = Specs::try_from(version_info).unwrap(); + + assert_eq!( + specs, + Specs { + cosmos_sdk: Some(semver::Version::parse("0.45.16").unwrap()), + ibc_go: Some(semver::Version::parse("4.4.2").unwrap()), + consensus: Some(ConsensusVersion::Tendermint( + semver::Version::parse("0.34.27").unwrap() + )) + } + ); + } + + #[test] + fn phoenix() { + let version_info = VersionInfo { + name: "terra".to_string(), + app_name: "terrad".to_string(), + version: "20210603".to_string(), + git_commit: "7cbb1f555b661a6ebec55231e563d2f94effc40e".to_string(), + build_tags: "netgo,ledger".to_string(), + go_version: "go version go1.20 linux/amd64".to_string(), + cosmos_sdk_version: "v0.47.5".to_string(), + build_deps: vec![ + Module { + path: "github.com/confio/ics23/go".to_string(), + version: "v0.9.0".to_string(), + sum: "h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4=".to_string(), + }, + Module { + path: "github.com/cometbft/cometbft-db".to_string(), + version: "v0.8.0".to_string(), + sum: "h1:vUMDaH3ApkX8m0KZvOFFy9b5DZHBAjsnEuo9AKVZpjo=".to_string(), + }, + Module { + path: "github.com/cosmos/cosmos-proto".to_string(), + version: "v1.0.0-beta.3".to_string(), + sum: "h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o=".to_string(), + }, + Module { + path: "github.com/cosmos/cosmos-sdk".to_string(), + version: "v0.47.5".to_string(), + sum: "".to_string(), + }, + Module { + path: "github.com/cosmos/ibc-go/v7".to_string(), + version: "v7.3.0".to_string(), + sum: "".to_string(), + }, + Module { + path: "github.com/cosmos/ics23/go".to_string(), + version: "v0.10.0".to_string(), + sum: "h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM=".to_string(), + }, + Module { + path: "github.com/cometbft/cometbft".to_string(), + version: "v0.37.2".to_string(), + sum: "h1:XB0yyHGT0lwmJlFmM4+rsRnczPlHoAKFX6K8Zgc2/Jc=".to_string(), + }, + ], + }; + + let app_info = AppInfo::from(&version_info); + + assert_eq!( + app_info, + AppInfo { + app_name: "terrad".to_string(), + version: "20210603".to_string(), + git_commit: "7cbb1f555b661a6ebec55231e563d2f94effc40e".to_string() + } + ); + + let specs = Specs::try_from(version_info).unwrap(); + + assert_eq!( + specs, + Specs { + cosmos_sdk: Some(semver::Version::parse("0.47.5").unwrap()), + ibc_go: Some(semver::Version::parse("7.3.0").unwrap()), + consensus: Some(ConsensusVersion::Comet( + semver::Version::parse("0.37.2").unwrap() + )) + } + ); + } +} diff --git a/crates/relayer/src/chain/endpoint.rs b/crates/relayer/src/chain/endpoint.rs index b9f5507c1b..8e48d87edc 100644 --- a/crates/relayer/src/chain/endpoint.rs +++ b/crates/relayer/src/chain/endpoint.rs @@ -1,5 +1,4 @@ use alloc::sync::Arc; -use core::convert::TryFrom; use ibc_proto::ibc::apps::fee::v1::{ QueryIncentivizedPacketRequest, QueryIncentivizedPacketResponse, diff --git a/crates/relayer/src/chain/penumbra/chain.rs b/crates/relayer/src/chain/penumbra/chain.rs index 8db3293a30..cb09de0cc0 100644 --- a/crates/relayer/src/chain/penumbra/chain.rs +++ b/crates/relayer/src/chain/penumbra/chain.rs @@ -23,7 +23,6 @@ use tracing::info; use crate::chain::client::ClientSettings; use crate::chain::cosmos::query::{abci_query, QueryResponse}; use crate::chain::endpoint::ChainStatus; -use crate::chain::requests::IncludeProof; use crate::chain::requests::*; use crate::chain::tracking::TrackedMsgs; use crate::client_state::{AnyClientState, IdentifiedAnyClientState}; @@ -144,10 +143,14 @@ impl PenumbraChain { use crate::config::EventSourceMode as Mode; let (event_source, monitor_tx) = match &self.config.event_source { - Mode::Pull { interval } => EventSource::rpc( + Mode::Pull { + interval, + max_retries, + } => EventSource::rpc( self.config.id.clone(), self.tendermint_rpc_client.clone(), *interval, + *max_retries, self.rt.clone(), ), _ => unimplemented!(), @@ -519,25 +522,17 @@ impl ChainEndpoint for PenumbraChain { .map_err(|e| Error::grpc_status(e, "app_parameters query".to_owned()))? .into_inner(); - let epoch_duration = app_parameters - .clone() - .app_parameters - .expect("should have app parameters") - .sct_params - .expect("should have sct parameters") - .epoch_duration; - - let unbonding_epochs = app_parameters + let unbonding_delay = app_parameters .app_parameters .expect("should have app parameters") .stake_params .expect("should have stake parameters") - .unbonding_epochs; + .unbonding_delay; // here we assume roughly 5s block time, which is not part of consensus but should be // roughly correct. it would really be better if the ibc protocol gave the client's // trusting period in terms of blocks instead of duration. - let unbonding_period = Duration::from_secs(epoch_duration * unbonding_epochs * 5); + let unbonding_period = Duration::from_secs(unbonding_delay * 5); tracing::info!("starting view service sync"); diff --git a/crates/relayer/src/chain/requests.rs b/crates/relayer/src/chain/requests.rs index 9941f4c8f9..3ded6c9ee5 100644 --- a/crates/relayer/src/chain/requests.rs +++ b/crates/relayer/src/chain/requests.rs @@ -70,7 +70,7 @@ impl TryFrom for AsciiMetadataValue { } impl Display for QueryHeight { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { QueryHeight::Latest => write!(f, "latest height"), QueryHeight::Specific(height) => write!(f, "{height}"), @@ -97,7 +97,7 @@ pub struct PageRequest { /// key is a value returned in PageResponse.next_key to begin /// querying the next page most efficiently. Only one of offset or key /// should be set. - pub key: ::prost::alloc::vec::Vec, + pub key: Vec, /// offset is a numeric offset that can be used when key is unavailable. /// It is less efficient than using key. Only one of offset or key should /// be set. diff --git a/crates/relayer/src/chain/runtime.rs b/crates/relayer/src/chain/runtime.rs index 6698f2816b..575f10ec95 100644 --- a/crates/relayer/src/chain/runtime.rs +++ b/crates/relayer/src/chain/runtime.rs @@ -37,7 +37,6 @@ use super::{ }; use crate::{ account::Balance, - chain::requests::QueryPacketEventDataRequest, client_state::{AnyClientState, IdentifiedAnyClientState}, config::ChainConfig, connection::ConnectionMsgType, diff --git a/crates/relayer/src/chain/tracking.rs b/crates/relayer/src/chain/tracking.rs index 62f89ca096..589ad305f2 100644 --- a/crates/relayer/src/chain/tracking.rs +++ b/crates/relayer/src/chain/tracking.rs @@ -15,7 +15,7 @@ pub enum TrackingId { /// the CLI or during packet clearing. Static(&'static str), /// Random identifier used to track latency of packet clearing. - ClearedUuid(Uuid), + PacketClearing(Uuid), } impl TrackingId { @@ -29,8 +29,13 @@ impl TrackingId { Self::Static(s) } - pub fn new_cleared_uuid() -> Self { - Self::ClearedUuid(Uuid::new_v4()) + pub fn new_packet_clearing() -> Self { + Self::PacketClearing(Uuid::new_v4()) + } + + /// Indicates whether a packet clearing process is currently in-progress. + pub fn is_clearing(&self) -> bool { + matches!(self, Self::PacketClearing(_)) } } @@ -43,7 +48,7 @@ impl Display for TrackingId { s.fmt(f) } TrackingId::Static(s) => s.fmt(f), - TrackingId::ClearedUuid(u) => { + TrackingId::PacketClearing(u) => { let mut uuid = "cleared/".to_owned(); let mut s = u.to_string(); s.truncate(8); diff --git a/crates/relayer/src/channel.rs b/crates/relayer/src/channel.rs index 885d3d3976..34f5da8b52 100644 --- a/crates/relayer/src/channel.rs +++ b/crates/relayer/src/channel.rs @@ -57,29 +57,29 @@ pub mod channel_handshake_retry { use crate::{ channel::ChannelError, - util::retry::{clamp_total, ConstantGrowth}, + util::retry::{clamp, ConstantGrowth}, }; /// Approximate number of retries per block. - const PER_BLOCK_RETRIES: u32 = 10; + const PER_BLOCK_RETRIES: u32 = 5; /// Defines the increment in delay between subsequent retries. /// A value of `0` will make the retry delay constant. - const DELAY_INCREMENT: u64 = 0; + const DELAY_INCREMENT: Duration = Duration::from_secs(0); - /// Maximum retry delay expressed in number of blocks - const BLOCK_NUMBER_DELAY: u32 = 10; + /// Maximum number of retries + const MAX_RETRIES: u32 = 10; /// The default retry strategy. /// We retry with a constant backoff strategy. The strategy is parametrized by the /// maximum block time expressed as a `Duration`. - pub fn default_strategy(max_block_times: Duration) -> impl Iterator { - let retry_delay = max_block_times / PER_BLOCK_RETRIES; + pub fn default_strategy(max_block_time: Duration) -> impl Iterator { + let retry_delay = max_block_time / PER_BLOCK_RETRIES; - clamp_total( - ConstantGrowth::new(retry_delay, Duration::from_secs(DELAY_INCREMENT)), - retry_delay, - max_block_times * BLOCK_NUMBER_DELAY, + clamp( + ConstantGrowth::new(retry_delay, DELAY_INCREMENT), + retry_delay + DELAY_INCREMENT * MAX_RETRIES, + MAX_RETRIES as usize, ) } @@ -869,6 +869,7 @@ impl Channel { counterparty, vec![self.dst_connection_id().clone()], version, + 0, ); // Build the domain type message @@ -948,6 +949,7 @@ impl Channel { counterparty, vec![self.dst_connection_id().clone()], Version::empty(), + 0, ); // Retrieve existing channel @@ -1039,6 +1041,7 @@ impl Channel { counterparty, vec![self.dst_connection_id().clone()], version, + 0, ); // Get signer @@ -1438,6 +1441,7 @@ impl Channel { channel_id: dst_channel_id.clone(), proofs, signer, + counterparty_upgrade_sequence: 0, }; msgs.push(new_msg.to_any()); diff --git a/crates/relayer/src/config.rs b/crates/relayer/src/config.rs index 74bc548dd3..2c8957bfa5 100644 --- a/crates/relayer/src/config.rs +++ b/crates/relayer/src/config.rs @@ -16,7 +16,13 @@ use core::{ str::FromStr, time::Duration, }; -use std::{fs, fs::File, io::Write, ops::Range, path::Path}; +use std::{ + borrow::Cow, + fs::{self, File}, + io::Write, + ops::Range, + path::Path, +}; use byte_unit::Byte; pub use error::Error; @@ -24,7 +30,7 @@ pub use filter::PacketFilter; use ibc_proto::google::protobuf::Any; use ibc_relayer_types::{ core::{ - ics23_commitment::specs::ProofSpecs, + ics04_channel::packet::Sequence, ics24_host::identifier::{ChainId, ChannelId, PortId}, }, timestamp::ZERO_DURATION, @@ -175,7 +181,11 @@ pub mod default { } pub fn poll_interval() -> Duration { - Duration::from_secs(1) + Duration::from_millis(500) + } + + pub fn max_retries() -> u32 { + 4 } pub fn batch_delay() -> Duration { @@ -419,6 +429,9 @@ pub struct Packets { pub ics20_max_memo_size: Ics20FieldSizeLimit, #[serde(default = "default::ics20_max_receiver_size")] pub ics20_max_receiver_size: Ics20FieldSizeLimit, + + #[serde(skip)] + pub force_disable_clear_on_start: bool, } impl Default for Packets { @@ -431,6 +444,7 @@ impl Default for Packets { auto_register_counterparty_payee: default::auto_register_counterparty_payee(), ics20_max_memo_size: default::ics20_max_memo_size(), ics20_max_receiver_size: default::ics20_max_receiver_size(), + force_disable_clear_on_start: false, } } } @@ -623,6 +637,11 @@ pub enum EventSourceMode { /// The polling interval #[serde(default = "default::poll_interval", with = "humantime_serde")] interval: Duration, + + /// The maximum retries to collect the block results + /// before giving up and moving to the next block + #[serde(default = "default::max_retries")] + max_retries: u32, }, } @@ -634,6 +653,7 @@ pub enum EventSourceMode { // below when adding a new chain type. #[derive(Clone, Debug, PartialEq, Serialize)] #[serde(tag = "type")] +#[allow(clippy::large_enum_variant)] pub enum ChainConfig { CosmosSdk(CosmosSdkConfig), Astria(CosmosSdkConfig), // TODO: if the config is the cometbft config, it's the same @@ -755,6 +775,18 @@ impl ChainConfig { } } + pub fn excluded_sequences(&self, channel_id: &ChannelId) -> Cow<'_, [Sequence]> { + match self { + Self::CosmosSdk(config) => config + .excluded_sequences + .get(channel_id) + .map(|seqs| Cow::Borrowed(seqs.as_slice())) + .unwrap_or_else(|| Cow::Owned(Vec::new())), + Self::Penumbra(_config) => todo!(), + Self::Astria(_config) => todo!(), + } + } + pub fn clock_drift(&self) -> Duration { match self { Self::CosmosSdk(config) => config.clock_drift, @@ -817,7 +849,7 @@ impl<'de> Deserialize<'de> for ChainConfig { /// Attempt to load and parse the TOML config file as a `Config`. pub fn load(path: impl AsRef) -> Result { - let config_toml = std::fs::read_to_string(&path).map_err(Error::io)?; + let config_toml = fs::read_to_string(&path).map_err(Error::io)?; let config = toml::from_str::(&config_toml[..]).map_err(Error::decode)?; diff --git a/crates/relayer/src/config/filter.rs b/crates/relayer/src/config/filter.rs index ef66a15dd4..64e07768f6 100644 --- a/crates/relayer/src/config/filter.rs +++ b/crates/relayer/src/config/filter.rs @@ -372,8 +372,6 @@ impl<'de> Deserialize<'de> for ChannelFilterMatch { } pub(crate) mod port { - use ibc_relayer_types::core::ics24_host::identifier::PortId; - use super::*; pub struct PortFilterMatchVisitor; @@ -401,8 +399,6 @@ pub(crate) mod port { } pub(crate) mod channel { - use ibc_relayer_types::core::ics24_host::identifier::ChannelId; - use super::*; pub struct ChannelFilterMatchVisitor; @@ -432,7 +428,6 @@ pub(crate) mod channel { #[cfg(test)] mod tests { use super::*; - use crate::config::filter::ChannelPolicy; #[test] fn deserialize_packet_filter_policy() { diff --git a/crates/relayer/src/connection.rs b/crates/relayer/src/connection.rs index 1bd190b5ed..50e2d3a4f4 100644 --- a/crates/relayer/src/connection.rs +++ b/crates/relayer/src/connection.rs @@ -56,29 +56,29 @@ mod handshake_retry { use crate::{ connection::ConnectionError, - util::retry::{clamp_total, ConstantGrowth}, + util::retry::{clamp, ConstantGrowth}, }; /// Approximate number of retries per block. - const PER_BLOCK_RETRIES: u32 = 10; + const PER_BLOCK_RETRIES: u32 = 5; /// Defines the increment in delay between subsequent retries. /// A value of `0` will make the retry delay constant. - const DELAY_INCREMENT: u64 = 0; + const DELAY_INCREMENT: Duration = Duration::from_secs(0); - /// Maximum retry delay expressed in number of blocks - const BLOCK_NUMBER_DELAY: u32 = 10; + /// Maximum number of retries + const MAX_RETRIES: u32 = 10; /// The default retry strategy. /// We retry with a constant backoff strategy. The strategy is parametrized by the /// maximum block time expressed as a `Duration`. - pub fn default_strategy(max_block_times: Duration) -> impl Iterator { - let retry_delay = max_block_times / PER_BLOCK_RETRIES; + pub fn default_strategy(max_block_time: Duration) -> impl Iterator { + let retry_delay = max_block_time / PER_BLOCK_RETRIES; - clamp_total( - ConstantGrowth::new(retry_delay, Duration::from_secs(DELAY_INCREMENT)), - retry_delay, - max_block_times * BLOCK_NUMBER_DELAY, + clamp( + ConstantGrowth::new(retry_delay, DELAY_INCREMENT), + retry_delay + DELAY_INCREMENT * MAX_RETRIES, + MAX_RETRIES as usize, ) } diff --git a/crates/relayer/src/error.rs b/crates/relayer/src/error.rs index a5a048e31c..cf6725a239 100644 --- a/crates/relayer/src/error.rs +++ b/crates/relayer/src/error.rs @@ -502,14 +502,14 @@ define_error! { format!("semantic config validation failed for option `gas_multiplier` of chain '{}', reason: gas multiplier ({}) is smaller than `1.1`, which could trigger gas fee errors in production", e.chain_id, e.gas_multiplier) }, - SdkModuleVersion + CompatCheckFailed { chain_id: ChainId, address: String, cause: String } |e| { - format!("Hermes health check failed while verifying the application compatibility for chain {0}:{1}; caused by: {2}", + format!("compatibility check failed for chain '{0}' at '{1}': {2}", e.chain_id, e.address, e.cause) }, @@ -726,6 +726,14 @@ impl GrpcStatusSubdetail { Some((expected, got)) => expected < got, } } + + /// Check whether this gRPC error message contains the string "invalid empty tx". + /// + /// ## Note + /// This error may happen for older chains that does not properly support simulation. + pub fn is_empty_tx_error(&self) -> bool { + self.status.message().contains("invalid empty tx") + } } /// Assumes that the cosmos-sdk account sequence mismatch error message, that may be seen diff --git a/crates/relayer/src/event.rs b/crates/relayer/src/event.rs index 362205d57f..68723227e5 100644 --- a/crates/relayer/src/event.rs +++ b/crates/relayer/src/event.rs @@ -332,8 +332,8 @@ fn client_extract_attributes_from_tx(event: &AbciEvent) -> Result Result { for tag in &event.attributes { if tag.key == HEADER_ATTRIBUTE_KEY { - let header_bytes = - hex::decode(&tag.value).map_err(|_| ClientError::malformed_header())?; + let header_bytes = hex::decode(tag.value.to_lowercase()) + .map_err(|_| ClientError::malformed_header())?; return decode_header(&header_bytes); } } @@ -406,9 +406,11 @@ pub fn extract_packet_and_write_ack_from_tx( ) -> Result<(Packet, Vec), ChannelError> { let mut packet = Packet::default(); let mut write_ack: Vec = Vec::new(); + for tag in &event.attributes { let key = tag.key.as_str(); let value = tag.value.as_str(); + match key { channel_events::PKT_SRC_PORT_ATTRIBUTE_KEY => { packet.source_port = value.parse().map_err(ChannelError::identifier)?; @@ -435,7 +437,8 @@ pub fn extract_packet_and_write_ack_from_tx( packet.timeout_timestamp = value.parse().unwrap(); } channel_events::PKT_DATA_ATTRIBUTE_KEY => { - packet.data = Vec::from(value.as_bytes()); + packet.data = hex::decode(value.to_lowercase()) + .map_err(|_| ChannelError::invalid_packet_data(value.to_string()))?; } channel_events::PKT_ACK_ATTRIBUTE_KEY => { write_ack = Vec::from(value.as_bytes()); diff --git a/crates/relayer/src/event/source.rs b/crates/relayer/src/event/source.rs index 8f1e683dec..58cc3e9537 100644 --- a/crates/relayer/src/event/source.rs +++ b/crates/relayer/src/event/source.rs @@ -42,9 +42,11 @@ impl EventSource { chain_id: ChainId, rpc_client: HttpClient, poll_interval: Duration, + max_retries: u32, rt: Arc, ) -> Result<(Self, TxEventSourceCmd)> { - let (source, tx) = rpc::EventSource::new(chain_id, rpc_client, poll_interval, rt)?; + let (source, tx) = + rpc::EventSource::new(chain_id, rpc_client, poll_interval, max_retries, rt)?; Ok((Self::Rpc(source), tx)) } diff --git a/crates/relayer/src/event/source/rpc.rs b/crates/relayer/src/event/source/rpc.rs index e358a0ee56..d2fff8950f 100644 --- a/crates/relayer/src/event/source/rpc.rs +++ b/crates/relayer/src/event/source/rpc.rs @@ -22,7 +22,7 @@ use self::extract::extract_events; use super::{EventBatch, EventSourceCmd, TxEventSourceCmd}; use crate::{ chain::tracking::TrackingId, - event::{bus::EventBus, source::Error, IbcEventWithHeight}, + event::{bus::EventBus, error::ErrorDetail, source::Error, IbcEventWithHeight}, telemetry, util::retry::ConstantGrowth, }; @@ -40,6 +40,9 @@ pub struct EventSource { /// Poll interval poll_interval: Duration, + /// Max retries to collect events + max_retries: u32, + /// Event bus for broadcasting events event_bus: EventBus>>, @@ -58,6 +61,7 @@ impl EventSource { chain_id: ChainId, rpc_client: HttpClient, poll_interval: Duration, + max_retries: u32, rt: Arc, ) -> Result<(Self, TxEventSourceCmd)> { let event_bus = EventBus::new(); @@ -68,6 +72,7 @@ impl EventSource { chain_id, rpc_client, poll_interval, + max_retries, event_bus, rx_cmd, last_fetched_height: BlockHeight::from(0_u32), @@ -199,19 +204,38 @@ impl EventSource { for height in heights { trace!("collecting events at height {height}"); - let result = collect_events(&self.rpc_client, &self.chain_id, height).await; + let mut attempts = 0; + let mut backoff = retries_backoff(self.max_retries); + + // NOTE: Even if we failed to collect events after max retries, + // we still need to update to move on next block + self.last_fetched_height = height; - match result { - Ok(batch) => { - self.last_fetched_height = height; + loop { + attempts += 1; - if let Some(batch) = batch { - batches.push(batch); + match collect_events(&self.rpc_client, &self.chain_id, height).await { + Ok(batch) => { + if let Some(batch) = batch { + batches.push(batch); + } + break; } - } - Err(e) => { - error!(%height, "failed to collect events: {e}"); - break; + Err(e) => match e.detail() { + ErrorDetail::Rpc(_) if attempts < self.max_retries => { + let delay = backoff.next().expect( + "backoff has attempted to make more iterates than is expected", + ); + + error!(%height, "failed to collect events: {e}, retrying in {delay:?}..."); + sleep(delay).await; + } + + _ => { + error!(%height, "failed to collect events after {attempts} attempts: {e}"); + break; + } + }, } } } @@ -240,6 +264,11 @@ fn poll_backoff(poll_interval: Duration) -> impl Iterator { .clamp(poll_interval * 5, usize::MAX) } +fn retries_backoff(collect_retries: u32) -> impl Iterator { + ConstantGrowth::new(Duration::from_secs(1), Duration::from_millis(500)) + .clamp(Duration::from_secs(4), collect_retries as usize) +} + fn dedupe(events: Vec) -> Vec { use std::hash::{Hash, Hasher}; diff --git a/crates/relayer/src/event/source/websocket.rs b/crates/relayer/src/event/source/websocket.rs index 578d12393c..71b7a6dbda 100644 --- a/crates/relayer/src/event/source/websocket.rs +++ b/crates/relayer/src/event/source/websocket.rs @@ -128,7 +128,7 @@ impl EventSource { rx_cmd, ws_url, rpc_compat, - subscriptions: Box::new(futures::stream::empty()), + subscriptions: Box::new(stream::empty()), }; Ok((source, TxEventSourceCmd(tx_cmd))) @@ -294,8 +294,7 @@ impl EventSource { async fn run_loop(&mut self) -> Next { // Take ownership of the subscriptions - let subscriptions = - core::mem::replace(&mut self.subscriptions, Box::new(futures::stream::empty())); + let subscriptions = core::mem::replace(&mut self.subscriptions, Box::new(stream::empty())); // Convert the stream of RPC events into a stream of event batches. let batches = stream_batches(subscriptions, self.chain_id.clone(), self.batch_delay); diff --git a/crates/relayer/src/event/source/websocket/extract.rs b/crates/relayer/src/event/source/websocket/extract.rs index a203a7669a..d81f795c23 100644 --- a/crates/relayer/src/event/source/websocket/extract.rs +++ b/crates/relayer/src/event/source/websocket/extract.rs @@ -1,5 +1,4 @@ use alloc::collections::BTreeMap as HashMap; -use core::convert::TryFrom; use ibc_relayer_types::{ applications::{ics29_fee::events::DistributionType, ics31_icq::events::CrossChainQueryPacket}, @@ -318,7 +317,7 @@ fn extract_block_events( ); append_events::( &mut events, - extract_events(height, block_events, "send_packet", "packet_data"), + extract_events(height, block_events, "send_packet", "packet_data_hex"), height, ); append_events::( diff --git a/crates/relayer/src/extension_options.rs b/crates/relayer/src/extension_options.rs index b796a5cbbe..f5eda5c08c 100644 --- a/crates/relayer/src/extension_options.rs +++ b/crates/relayer/src/extension_options.rs @@ -9,7 +9,7 @@ use crate::error::Error; #[derive(Clone, PartialEq, Eq, Message, Serialize, Deserialize)] pub struct ExtensionOptionDynamicFeeTx { #[prost(string, tag = "1")] - pub max_priority_price: ::prost::alloc::string::String, + pub max_priority_price: String, } impl ExtensionOptionDynamicFeeTx { diff --git a/crates/relayer/src/keyring/any_signing_key_pair.rs b/crates/relayer/src/keyring/any_signing_key_pair.rs index b9dd880c10..f6aa27bd0b 100644 --- a/crates/relayer/src/keyring/any_signing_key_pair.rs +++ b/crates/relayer/src/keyring/any_signing_key_pair.rs @@ -30,7 +30,7 @@ impl AnySigningKeyPair { Self::Ed25519(key_pair) => key_pair.as_any(), } .downcast_ref::() - .map(T::clone) + .cloned() } } diff --git a/crates/relayer/src/keyring/ed25519_key_pair.rs b/crates/relayer/src/keyring/ed25519_key_pair.rs index 64f8f11f04..60ba0ad4f3 100644 --- a/crates/relayer/src/keyring/ed25519_key_pair.rs +++ b/crates/relayer/src/keyring/ed25519_key_pair.rs @@ -138,14 +138,14 @@ impl SigningKeyPair for Ed25519KeyPair { Ed25519AddressType::Solana => { bs58::encode(&self.signing_key.verifying_key()).into_string() } - Ed25519AddressType::Astria => hex::encode( - astria_core::sequencer::v1alpha1::Address::from_verification_key( + Ed25519AddressType::Astria => { + hex::encode(astria_core::sequencer::v1::Address::from_verification_key( ed25519_consensus::VerificationKey::try_from( self.signing_key.verifying_key().to_bytes(), ) .expect("can convert between ed25519 keys"), - ), - ), + )) + } } } diff --git a/crates/relayer/src/lib.rs b/crates/relayer/src/lib.rs index 7649bf789b..fc5df8fc70 100644 --- a/crates/relayer/src/lib.rs +++ b/crates/relayer/src/lib.rs @@ -15,7 +15,7 @@ //! //! For the IBC relayer binary, please see [Hermes] (`ibc-relayer-cli` crate). //! -//! [Hermes]: https://docs.rs/ibc-relayer-cli/1.8.0/ +//! [Hermes]: https://docs.rs/ibc-relayer-cli/1.8.2/ extern crate alloc; diff --git a/crates/relayer/src/link.rs b/crates/relayer/src/link.rs index 079f9abdc5..a6edf85ef5 100644 --- a/crates/relayer/src/link.rs +++ b/crates/relayer/src/link.rs @@ -1,6 +1,7 @@ use ibc_relayer_types::core::{ ics03_connection::connection::State as ConnectionState, ics04_channel::channel::State as ChannelState, + ics04_channel::packet::Sequence, ics24_host::identifier::{ChannelId, PortChannelId, PortId}, }; use tracing::info; @@ -38,6 +39,7 @@ pub struct LinkParameters { pub src_channel_id: ChannelId, pub max_memo_size: Ics20FieldSizeLimit, pub max_receiver_size: Ics20FieldSizeLimit, + pub exclude_src_sequences: Vec, } pub struct Link { @@ -177,31 +179,4 @@ impl Link { Link::new(channel, with_tx_confirmation, opts) } - - /// Constructs a link around the channel that is reverse to the channel - /// in this link. - pub fn reverse( - &self, - with_tx_confirmation: bool, - auto_register_counterparty_payee: bool, - ) -> Result, LinkError> { - let opts = LinkParameters { - src_port_id: self.a_to_b.dst_port_id().clone(), - src_channel_id: self.a_to_b.dst_channel_id().clone(), - max_memo_size: self.a_to_b.max_memo_size, - max_receiver_size: self.a_to_b.max_receiver_size, - }; - let chain_b = self.a_to_b.dst_chain().clone(); - let chain_a = self.a_to_b.src_chain().clone(); - - // Some of the checks and initializations may be redundant; - // going slowly, but reliably. - Link::new_from_opts( - chain_b, - chain_a, - opts, - with_tx_confirmation, - auto_register_counterparty_payee, - ) - } } diff --git a/crates/relayer/src/link/cli.rs b/crates/relayer/src/link/cli.rs index a0d9c046c4..8b1c20e57d 100644 --- a/crates/relayer/src/link/cli.rs +++ b/crates/relayer/src/link/cli.rs @@ -1,5 +1,4 @@ use std::{ - convert::TryInto, ops::RangeInclusive, thread, time::{Duration, Instant}, diff --git a/crates/relayer/src/link/error.rs b/crates/relayer/src/link/error.rs index 4cd077751e..57e2a15deb 100644 --- a/crates/relayer/src/link/error.rs +++ b/crates/relayer/src/link/error.rs @@ -79,7 +79,7 @@ define_error! { Send { event: IbcEvent } |e| { - format!("chain error when sending messages: {0}", e.event) + format!("failed to send message: {0}", e.event) }, MissingChannelId diff --git a/crates/relayer/src/link/pending.rs b/crates/relayer/src/link/pending.rs index d3e545c753..71642782f6 100644 --- a/crates/relayer/src/link/pending.rs +++ b/crates/relayer/src/link/pending.rs @@ -1,4 +1,4 @@ -use core::{iter::Iterator, time::Duration}; +use core::time::Duration; use std::time::Instant; use ibc_relayer_types::{ diff --git a/crates/relayer/src/link/relay_path.rs b/crates/relayer/src/link/relay_path.rs index f89ef92b23..0bd3f816bd 100644 --- a/crates/relayer/src/link/relay_path.rs +++ b/crates/relayer/src/link/relay_path.rs @@ -19,7 +19,7 @@ use ibc_relayer_types::{ recv_packet::MsgRecvPacket, timeout::MsgTimeout, timeout_on_close::MsgTimeoutOnClose, }, - packet::{Packet, PacketMsgType}, + packet::{Packet, PacketMsgType, Sequence}, }, ics24_host::identifier::{ChannelId, ClientId, ConnectionId, PortId}, }, @@ -116,6 +116,7 @@ pub struct RelayPath { pub max_memo_size: Ics20FieldSizeLimit, pub max_receiver_size: Ics20FieldSizeLimit, + pub exclude_src_sequences: Vec, } impl RelayPath { @@ -164,6 +165,8 @@ impl RelayPath { max_memo_size: link_parameters.max_memo_size, max_receiver_size: link_parameters.max_receiver_size, + + exclude_src_sequences: link_parameters.exclude_src_sequences, }) } @@ -370,6 +373,7 @@ impl RelayPath { channel_id: self.dst_channel_id().clone(), proofs, signer: self.dst_signer()?, + counterparty_upgrade_sequence: 0, }; Ok(Some(new_msg.to_any())) @@ -427,7 +431,7 @@ impl RelayPath { fn relay_pending_packets(&self, height: Option) -> Result<(), LinkError> { let _span = span!(Level::ERROR, "relay_pending_packets", ?height).entered(); - let tracking_id = TrackingId::new_cleared_uuid(); + let tracking_id = TrackingId::new_packet_clearing(); telemetry!(received_event_batch, tracking_id); let src_config = self.src_chain().config().map_err(LinkError::relayer)?; @@ -710,12 +714,12 @@ impl RelayPath { return Ok(reply); } - Err(LinkError(error::LinkErrorDetail::Send(e), _)) => { - // This error means we could retry - error!("error {}", e.event); + Err(LinkError(error::LinkErrorDetail::Send(_), _)) => { if i + 1 == MAX_RETRIES { - error!("{}/{} retries exhausted. giving up", i + 1, MAX_RETRIES) + error!("{}/{} retries exhausted, giving up", i + 1, MAX_RETRIES) } else { + debug!("{}/{} retries exhausted, retrying with newly-generated operational data", i + 1, MAX_RETRIES); + // If we haven't exhausted all retries, regenerate the op. data & retry match self.regenerate_operational_data(odata.clone()) { None => return Ok(S::Reply::empty()), // Nothing to retry @@ -1151,6 +1155,12 @@ impl RelayPath { return Ok(()); } + // Retain only sequences which should not be filtered out + let sequences: Vec = sequences + .into_iter() + .filter(|sequence| !self.exclude_src_sequences.contains(sequence)) + .collect(); + debug!( dst_chain = %self.dst_chain().id(), src_chain = %self.src_chain().id(), @@ -1215,6 +1225,12 @@ impl RelayPath { return Ok(()); } + // Retain only sequences which should not be filtered out + let sequences: Vec = sequences + .into_iter() + .filter(|sequence| !self.exclude_src_sequences.contains(sequence)) + .collect(); + debug!( dst_chain = %self.dst_chain().id(), src_chain = %self.src_chain().id(), diff --git a/crates/relayer/src/link/relay_sender.rs b/crates/relayer/src/link/relay_sender.rs index 12efc62525..f07ebc4c51 100644 --- a/crates/relayer/src/link/relay_sender.rs +++ b/crates/relayer/src/link/relay_sender.rs @@ -94,10 +94,11 @@ impl Submit for AsyncSender { type Reply = AsyncReply; fn submit(target: &impl ChainHandle, msgs: TrackedMsgs) -> Result { - let a = target + let responses = target .send_messages_and_wait_check_tx(msgs) .map_err(LinkError::relayer)?; - let reply = AsyncReply { responses: a }; + + let reply = AsyncReply { responses }; // Note: There may be errors in the reply, for example: // `Response { code: Err(11), data: Data([]), log: Log("Too much gas wanted: 35000000, maximum is 25000000: out of gas")` diff --git a/crates/relayer/src/sdk_error.rs b/crates/relayer/src/sdk_error.rs index ef48c06be9..327404b2e9 100644 --- a/crates/relayer/src/sdk_error.rs +++ b/crates/relayer/src/sdk_error.rs @@ -1,6 +1,8 @@ use flex_error::define_error; use tendermint::abci::Code; +use crate::chain::cosmos::estimate::EstimatedGas; + // Provides mapping for errors returned from ibc-go and cosmos-sdk define_error! { SdkError { @@ -24,9 +26,13 @@ define_error! { { code: u32 } | e | { format_args!("unknown TX sync response error: {}", e.code) }, - OutOfGas - { code: u32 } - |_| { "the gas requirement is higher than the configured maximum gas! please check the Hermes config.toml".to_string() }, + OutOfGasDefault + { code: u32, amount: u64 } + |e| { format_args!("due to the Tx simulation failing, the configured default gas was used. Please check the Hermes config.toml and increase the configured `default_gas`. Current value is `{}`", e.amount) }, + + OutOfGasSimulated + { code: u32, amount: u64 } + |e| { format_args!("the issue might have been caused by the configured max gas which binds the gas used. Please check the Hermes config.toml and increase the configured `max_gas`. Curerent value is `{}`", e.amount) }, InsufficientFee { code: u32 } @@ -186,12 +192,15 @@ pub fn sdk_error_from_tx_result(code: Code, codespace: &str) -> SdkError { /// into IBC relayer domain-type errors. /// See [`tendermint_rpc::endpoint::broadcast::tx_sync::Response`]. /// Cf: -pub fn sdk_error_from_tx_sync_error_code(code: u32) -> SdkError { +pub fn sdk_error_from_tx_sync_error_code(code: u32, estimated_gas: EstimatedGas) -> SdkError { match code { // The primary reason (we know of) causing broadcast_tx_sync to fail // is due to "out of gas" errors. These are unrecoverable at the moment // on Hermes side. We'll inform the user to check for misconfiguration. - 11 => SdkError::out_of_gas(code), + 11 => match estimated_gas { + EstimatedGas::Default(amount) => SdkError::out_of_gas_default(code, amount), + EstimatedGas::Simulated(amount) => SdkError::out_of_gas_simulated(code, amount), + }, 13 => SdkError::insufficient_fee(code), _ => SdkError::unknown_tx_sync(code), } diff --git a/crates/relayer/src/transfer.rs b/crates/relayer/src/transfer.rs index ae0738b783..e720d05ec5 100644 --- a/crates/relayer/src/transfer.rs +++ b/crates/relayer/src/transfer.rs @@ -1,7 +1,7 @@ use core::time::Duration; use std::{ops::Add, str::FromStr}; -use astria_core::sequencer::v1alpha1::asset::default_native_asset_id; +use astria_core::sequencer::v1::asset::default_native_asset_id; use flex_error::{define_error, DetailOnly}; use ibc_proto::{cosmos::base::v1beta1::Coin, google::protobuf::Any}; use ibc_relayer_types::{ @@ -172,17 +172,17 @@ fn build_transfer_message_astria( ) -> Any { let timeout_height = match timeout_height { // TODO: update astria IbcHeight to support optional? - TimeoutHeight::At(height) => astria_core::generated::sequencer::v1alpha1::IbcHeight { + TimeoutHeight::At(height) => astria_core::generated::sequencer::v1::IbcHeight { revision_number: height.revision_number(), revision_height: height.revision_height(), }, - TimeoutHeight::Never => astria_core::generated::sequencer::v1alpha1::IbcHeight { + TimeoutHeight::Never => astria_core::generated::sequencer::v1::IbcHeight { revision_number: 0, revision_height: u64::MAX, }, }; - let msg = astria_core::generated::sequencer::v1alpha1::Ics20Withdrawal { + let msg = astria_core::generated::sequencer::v1::Ics20Withdrawal { source_channel: src_channel_id.to_string(), denom, amount: Some( @@ -194,7 +194,7 @@ fn build_transfer_message_astria( return_address: hex::decode(sender.to_string()).expect("sender address is hex"), timeout_height: Some(timeout_height), timeout_time: timeout_timestamp.nanoseconds(), - fee_asset_id: default_native_asset_id().as_bytes().into(), + fee_asset_id: default_native_asset_id().as_ref().into(), }; Any { diff --git a/crates/relayer/src/upgrade_chain.rs b/crates/relayer/src/upgrade_chain.rs index d1861f1a76..d94affbb80 100644 --- a/crates/relayer/src/upgrade_chain.rs +++ b/crates/relayer/src/upgrade_chain.rs @@ -22,6 +22,7 @@ use ibc_relayer_types::{ downcast, Height, }; use tendermint::Hash as TxHash; +use tracing::warn; use crate::{ chain::{ @@ -105,22 +106,32 @@ pub fn build_and_send_ibc_upgrade_proposal( /// Looks at the ibc-go version to determine if the legacy `UpgradeProposal` message /// or if the newer `MsgIBCSoftwareUpdate` message should be used to upgrade the chain. /// If the ibc-go version returned isn't reliable, a deprecated version, then the version -/// of Cosmos SDK is used. +/// of Cosmos SDK is used, if any. If there is no SDK version, we assume that the legacy upgrade is required. pub fn requires_legacy_upgrade_proposal(dst_chain: impl ChainHandle) -> bool { - let version_specs = dst_chain.version_specs().unwrap(); + let Ok(version_specs) = dst_chain.version_specs() else { + warn!("failed to get version specs, assuming legacy upgrade proposal is required"); + return true; + }; + + let sdk_before_50 = version_specs + .cosmos_sdk + .as_ref() + .map(|s| s.minor < 50) + .unwrap_or(true); + match version_specs.ibc_go { + None => sdk_before_50, Some(ibc_version) => { // Some ibc-go simapps return unreliable ibc-go versions, such as simapp v8.0.0 // returns version v1.0.0. So if the ibc-go version matches which is not maintained // anymore, use the Cosmos SDK version to determine if the legacy upgrade proposal // has to be used if ibc_version.major < 4 { - version_specs.cosmos_sdk.minor < 50 + sdk_before_50 } else { ibc_version.major < 8 } } - None => version_specs.cosmos_sdk.minor < 50, } } diff --git a/crates/relayer/src/util/profiling.rs b/crates/relayer/src/util/profiling.rs index dd4284299b..fe27bd3fdb 100644 --- a/crates/relayer/src/util/profiling.rs +++ b/crates/relayer/src/util/profiling.rs @@ -12,7 +12,7 @@ use serde_derive::Serialize; use serde_json::Value; std::thread_local! { - pub static DEPTH: AtomicUsize = AtomicUsize::new(0); + pub static DEPTH: AtomicUsize = const { AtomicUsize::new(0) }; } static FILE: OnceCell> = OnceCell::new(); diff --git a/crates/relayer/src/worker.rs b/crates/relayer/src/worker.rs index 7404aed8bf..78d1928cb7 100644 --- a/crates/relayer/src/worker.rs +++ b/crates/relayer/src/worker.rs @@ -111,6 +111,12 @@ pub fn spawn_worker_tasks( (Some(cmd_tx), None) } Object::Packet(path) => { + let exclude_src_sequences = config + .find_chain(&chains.a.id()) + .map(|chain_config| chain_config.excluded_sequences(&path.src_channel_id)) + .unwrap_or_default() + .to_vec(); + let packets_config = config.mode.packets; let link_res = Link::new_from_opts( chains.a.clone(), @@ -120,6 +126,7 @@ pub fn spawn_worker_tasks( src_channel_id: path.src_channel_id.clone(), max_memo_size: packets_config.ics20_max_memo_size, max_receiver_size: packets_config.ics20_max_receiver_size, + exclude_src_sequences, }, packets_config.tx_confirmation, packets_config.auto_register_counterparty_payee, @@ -129,7 +136,7 @@ pub fn spawn_worker_tasks( Ok(link) => { let channel_ordering = link.a_to_b.channel().ordering; let should_clear_on_start = - packets_config.clear_on_start || channel_ordering == Ordering::Ordered; + should_clear_on_start(&packets_config, channel_ordering); let (cmd_tx, cmd_rx) = crossbeam_channel::unbounded(); let link = Arc::new(Mutex::new(link)); @@ -218,3 +225,11 @@ pub fn spawn_worker_tasks( WorkerHandle::new(id, object, data, cmd_tx, task_handles) } + +fn should_clear_on_start(config: &crate::config::Packets, channel_ordering: Ordering) -> bool { + if config.force_disable_clear_on_start { + false + } else { + config.clear_on_start || channel_ordering == Ordering::Ordered + } +} diff --git a/crates/relayer/src/worker/packet.rs b/crates/relayer/src/worker/packet.rs index 172aa41999..44de4be1ad 100644 --- a/crates/relayer/src/worker/packet.rs +++ b/crates/relayer/src/worker/packet.rs @@ -14,7 +14,7 @@ use ibc_relayer_types::{ ics29_fee::events::IncentivizedPacket, transfer::{Amount, Coin, RawCoin}, }, - core::ics04_channel::{events::WriteAcknowledgement, packet::Sequence}, + core::ics04_channel::{channel::Ordering, events::WriteAcknowledgement, packet::Sequence}, events::{IbcEvent, IbcEventType}, Height, }; @@ -29,9 +29,9 @@ use { use super::{error::RunError, WorkerCmd}; use crate::{ - chain::handle::ChainHandle, + chain::{handle::ChainHandle, requests::QueryHeight}, config::filter::FeePolicy, - event::source::EventBatch, + event::{source::EventBatch, IbcEventWithHeight}, foreign_client::HasExpiredOrFrozenError, link::{error::LinkError, Link, Resubmit}, object::Packet, @@ -168,7 +168,7 @@ pub fn spawn_incentivized_packet_cmd_worker> = RwArc::new_lock( - moka::sync::Cache::builder() + Cache::builder() .time_to_live(INCENTIVIZED_CACHE_TTL) .max_capacity(INCENTIVIZED_CACHE_MAX_CAPACITY) .build(), @@ -210,6 +210,24 @@ fn handle_packet_cmd( ) -> Result<(), TaskError> { // Handle packet clearing which is triggered from a command let (do_clear, maybe_height) = match &cmd { + WorkerCmd::IbcEvents { batch } if link.a_to_b.channel().ordering == Ordering::Ordered => { + let lowest_sequence = lowest_sequence(&batch.events); + + let next_sequence = query_next_sequence_receive( + link.a_to_b.dst_chain(), + link.a_to_b.dst_port_id(), + link.a_to_b.dst_channel_id(), + QueryHeight::Specific(batch.height), + ) + .ok(); + + if *should_clear_on_start || next_sequence < lowest_sequence { + (true, Some(batch.height)) + } else { + (false, None) + } + } + WorkerCmd::IbcEvents { batch } => { if *should_clear_on_start { (true, Some(batch.height)) @@ -445,6 +463,34 @@ fn handle_execute_schedule( Ok(()) } +fn query_next_sequence_receive( + chain: &Chain, + port_id: &PortId, + channel_id: &ChannelId, + height: QueryHeight, +) -> Result { + use crate::chain::requests::{IncludeProof, QueryNextSequenceReceiveRequest}; + + chain + .query_next_sequence_receive( + QueryNextSequenceReceiveRequest { + port_id: port_id.clone(), + channel_id: channel_id.clone(), + height, + }, + IncludeProof::No, + ) + .map(|(seq, _height)| seq) + .map_err(|e| LinkError::query(chain.id(), e)) +} + +fn lowest_sequence(events: &[IbcEventWithHeight]) -> Option { + events + .iter() + .flat_map(|event| event.event.packet().map(|p| p.sequence)) + .min() +} + #[cfg(feature = "telemetry")] use crate::link::RelaySummary; diff --git a/crates/telemetry/Cargo.toml b/crates/telemetry/Cargo.toml index 60d3357d71..13faac718e 100644 --- a/crates/telemetry/Cargo.toml +++ b/crates/telemetry/Cargo.toml @@ -1,32 +1,29 @@ [package] name = "ibc-telemetry" -version = "0.27.0" +version = "0.27.2" edition = "2021" license = "Apache-2.0" readme = "README.md" keywords = ["cosmos", "ibc", "relayer", "telemetry"] repository = "https://github.com/informalsystems/hermes" authors = ["Informal Systems "] -rust-version = "1.71" +rust-version = "1.77.1" description = """ Telemetry service for the Hermes IBC relayer """ [dependencies] -ibc-relayer-types = { version = "0.27.0", path = "../relayer-types" } +ibc-relayer-types = { workspace = true } -once_cell = "1.19.0" -opentelemetry = { version = "0.19.0", features = ["metrics"] } -opentelemetry-prometheus = "0.12.0" -prometheus = "0.13.2" -moka = { version = "0.12.0", features = ["sync"] } -dashmap = "5.4.0" -serde_json = "1.0.111" -serde = "1.0.195" -axum = "0.6.18" -tokio = "1.26.0" -tracing = "0.1.36" - -[dependencies.tendermint] -version = "0.34.0" -default-features = false +axum = { workspace = true } +dashmap = { workspace = true } +moka = { workspace = true, features = ["sync"] } +once_cell = { workspace = true } +opentelemetry = { workspace = true, features = ["metrics"] } +opentelemetry-prometheus = { workspace = true } +prometheus = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +tendermint = { workspace = true } +tokio = { workspace = true } +tracing = { workspace = true } diff --git a/crates/telemetry/src/state.rs b/crates/telemetry/src/state.rs index 9dff02fed3..248c3c7cbb 100644 --- a/crates/telemetry/src/state.rs +++ b/crates/telemetry/src/state.rs @@ -199,6 +199,9 @@ pub struct TelemetryState { /// Number of errors observed by Hermes when broadcasting a Tx broadcast_errors: Counter, + /// Number of errors observed by Hermes when simulating a Tx + simulate_errors: Counter, + /// The EIP-1559 base fee queried dynamic_gas_queried_fees: ObservableGauge, @@ -394,6 +397,13 @@ impl TelemetryState { ) .init(), + simulate_errors: meter + .u64_counter("simulate_errors") + .with_description( + "Number of errors observed by Hermes when simulating a Tx", + ) + .init(), + dynamic_gas_queried_fees: meter .f64_observable_gauge("dynamic_gas_queried_fees") .with_description("The EIP-1559 base fee queried") @@ -1160,6 +1170,20 @@ impl TelemetryState { self.broadcast_errors.add(&cx, 1, labels); } + /// Add an error and its description to the list of errors observed after simulating + /// a Tx with a specific account. + pub fn simulate_errors(&self, address: &String, recoverable: bool, error_description: String) { + let cx = Context::current(); + + let labels = &[ + KeyValue::new("account", address.to_string()), + KeyValue::new("recoverable", recoverable.to_string()), + KeyValue::new("error_description", error_description.to_owned()), + ]; + + self.simulate_errors.add(&cx, 1, labels); + } + pub fn dynamic_gas_queried_fees(&self, chain_id: &ChainId, amount: f64) { let cx = Context::current(); diff --git a/flake.lock b/flake.lock index a0dbfb5653..d676a39d15 100644 --- a/flake.lock +++ b/flake.lock @@ -17,6 +17,23 @@ "type": "github" } }, + "andromeda-src": { + "flake": false, + "locked": { + "lastModified": 1699913909, + "narHash": "sha256-8nKekKLBZR7nDNXZ1UL0J7YOMRv6HbzT7pj0W+fV+4U=", + "owner": "andromedaprotocol", + "repo": "andromedad", + "rev": "a72f010f8e3f9db183da0ddaf4ef65069b690981", + "type": "github" + }, + "original": { + "owner": "andromedaprotocol", + "ref": "andromeda-1", + "repo": "andromedad", + "type": "github" + } + }, "apalache-src": { "flake": false, "locked": { @@ -105,6 +122,7 @@ "cosmos-nix": { "inputs": { "akash-src": "akash-src", + "andromeda-src": "andromeda-src", "apalache-src": "apalache-src", "beaker-src": "beaker-src", "celestia-src": "celestia-src", @@ -131,6 +149,7 @@ "gaia9-src": "gaia9-src", "gex-src": "gex-src", "gomod2nix": "gomod2nix", + "haqq-src": "haqq-src", "hermes-src": "hermes-src", "ibc-go-v2-src": "ibc-go-v2-src", "ibc-go-v3-src": "ibc-go-v3-src", @@ -138,11 +157,11 @@ "ibc-go-v5-src": "ibc-go-v5-src", "ibc-go-v6-src": "ibc-go-v6-src", "ibc-go-v7-src": "ibc-go-v7-src", - "ibc-go-v8-channel-upgrade-src": "ibc-go-v8-channel-upgrade-src", "ibc-go-v8-src": "ibc-go-v8-src", "ibc-rs-src": "ibc-rs-src", "ica-src": "ica-src", "ignite-cli-src": "ignite-cli-src", + "injective-src": "injective-src", "interchain-security-src": "interchain-security-src", "iris-src": "iris-src", "ixo-src": "ixo-src", @@ -151,7 +170,7 @@ "namada-src": "namada-src", "neutron-src": "neutron-src", "nix-std": "nix-std", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "osmosis-src": "osmosis-src", "provenance-src": "provenance-src", "regen-src": "regen-src", @@ -161,6 +180,7 @@ "sconfig-src": "sconfig-src", "sentinel-src": "sentinel-src", "sifchain-src": "sifchain-src", + "slinky-src": "slinky-src", "stargaze-src": "stargaze-src", "stoml-src": "stoml-src", "stride-consumer-src": "stride-consumer-src", @@ -178,11 +198,11 @@ "wasmvm_1_beta7-src": "wasmvm_1_beta7-src" }, "locked": { - "lastModified": 1705315275, - "narHash": "sha256-XnjvjdTdXkwWFWx1nRflbsDyazSBV09QOmr/aiAuZ1M=", + "lastModified": 1710159227, + "narHash": "sha256-YtGtc7e4xIou6fD2r0xAzgEbIgrklYoT8YQnDObqBgU=", "owner": "informalsystems", "repo": "cosmos.nix", - "rev": "04ef5159b4262b7dd445544838468a84a1d987cf", + "rev": "3d922c4bc02a5433aa2a9343268a58790c631349", "type": "github" }, "original": { @@ -259,6 +279,31 @@ "type": "github" } }, + "devenv": { + "inputs": { + "flake-compat": "flake-compat", + "nix": "nix", + "nixpkgs": [ + "cosmos-nix", + "haqq-src", + "nixpkgs-unstable" + ], + "pre-commit-hooks": "pre-commit-hooks" + }, + "locked": { + "lastModified": 1700127701, + "narHash": "sha256-NLvhvXBmX+WuqDN9PbRbQCsA+y57yGaf+jCWuJVdaIQ=", + "owner": "cachix", + "repo": "devenv", + "rev": "0c41b86406e910a75fbde28f81ec7f6fda74f7e1", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "devenv", + "type": "github" + } + }, "dydx-src": { "flake": false, "locked": { @@ -293,6 +338,22 @@ "type": "github" } }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" @@ -333,6 +394,42 @@ "inputs": { "systems": "systems_2" }, + "locked": { + "lastModified": 1685518550, + "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_4": { + "inputs": { + "systems": "systems_4" + }, "locked": { "lastModified": 1681202837, "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", @@ -347,7 +444,7 @@ "type": "github" } }, - "flake-utils_3": { + "flake-utils_5": { "locked": { "lastModified": 1667395993, "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", @@ -362,16 +459,16 @@ "type": "github" } }, - "flake-utils_4": { + "flake-utils_6": { "inputs": { - "systems": "systems_3" + "systems": "systems_5" }, "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -600,6 +697,30 @@ "type": "github" } }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "cosmos-nix", + "haqq-src", + "devenv", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1660459072, + "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "gomod2nix": { "inputs": { "flake-utils": "flake-utils", @@ -620,6 +741,57 @@ "type": "github" } }, + "gomod2nix_2": { + "inputs": { + "flake-utils": [ + "cosmos-nix", + "haqq-src", + "flake-utils" + ], + "nixpkgs": [ + "cosmos-nix", + "haqq-src", + "nixpkgs-unstable" + ] + }, + "locked": { + "lastModified": 1705314449, + "narHash": "sha256-yfQQ67dLejP0FLK76LKHbkzcQqNIrux6MFe32MMFGNQ=", + "owner": "nix-community", + "repo": "gomod2nix", + "rev": "30e3c3a9ec4ac8453282ca7f67fca9e1da12c3e6", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "gomod2nix", + "type": "github" + } + }, + "haqq-src": { + "inputs": { + "devenv": "devenv", + "flake-utils": "flake-utils_3", + "gomod2nix": "gomod2nix_2", + "nixpkgs": "nixpkgs_2", + "nixpkgs-unstable": "nixpkgs-unstable" + }, + "locked": { + "lastModified": 1707232493, + "narHash": "sha256-pXbLGvq6ZyZbtKYoe8GbgaxGV0SIbARrT6DkDmPwlYE=", + "owner": "haqq-network", + "repo": "haqq", + "rev": "18370cfb2f9aab35d311c4c75ab5586f50213830", + "type": "github" + }, + "original": { + "owner": "haqq-network", + "repo": "haqq", + "rev": "18370cfb2f9aab35d311c4c75ab5586f50213830", + "type": "github" + } + }, "hermes-src": { "flake": false, "locked": { @@ -739,36 +911,19 @@ "type": "github" } }, - "ibc-go-v8-channel-upgrade-src": { - "flake": false, - "locked": { - "lastModified": 1703189903, - "narHash": "sha256-vxzv+b40TKqCIN4FAkeIu+jmlPP5XRLR+P0uEIjr7AE=", - "owner": "cosmos", - "repo": "ibc-go", - "rev": "7a89e5d5b5ebb7643ce3992c34008c35373ecf34", - "type": "github" - }, - "original": { - "owner": "cosmos", - "ref": "04-channel-upgrades-rc.0", - "repo": "ibc-go", - "type": "github" - } - }, "ibc-go-v8-src": { "flake": false, "locked": { - "lastModified": 1699602904, - "narHash": "sha256-BcP3y874QviVsV+04p9CioolyvmWH82ORbb5EB2GyRI=", + "lastModified": 1706691043, + "narHash": "sha256-eS+X4bT7vp1+LyIPd0mOnAJahAONr+Syton3v3rSkGI=", "owner": "cosmos", "repo": "ibc-go", - "rev": "2551dea41cd3c512845007ca895c8402afa9b79f", + "rev": "7e01c9149149b9d4b1d871e58eb88a22f15bdb3c", "type": "github" }, "original": { "owner": "cosmos", - "ref": "v8.0.0", + "ref": "v8.1.0", "repo": "ibc-go", "type": "github" } @@ -823,6 +978,23 @@ "type": "github" } }, + "injective-src": { + "flake": false, + "locked": { + "lastModified": 1706041278, + "narHash": "sha256-Vr/l8/wtZ47wi1OTWhsfLetKZH8c1fUFeoQaxF+QS3c=", + "owner": "OpenDeFiFoundation", + "repo": "injective-core", + "rev": "e1ab66c240524b05b872f63890fefcd4fced5f7a", + "type": "github" + }, + "original": { + "owner": "OpenDeFiFoundation", + "ref": "v1.12.1", + "repo": "injective-core", + "type": "github" + } + }, "interchain-security-src": { "flake": false, "locked": { @@ -891,6 +1063,22 @@ "type": "github" } }, + "lowdown-src": { + "flake": false, + "locked": { + "lastModified": 1633514407, + "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", + "owner": "kristapsdz", + "repo": "lowdown", + "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", + "type": "github" + }, + "original": { + "owner": "kristapsdz", + "repo": "lowdown", + "type": "github" + } + }, "migaloo-src": { "flake": false, "locked": { @@ -942,6 +1130,32 @@ "type": "github" } }, + "nix": { + "inputs": { + "lowdown-src": "lowdown-src", + "nixpkgs": [ + "cosmos-nix", + "haqq-src", + "devenv", + "nixpkgs" + ], + "nixpkgs-regression": "nixpkgs-regression" + }, + "locked": { + "lastModified": 1676545802, + "narHash": "sha256-EK4rZ+Hd5hsvXnzSzk2ikhStJnD63odF7SzsQ8CuSPU=", + "owner": "domenkozar", + "repo": "nix", + "rev": "7c91803598ffbcfe4a55c44ac6d49b2cf07a527f", + "type": "github" + }, + "original": { + "owner": "domenkozar", + "ref": "relaxed-flakes", + "repo": "nix", + "type": "github" + } + }, "nix-std": { "locked": { "lastModified": 1701658249, @@ -991,13 +1205,75 @@ "type": "github" } }, + "nixpkgs-regression": { + "locked": { + "lastModified": 1643052045, + "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1685801374, + "narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c37ca420157f4abc31e26f436c1145f8951ff373", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1707092692, + "narHash": "sha256-ZbHsm+mGk/izkWtT4xwwqz38fdlwu7nUUKXTOmm4SyE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "faf912b086576fd1a15fca610166c98d47bc667e", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { - "lastModified": 1701040486, - "narHash": "sha256-vawYwoHA5CwvjfqaT3A5CT9V36Eq43gxdwpux32Qkjw=", + "lastModified": 1707091808, + "narHash": "sha256-LahKBAfGbY836gtpVNnWwBTIzN7yf/uYM/S0g393r0Y=", + "rev": "9f2ee8c91ac42da3ae6c6a1d21555f283458247e", + "revCount": 555392, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2311.555392%2Brev-9f2ee8c91ac42da3ae6c6a1d21555f283458247e/018d7c73-3161-76d5-aca1-5929105b0aa0/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.2311.%2A.tar.gz" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1706683685, + "narHash": "sha256-FtPPshEpxH/ewBOsdKBNhlsL2MLEFv1hEnQ19f/bFsQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "45827faa2132b8eade424f6bdd48d8828754341a", + "rev": "5ad9903c16126a7d949101687af0aa589b1d7d3d", "type": "github" }, "original": { @@ -1007,7 +1283,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1681358109, "narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=", @@ -1023,7 +1299,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1674990008, "narHash": "sha256-4zOyp+hFW2Y7imxIpZqZGT8CEqKmDjwgfD6BzRUE0mQ=", @@ -1039,13 +1315,13 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { - "lastModified": 1705505490, - "narHash": "sha256-HS+Zg50Zm1Ehfat/OgGS2YJqU7/4ohsQhK+ClwcKmVA=", + "lastModified": 1710222005, + "narHash": "sha256-irXySffHz7b82dZIme6peyAu+8tTJr1zyxcfUPhqUrg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "f36047a5a4b5631f75210859abac7f97ba1ba7a7", + "rev": "9a9a7552431c4f1a3b2eee9398641babf7c30d0e", "type": "github" }, "original": { @@ -1072,6 +1348,38 @@ "type": "github" } }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": [ + "cosmos-nix", + "haqq-src", + "devenv", + "flake-compat" + ], + "flake-utils": "flake-utils_2", + "gitignore": "gitignore", + "nixpkgs": [ + "cosmos-nix", + "haqq-src", + "devenv", + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1688056373, + "narHash": "sha256-2+SDlNRTKsgo3LBRiMUcoEUb6sDViRNQhzJquZ4koOI=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "5843cf069272d92b60c3ed9e55b7a8989c01d4c7", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, "provenance-src": { "flake": false, "locked": { @@ -1126,14 +1434,14 @@ "root": { "inputs": { "cosmos-nix": "cosmos-nix", - "flake-utils": "flake-utils_4", - "nixpkgs": "nixpkgs_5" + "flake-utils": "flake-utils_6", + "nixpkgs": "nixpkgs_6" } }, "rust-overlay": { "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_3" + "flake-utils": "flake-utils_4", + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1702347444, @@ -1151,8 +1459,8 @@ }, "sbt-derivation": { "inputs": { - "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_4" + "flake-utils": "flake-utils_5", + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1698464090, @@ -1218,6 +1526,23 @@ "type": "github" } }, + "slinky-src": { + "flake": false, + "locked": { + "lastModified": 1706741000, + "narHash": "sha256-gto9l+zeM1WLIv/VtVlrhTpUTMLN+niQTo5zlrbkx30=", + "owner": "skip-mev", + "repo": "slinky", + "rev": "642846e3517f4aa4ffe1cd29180fef4d459bfbfe", + "type": "github" + }, + "original": { + "owner": "skip-mev", + "ref": "v0.2.0", + "repo": "slinky", + "type": "github" + } + }, "stargaze-src": { "flake": false, "locked": { @@ -1330,6 +1655,36 @@ "type": "github" } }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "umee-src": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 7e2f5756e3..9f823c4f16 100644 --- a/flake.nix +++ b/flake.nix @@ -52,6 +52,7 @@ stride-consumer-no-admin stride-consumer wasmd + injective ; python = nixpkgs.python3.withPackages (p: [ diff --git a/guide/README.md b/guide/README.md index 0c2a7bf993..8491178669 100644 --- a/guide/README.md +++ b/guide/README.md @@ -10,7 +10,7 @@ mdBook is a utility to create modern online books from Markdown files. This guide should be permanently deployed at its latest stable version at [hermes.informal.systems](https://hermes.informal.systems). -Current version: `v1.8.0`. +Current version: `v1.8.2`. The version of this guide is aligned with the [versioning of the ibc crates](../README.md). diff --git a/guide/src/SUMMARY.md b/guide/src/SUMMARY.md index 86b06ace7e..cf9b2de8c5 100644 --- a/guide/src/SUMMARY.md +++ b/guide/src/SUMMARY.md @@ -53,6 +53,7 @@ - [Cross Stack Misconfiguration](./advanced/troubleshooting/cross-comp-config.md) - [Genesis restart without IBC upgrade proposal](./advanced/troubleshooting/genesis-restart.md) - [Handling Clock Drift](./advanced/troubleshooting/clock-drift.md) + - [Gas Errors](./advanced/troubleshooting/gas-errors.md) - [Commands Reference](./documentation/commands/index.md) - [Global options and JSON output](./documentation/commands/global.md) diff --git a/guide/src/advanced/troubleshooting/gas-errors.md b/guide/src/advanced/troubleshooting/gas-errors.md new file mode 100644 index 0000000000..220e0f8d0d --- /dev/null +++ b/guide/src/advanced/troubleshooting/gas-errors.md @@ -0,0 +1,48 @@ +# Gas errors + +This section will expand on the out of gas error which can happen when simulating or sending Txs. The related configurations are: + +```toml +default_gas = 100000 +max_gas = 4000000 +gas_multiplier = 1.1 +``` + +Before sending a transaction, Hermes will retrieve an estimation of the gas required with the simulation capability of the chain. After retrieving the gas amount from the simulation, the `gas_multiplier` will be applied since the simulation might be slightly lower than the required amount of gas. +Since the `max_gas` is applied after the gas_multiplier, it can happen that the value `simulated_gas * gas_multiplier > max_gas`, in which case the `max_gas` value is used. + +Note that if the simulation fails with a recoverable error, Hermes will use the configured `default_gas`. + +## Simulating Tx + +The first instance where an error can happen is when the tracasction simulation succeeds but the gas amount retrieved exceeds the configured `max_gas`, Hermes will throw an unrecoverable error: + +``` + gas estimate from simulated Tx exceeds the maximum configured +``` + +This can be fixed by increasing the configured `max_gas`. + +## Broadcasting Tx + +> __NOTE__: This issue will only arise with Cosmos chains as this is a Cosmos SDK error. + +The second instance when an error can happen is when sending the transaction. If the gas included for the transaction is not enough Hermes will throw an error: + +``` +out of gas in location: ; gasWanted: , gasUsed: : out of gas +``` + +Two cases need to be verified in order to fix this issue. + +### Caused by max_gas + +If simulated gas is close to the `max_gas` configured, after multiplying the value with the `gas_multiplier`, it can be the case that the `max_gas` is used instead. And since the simulated gas might be slightly lower than the required gas, this can cause an out of gas error. +This can be fixed by increasing the configured `max_gas`. + +### Caused by default_gas + +When the transaction simulation fails with a recoverable error, the `default_gas` will be used. If the `default_gas` is too low an out of gas error will be thrown. This can be fixed by increasing the `default_gas`. +But there can also be a case similar to the one explained in the previous section [Caused by max_gas](./gas-errors.md#caused-by-max_gas). + +If the `default_gas` is too close to the `max_gas`, the `max_gas` will be used instead of `default_gas * gas_multiplier`, causing an out of gas error. In this situation both `max_gas` and `default_gas` need to be verified, and one or both need to be increased. \ No newline at end of file diff --git a/guide/src/documentation/configuration/packet-clearing.md b/guide/src/documentation/configuration/packet-clearing.md index b12dd4d27d..805c061b31 100644 --- a/guide/src/documentation/configuration/packet-clearing.md +++ b/guide/src/documentation/configuration/packet-clearing.md @@ -2,7 +2,7 @@ Hermes can be configured in order to clear packets which haven't been relayed. This can happen if there wasn't a relayer instance running when the packet event was submitted or if there was an issue relaying the packet. -There are three different configurations to determine when Hermes will clear packets. +There are four different configurations to determine when Hermes will clear packets. ## Global configurations @@ -32,7 +32,7 @@ This configuration defines how often Hermes will verify if there are pending pac ## Chain specific configuration -The third configuration is specific for each chain. +The third and fourth configurations are specific for each chain. ### 3. `clear_interval` @@ -42,4 +42,17 @@ The third configuration is specific for each chain. clear_interval = 50 ``` -An additional `clear_interval` can be specified for each chain, this value is also in number of blocks. This configuration will override the clear interval value for the specific chain and can be used if chains need to have different clear values. This configuration is optional, if it is not set the global value will be used. \ No newline at end of file +An additional `clear_interval` can be specified for each chain, this value is also in number of blocks. This configuration will override the clear interval value for the specific chain and can be used if chains need to have different clear values. This configuration is optional, if it is not set the global value will be used. + +### 4. `excluded_sequences` + +```toml +[[chains]] +... +excluded_sequences = [ + ['channel-0', [1, 2, 3]], + ['channel-1', [4, 5, 6]] +] +``` + +It is possible to specify which packet sequences should be ignored when clearing packets for specific channels. This can be used when there are stuck packets which need to be handled in a specific way, but it is still required to clear the other stuck packets. This configuration will only filter packet when clearing, standard relaying will not filter the sequences configured in `excluded_sequences`. \ No newline at end of file diff --git a/guide/src/documentation/telemetry/operators.md b/guide/src/documentation/telemetry/operators.md index 2496b6e91a..dd0d137d2e 100644 --- a/guide/src/documentation/telemetry/operators.md +++ b/guide/src/documentation/telemetry/operators.md @@ -142,6 +142,7 @@ If this metric is increasing, it signals that the packet queue is increasing and | `cleared_send_packet_count_total`  | Number of SendPacket events received during the initial and periodic clearing, per chain, counterparty chain, channel and port | `u64` Counter | Packet workers enabled, and periodic packet clearing or clear on start enabled | | `cleared_acknowledgment_count_total` | Number of WriteAcknowledgement events received during the initial and periodic clearing, per chain, counterparty chain, channel and port | `u64` Counter | Packet workers enabled, and periodic packet clearing or clear on start enabled | | `broadcast_errors_total` | Number of errors observed by Hermes when broadcasting a Tx, per error type and account | `u64` Counter | Packet workers enabled | +| `simulate_errors_total` | Number of errors observed by Hermes when simulating a Tx, per error type, account and whether the error is recoverable or not | `u64` Counter | Packet workers enabled | | `filtered_packets` | Number of ICS-20 packets filtered because the memo and/or the receiver fields were exceeding the configured limits | `u64` Counter | Packet workers enabled, and `ics20_max_memo_size` and/or `ics20_max_receiver_size` enabled | Notes: diff --git a/guide/src/index.md b/guide/src/index.md index 0b364cd9f9..329ec05641 100644 --- a/guide/src/index.md +++ b/guide/src/index.md @@ -74,7 +74,7 @@ Hermes is actively developed and maintained by [Informal Systems](https://inform - The official GitHub repository for Hermes. - [IBC GitHub repository](https://github.com/cosmos/ics) - The official repository for the Inter-blockchain protocol (IBC). - - [IBC Protocol](https://ibcprotocol.org) + - [IBC Protocol](https://www.ibcprotocol.dev) - The official IBC protocol page. ## Contact diff --git a/guide/src/quick-start/pre-requisites.md b/guide/src/quick-start/pre-requisites.md index aefafe2c18..fa430166d8 100644 --- a/guide/src/quick-start/pre-requisites.md +++ b/guide/src/quick-start/pre-requisites.md @@ -12,8 +12,7 @@ The provided instructions will install all the Rust tool chain including `rustc` ### Version requirements -Hermes is developed and tested using the latest version of Rust, `1.71` at -the moment. To check that your tool chain is up-to-date run: +Hermes is developed and tested using the latest stable version of Rust. To check that your tool chain is up-to-date run: ```shell rustc --version diff --git a/tools/check-guide/Cargo.lock b/tools/check-guide/Cargo.lock index e5ab2c34a5..df79b8288f 100644 --- a/tools/check-guide/Cargo.lock +++ b/tools/check-guide/Cargo.lock @@ -153,6 +153,18 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +[[package]] +name = "arrayref" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" + +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + [[package]] name = "async-stream" version = "0.3.5" @@ -289,12 +301,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - [[package]] name = "base64" version = "0.21.4" @@ -342,7 +348,7 @@ checksum = "fd00f3c09b5f21fb357abe32d29946eb8bb7a0862bae62c0b5e4a692acbbe73c" dependencies = [ "bech32 0.10.0-beta", "bitcoin-internals", - "bitcoin_hashes 0.13.0", + "bitcoin_hashes", "hex-conservative", "hex_lit", "secp256k1", @@ -358,21 +364,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bitcoin-private" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73290177011694f38ec25e165d0387ab7ea749a4b81cd4c80dae5988229f7a57" - -[[package]] -name = "bitcoin_hashes" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d7066118b13d4b20b23645932dfb3a81ce7e29f95726c2036fa33cd7b092501" -dependencies = [ - "bitcoin-private", -] - [[package]] name = "bitcoin_hashes" version = "0.13.0" @@ -396,6 +387,28 @@ version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +[[package]] +name = "blake2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "blake3" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if 1.0.0", + "constant_time_eq", +] + [[package]] name = "block-buffer" version = "0.9.0" @@ -690,6 +703,12 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" +[[package]] +name = "constant_time_eq" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" + [[package]] name = "contracts" version = "0.6.3" @@ -898,13 +917,14 @@ dependencies = [ [[package]] name = "dialoguer" -version = "0.10.4" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59c6f2989294b9a498d3ad5491a79c6deb604617378e1cdc4bfc1c1361fe2f87" +checksum = "658bce805d770f407bc62102fca7c2c64ceef2fbcb2b8bd19d2765ce093980de" dependencies = [ "console", "shell-words", "tempfile", + "thiserror", "zeroize", ] @@ -1130,9 +1150,9 @@ dependencies = [ [[package]] name = "eyre" -version = "0.6.8" +version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" dependencies = [ "indenter", "once_cell", @@ -1197,7 +1217,6 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" dependencies = [ - "anyhow", "eyre", "paste", ] @@ -1391,26 +1410,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "gumdrop" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc700f989d2f6f0248546222d9b4258f5b02a171a431f8285a81c08142629e3" -dependencies = [ - "gumdrop_derive", -] - -[[package]] -name = "gumdrop_derive" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "729f9bd3449d77e7831a18abfb7ba2f99ee813dfd15b8c2167c9a54ba20aa99d" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "h2" version = "0.3.21" @@ -1477,7 +1476,7 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" dependencies = [ - "base64 0.21.4", + "base64", "bytes", "headers-core", "http", @@ -1682,7 +1681,7 @@ dependencies = [ [[package]] name = "ibc-chain-registry" -version = "0.26.4" +version = "0.27.2" dependencies = [ "async-trait", "flex-error", @@ -1701,14 +1700,15 @@ dependencies = [ [[package]] name = "ibc-proto" -version = "0.39.0" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b5aca9ca863246a2b358e0a1845759780860673e54c0a76335faccc504981c" +checksum = "c1a6f2bbf7e1d12f98d8d54d9114231b865418d0f8b619c0873180eafdee07fd" dependencies = [ - "base64 0.21.4", + "base64", "bytes", "flex-error", "ics23", + "informalsystems-pbjson", "prost", "serde", "subtle-encoding", @@ -1718,7 +1718,7 @@ dependencies = [ [[package]] name = "ibc-relayer" -version = "0.26.4" +version = "0.27.2" dependencies = [ "anyhow", "async-stream", @@ -1746,7 +1746,6 @@ dependencies = [ "ibc-telemetry", "itertools 0.10.5", "moka", - "monostate", "num-bigint", "num-rational", "once_cell", @@ -1784,7 +1783,7 @@ dependencies = [ [[package]] name = "ibc-relayer-cli" -version = "1.7.4" +version = "1.8.2" dependencies = [ "abscissa_core", "clap 3.2.25", @@ -1823,7 +1822,7 @@ dependencies = [ [[package]] name = "ibc-relayer-rest" -version = "0.26.4" +version = "0.27.2" dependencies = [ "axum", "crossbeam-channel 0.5.11", @@ -1836,7 +1835,7 @@ dependencies = [ [[package]] name = "ibc-relayer-types" -version = "0.26.4" +version = "0.27.2" dependencies = [ "bytes", "derive_more", @@ -1855,14 +1854,13 @@ dependencies = [ "tendermint", "tendermint-light-client-verifier", "tendermint-proto", - "tendermint-testgen", "time", "uint", ] [[package]] name = "ibc-telemetry" -version = "0.26.4" +version = "0.27.2" dependencies = [ "axum", "dashmap", @@ -1881,11 +1879,13 @@ dependencies = [ [[package]] name = "ics23" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "661e2d6f79952a65bc92b1c81f639ebd37228dae6ff412a5aba7d474bdc4b957" +checksum = "dc3b8be84e7285c73b88effdc3294b552277d6b0ec728ee016c861b7b9a2c19c" dependencies = [ "anyhow", + "blake2", + "blake3", "bytes", "hex", "informalsystems-pbjson", @@ -1966,11 +1966,11 @@ dependencies = [ [[package]] name = "informalsystems-pbjson" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4eecd90f87bea412eac91c6ef94f6b1e390128290898cbe14f2b926787ae1fb" +checksum = "9aa4a0980c8379295100d70854354e78df2ee1c6ca0f96ffe89afeb3140e3a3d" dependencies = [ - "base64 0.13.1", + "base64", "serde", ] @@ -2125,15 +2125,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" -[[package]] -name = "mach2" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d0d1830bcd151a6fc4aea1369af235b36c1528fe976b8ff678683c9995eade8" -dependencies = [ - "libc", -] - [[package]] name = "maplit" version = "1.0.2" @@ -2280,9 +2271,9 @@ dependencies = [ [[package]] name = "moka" -version = "0.12.1" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8017ec3548ffe7d4cef7ac0e12b044c01164a74c0f3119420faeaf13490ad8b" +checksum = "b1911e88d5831f748a4097a43862d129e3c6fca831eecac9b8db6d01d93c9de2" dependencies = [ "crossbeam-channel 0.5.11", "crossbeam-epoch", @@ -2299,27 +2290,6 @@ dependencies = [ "uuid 1.7.0", ] -[[package]] -name = "monostate" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "878c2a1f1c70e5724fa28f101ca787b6a7e8ad5c5e4ae4ca3b0fa4a419fa9075" -dependencies = [ - "monostate-impl", - "serde", -] - -[[package]] -name = "monostate-impl" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f686d68a09079e63b1d2c64aa305095887ce50565f00a922ebfaeeee0d9ba6ce" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - [[package]] name = "new_debug_unreachable" version = "1.0.4" @@ -2836,9 +2806,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fdd22f3b9c31b53c060df4a0613a1c7f062d4115a2b984dd15b1858f7e340d" +checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" dependencies = [ "bytes", "prost-derive", @@ -2846,9 +2816,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "265baba7fabd416cf5078179f7d2cbeca4ce7a9041111900675ea7c4cb8a4c32" +checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" dependencies = [ "anyhow", "itertools 0.11.0", @@ -2885,13 +2855,12 @@ dependencies = [ [[package]] name = "quanta" -version = "0.11.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17e662a7a8291a865152364c20c7abc5e60486ab2001e8ec10b24862de0b9ab" +checksum = "9ca0b7bac0b97248c40bb77288fc52029cf1459c0461ea1b05ee32ccf011de2c" dependencies = [ "crossbeam-utils 0.8.19", "libc", - "mach2", "once_cell", "raw-cpuid", "wasi", @@ -2940,11 +2909,11 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "10.7.0" +version = "11.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332" +checksum = "9d86a7c4638d42c44551f4791a20e687dbb4c3de1f33c43dd71e355cd429def1" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", ] [[package]] @@ -3026,7 +2995,7 @@ version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ - "base64 0.21.4", + "base64", "bytes", "encoding_rs", "futures-core", @@ -3164,7 +3133,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.4", + "base64", ] [[package]] @@ -3245,11 +3214,11 @@ dependencies = [ [[package]] name = "secp256k1" -version = "0.28.1" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f622567e3b4b38154fb8190bcf6b160d7a4301d70595a49195b48c116007a27" +checksum = "d24b59d129cdadea20aea4fb2352fa053712e5d713eee47d700cd4b2bc002f10" dependencies = [ - "bitcoin_hashes 0.12.0", + "bitcoin_hashes", "rand", "secp256k1-sys", "serde", @@ -3299,18 +3268,18 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.19" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad977052201c6de01a8ef2aa3378c4bd23217a056337d1d6da40468d267a4fb0" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.195" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] @@ -3336,9 +3305,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.195" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", @@ -3347,9 +3316,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.107" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ "itoa", "ryu", @@ -3493,12 +3462,6 @@ dependencies = [ "rand_core", ] -[[package]] -name = "simple-error" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc47a29ce97772ca5c927f75bac34866b16d64e07f330c3248e2d7226623901b" - [[package]] name = "siphasher" version = "0.3.11" @@ -3841,9 +3804,9 @@ dependencies = [ [[package]] name = "tendermint-proto" -version = "0.34.0" +version = "0.34.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc728a4f9e891d71adf66af6ecaece146f9c7a11312288a3107b3e1d6979aaf" +checksum = "b797dd3d2beaaee91d2f065e7bdf239dc8d80bba4a183a288bc1279dd5a69a1e" dependencies = [ "bytes", "flex-error", @@ -3890,22 +3853,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "tendermint-testgen" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19d4f02b7e38ce790da973fdc9edc71a0e35340ac57737bf278c8379037c1f5" -dependencies = [ - "ed25519-consensus", - "gumdrop", - "serde", - "serde_json", - "simple-error", - "tempfile", - "tendermint", - "time", -] - [[package]] name = "tendril" version = "0.4.3" @@ -3944,18 +3891,18 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.49" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.49" +version = "1.0.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", @@ -4181,7 +4128,7 @@ dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.21.4", + "base64", "bytes", "h2", "http", diff --git a/tools/check-guide/Cargo.toml b/tools/check-guide/Cargo.toml index a69316ec10..4239591403 100644 --- a/tools/check-guide/Cargo.toml +++ b/tools/check-guide/Cargo.toml @@ -1,11 +1,9 @@ [package] -name = "check-guide" +name = "check-guide" version = "0.1.0" edition = "2021" publish = false -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [dependencies] ibc-relayer-cli = { path = "../../crates/relayer-cli" } clap = "3.2" diff --git a/tools/integration-test/Cargo.toml b/tools/integration-test/Cargo.toml index 9580ba24bf..defd628b44 100644 --- a/tools/integration-test/Cargo.toml +++ b/tools/integration-test/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "ibc-integration-test" -version = "0.27.0" +version = "0.27.2" edition = "2021" -rust-version = "1.71" +rust-version = "1.77.1" license = "Apache-2.0" readme = "README.md" keywords = ["blockchain", "consensus", "cosmos", "ibc", "tendermint"] @@ -13,52 +13,43 @@ description = "Integration tests for Hermes" publish = false [dependencies] -ibc-relayer-types = { path = "../../crates/relayer-types" } -ibc-relayer = { path = "../../crates/relayer" } -ibc-test-framework = { path = "../test-framework" } - -http = "0.2.9" -serde_json = "1" -time = "0.3" -toml = "0.8" -prost = { version = "0.12" } -tonic = { version = "0.10", features = ["tls", "tls-roots"] } -serde = "1.0.195" +ibc-relayer-types = { workspace = true } +ibc-relayer = { workspace = true } +ibc-test-framework = { workspace = true } + +byte-unit = { workspace = true, features = ["serde"] } +http = { workspace = true } +prost = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +tendermint-rpc = { workspace = true, features = ["http-client"] } +tendermint = { workspace = true } +time = { workspace = true } +toml = { workspace = true } +tonic = { workspace = true, features = ["tls", "tls-roots"] } [features] -default = [] -example = [] -manual = [] -ordered = [] -ica = [] -ics29-fee = [] -experimental = [] -mbt = [] -forward-packet = [] -ics31 = [] -clean-workers = [] -fee-grant = [] +default = [] +example = [] +manual = [] +ordered = [] +ica = [] +ics29-fee = [] +experimental = [] +mbt = [] +forward-packet = [] +ics31 = [] +clean-workers = [] +fee-grant = [] interchain-security = [] -celestia = [] -async-icq = [] -juno = [] -dynamic-gas-fee = [] +celestia = [] +async-icq = [] +juno = [] +dynamic-gas-fee = [] [[bin]] name = "test_setup_with_binary_channel" -doc = true +doc = true [dev-dependencies] -tempfile = "3.6.0" - -[dependencies.tendermint] -version = "0.34.0" - -[dependencies.tendermint-rpc] -version = "0.34.0" -features = ["http-client"] - -[dependencies.byte-unit] -version = "4.0.19" -default-features = false -features = ["serde"] \ No newline at end of file +tempfile = { workspace = true } diff --git a/tools/integration-test/src/bin/test_setup_with_binary_channel.rs b/tools/integration-test/src/bin/test_setup_with_binary_channel.rs index 53e5cd4aa0..bfa71f8773 100644 --- a/tools/integration-test/src/bin/test_setup_with_binary_channel.rs +++ b/tools/integration-test/src/bin/test_setup_with_binary_channel.rs @@ -36,7 +36,7 @@ struct Test { impl TestOverrides for Test { fn modify_test_config(&self, config: &mut TestConfig) { - config.chain_store_dir = self.store_dir.clone(); + config.chain_store_dir.clone_from(&self.store_dir); } fn modify_relayer_config(&self, config: &mut Config) { diff --git a/tools/integration-test/src/bin/test_setup_with_fee_enabled_binary_channel.rs b/tools/integration-test/src/bin/test_setup_with_fee_enabled_binary_channel.rs index 3b4fffc816..787b85e206 100644 --- a/tools/integration-test/src/bin/test_setup_with_fee_enabled_binary_channel.rs +++ b/tools/integration-test/src/bin/test_setup_with_fee_enabled_binary_channel.rs @@ -37,7 +37,7 @@ struct Test { impl TestOverrides for Test { fn modify_test_config(&self, config: &mut TestConfig) { - config.chain_store_dir = self.store_dir.clone(); + config.chain_store_dir.clone_from(&self.store_dir); } fn modify_relayer_config(&self, config: &mut Config) { diff --git a/tools/integration-test/src/bin/test_setup_with_ternary_channel.rs b/tools/integration-test/src/bin/test_setup_with_ternary_channel.rs index 4d7b3efa62..de32105ba7 100644 --- a/tools/integration-test/src/bin/test_setup_with_ternary_channel.rs +++ b/tools/integration-test/src/bin/test_setup_with_ternary_channel.rs @@ -36,7 +36,7 @@ struct Test { impl TestOverrides for Test { fn modify_test_config(&self, config: &mut TestConfig) { - config.chain_store_dir = self.store_dir.clone(); + config.chain_store_dir.clone_from(&self.store_dir); } fn modify_relayer_config(&self, config: &mut Config) { diff --git a/tools/integration-test/src/mbt/transfer.rs b/tools/integration-test/src/mbt/transfer.rs index 3404ef6f3e..3acb8f6486 100644 --- a/tools/integration-test/src/mbt/transfer.rs +++ b/tools/integration-test/src/mbt/transfer.rs @@ -164,6 +164,7 @@ impl TestOverrides for IbcTransferMBT { ChainConfig::CosmosSdk(chain_config) => { chain_config.trusting_period = Some(CLIENT_EXPIRY); } + ChainConfig::Penumbra(_) | ChainConfig::Astria(_) => todo!(), } } } diff --git a/tools/integration-test/src/tests/async_icq/simple_query.rs b/tools/integration-test/src/tests/async_icq/simple_query.rs index 9456e4f94b..97b29c6776 100644 --- a/tools/integration-test/src/tests/async_icq/simple_query.rs +++ b/tools/integration-test/src/tests/async_icq/simple_query.rs @@ -143,8 +143,8 @@ fn assert_eventual_async_icq_success( ) -> Result<(), Error> { let rpc_addr = match relayer.config.chains.first().unwrap() { ChainConfig::CosmosSdk(c) => c.rpc_addr.clone(), - ChainConfig::Penumbra(c) => todo!(), - ChainConfig::Astria(c) => todo!(), + ChainConfig::Penumbra(_c) => todo!(), + ChainConfig::Astria(_c) => todo!(), }; let mut rpc_client = HttpClient::new(rpc_addr).unwrap(); diff --git a/tools/integration-test/src/tests/clear_packet.rs b/tools/integration-test/src/tests/clear_packet.rs index 248a93a76d..6e036293e4 100644 --- a/tools/integration-test/src/tests/clear_packet.rs +++ b/tools/integration-test/src/tests/clear_packet.rs @@ -488,6 +488,15 @@ impl BinaryChannelTest for ClearPacketSequencesTest { src_channel_id: channel.channel_id_a.clone().into_value(), max_memo_size: packet_config.ics20_max_memo_size, max_receiver_size: packet_config.ics20_max_receiver_size, + exclude_src_sequences: vec![], + }; + + let rev_opts = LinkParameters { + src_port_id: channel.port_b.clone().into_value(), + src_channel_id: channel.channel_id_b.clone().into_value(), + max_memo_size: packet_config.ics20_max_memo_size, + max_receiver_size: packet_config.ics20_max_receiver_size, + exclude_src_sequences: vec![], }; // Clear all even packets @@ -533,8 +542,15 @@ impl BinaryChannelTest for ClearPacketSequencesTest { info!("Clearing all unreceived ack packets ({})", to_clear.len()); - let rev_link = link.reverse(false, false).unwrap(); - rev_link.relay_ack_packet_messages(to_clear).unwrap(); + let rev_link = Link::new_from_opts( + chains.handle_b().clone(), + chains.handle_a().clone(), + rev_opts, + false, + false, + )?; + + rev_link.relay_ack_packet_messages(to_clear)?; let pending_packets_a = pending_packet_summary(chains.handle_a(), chains.handle_b(), channel_end_a.value())?; diff --git a/tools/integration-test/src/tests/consensus_states.rs b/tools/integration-test/src/tests/consensus_states.rs index 541da0bfca..d173d05089 100644 --- a/tools/integration-test/src/tests/consensus_states.rs +++ b/tools/integration-test/src/tests/consensus_states.rs @@ -1,5 +1,3 @@ -use std::time::Duration; - use ibc_relayer::chain::{ cosmos::query::consensus_state::query_consensus_states, requests::{PageRequest, QueryConsensusStateHeightsRequest, QueryConsensusStatesRequest}, diff --git a/tools/integration-test/src/tests/dynamic_gas_fee.rs b/tools/integration-test/src/tests/dynamic_gas_fee.rs index 4444bd0914..32d223564b 100644 --- a/tools/integration-test/src/tests/dynamic_gas_fee.rs +++ b/tools/integration-test/src/tests/dynamic_gas_fee.rs @@ -52,8 +52,8 @@ impl TestOverrides for DynamicGasTest { GasPrice::new(0.1, chain_config_a.gas_price.denom.clone()); chain_config_a.dynamic_gas_price = DynamicGasPrice::unsafe_new(false, 1.1, 0.6); } - ChainConfig::Penumbra(chain_config_a) => todo!(), - ChainConfig::Astria(chain_config_a) => todo!(), + ChainConfig::Penumbra(_chain_config_a) => todo!(), + ChainConfig::Astria(_chain_config_a) => todo!(), } match &mut config.chains[1] { @@ -63,8 +63,8 @@ impl TestOverrides for DynamicGasTest { chain_config_b.dynamic_gas_price = DynamicGasPrice::unsafe_new(self.dynamic_gas_enabled, 1.1, 0.6); } - ChainConfig::Penumbra(chain_config_b) => todo!(), - ChainConfig::Astria(chain_config_b) => todo!(), + ChainConfig::Penumbra(_chain_config_b) => todo!(), + ChainConfig::Astria(_chain_config_b) => todo!(), } } diff --git a/tools/integration-test/src/tests/execute_schedule.rs b/tools/integration-test/src/tests/execute_schedule.rs index 2e51ddfbc7..9521d2b535 100644 --- a/tools/integration-test/src/tests/execute_schedule.rs +++ b/tools/integration-test/src/tests/execute_schedule.rs @@ -47,6 +47,7 @@ impl BinaryChannelTest for ExecuteScheduleTest { src_channel_id: channel.channel_id_a.clone().into_value(), max_memo_size: packet_config.ics20_max_memo_size, max_receiver_size: packet_config.ics20_max_receiver_size, + exclude_src_sequences: vec![], }; let chain_a_link = Link::new_from_opts( diff --git a/tools/integration-test/src/tests/fee/auto_forward_relayer.rs b/tools/integration-test/src/tests/fee/auto_forward_relayer.rs index 9b4c6b4853..a6fa9fb757 100644 --- a/tools/integration-test/src/tests/fee/auto_forward_relayer.rs +++ b/tools/integration-test/src/tests/fee/auto_forward_relayer.rs @@ -53,7 +53,7 @@ impl BinaryChannelTest for AutoForwardRelayerTest { let user_a = wallets_a.user1(); let user_b = wallets_b.user1(); - let balance_a1 = chain_driver_a.query_balance(&user_a.address(), &denom_a)?; + let balance_a = chain_driver_a.query_balance(&user_a.address(), &denom_a)?; let relayer_balance_a = chain_driver_a.query_balance(&relayer_a.address(), &denom_a)?; @@ -62,10 +62,6 @@ impl BinaryChannelTest for AutoForwardRelayerTest { let ack_fee = random_u128_range(200, 300); let timeout_fee = random_u128_range(100, 200); - let total_sent = send_amount + receive_fee + ack_fee + timeout_fee; - - let balance_a2 = balance_a1 - total_sent; - chain_driver_a.ibc_token_transfer_with_fee( &port_a, &channel_id_a, @@ -84,18 +80,22 @@ impl BinaryChannelTest for AutoForwardRelayerTest { &denom_a, )?; - chain_driver_a.assert_eventual_wallet_amount(&user_a.address(), &balance_a2.as_ref())?; + info!("Will assert user b received the transferred token"); chain_driver_b.assert_eventual_wallet_amount( &user_b.address(), &denom_b.with_amount(send_amount).as_ref(), )?; + info!("Will assert user a transferred the sent amount, the recv fee and ack fee"); + chain_driver_a.assert_eventual_wallet_amount( &user_a.address(), - &(balance_a2 + timeout_fee).as_ref(), + &(balance_a - send_amount - receive_fee - ack_fee).as_ref(), )?; + info!("Will assert the relayer received the recv fee and ack fee"); + chain_driver_a.assert_eventual_wallet_amount( &relayer_a.address(), &(relayer_balance_a + ack_fee + receive_fee).as_ref(), diff --git a/tools/integration-test/src/tests/fee/filter_fees.rs b/tools/integration-test/src/tests/fee/filter_fees.rs index 4730e96bdf..0eb322ecdb 100644 --- a/tools/integration-test/src/tests/fee/filter_fees.rs +++ b/tools/integration-test/src/tests/fee/filter_fees.rs @@ -1,3 +1,4 @@ +use std::cmp::max; use std::collections::HashMap; use ibc_relayer::config::{ @@ -80,7 +81,12 @@ impl BinaryChannelTest for FilterIncentivizedFeesRelayerTest { let total_sent_fail = send_amount + receive_fee_fail + ack_fee + timeout_fee; - let balance_a2_fail = balance_a1 - total_sent_fail; + // Before ibc-go v8.1.0 the amount escrowed for ICS29 fees is the sum of recv, ack and timeout fees + let balance_a2_fail = balance_a1.clone() - total_sent_fail; + + // From ibc-go v8.1+ the amount escrowed for ICS29 fees is the highest value between recv + ack fees or timeout fee + let balance_a2_fail2 = + balance_a1 - send_amount - max(receive_fee_fail + ack_fee, timeout_fee); chain_driver_a.ibc_token_transfer_with_fee( &port_a, @@ -102,16 +108,30 @@ impl BinaryChannelTest for FilterIncentivizedFeesRelayerTest { std::thread::sleep(Duration::from_secs(10)); - chain_driver_a - .assert_eventual_wallet_amount(&user_a.address(), &balance_a2_fail.as_ref())?; + // This double check is required because ibc-go versions previous to v8.1.0 escrow recv, ack and timeout + // fees for ICS29. From ibc-go v8.1+ only the highest value between recv+ack and timeout is escrowed. + match chain_driver_a + .assert_eventual_wallet_amount(&user_a.address(), &balance_a2_fail.as_ref()) + { + Ok(()) => {} + Err(_) => chain_driver_a + .assert_eventual_wallet_amount(&user_a.address(), &balance_a2_fail2.as_ref())?, + } chain_driver_b.assert_eventual_wallet_amount( &user_b.address(), &denom_b.with_amount(0u128).as_ref(), )?; - chain_driver_a - .assert_eventual_wallet_amount(&user_a.address(), &(balance_a2_fail).as_ref())?; + // This double check is required because ibc-go versions previous to v8.1.0 escrow recv, ack and timeout + // fees for ICS29. From ibc-go v8.1+ only the highest value between recv+ack and timeout is escrowed. + match chain_driver_a + .assert_eventual_wallet_amount(&user_a.address(), &(balance_a2_fail).as_ref()) + { + Ok(()) => {} + Err(_) => chain_driver_a + .assert_eventual_wallet_amount(&user_a.address(), &balance_a2_fail2.as_ref())?, + } chain_driver_a.assert_eventual_wallet_amount( &relayer_a.address(), @@ -121,7 +141,7 @@ impl BinaryChannelTest for FilterIncentivizedFeesRelayerTest { { info!("Verify that packet with enough fees is relayed"); - let balance_a1 = chain_driver_a.query_balance(&user_a.address(), &denom_a)?; + let balance_a = chain_driver_a.query_balance(&user_a.address(), &denom_a)?; let relayer_balance_a = chain_driver_a.query_balance(&relayer_a.address(), &denom_a)?; let send_amount = random_u128_range(1000, 2000); @@ -129,10 +149,6 @@ impl BinaryChannelTest for FilterIncentivizedFeesRelayerTest { let ack_fee = random_u128_range(200, 300); let timeout_fee = random_u128_range(100, 200); - let total_sent_success = send_amount + receive_fee_success + ack_fee + timeout_fee; - - let balance_a2_success = balance_a1 - total_sent_success; - chain_driver_a.ibc_token_transfer_with_fee( &port_a, &channel_id_a, @@ -151,9 +167,6 @@ impl BinaryChannelTest for FilterIncentivizedFeesRelayerTest { &denom_a, )?; - chain_driver_a - .assert_eventual_wallet_amount(&user_a.address(), &balance_a2_success.as_ref())?; - chain_driver_b.assert_eventual_wallet_amount( &user_b.address(), &denom_b.with_amount(send_amount).as_ref(), @@ -163,6 +176,11 @@ impl BinaryChannelTest for FilterIncentivizedFeesRelayerTest { &relayer_a.address(), &(relayer_balance_a + receive_fee_success + ack_fee).as_ref(), )?; + + chain_driver_a.assert_eventual_wallet_amount( + &user_a.address(), + &(balance_a - send_amount - receive_fee_success - ack_fee).as_ref(), + )?; } Ok(()) @@ -231,7 +249,11 @@ impl BinaryChannelTest for FilterByChannelIncentivizedFeesRelayerTest { let total_sent = send_amount + receive_fee + ack_fee + timeout_fee; - let balance_a2 = balance_a1 - total_sent; + // Before ibc-go v8.1.0 the amount escrowed for ICS29 fees is the sum of recv, ack and timeout fees + let balance_a2_legacy = balance_a1.clone() - total_sent; + + // From ibc-go v8.1+ the amount escrowed for ICS29 fees is the highest value between recv + ack fees or timeout fee + let balance_a2 = balance_a1.clone() - send_amount - max(receive_fee + ack_fee, timeout_fee); let denom_b = derive_ibc_denom( &channel.port_b.as_ref(), @@ -253,7 +275,15 @@ impl BinaryChannelTest for FilterByChannelIncentivizedFeesRelayerTest { Duration::from_secs(60), )?; - chain_driver_a.assert_eventual_wallet_amount(&user_a.address(), &balance_a2.as_ref())?; + // This double check is required because ibc-go versions previous to v8.1.0 escrow recv, ack and timeout + // fees for ICS29. From ibc-go v8.1+ only the highest value between recv+ack and timeout is escrowed. + match chain_driver_a + .assert_eventual_wallet_amount(&user_a.address(), &balance_a2_legacy.as_ref()) + { + Ok(()) => {} + Err(_) => chain_driver_a + .assert_eventual_wallet_amount(&user_a.address(), &balance_a2.as_ref())?, + } chain_driver_b.assert_eventual_wallet_amount( &user_b.address(), @@ -262,7 +292,7 @@ impl BinaryChannelTest for FilterByChannelIncentivizedFeesRelayerTest { chain_driver_a.assert_eventual_wallet_amount( &user_a.address(), - &(balance_a2 + timeout_fee).as_ref(), + &(balance_a1 - send_amount - receive_fee - ack_fee).as_ref(), )?; chain_driver_a.assert_eventual_wallet_amount( diff --git a/tools/integration-test/src/tests/fee/forward_relayer.rs b/tools/integration-test/src/tests/fee/forward_relayer.rs index 93a292aaf1..89e19465f6 100644 --- a/tools/integration-test/src/tests/fee/forward_relayer.rs +++ b/tools/integration-test/src/tests/fee/forward_relayer.rs @@ -92,7 +92,7 @@ impl BinaryChannelTest for ForwardRelayerTest { let user_a = wallets_a.user1(); let user_b = wallets_b.user1(); - let balance_a1 = chain_driver_a.query_balance(&user_a.address(), &denom_a)?; + let balance_a = chain_driver_a.query_balance(&user_a.address(), &denom_a)?; let relayer_balance_a = chain_driver_a.query_balance(&relayer_a.address(), &denom_a)?; @@ -101,10 +101,6 @@ impl BinaryChannelTest for ForwardRelayerTest { let ack_fee = random_u128_range(200, 300); let timeout_fee = random_u128_range(100, 200); - let total_sent = send_amount + receive_fee + ack_fee + timeout_fee; - - let balance_a2 = balance_a1 - total_sent; - chain_driver_a.ibc_token_transfer_with_fee( &port_a, &channel_id_a, @@ -123,8 +119,6 @@ impl BinaryChannelTest for ForwardRelayerTest { &denom_a, )?; - chain_driver_a.assert_eventual_wallet_amount(&user_a.address(), &balance_a2.as_ref())?; - chain_driver_b.assert_eventual_wallet_amount( &user_b.address(), &denom_b.with_amount(send_amount).as_ref(), @@ -132,7 +126,7 @@ impl BinaryChannelTest for ForwardRelayerTest { chain_driver_a.assert_eventual_wallet_amount( &user_a.address(), - &(balance_a2 + timeout_fee).as_ref(), + &(balance_a - send_amount - receive_fee - ack_fee).as_ref(), )?; chain_driver_a.assert_eventual_wallet_amount( diff --git a/tools/integration-test/src/tests/fee/no_forward_relayer.rs b/tools/integration-test/src/tests/fee/no_forward_relayer.rs index 10d2ee3d5b..9fb27c37b4 100644 --- a/tools/integration-test/src/tests/fee/no_forward_relayer.rs +++ b/tools/integration-test/src/tests/fee/no_forward_relayer.rs @@ -70,7 +70,7 @@ impl BinaryChannelTest for NoForwardRelayerTest { let user_a = wallets_a.user1(); let user_b = wallets_b.user1(); - let balance_a1 = chain_driver_a.query_balance(&user_a.address(), &denom_a)?; + let balance_a = chain_driver_a.query_balance(&user_a.address(), &denom_a)?; let relayer_balance_a = chain_driver_a.query_balance(&relayer_a.address(), &denom_a)?; @@ -79,10 +79,6 @@ impl BinaryChannelTest for NoForwardRelayerTest { let ack_fee = random_u128_range(200, 300); let timeout_fee = random_u128_range(100, 200); - let total_sent = send_amount + receive_fee + ack_fee + timeout_fee; - - let balance_a2 = balance_a1 - total_sent; - chain_driver_a.ibc_token_transfer_with_fee( &port_a, &channel_id_a, @@ -101,8 +97,6 @@ impl BinaryChannelTest for NoForwardRelayerTest { &denom_a, )?; - chain_driver_a.assert_eventual_wallet_amount(&user_a.address(), &balance_a2.as_ref())?; - chain_driver_b.assert_eventual_wallet_amount( &user_b.address(), &denom_b.with_amount(send_amount).as_ref(), @@ -112,7 +106,7 @@ impl BinaryChannelTest for NoForwardRelayerTest { // as there is no counterparty address registered. chain_driver_a.assert_eventual_wallet_amount( &user_a.address(), - &(balance_a2 + receive_fee + timeout_fee).as_ref(), + &(balance_a - send_amount - ack_fee).as_ref(), )?; chain_driver_a.assert_eventual_wallet_amount( @@ -152,7 +146,7 @@ impl BinaryChannelTest for InvalidForwardRelayerTest { let user_a = wallets_a.user1(); let user_b = wallets_b.user1(); - let balance_a1 = chain_driver_a.query_balance(&user_a.address(), &denom_a)?; + let balance_a = chain_driver_a.query_balance(&user_a.address(), &denom_a)?; let relayer_balance_a = chain_driver_a.query_balance(&relayer_a.address(), &denom_a)?; @@ -161,10 +155,6 @@ impl BinaryChannelTest for InvalidForwardRelayerTest { let ack_fee = random_u128_range(200, 300); let timeout_fee = random_u128_range(100, 200); - let total_sent = send_amount + receive_fee + ack_fee + timeout_fee; - - let balance_a2 = balance_a1 - total_sent; - let invalid_address = MonoTagged::new(WalletAddress("a very long and invalid address".to_string())); @@ -193,18 +183,16 @@ impl BinaryChannelTest for InvalidForwardRelayerTest { &denom_a, )?; - chain_driver_a.assert_eventual_wallet_amount(&user_a.address(), &balance_a2.as_ref())?; - chain_driver_b.assert_eventual_wallet_amount( &user_b.address(), &denom_b.with_amount(send_amount).as_ref(), )?; // receive fee and timeout fee should be refunded, - // as thecounterparty address registered is invalid. + // as the counterparty address registered is invalid. chain_driver_a.assert_eventual_wallet_amount( &user_a.address(), - &(balance_a2 + receive_fee + timeout_fee).as_ref(), + &(balance_a - send_amount - ack_fee).as_ref(), )?; chain_driver_a.assert_eventual_wallet_amount( diff --git a/tools/integration-test/src/tests/fee/pay_fee_async.rs b/tools/integration-test/src/tests/fee/pay_fee_async.rs index 55080df6c5..b904170482 100644 --- a/tools/integration-test/src/tests/fee/pay_fee_async.rs +++ b/tools/integration-test/src/tests/fee/pay_fee_async.rs @@ -18,6 +18,8 @@ //! Finally, the test initializes the supervisor in order to relay the pending packets so that the //! balances on the two chains can be asserted. +use std::cmp::max; + use ibc_relayer_types::{core::ics04_channel::version::Version, events::IbcEvent}; use ibc_test_framework::{prelude::*, util::random::random_u128_range}; @@ -103,13 +105,26 @@ impl BinaryChannelTest for PayPacketFeeAsyncTest { &denom_a.with_amount(receive_fee).as_ref(), &denom_a.with_amount(ack_fee).as_ref(), &denom_a.with_amount(timeout_fee).as_ref(), - Duration::from_secs(60), + Duration::from_secs(300), )?; let total_sent = send_amount + receive_fee + ack_fee + timeout_fee; - let balance_a2 = balance_a1 - total_sent; - chain_driver_a.assert_eventual_wallet_amount(&user_a.address(), &balance_a2.as_ref())?; + // Before ibc-go v8.1.0 the amount escrowed for ICS29 fees is the sum of recv, ack and timeout fees + let balance_a2_legacy = balance_a1.clone() - total_sent; + + // From ibc-go v8.1+ the amount escrowed for ICS29 fees is the highest value between recv + ack fees or timeout fee + let balance_a2 = balance_a1.clone() - send_amount - max(receive_fee + ack_fee, timeout_fee); + + // This double check is required because ibc-go versions previous to v8.1.0 escrow recv, ack and timeout + // fees for ICS29. From ibc-go v8.1+ only the highest value between recv+ack and timeout is escrowed. + match chain_driver_a + .assert_eventual_wallet_amount(&user_a.address(), &balance_a2_legacy.as_ref()) + { + Ok(()) => {} + Err(_) => chain_driver_a + .assert_eventual_wallet_amount(&user_a.address(), &balance_a2.as_ref())?, + } let sequence = { let send_packet_event = events @@ -206,9 +221,22 @@ impl BinaryChannelTest for PayPacketFeeAsyncTest { )?; let total_sent_2 = receive_fee_2 + ack_fee_2 + timeout_fee_2; - let balance_a3 = balance_a2 - total_sent_2; - chain_driver_a.assert_eventual_wallet_amount(&user_a.address(), &balance_a3.as_ref())?; + // Before ibc-go v8.1.0 the amount escrowed for ICS29 fees is the sum of recv, ack and timeout fees + let balance_a3_legacy = balance_a2_legacy - total_sent_2; + + // From ibc-go v8.1+ the amount escrowed for ICS29 fees is the highest value between recv + ack fees or timeout fee + let balance_a3 = balance_a2 - max(receive_fee_2 + ack_fee_2, timeout_fee_2); + + // This double check is required because ibc-go versions previous to v8.1.0 escrow recv, ack and timeout + // fees for ICS29. From ibc-go v8.1+ only the highest value between recv+ack and timeout is escrowed. + match chain_driver_a + .assert_eventual_wallet_amount(&user_a.address(), &balance_a3_legacy.as_ref()) + { + Ok(()) => {} + Err(_) => chain_driver_a + .assert_eventual_wallet_amount(&user_a.address(), &balance_a3.as_ref())?, + } { let event = events2 @@ -257,7 +285,8 @@ impl BinaryChannelTest for PayPacketFeeAsyncTest { chain_driver_a.assert_eventual_wallet_amount( &user_a.address(), - &(balance_a3 + timeout_fee + timeout_fee_2).as_ref(), + &(balance_a1 - send_amount - receive_fee - receive_fee_2 - ack_fee - ack_fee_2) + .as_ref(), )?; chain_driver_a.assert_eventual_wallet_amount( diff --git a/tools/integration-test/src/tests/fee/register_payee.rs b/tools/integration-test/src/tests/fee/register_payee.rs index 64c994c3a4..0187f08cbc 100644 --- a/tools/integration-test/src/tests/fee/register_payee.rs +++ b/tools/integration-test/src/tests/fee/register_payee.rs @@ -106,7 +106,7 @@ impl BinaryChannelTest for ForwardRelayerTest { let user_a = wallets_a.user1(); let user_b = wallets_b.user1(); - let balance_a1 = chain_driver_a.query_balance(&user_a.address(), &denom_a)?; + let balance_a = chain_driver_a.query_balance(&user_a.address(), &denom_a)?; let relayer_balance_a = chain_driver_a.query_balance(&relayer_a.address(), &denom_a)?; let payee_balance_a = chain_driver_a.query_balance(&payee_a.address(), &denom_a)?; @@ -116,10 +116,6 @@ impl BinaryChannelTest for ForwardRelayerTest { let ack_fee = random_u128_range(200, 300); let timeout_fee = random_u128_range(100, 200); - let total_sent = send_amount + receive_fee + ack_fee + timeout_fee; - - let balance_a2 = balance_a1 - total_sent; - chain_driver_a.ibc_token_transfer_with_fee( &port_a, &channel_id_a, @@ -138,8 +134,6 @@ impl BinaryChannelTest for ForwardRelayerTest { &denom_a, )?; - chain_driver_a.assert_eventual_wallet_amount(&user_a.address(), &balance_a2.as_ref())?; - chain_driver_b.assert_eventual_wallet_amount( &user_b.address(), &denom_b.with_amount(send_amount).as_ref(), @@ -147,7 +141,7 @@ impl BinaryChannelTest for ForwardRelayerTest { chain_driver_a.assert_eventual_wallet_amount( &user_a.address(), - &(balance_a2 + timeout_fee).as_ref(), + &(balance_a - send_amount - receive_fee - ack_fee).as_ref(), )?; chain_driver_a.assert_eventual_wallet_amount( diff --git a/tools/integration-test/src/tests/fee/timeout_fee.rs b/tools/integration-test/src/tests/fee/timeout_fee.rs index 4d69e8fe1a..3f749e0dfb 100644 --- a/tools/integration-test/src/tests/fee/timeout_fee.rs +++ b/tools/integration-test/src/tests/fee/timeout_fee.rs @@ -72,10 +72,6 @@ impl BinaryChannelTest for TimeoutFeeTest { Duration::from_secs(5), )?; - info!("Expect user A's balance after transfer: {}", balance_a2); - - chain_driver_a.assert_eventual_wallet_amount(&user_a.address(), &balance_a2.as_ref())?; - // Sleep to wait for IBC packet to timeout before start relaying thread::sleep(Duration::from_secs(6)); diff --git a/tools/integration-test/src/tests/fee_grant.rs b/tools/integration-test/src/tests/fee_grant.rs index d181a4221e..77cf2354ed 100644 --- a/tools/integration-test/src/tests/fee_grant.rs +++ b/tools/integration-test/src/tests/fee_grant.rs @@ -81,8 +81,8 @@ impl BinaryChannelTest for FeeGrantTest { .ok_or_else(|| eyre!("chain configuration is empty"))? { ChainConfig::CosmosSdk(chain_config) => chain_config.gas_price.denom.clone(), - ChainConfig::Penumbra(chain_config) => todo!(), - ChainConfig::Astria(chain_config) => todo!(), + ChainConfig::Penumbra(_chain_config) => todo!(), + ChainConfig::Astria(_chain_config) => todo!(), }; let gas_denom: MonoTagged = MonoTagged::new(Denom::Base(gas_denom_str)); @@ -108,8 +108,8 @@ impl BinaryChannelTest for FeeGrantTest { ChainConfig::CosmosSdk(c) => { c.fee_granter = Some("user2".to_owned()); } - ChainConfig::Penumbra(c) => todo!(), - ChainConfig::Astria(c) => todo!(), + ChainConfig::Penumbra(_c) => todo!(), + ChainConfig::Astria(_c) => todo!(), } } }); @@ -228,8 +228,8 @@ impl BinaryChannelTest for NoFeeGrantTest { .ok_or_else(|| eyre!("chain configuration is empty"))? { ChainConfig::CosmosSdk(chain_config) => chain_config.gas_price.denom.clone(), - ChainConfig::Penumbra(chain_config) => todo!(), - ChainConfig::Astria(chain_config) => todo!(), + ChainConfig::Penumbra(_chain_config) => todo!(), + ChainConfig::Astria(_chain_config) => todo!(), }; let gas_denom: MonoTagged = MonoTagged::new(Denom::Base(gas_denom_str)); diff --git a/tools/integration-test/src/tests/forward/forward_hop_transfer.rs b/tools/integration-test/src/tests/forward/forward_hop_transfer.rs index 3ae0337aba..931ceddd23 100644 --- a/tools/integration-test/src/tests/forward/forward_hop_transfer.rs +++ b/tools/integration-test/src/tests/forward/forward_hop_transfer.rs @@ -6,7 +6,7 @@ //! - The `AtomicIbcForwardHopTransferTest` tests the case where the //! hop between chain C and D fails. In this case the sender is still refunded. -use ibc_relayer::config::{self, Config, ModeConfig}; +use ibc_relayer::config::{self, ModeConfig}; use ibc_test_framework::prelude::*; use crate::tests::forward::memo::HopMemoField; diff --git a/tools/integration-test/src/tests/forward/forward_transfer.rs b/tools/integration-test/src/tests/forward/forward_transfer.rs index 4830ee43b6..65827fc0d6 100644 --- a/tools/integration-test/src/tests/forward/forward_transfer.rs +++ b/tools/integration-test/src/tests/forward/forward_transfer.rs @@ -18,7 +18,7 @@ //! the memo fields are misspelled: //! - Misspelled receiver address, port or channel: The intermediary chain will refund the sender. -use ibc_relayer::config::{self, Config, ModeConfig}; +use ibc_relayer::config::{self, ModeConfig}; use ibc_test_framework::prelude::*; use crate::tests::forward::memo::{ diff --git a/tools/integration-test/src/tests/ica.rs b/tools/integration-test/src/tests/ica.rs index 25efbcada0..11ac0ff0ba 100644 --- a/tools/integration-test/src/tests/ica.rs +++ b/tools/integration-test/src/tests/ica.rs @@ -1,14 +1,10 @@ use std::collections::HashMap; use std::str::FromStr; -use ibc_relayer::chain::handle::ChainHandle; -use ibc_relayer::chain::tracking::TrackedMsgs; use ibc_relayer::config::{ filter::{ChannelFilters, ChannelPolicy, FilterPattern}, ChainConfig, PacketFilter, }; -use ibc_relayer::event::IbcEventWithHeight; -use ibc_relayer_types::applications::ics27_ica::msgs::send_tx::MsgSendTx; use ibc_relayer_types::applications::ics27_ica::packet_data::InterchainAccountPacketData; use ibc_relayer_types::applications::{ ics27_ica::cosmos_tx::CosmosTx, @@ -21,11 +17,11 @@ use ibc_relayer_types::timestamp::Timestamp; use ibc_relayer_types::tx_msg::Msg; use ibc_test_framework::chain::ext::ica::register_interchain_account; -use ibc_test_framework::ibc::denom::Denom; use ibc_test_framework::prelude::*; use ibc_test_framework::relayer::channel::{ assert_eventually_channel_closed, assert_eventually_channel_established, query_channel_end, }; +use ibc_test_framework::util::interchain_security::interchain_send_tx; #[test] fn test_ica_filter_default() -> Result<(), Error> { @@ -189,6 +185,7 @@ impl BinaryConnectionTest for IcaFilterTestAllow { Ok(()) } } + pub struct IcaFilterTestDeny; impl TestOverrides for IcaFilterTestDeny { @@ -377,26 +374,3 @@ impl BinaryConnectionTest for ICACloseChannelTest { }) } } - -fn interchain_send_tx( - chain: &ChainA, - from: &Signer, - connection: &ConnectionId, - msg: InterchainAccountPacketData, - relative_timeout: Timestamp, -) -> Result, Error> { - let msg = MsgSendTx { - owner: from.clone(), - connection_id: connection.clone(), - packet_data: msg, - relative_timeout, - }; - - let msg_any = msg.to_any(); - - let tm = TrackedMsgs::new_static(vec![msg_any], "SendTx"); - - chain - .send_messages_and_wait_commit(tm) - .map_err(Error::relayer) -} diff --git a/tools/integration-test/src/tests/interchain_security/ica_ordered_channel.rs b/tools/integration-test/src/tests/interchain_security/ica_ordered_channel.rs new file mode 100644 index 0000000000..56a0075ff3 --- /dev/null +++ b/tools/integration-test/src/tests/interchain_security/ica_ordered_channel.rs @@ -0,0 +1,226 @@ +//! Verifies the behaviour of ordered channels with Interchain Accounts. +//! +//! In order to ensure that ordered channels correctly clear packets on ICA +//! channels, this test sends some sequential packets with the supervisor enabled, +//! sends the next packet *without* the supervisor enabled, then sends additional +//! packets with the supervisor enabled again. The pending packet that was sent +//! without the supervisor enabled should be relayed in order along with the +//! other packets, as expected of ordered channel behaviour. + +use std::str::FromStr; + +use ibc_relayer_types::applications::ics27_ica::cosmos_tx::CosmosTx; +use ibc_relayer_types::applications::ics27_ica::packet_data::InterchainAccountPacketData; +use ibc_relayer_types::applications::transfer::msgs::send::MsgSend; +use ibc_relayer_types::applications::transfer::{Amount, Coin}; +use ibc_relayer_types::bigint::U256; +use ibc_relayer_types::signer::Signer; +use ibc_relayer_types::timestamp::Timestamp; +use ibc_relayer_types::tx_msg::Msg; +use ibc_test_framework::chain::ext::ica::register_interchain_account; +use ibc_test_framework::framework::binary::channel::run_binary_interchain_security_channel_test; +use ibc_test_framework::prelude::*; +use ibc_test_framework::relayer::channel::assert_eventually_channel_established; +use ibc_test_framework::relayer::channel::query_channel_end; +use ibc_test_framework::util::interchain_security::{ + interchain_send_tx, update_genesis_for_consumer_chain, update_relayer_config_for_consumer_chain, +}; + +#[test] +fn test_ica_ordered_channel() -> Result<(), Error> { + run_binary_interchain_security_channel_test(&IcaOrderedChannelTest) +} + +struct IcaOrderedChannelTest; + +impl TestOverrides for IcaOrderedChannelTest { + fn modify_genesis_file(&self, genesis: &mut serde_json::Value) -> Result<(), Error> { + use serde_json::Value; + + // Allow MsgSend messages over ICA + let allow_messages = genesis + .get_mut("app_state") + .and_then(|app_state| app_state.get_mut("interchainaccounts")) + .and_then(|ica| ica.get_mut("host_genesis_state")) + .and_then(|state| state.get_mut("params")) + .and_then(|params| params.get_mut("allow_messages")) + .and_then(|allow_messages| allow_messages.as_array_mut()); + + if let Some(allow_messages) = allow_messages { + allow_messages.push(Value::String("/cosmos.bank.v1beta1.MsgSend".to_string())); + } else { + return Err(Error::generic(eyre!("failed to update genesis file"))); + } + + update_genesis_for_consumer_chain(genesis)?; + + Ok(()) + } + + fn modify_relayer_config(&self, config: &mut Config) { + config.mode.clients.misbehaviour = false; + + config.mode.channels.enabled = true; + + // Disable packet clearing so that packets sent without the supervisor + // enabled enter a pending state. + config.mode.packets.enabled = true; + config.mode.packets.clear_on_start = false; + config.mode.packets.clear_interval = 0; + // This is needed for ordered channels + config.mode.packets.force_disable_clear_on_start = true; + + update_relayer_config_for_consumer_chain(config); + } + + fn should_spawn_supervisor(&self) -> bool { + false + } +} + +impl BinaryChannelTest for IcaOrderedChannelTest { + fn run( + &self, + _config: &TestConfig, + relayer: RelayerDriver, + chains: ConnectedChains, + channel: ConnectedChannel, + ) -> Result<(), Error> { + let connection_b_to_a = channel.connection.clone().flip(); + let (wallet, channel_id, port_id) = + register_interchain_account(&chains.node_b, chains.handle_b(), &connection_b_to_a)?; + + relayer.with_supervisor(|| { + // Check that the corresponding ICA channel is eventually established. + let _counterparty_channel_id = assert_eventually_channel_established( + chains.handle_b(), + chains.handle_a(), + &channel_id.as_ref(), + &port_id.as_ref(), + )?; + + Ok(()) + })?; + + // Assert that the channel returned by `register_interchain_account` is an ordered channel + let channel_end = + query_channel_end(chains.handle_b(), &channel_id.as_ref(), &port_id.as_ref())?; + + assert_eq!(channel_end.value().ordering(), &Ordering::Ordered); + + // Query the controller chain for the address of the ICA wallet on the host chain. + let ica_address = chains.node_b.chain_driver().query_interchain_account( + &wallet.address(), + &channel.connection.connection_id_b.as_ref(), + )?; + + let stake_denom: MonoTagged = MonoTagged::new(Denom::base("stake")); + + chains.node_a.chain_driver().assert_eventual_wallet_amount( + &ica_address.as_ref(), + &stake_denom.with_amount(0u64).as_ref(), + )?; + + // Send funds to the interchain account. + let ica_fund = 42000u64; + + chains.node_a.chain_driver().local_transfer_token( + &chains.node_a.wallets().user1(), + &ica_address.as_ref(), + &stake_denom.with_amount(ica_fund).as_ref(), + )?; + + chains.node_a.chain_driver().assert_eventual_wallet_amount( + &ica_address.as_ref(), + &stake_denom.with_amount(ica_fund).as_ref(), + )?; + + let amount = 1200; + + let msg = MsgSend { + from_address: ica_address.to_string(), + to_address: chains.node_a.wallets().user2().address().to_string(), + amount: vec![Coin { + denom: stake_denom.to_string(), + amount: Amount(U256::from(amount)), + }], + }; + + let raw_msg = msg.to_any(); + + let cosmos_tx = CosmosTx { + messages: vec![raw_msg], + }; + + let raw_cosmos_tx = cosmos_tx.to_any(); + + let interchain_account_packet_data = InterchainAccountPacketData::new(raw_cosmos_tx.value); + + let signer = Signer::from_str(&wallet.address().to_string()).unwrap(); + + let user2_balance = chains.node_a.chain_driver().query_balance( + &chains.node_a.wallets().user2().address(), + &stake_denom.as_ref(), + )?; + + relayer.with_supervisor(|| { + let ica_events = interchain_send_tx( + chains.handle_b(), + &signer, + &channel.connection.connection_id_b.0, + interchain_account_packet_data.clone(), + Timestamp::from_nanoseconds(120000000000).unwrap(), + )?; + + // Check that the ICA account's balance has been debited the sent amount. + chains.node_a.chain_driver().assert_eventual_wallet_amount( + &ica_address.as_ref(), + &stake_denom.with_amount(ica_fund - amount).as_ref(), + )?; + + chains.node_a.chain_driver().assert_eventual_wallet_amount( + &chains.node_a.wallets().user2().address(), + &(user2_balance.clone() + amount).as_ref(), + )?; + + info!("First ICA transfer made with supervisor: {ica_events:#?}"); + + Ok(()) + })?; + + let ica_events = interchain_send_tx( + chains.handle_b(), + &signer, + &channel.connection.connection_id_b.0, + interchain_account_packet_data.clone(), + Timestamp::from_nanoseconds(120000000000).unwrap(), + )?; + + info!("Second ICA transfer made without supervisor: {ica_events:#?}"); + + relayer.with_supervisor(|| { + let ica_events = interchain_send_tx( + chains.handle_b(), + &signer, + &channel.connection.connection_id_b.0, + interchain_account_packet_data, + Timestamp::from_nanoseconds(120000000000).unwrap(), + )?; + + // Check that the ICA account's balance has been debited the sent amount. + chains.node_a.chain_driver().assert_eventual_wallet_amount( + &ica_address.as_ref(), + &stake_denom.with_amount(ica_fund - 3 * amount).as_ref(), + )?; + + info!("Third ICA transfer made with supervisor: {ica_events:#?}"); + + chains.node_a.chain_driver().assert_eventual_wallet_amount( + &chains.node_a.wallets().user2().address(), + &(user2_balance + (3 * amount)).as_ref(), + )?; + + Ok(()) + }) + } +} diff --git a/tools/integration-test/src/tests/interchain_security/ica_transfer.rs b/tools/integration-test/src/tests/interchain_security/ica_transfer.rs index 5d6cd4ef36..b2528952bb 100644 --- a/tools/integration-test/src/tests/interchain_security/ica_transfer.rs +++ b/tools/integration-test/src/tests/interchain_security/ica_transfer.rs @@ -3,12 +3,9 @@ //! the second chain a Consumer chain. use std::str::FromStr; -use ibc_relayer::{chain::tracking::TrackedMsgs, event::IbcEventWithHeight}; use ibc_relayer_types::{ applications::{ - ics27_ica::{ - cosmos_tx::CosmosTx, msgs::send_tx::MsgSendTx, packet_data::InterchainAccountPacketData, - }, + ics27_ica::{cosmos_tx::CosmosTx, packet_data::InterchainAccountPacketData}, transfer::{msgs::send::MsgSend, Amount, Coin}, }, bigint::U256, @@ -22,7 +19,8 @@ use ibc_test_framework::{ prelude::*, relayer::channel::assert_eventually_channel_established, util::interchain_security::{ - update_genesis_for_consumer_chain, update_relayer_config_for_consumer_chain, + interchain_send_tx, update_genesis_for_consumer_chain, + update_relayer_config_for_consumer_chain, }, }; @@ -155,29 +153,7 @@ impl BinaryChannelTest for InterchainSecurityIcaTransferTest { &ica_address.as_ref(), &stake_denom.with_amount(ica_fund - amount).as_ref(), )?; + Ok(()) } } - -fn interchain_send_tx( - chain: &ChainA, - from: &Signer, - connection: &ConnectionId, - msg: InterchainAccountPacketData, - relative_timeout: Timestamp, -) -> Result, Error> { - let msg = MsgSendTx { - owner: from.clone(), - connection_id: connection.clone(), - packet_data: msg, - relative_timeout, - }; - - let msg_any = msg.to_any(); - - let tm = TrackedMsgs::new_static(vec![msg_any], "SendTx"); - - chain - .send_messages_and_wait_commit(tm) - .map_err(Error::relayer) -} diff --git a/tools/integration-test/src/tests/interchain_security/mod.rs b/tools/integration-test/src/tests/interchain_security/mod.rs index a2acc74d92..0772d733db 100644 --- a/tools/integration-test/src/tests/interchain_security/mod.rs +++ b/tools/integration-test/src/tests/interchain_security/mod.rs @@ -1,4 +1,6 @@ #[cfg(any(doc, feature = "ica"))] +pub mod ica_ordered_channel; +#[cfg(any(doc, feature = "ica"))] pub mod ica_transfer; #[cfg(any(doc, feature = "ics31"))] pub mod icq; diff --git a/tools/integration-test/src/tests/manual/simulation.rs b/tools/integration-test/src/tests/manual/simulation.rs index 6ad421172a..27145634ad 100644 --- a/tools/integration-test/src/tests/manual/simulation.rs +++ b/tools/integration-test/src/tests/manual/simulation.rs @@ -36,6 +36,7 @@ impl TestOverrides for SimulationTest { ChainConfig::CosmosSdk(chain_config) => { chain_config.max_msg_num = MaxMsgNum::new(MAX_MSGS).unwrap(); } + ChainConfig::Penumbra(_) | ChainConfig::Astria(_) => todo!(), } } } diff --git a/tools/integration-test/src/tests/memo.rs b/tools/integration-test/src/tests/memo.rs index 6d2b1ad2e6..446844e053 100644 --- a/tools/integration-test/src/tests/memo.rs +++ b/tools/integration-test/src/tests/memo.rs @@ -4,6 +4,7 @@ //! You can find a more thorough walkthrough of this test at //! `tools/test-framework/src/docs/walkthroughs/memo.rs`. +const OVERWRITE_MEMO: &str = "Overwritten memo"; use ibc_relayer::config::{types::Memo, ChainConfig, Config}; use ibc_test_framework::{ ibc::denom::derive_ibc_denom, @@ -19,6 +20,13 @@ fn test_memo() -> Result<(), Error> { run_binary_channel_test(&test) } +#[test] +fn test_memo_overwrite() -> Result<(), Error> { + let memo = Memo::new(random_string()).unwrap(); + let test = MemoTest { memo }; + run_binary_channel_test(&test) +} + pub struct MemoTest { memo: Memo, } @@ -84,6 +92,72 @@ impl BinaryChannelTest for MemoTest { } } +pub struct MemoOverwriteTest { + memo: Memo, +} + +impl TestOverrides for MemoOverwriteTest { + fn modify_relayer_config(&self, config: &mut Config) { + for chain in config.chains.iter_mut() { + match chain { + ChainConfig::CosmosSdk(chain_config) => { + chain_config.memo_prefix = self.memo.clone(); + chain_config.memo_overwrite = Some(Memo::new(OVERWRITE_MEMO).unwrap()) + } + ChainConfig::Astria(_) => todo!(), + ChainConfig::Penumbra(_) => todo!(), + } + } + } +} + +impl BinaryChannelTest for MemoOverwriteTest { + fn run( + &self, + _config: &TestConfig, + _relayer: RelayerDriver, + chains: ConnectedChains, + channel: ConnectedChannel, + ) -> Result<(), Error> { + info!( + "testing IBC transfer with memo configured: \"{}\"", + self.memo + ); + + let denom_a = chains.node_a.denom(); + + let a_to_b_amount = random_u128_range(1000, 5000); + + chains.node_a.chain_driver().ibc_transfer_token( + &channel.port_a.as_ref(), + &channel.channel_id_a.as_ref(), + &chains.node_a.wallets().user1(), + &chains.node_b.wallets().user1().address(), + &denom_a.with_amount(a_to_b_amount).as_ref(), + )?; + + let denom_b = derive_ibc_denom( + &channel.port_b.as_ref(), + &channel.channel_id_b.as_ref(), + &denom_a, + )?; + + chains.node_b.chain_driver().assert_eventual_wallet_amount( + &chains.node_b.wallets().user1().address(), + &denom_b.with_amount(a_to_b_amount).as_ref(), + )?; + + let tx_info = chains + .node_b + .chain_driver() + .query_recipient_transactions(&chains.node_b.wallets().user1().address())?; + + assert_tx_memo_equals(&tx_info, OVERWRITE_MEMO)?; + + Ok(()) + } +} + fn assert_tx_memo_equals(tx_info: &json::Value, expected_memo: &str) -> Result<(), Error> { debug!("comparing memo field from json value {}", tx_info); diff --git a/tools/integration-test/src/tests/mod.rs b/tools/integration-test/src/tests/mod.rs index 373cf4d276..b6bff318ab 100644 --- a/tools/integration-test/src/tests/mod.rs +++ b/tools/integration-test/src/tests/mod.rs @@ -22,6 +22,8 @@ pub mod ics20_filter; pub mod memo; pub mod python; pub mod query_packet; +#[cfg(not(feature = "celestia"))] +pub mod sequence_filter; pub mod supervisor; pub mod tendermint; #[cfg(not(feature = "celestia"))] diff --git a/tools/integration-test/src/tests/ordered_channel_clear.rs b/tools/integration-test/src/tests/ordered_channel_clear.rs index 815aa2700d..9a7de5ceb8 100644 --- a/tools/integration-test/src/tests/ordered_channel_clear.rs +++ b/tools/integration-test/src/tests/ordered_channel_clear.rs @@ -56,6 +56,7 @@ impl TestOverrides for OrderedChannelClearTest { ChainConfig::CosmosSdk(chain_config) => { chain_config.sequential_batch_tx = self.sequential_batch_tx; } + ChainConfig::Astria(_) | ChainConfig::Penumbra(_) => todo!(), } } @@ -64,6 +65,7 @@ impl TestOverrides for OrderedChannelClearTest { ChainConfig::CosmosSdk(chain_config) => { chain_config.sequential_batch_tx = self.sequential_batch_tx; } + ChainConfig::Astria(_) | ChainConfig::Penumbra(_) => todo!(), } } @@ -123,6 +125,7 @@ impl BinaryChannelTest for OrderedChannelClearTest { src_channel_id: channel.channel_id_a.clone().into_value(), max_memo_size: packet_config.ics20_max_memo_size, max_receiver_size: packet_config.ics20_max_receiver_size, + exclude_src_sequences: vec![], }; let chain_a_link = Link::new_from_opts( @@ -138,6 +141,7 @@ impl BinaryChannelTest for OrderedChannelClearTest { src_channel_id: channel.channel_id_b.clone().into_value(), max_memo_size: packet_config.ics20_max_memo_size, max_receiver_size: packet_config.ics20_max_receiver_size, + exclude_src_sequences: vec![], }; let chain_b_link = Link::new_from_opts( @@ -198,6 +202,7 @@ impl TestOverrides for OrderedChannelClearEqualCLITest { chain_config.sequential_batch_tx = true; chain_config.max_msg_num = MaxMsgNum::new(3).unwrap(); } + ChainConfig::Astria(_) | ChainConfig::Penumbra(_) => todo!(), } } @@ -207,6 +212,7 @@ impl TestOverrides for OrderedChannelClearEqualCLITest { chain_config.sequential_batch_tx = true; chain_config.max_msg_num = MaxMsgNum::new(3).unwrap(); } + ChainConfig::Astria(_) | ChainConfig::Penumbra(_) => todo!(), } } @@ -274,6 +280,7 @@ impl BinaryChannelTest for OrderedChannelClearEqualCLITest { src_channel_id: channel.channel_id_a.into_value(), max_memo_size: packet_config.ics20_max_memo_size, max_receiver_size: packet_config.ics20_max_receiver_size, + exclude_src_sequences: vec![], }; let chain_a_link = Link::new_from_opts( diff --git a/tools/integration-test/src/tests/query_packet.rs b/tools/integration-test/src/tests/query_packet.rs index 582e8d9706..24d8e76feb 100644 --- a/tools/integration-test/src/tests/query_packet.rs +++ b/tools/integration-test/src/tests/query_packet.rs @@ -64,7 +64,17 @@ impl BinaryChannelTest for QueryPacketPendingTest { src_channel_id: channel.channel_id_a.clone().into_value(), max_memo_size: packet_config.ics20_max_memo_size, max_receiver_size: packet_config.ics20_max_receiver_size, + exclude_src_sequences: vec![], }; + + let rev_opts = LinkParameters { + src_port_id: channel.port_b.clone().into_value(), + src_channel_id: channel.channel_id_b.clone().into_value(), + max_memo_size: packet_config.ics20_max_memo_size, + max_receiver_size: packet_config.ics20_max_receiver_size, + exclude_src_sequences: vec![], + }; + let link = Link::new_from_opts( chains.handle_a().clone(), chains.handle_b().clone(), @@ -95,8 +105,16 @@ impl BinaryChannelTest for QueryPacketPendingTest { assert_eq!(summary.unreceived_acks, [1.into()]); // Acknowledge the packet on the source chain - let link = link.reverse(false, false)?; - link.relay_ack_packet_messages(vec![])?; + + let rev_link = Link::new_from_opts( + chains.handle_b().clone(), + chains.handle_a().clone(), + rev_opts, + false, + false, + )?; + + rev_link.relay_ack_packet_messages(vec![])?; let summary = pending_packet_summary(chains.handle_a(), chains.handle_b(), channel_end.value())?; diff --git a/tools/integration-test/src/tests/sequence_filter.rs b/tools/integration-test/src/tests/sequence_filter.rs new file mode 100644 index 0000000000..f4a5a0ad33 --- /dev/null +++ b/tools/integration-test/src/tests/sequence_filter.rs @@ -0,0 +1,575 @@ +//! This tests different scenarios for the packet sequence filter. +//! The purpose of this filter is to only filter out packets when clearing, +//! standard relaying should not be affected by this configuration. +//! +//! `FilterClearOnStartTest` tests that the packets sequences configured in +//! `excluded_sequences` are not relayed when clearing packet on start. +//! +//! `FilterClearIntervalTest` tests that the packet sequences configured in +//! `excluded_sequences` are not relayed when the clear interval is triggered. +//! +//! `ClearNoFilterTest` tests that packets are correctly cleared if there is no +//! packet sequence configured in `excluded_sequences`. +//! +//! `StandardRelayingNoFilterTest` tests that even if a packet sequence is +//! configured in the `excluded_sequences` it will be relayed by the running +//! instance. + +use std::collections::BTreeMap; + +use ibc_relayer::config::ChainConfig; +use ibc_test_framework::{ + prelude::*, + relayer::channel::{assert_eventually_channel_established, init_channel}, +}; + +#[test] +fn test_filter_clear_on_start() -> Result<(), Error> { + run_binary_channel_test(&FilterClearOnStartTest) +} + +#[test] +fn test_filter_clear_interval() -> Result<(), Error> { + run_binary_channel_test(&FilterClearIntervalTest) +} + +#[test] +fn test_clear_no_filter() -> Result<(), Error> { + run_binary_channel_test(&ClearNoFilterTest) +} + +#[test] +fn test_no_filter_standard_relaying() -> Result<(), Error> { + run_binary_channel_test(&StandardRelayingNoFilterTest) +} + +pub struct FilterClearOnStartTest; + +impl TestOverrides for FilterClearOnStartTest { + fn modify_relayer_config(&self, config: &mut Config) { + let mut excluded_sequences = BTreeMap::new(); + excluded_sequences.insert(ChannelId::new(2), vec![2.into()]); + let chain_a = &mut config.chains[0]; + match chain_a { + ChainConfig::CosmosSdk(chain_config) => { + chain_config.excluded_sequences = excluded_sequences; + } + ChainConfig::Astria(_) => todo!(), + ChainConfig::Penumbra(_) => todo!(), + } + config.mode.channels.enabled = true; + + config.mode.packets.clear_on_start = true; + config.mode.packets.clear_interval = 0; + + config.mode.clients.misbehaviour = false; + } + + fn should_spawn_supervisor(&self) -> bool { + false + } +} + +impl BinaryChannelTest for FilterClearOnStartTest { + fn run( + &self, + _config: &TestConfig, + relayer: RelayerDriver, + chains: ConnectedChains, + channels: ConnectedChannel, + ) -> Result<(), Error> { + run_sequence_filter_test(relayer, chains, channels) + } +} + +pub struct FilterClearIntervalTest; + +impl TestOverrides for FilterClearIntervalTest { + fn modify_relayer_config(&self, config: &mut Config) { + let mut excluded_sequences = BTreeMap::new(); + excluded_sequences.insert(ChannelId::new(2), vec![2.into()]); + let chain_a = &mut config.chains[0]; + match chain_a { + ChainConfig::CosmosSdk(chain_config) => { + chain_config.excluded_sequences = excluded_sequences; + } + ChainConfig::Astria(_) => todo!(), + ChainConfig::Penumbra(_) => todo!(), + } + config.mode.channels.enabled = true; + + config.mode.packets.clear_on_start = false; + config.mode.packets.clear_interval = 10; + + config.mode.clients.misbehaviour = false; + } + + fn should_spawn_supervisor(&self) -> bool { + false + } +} + +impl BinaryChannelTest for FilterClearIntervalTest { + fn run( + &self, + _config: &TestConfig, + relayer: RelayerDriver, + chains: ConnectedChains, + channels: ConnectedChannel, + ) -> Result<(), Error> { + run_sequence_filter_test(relayer, chains, channels) + } +} + +pub struct ClearNoFilterTest; + +impl TestOverrides for ClearNoFilterTest { + fn modify_relayer_config(&self, config: &mut Config) { + config.mode.channels.enabled = true; + + config.mode.packets.clear_on_start = true; + config.mode.packets.clear_interval = 0; + + config.mode.clients.misbehaviour = false; + } + + fn should_spawn_supervisor(&self) -> bool { + false + } +} + +impl BinaryChannelTest for ClearNoFilterTest { + fn run( + &self, + _config: &TestConfig, + relayer: RelayerDriver, + chains: ConnectedChains, + channels: ConnectedChannel, + ) -> Result<(), Error> { + let denom_a = chains.node_a.denom(); + let denom_a_to_b = derive_ibc_denom( + &channels.port_b.as_ref(), + &channels.channel_id_b.as_ref(), + &denom_a, + )?; + let denom_b = chains.node_b.denom(); + let denom_b_to_a = derive_ibc_denom( + &channels.port_a.as_ref(), + &channels.channel_id_a.as_ref(), + &denom_b, + )?; + + let wallet_a = chains.node_a.wallets().user1().cloned(); + let wallet_b = chains.node_b.wallets().user1().cloned(); + + let a_to_b_amount = 12345u64; + let b_to_a_amount = 54321u64; + + let balance_a = chains + .node_a + .chain_driver() + .query_balance(&wallet_a.address(), &denom_a)?; + + let balance_b = chains + .node_b + .chain_driver() + .query_balance(&wallet_b.address(), &denom_b)?; + + // Create a pending transfer from A to B with sequence 1 + chains.node_a.chain_driver().ibc_transfer_token( + &channels.port_a.as_ref(), + &channels.channel_id_a.as_ref(), + &wallet_a.as_ref(), + &wallet_b.address(), + &denom_a.with_amount(a_to_b_amount).as_ref(), + )?; + + // Create a pending transfer from A to B with sequence 2 + chains.node_a.chain_driver().ibc_transfer_token( + &channels.port_a.as_ref(), + &channels.channel_id_a.as_ref(), + &wallet_a.as_ref(), + &wallet_b.address(), + &denom_a.with_amount(a_to_b_amount).as_ref(), + )?; + + // Create a pending transfer from B to A with sequence 1 + chains.node_b.chain_driver().ibc_transfer_token( + &channels.port_b.as_ref(), + &channels.channel_id_b.as_ref(), + &wallet_b.as_ref(), + &wallet_a.address(), + &denom_b.with_amount(b_to_a_amount).as_ref(), + )?; + + // Create a pending transfer from B to A with sequence 2 + chains.node_b.chain_driver().ibc_transfer_token( + &channels.port_b.as_ref(), + &channels.channel_id_b.as_ref(), + &wallet_b.as_ref(), + &wallet_a.address(), + &denom_b.with_amount(b_to_a_amount).as_ref(), + )?; + + relayer.with_supervisor(|| { + info!("Assert that the send from A escrowed tokens for both transfers"); + + chains.node_a.chain_driver().assert_eventual_wallet_amount( + &wallet_a.address(), + &(balance_a - 2 * a_to_b_amount).as_ref(), + )?; + + info!("Assert that only the first transfer A to B was cleared"); + + chains.node_b.chain_driver().assert_eventual_wallet_amount( + &wallet_b.address(), + &denom_a_to_b.with_amount(2 * a_to_b_amount).as_ref(), + )?; + info!("Assert that the sender from B escrowed tokens for both transfers"); + + chains.node_b.chain_driver().assert_eventual_wallet_amount( + &wallet_b.address(), + &(balance_b - 2 * b_to_a_amount).as_ref(), + )?; + + info!("Assert that both transfers from B to A were cleared"); + + chains.node_a.chain_driver().assert_eventual_wallet_amount( + &wallet_a.address(), + &denom_b_to_a.with_amount(2 * b_to_a_amount).as_ref(), + )?; + Ok(()) + }) + } +} + +pub struct StandardRelayingNoFilterTest; + +impl TestOverrides for StandardRelayingNoFilterTest { + fn modify_relayer_config(&self, config: &mut Config) { + let mut excluded_sequences = BTreeMap::new(); + excluded_sequences.insert(ChannelId::new(2), vec![2.into()]); + let chain_a = &mut config.chains[0]; + match chain_a { + ChainConfig::CosmosSdk(chain_config) => { + chain_config.excluded_sequences = excluded_sequences; + } + ChainConfig::Astria(_) => todo!(), + ChainConfig::Penumbra(_) => todo!(), + } + config.mode.packets.clear_on_start = true; + config.mode.packets.clear_interval = 0; + } + + fn should_spawn_supervisor(&self) -> bool { + true + } +} + +impl BinaryChannelTest for StandardRelayingNoFilterTest { + fn run( + &self, + _config: &TestConfig, + _relayer: RelayerDriver, + chains: ConnectedChains, + channels: ConnectedChannel, + ) -> Result<(), Error> { + let denom_a = chains.node_a.denom(); + let denom_a_to_b = derive_ibc_denom( + &channels.port_b.as_ref(), + &channels.channel_id_b.as_ref(), + &denom_a, + )?; + let denom_b = chains.node_b.denom(); + let denom_b_to_a = derive_ibc_denom( + &channels.port_a.as_ref(), + &channels.channel_id_a.as_ref(), + &denom_b, + )?; + + let wallet_a = chains.node_a.wallets().user1().cloned(); + let wallet_b = chains.node_b.wallets().user1().cloned(); + + let a_to_b_amount = 12345u64; + let b_to_a_amount = 54321u64; + + let balance_a = chains + .node_a + .chain_driver() + .query_balance(&wallet_a.address(), &denom_a)?; + + let balance_b = chains + .node_b + .chain_driver() + .query_balance(&wallet_b.address(), &denom_b)?; + + // Create a pending transfer from A to B with sequence 1 + chains.node_a.chain_driver().ibc_transfer_token( + &channels.port_a.as_ref(), + &channels.channel_id_a.as_ref(), + &wallet_a.as_ref(), + &wallet_b.address(), + &denom_a.with_amount(a_to_b_amount).as_ref(), + )?; + + // Create a pending transfer from A to B with sequence 2 + chains.node_a.chain_driver().ibc_transfer_token( + &channels.port_a.as_ref(), + &channels.channel_id_a.as_ref(), + &wallet_a.as_ref(), + &wallet_b.address(), + &denom_a.with_amount(a_to_b_amount).as_ref(), + )?; + + // Create a pending transfer from B to A with sequence 1 + chains.node_b.chain_driver().ibc_transfer_token( + &channels.port_b.as_ref(), + &channels.channel_id_b.as_ref(), + &wallet_b.as_ref(), + &wallet_a.address(), + &denom_b.with_amount(b_to_a_amount).as_ref(), + )?; + + // Create a pending transfer from B to A with sequence 2 + chains.node_b.chain_driver().ibc_transfer_token( + &channels.port_b.as_ref(), + &channels.channel_id_b.as_ref(), + &wallet_b.as_ref(), + &wallet_a.address(), + &denom_b.with_amount(b_to_a_amount).as_ref(), + )?; + + info!("Assert that the send from A escrowed tokens for both transfers"); + + chains.node_a.chain_driver().assert_eventual_wallet_amount( + &wallet_a.address(), + &(balance_a - 2 * a_to_b_amount).as_ref(), + )?; + + info!("Assert that only the first transfer A to B was cleared"); + + chains.node_b.chain_driver().assert_eventual_wallet_amount( + &wallet_b.address(), + &denom_a_to_b.with_amount(2 * a_to_b_amount).as_ref(), + )?; + info!("Assert that the sender from B escrowed tokens for both transfers"); + + chains.node_b.chain_driver().assert_eventual_wallet_amount( + &wallet_b.address(), + &(balance_b - 2 * b_to_a_amount).as_ref(), + )?; + + info!("Assert that both transfers from B to A were cleared"); + + chains.node_a.chain_driver().assert_eventual_wallet_amount( + &wallet_a.address(), + &denom_b_to_a.with_amount(2 * b_to_a_amount).as_ref(), + )?; + Ok(()) + } +} + +fn run_sequence_filter_test( + relayer: RelayerDriver, + chains: ConnectedChains, + channels: ConnectedChannel, +) -> Result<(), Error> { + let (channel_id_a_2, channel_id_b_2, channel_b_2) = relayer.with_supervisor(|| { + // During test bootstrap channel padding initialises a channel with ID 0. + // Before creating the new channel with sequence filter, complete the handshake of + // the pad channel in order to insure that the retrieved channel IDs `channel_id_a_2` and + // `channel_id_b_2` are `channel-2` + let pad_channel_id = DualTagged::new(ChannelId::new(0)); + let _ = assert_eventually_channel_established( + chains.handle_b(), + chains.handle_a(), + &pad_channel_id.as_ref(), + &channels.port_b.as_ref(), + )?; + let (channel_id_b_2, channel_b_2) = init_channel( + chains.handle_a(), + chains.handle_b(), + &chains.client_id_a(), + &chains.client_id_b(), + &channels.connection.connection_id_a.as_ref(), + &channels.connection.connection_id_b.as_ref(), + &channels.port_a.as_ref(), + &channels.port_b.as_ref(), + )?; + + let channel_id_a_2 = assert_eventually_channel_established( + chains.handle_b(), + chains.handle_a(), + &channel_id_b_2.as_ref(), + &channels.port_b.as_ref(), + )?; + Ok((channel_id_a_2, channel_id_b_2, channel_b_2)) + })?; + + let denom_a = chains.node_a.denom(); + let denom_a_to_b_1 = derive_ibc_denom( + &channels.port_b.as_ref(), + &channels.channel_id_b.as_ref(), + &denom_a, + )?; + let denom_a_to_b_2 = derive_ibc_denom( + &channels.port_b.as_ref(), + &channel_id_b_2.as_ref(), + &denom_a, + )?; + let denom_b = chains.node_b.denom(); + let denom_b_to_a_1 = derive_ibc_denom( + &channels.port_a.as_ref(), + &channels.channel_id_a.as_ref(), + &denom_b, + )?; + let denom_b_to_a_2 = derive_ibc_denom( + &channels.port_a.as_ref(), + &channel_id_a_2.as_ref(), + &denom_b, + )?; + + let wallet_a_1 = chains.node_a.wallets().user1().cloned(); + let wallet_a_2 = chains.node_a.wallets().user2().cloned(); + let wallet_b_1 = chains.node_b.wallets().user1().cloned(); + let wallet_b_2 = chains.node_b.wallets().user2().cloned(); + + let a_to_b_amount = 12345u64; + let b_to_a_amount = 54321u64; + + let balance_a_1 = chains + .node_a + .chain_driver() + .query_balance(&wallet_a_1.address(), &denom_a)?; + + let balance_b_1 = chains + .node_b + .chain_driver() + .query_balance(&wallet_b_1.address(), &denom_b)?; + + let balance_a_2 = chains + .node_a + .chain_driver() + .query_balance(&wallet_a_2.address(), &denom_a)?; + + let balance_b_2 = chains + .node_b + .chain_driver() + .query_balance(&wallet_b_2.address(), &denom_b)?; + + // Double transfer from A to B on channel with filter + double_transfer( + chains.node_a.chain_driver(), + &channels.port_a.as_ref(), + &channels.channel_id_a.as_ref(), + &wallet_a_1.as_ref(), + &wallet_b_1.address(), + &denom_a.with_amount(a_to_b_amount).as_ref(), + )?; + + let port_b_2: DualTagged = + DualTagged::new(channel_b_2.a_side.port_id()); + let port_a_2: DualTagged = + DualTagged::new(channel_b_2.clone().flipped().a_side.port_id().clone()); + + // Double transfer from A to B on channel without filter + double_transfer( + chains.node_a.chain_driver(), + &port_a_2.as_ref(), + &channel_id_a_2.as_ref(), + &wallet_a_2.as_ref(), + &wallet_b_2.address(), + &denom_a.with_amount(a_to_b_amount).as_ref(), + )?; + + // Double transfer from B to A on channel with filter + double_transfer( + chains.node_b.chain_driver(), + &channels.port_b.as_ref(), + &channels.channel_id_b.as_ref(), + &wallet_b_1.as_ref(), + &wallet_a_1.address(), + &denom_b.with_amount(b_to_a_amount).as_ref(), + )?; + + // Double transfer from B to A on channel without filter + double_transfer( + chains.node_b.chain_driver(), + &port_b_2, + &channel_id_b_2.as_ref(), + &wallet_b_2.as_ref(), + &wallet_a_2.address(), + &denom_b.with_amount(b_to_a_amount).as_ref(), + )?; + + relayer.with_supervisor(|| { + info!("Assert that the send from A escrowed tokens for both transfers"); + + chains.node_a.chain_driver().assert_eventual_wallet_amount( + &wallet_a_1.address(), + &(balance_a_1 - 2 * a_to_b_amount).as_ref(), + )?; + + chains.node_a.chain_driver().assert_eventual_wallet_amount( + &wallet_a_2.address(), + &(balance_a_2 - 2 * a_to_b_amount).as_ref(), + )?; + + info!("Assert that only the first transfer A to B was cleared on channel with filter"); + + chains.node_b.chain_driver().assert_eventual_wallet_amount( + &wallet_b_2.address(), + &denom_a_to_b_2.with_amount(a_to_b_amount).as_ref(), + )?; + + info!("Assert that both transfer A to B were cleared on channel without filter"); + + chains.node_b.chain_driver().assert_eventual_wallet_amount( + &wallet_b_1.address(), + &denom_a_to_b_1.with_amount(2 * a_to_b_amount).as_ref(), + )?; + + info!("Assert that the sender from B escrowed tokens for both transfers on both channels"); + + chains.node_b.chain_driver().assert_eventual_wallet_amount( + &wallet_b_1.address(), + &(balance_b_1 - 2 * b_to_a_amount).as_ref(), + )?; + + chains.node_b.chain_driver().assert_eventual_wallet_amount( + &wallet_b_2.address(), + &(balance_b_2 - 2 * b_to_a_amount).as_ref(), + )?; + + info!("Assert that both transfers from B to A were cleared on both channels"); + + chains.node_a.chain_driver().assert_eventual_wallet_amount( + &wallet_a_1.address(), + &denom_b_to_a_1.with_amount(2 * b_to_a_amount).as_ref(), + )?; + + chains.node_a.chain_driver().assert_eventual_wallet_amount( + &wallet_a_2.address(), + &denom_b_to_a_2.with_amount(2 * b_to_a_amount).as_ref(), + )?; + + Ok(()) + }) +} + +fn double_transfer( + chain_driver: MonoTagged, + port_id: &TaggedPortIdRef, + channel_id: &TaggedChannelIdRef, + sender: &MonoTagged, + recipient: &MonoTagged, + token: &TaggedTokenRef, +) -> Result<(), Error> { + // Create a pending transfer from B to A with sequence 1 + chain_driver.ibc_transfer_token(port_id, channel_id, sender, recipient, token)?; + + // Create a pending transfer from B to A with sequence 2 + chain_driver.ibc_transfer_token(port_id, channel_id, sender, recipient, token)?; + + Ok(()) +} diff --git a/tools/query-events/Cargo.lock b/tools/query-events/Cargo.lock new file mode 100644 index 0000000000..599a54f9b3 --- /dev/null +++ b/tools/query-events/Cargo.lock @@ -0,0 +1,2197 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "addr2line" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "anyhow" +version = "1.0.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" + +[[package]] +name = "async-trait" +version = "0.1.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.53", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + +[[package]] +name = "autocfg" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "backtrace" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +dependencies = [ + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", +] + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "bumpalo" +version = "3.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ff69b9dd49fd426c69a0db9fc04dd934cdb6645ff000864d98f7e2af8830eaa" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +dependencies = [ + "serde", +] + +[[package]] +name = "cc" +version = "1.0.90" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cd6604a82acf3039f1144f54b8eb34e91ffba622051189e71b781822d5ee1f5" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clap" +version = "3.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +dependencies = [ + "atty", + "bitflags", + "clap_derive", + "clap_lex", + "indexmap 1.9.3", + "once_cell", + "strsim", + "termcolor", + "textwrap", +] + +[[package]] +name = "clap_derive" +version = "3.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" +dependencies = [ + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + +[[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "curve25519-dalek-ng" +version = "4.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core", + "subtle-ng", + "zeroize", +] + +[[package]] +name = "der" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", +] + +[[package]] +name = "ed25519" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" +dependencies = [ + "pkcs8", + "signature", +] + +[[package]] +name = "ed25519-consensus" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c8465edc8ee7436ffea81d21a019b16676ee3db267aa8d5a8d729581ecf998b" +dependencies = [ + "curve25519-dalek-ng", + "hex", + "rand_core", + "sha2 0.9.9", + "zeroize", +] + +[[package]] +name = "either" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" + +[[package]] +name = "encoding_rs" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + +[[package]] +name = "flex-error" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" +dependencies = [ + "eyre", + "paste", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" + +[[package]] +name = "futures-executor" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" + +[[package]] +name = "futures-macro" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.53", +] + +[[package]] +name = "futures-sink" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" + +[[package]] +name = "futures-task" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" + +[[package]] +name = "futures-util" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "gimli" +version = "0.28.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" + +[[package]] +name = "h2" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fbd2820c5e49886948654ab546d0688ff24530286bdcf8fca3cefb16d4618eb" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 2.2.5", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + +[[package]] +name = "hermit-abi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +dependencies = [ + "futures-util", + "http", + "hyper", + "rustls", + "tokio", + "tokio-rustls", +] + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + +[[package]] +name = "indexmap" +version = "2.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", +] + +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" + +[[package]] +name = "js-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + +[[package]] +name = "libc" +version = "0.2.153" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" + +[[package]] +name = "lock_api" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "memchr" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +dependencies = [ + "adler", +] + +[[package]] +name = "mio" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.48.0", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num-conv" +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-traits" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.9", + "libc", +] + +[[package]] +name = "object" +version = "0.32.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "os_str_bytes" +version = "6.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.48.5", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "peg" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "400bcab7d219c38abf8bd7cc2054eb9bbbd4312d66f6a5557d572a203f646f61" +dependencies = [ + "peg-macros", + "peg-runtime", +] + +[[package]] +name = "peg-macros" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46e61cce859b76d19090f62da50a9fe92bab7c2a5f09e183763559a2ac392c90" +dependencies = [ + "peg-runtime", + "proc-macro2", + "quote", +] + +[[package]] +name = "peg-runtime" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36bae92c60fa2398ce4678b98b2c4b5a7c61099961ca1fa305aec04a9ad28922" + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.53", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prost" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-derive" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" +dependencies = [ + "anyhow", + "itertools 0.11.0", + "proc-macro2", + "quote", + "syn 2.0.53", +] + +[[package]] +name = "prost-types" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" +dependencies = [ + "prost", +] + +[[package]] +name = "query-events" +version = "0.1.0" +dependencies = [ + "clap", + "futures", + "itertools 0.10.5", + "tendermint", + "tendermint-rpc", + "tokio", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "quote" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.6", + "regex-syntax 0.8.2", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.2", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" + +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-native-certs", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-rustls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" + +[[package]] +name = "rustls" +version = "0.21.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +dependencies = [ + "log", + "ring", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "ryu" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "security-framework" +version = "2.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" + +[[package]] +name = "serde" +version = "1.0.197" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.197" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.53", +] + +[[package]] +name = "serde_json" +version = "1.0.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_repr" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.53", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "socket2" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "subtle" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" + +[[package]] +name = "subtle-encoding" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" +dependencies = [ + "zeroize", +] + +[[package]] +name = "subtle-ng" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tendermint" +version = "0.34.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15ab8f0a25d0d2ad49ac615da054d6a76aa6603ff95f7d18bafdd34450a1a04b" +dependencies = [ + "bytes", + "digest 0.10.7", + "ed25519", + "ed25519-consensus", + "flex-error", + "futures", + "num-traits", + "once_cell", + "prost", + "prost-types", + "serde", + "serde_bytes", + "serde_json", + "serde_repr", + "sha2 0.10.8", + "signature", + "subtle", + "subtle-encoding", + "tendermint-proto", + "time", + "zeroize", +] + +[[package]] +name = "tendermint-config" +version = "0.34.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1a02da769166e2052cd537b1a97c78017632c2d9e19266367b27e73910434fc" +dependencies = [ + "flex-error", + "serde", + "serde_json", + "tendermint", + "toml", + "url", +] + +[[package]] +name = "tendermint-proto" +version = "0.34.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b797dd3d2beaaee91d2f065e7bdf239dc8d80bba4a183a288bc1279dd5a69a1e" +dependencies = [ + "bytes", + "flex-error", + "num-derive", + "num-traits", + "prost", + "prost-types", + "serde", + "serde_bytes", + "subtle-encoding", + "time", +] + +[[package]] +name = "tendermint-rpc" +version = "0.34.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71afae8bb5f6b14ed48d4e1316a643b6c2c3cbad114f510be77b4ed20b7b3e42" +dependencies = [ + "async-trait", + "bytes", + "flex-error", + "futures", + "getrandom", + "peg", + "pin-project", + "rand", + "reqwest", + "semver", + "serde", + "serde_bytes", + "serde_json", + "subtle", + "subtle-encoding", + "tendermint", + "tendermint-config", + "tendermint-proto", + "thiserror", + "time", + "tokio", + "tracing", + "url", + "uuid", + "walkdir", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "textwrap" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" + +[[package]] +name = "thiserror" +version = "1.0.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.53", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "time" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinyvec" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "num_cpus", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.48.0", +] + +[[package]] +name = "tokio-macros" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.53", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.53", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "uuid" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "version_check" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.53", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.53", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.92" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" + +[[package]] +name = "web-sys" +version = "0.3.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +dependencies = [ + "winapi", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.4", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" +dependencies = [ + "windows_aarch64_gnullvm 0.52.4", + "windows_aarch64_msvc 0.52.4", + "windows_i686_gnu 0.52.4", + "windows_i686_msvc 0.52.4", + "windows_x86_64_gnu 0.52.4", + "windows_x86_64_gnullvm 0.52.4", + "windows_x86_64_msvc 0.52.4", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" + +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "zeroize" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.53", +] diff --git a/tools/test-framework/Cargo.toml b/tools/test-framework/Cargo.toml index a33bbf74d4..45e19e7b15 100644 --- a/tools/test-framework/Cargo.toml +++ b/tools/test-framework/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ibc-test-framework" -version = "0.27.0" +version = "0.27.2" edition = "2021" license = "Apache-2.0" readme = "README.md" @@ -14,31 +14,31 @@ description = """ """ [dependencies] -ibc-relayer-types = { version = "=0.27.0", path = "../../crates/relayer-types" } -ibc-relayer = { version = "=0.27.0", path = "../../crates/relayer" } -ibc-relayer-cli = { version = "=1.8.0", path = "../../crates/relayer-cli" } -ibc-proto = { version = "0.41.0", features = ["serde"] } -tendermint-rpc = { version = "0.34.0", features = ["http-client", "websocket-client"] } +ibc-relayer-types = { workspace = true } +ibc-relayer = { workspace = true } +ibc-relayer-cli = { workspace = true } +ibc-proto = { workspace = true, features = ["serde"] } +tendermint-rpc = { workspace = true, features = ["http-client", "websocket-client"] } -http = "0.2.9" -tokio = { version = "1.0", features = ["full"] } -tracing = "0.1.36" -tracing-subscriber = "0.3.14" -eyre = "0.6.8" -color-eyre = "0.6" -rand = "0.8.5" -hex = "0.4.3" -serde = "1.0" -serde_json = "1" -serde_yaml = "0.9.31" -itertools = "0.10" -toml = "0.8" -subtle-encoding = "0.5.1" -sha2 = "0.10.6" -crossbeam-channel = "0.5.11" -semver = "1.0.21" -flex-error = "0.4.4" -prost = { version = "0.12" } -tonic = { version = "0.10", features = ["tls", "tls-roots"] } -hdpath = "0.6.3" -once_cell = "1.19.0" +color-eyre = { workspace = true } +crossbeam-channel = { workspace = true } +eyre = { workspace = true } +flex-error = { workspace = true } +hdpath = { workspace = true } +hex = { workspace = true } +http = { workspace = true } +itertools = { workspace = true } +once_cell = { workspace = true } +prost = { workspace = true } +rand = { workspace = true } +semver = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +serde_yaml = { workspace = true } +sha2 = { workspace = true } +subtle-encoding = { workspace = true } +tokio = { workspace = true, features = ["full"] } +toml = { workspace = true } +tonic = { workspace = true, features = ["tls", "tls-roots"] } +tracing = { workspace = true } +tracing-subscriber = { workspace = true } diff --git a/tools/test-framework/src/chain/chain_type.rs b/tools/test-framework/src/chain/chain_type.rs index bf8f883bd0..93de40804b 100644 --- a/tools/test-framework/src/chain/chain_type.rs +++ b/tools/test-framework/src/chain/chain_type.rs @@ -18,13 +18,14 @@ pub enum ChainType { Evmos, Astria, Provenance, + Injective, } impl ChainType { pub fn hd_path(&self) -> &str { match self { Self::Cosmos => COSMOS_HD_PATH, - Self::Evmos => EVMOS_HD_PATH, + Self::Evmos | Self::Injective => EVMOS_HD_PATH, Self::Astria => todo!("Astria HD path not yet implemented"), Self::Provenance => PROVENANCE_HD_PATH, } @@ -39,6 +40,7 @@ impl ChainType { ChainId::from_string(&format!("ibc{prefix}")) } } + Self::Injective => ChainId::from_string(&format!("injective-{prefix}")), Self::Evmos => ChainId::from_string(&format!("evmos_9000-{prefix}")), Self::Astria => todo!("Astria chain id not yet implemented"), Self::Provenance => ChainId::from_string(&format!("pio-mainnet-{prefix}")), @@ -50,25 +52,42 @@ impl ChainType { let mut res = vec![]; let json_rpc_port = random_unused_tcp_port(); match self { - Self::Cosmos => {} + Self::Cosmos | Self::Injective | Self::Provenance => {} Self::Evmos => { res.push("--json-rpc.address".to_owned()); res.push(format!("localhost:{json_rpc_port}")); } + ChainType::Astria => todo!(), + } + res + } + + // Extra arguments required to run ` add-genesis-account` + pub fn extra_add_genesis_account_args(&self, chain_id: &ChainId) -> Vec { + let mut res = vec![]; + match self { + Self::Cosmos | Self::Evmos | Self::Provenance => {} + Self::Injective => { + res.push("--chain-id".to_owned()); + res.push(format!("{chain_id}")); + } Self::Astria => todo!("Astria extra start args not yet implemented"), - Self::Provenance => {} + // Self::Penumbra => todo!("Penumbra extra start args not yet implemented"), } res } pub fn address_type(&self) -> AddressType { match self { - Self::Cosmos => AddressType::default(), + Self::Cosmos | Self::Provenance => AddressType::default(), Self::Evmos => AddressType::Ethermint { pk_type: "/ethermint.crypto.v1.ethsecp256k1.PubKey".to_string(), }, + Self::Injective => AddressType::Ethermint { + pk_type: "/injective.crypto.v1beta1.ethsecp256k1.PubKey".to_string(), + }, Self::Astria => AddressType::Astria, - Self::Provenance => AddressType::default(), + // Self::Penumbra => todo!(), } } } @@ -78,13 +97,11 @@ impl FromStr for ChainType { fn from_str(s: &str) -> Result { match s { - name if name.contains("gaiad") => Ok(ChainType::Cosmos), - name if name.contains("simd") => Ok(ChainType::Cosmos), - name if name.contains("wasmd") => Ok(ChainType::Cosmos), - name if name.contains("icad") => Ok(ChainType::Cosmos), name if name.contains("evmosd") => Ok(ChainType::Evmos), + name if name.contains("injectived") => Ok(ChainType::Injective), name if name.contains("astria") => Ok(ChainType::Astria), name if name.contains("provenanced") => Ok(ChainType::Provenance), + // name if name.contains("penumbra") => Ok(ChainType::Penumbra), _ => Ok(ChainType::Cosmos), } } diff --git a/tools/test-framework/src/chain/cli/bootstrap.rs b/tools/test-framework/src/chain/cli/bootstrap.rs index 621ef5661e..b5a60ea765 100644 --- a/tools/test-framework/src/chain/cli/bootstrap.rs +++ b/tools/test-framework/src/chain/cli/bootstrap.rs @@ -64,35 +64,37 @@ pub fn add_genesis_account( home_path: &str, wallet_address: &str, amounts: &[String], + extra_start_args: &[&str], ) -> Result<(), Error> { let amounts_str = itertools::join(amounts, ","); + + let legacy_base_args = [ + "--home", + home_path, + "add-genesis-account", + wallet_address, + &amounts_str, + ]; + let mut legacy_args: Vec<&str> = legacy_base_args.to_vec(); + legacy_args.extend(extra_start_args.iter()); + + let base_args = [ + "--home", + home_path, + "genesis", + "add-genesis-account", + wallet_address, + &amounts_str, + ]; + let mut args: Vec<&str> = base_args.to_vec(); + args.extend(extra_start_args.iter()); + // Cosmos SDK v0.47.0 introduced the `genesis` subcommand, this match is required to // support pre and post SDK v0.47.0. https://github.com/cosmos/cosmos-sdk/pull/14149 - match simple_exec( - chain_id, - command_path, - &[ - "--home", - home_path, - "genesis", - "add-genesis-account", - wallet_address, - &amounts_str, - ], - ) { + match simple_exec(chain_id, command_path, &args) { Ok(_) => Ok(()), Err(_) => { - simple_exec( - chain_id, - command_path, - &[ - "--home", - home_path, - "add-genesis-account", - wallet_address, - &amounts_str, - ], - )?; + simple_exec(chain_id, command_path, &legacy_args)?; Ok(()) } } diff --git a/tools/test-framework/src/chain/ext/bootstrap.rs b/tools/test-framework/src/chain/ext/bootstrap.rs index 2ce809c73b..f60e9a5d12 100644 --- a/tools/test-framework/src/chain/ext/bootstrap.rs +++ b/tools/test-framework/src/chain/ext/bootstrap.rs @@ -236,6 +236,9 @@ impl ChainBootstrapMethodsExt for ChainDriver { fn add_genesis_account(&self, wallet: &WalletAddress, amounts: &[&Token]) -> Result<(), Error> { let amounts_str = amounts.iter().map(|t| t.to_string()).collect::>(); + let extra_args = self + .chain_type + .extra_add_genesis_account_args(&self.chain_id); add_genesis_account( self.chain_id.as_str(), @@ -243,6 +246,7 @@ impl ChainBootstrapMethodsExt for ChainDriver { &self.home_path, &wallet.0, &amounts_str, + &extra_args.iter().map(|s| s.as_ref()).collect::>(), ) } diff --git a/tools/test-framework/src/chain/ext/ica.rs b/tools/test-framework/src/chain/ext/ica.rs index 3a0e6b4442..6b7265e0cc 100644 --- a/tools/test-framework/src/chain/ext/ica.rs +++ b/tools/test-framework/src/chain/ext/ica.rs @@ -1,6 +1,6 @@ use ibc_relayer::chain::{handle::ChainHandle, tracking::TrackedMsgs}; use ibc_relayer_types::{ - applications::ics27_ica::msgs::register::MsgRegisterInterchainAccount, + applications::ics27_ica::msgs::register::LegacyMsgRegisterInterchainAccount, core::ics04_channel::version::Version, events::IbcEvent, tx_msg::Msg, }; @@ -82,7 +82,7 @@ pub fn register_interchain_account( + chain: &ChainA, + from: &Signer, + connection: &ConnectionId, + msg: InterchainAccountPacketData, + relative_timeout: Timestamp, +) -> Result, Error> { + let msg = MsgSendTx { + owner: from.clone(), + connection_id: connection.clone(), + packet_data: msg, + relative_timeout, + }; + + let msg_any = msg.to_any(); + + let tm = TrackedMsgs::new_static(vec![msg_any], "SendTx"); + + chain + .send_messages_and_wait_commit(tm) + .map_err(Error::relayer) +}