diff --git a/.changelog/unreleased/features/ibc-relayer-cli/3456-evidence-command.md b/.changelog/unreleased/features/ibc-relayer-cli/3456-evidence-command.md new file mode 100644 index 0000000000..8daa96e334 --- /dev/null +++ b/.changelog/unreleased/features/ibc-relayer-cli/3456-evidence-command.md @@ -0,0 +1,4 @@ +- Add a new `evidence` command for monitoring the blocks emitted + by a chain for the presence of a misbehaviour evidence, and + report that evidence to all counteparty clients of that chain. + ([\#3456](https://github.com/informalsystems/hermes/pull/3456)) diff --git a/.changelog/unreleased/improvements/ibc-relayer/3219-ics-consumer-misbehavior.md b/.changelog/unreleased/improvements/ibc-relayer/3219-ics-consumer-misbehavior.md new file mode 100644 index 0000000000..eaec421cc8 --- /dev/null +++ b/.changelog/unreleased/improvements/ibc-relayer/3219-ics-consumer-misbehavior.md @@ -0,0 +1,4 @@ +- When Hermes detects a misbehaviour on a chain that is CCV + consumer, it will now send the misbehaviour evidence to the + provider chain using the new `IcsConsumerMisbehaviour` message. + ([\#3219](https://github.com/informalsystems/hermes/issues/3219)) \ No newline at end of file diff --git a/.changelog/unreleased/improvements/ibc-relayer/3223-submit-misbehavior-all-clients.md b/.changelog/unreleased/improvements/ibc-relayer/3223-submit-misbehavior-all-clients.md new file mode 100644 index 0000000000..c76ebb57d8 --- /dev/null +++ b/.changelog/unreleased/improvements/ibc-relayer/3223-submit-misbehavior-all-clients.md @@ -0,0 +1,5 @@ +- When Hermes detects a misbehaviour from a on-chain client, eg. a light + client attack or a double-sign, it will now submit the misbehaviour + evidence to all counterparty clients of the misbehaving chain + instead of to the counterparty client of the misbehaving client only. + ([\#3223](https://github.com/informalsystems/hermes/issues/3223)) \ No newline at end of file diff --git a/.github/workflows/misbehaviour.yml b/.github/workflows/misbehaviour.yml index 8a4c4c819f..647172a582 100644 --- a/.github/workflows/misbehaviour.yml +++ b/.github/workflows/misbehaviour.yml @@ -36,7 +36,7 @@ concurrency: cancel-in-progress: true jobs: - misbehaviour: + light-client-attack: runs-on: ubuntu-20.04 timeout-minutes: 20 strategy: @@ -91,3 +91,166 @@ jobs: run: | nix shell .#${{ matrix.chain.package }} -c bash misbehaviour_test.sh + ics-light-client-attack: + runs-on: ubuntu-20.04 + timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + chain: + - package: interchain-security + account_prefix: cosmos + steps: + - uses: actions/checkout@v3 + - name: Install Nix + uses: cachix/install-nix-action@v22 + with: + extra_nix_config: | + experimental-features = nix-command flakes + - name: Use cachix cache + uses: cachix/cachix-action@v12 + with: + name: cosmos + - name: Install sconfig + uses: jaxxstorm/action-install-gh-release@v1.10.0 + with: + repo: freshautomations/sconfig + platform: linux + arch: amd64 + extension-matching: disable + rename-to: sconfig + chmod: 0755 + - name: Install stoml + uses: jaxxstorm/action-install-gh-release@v1.10.0 + with: + repo: freshautomations/stoml + platform: linux + arch: amd64 + extension-matching: disable + rename-to: stoml + chmod: 0755 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Use Rust cache + uses: Swatinem/rust-cache@v1 + - name: Build Hermes + uses: actions-rs/cargo@v1 + with: + command: build + - name: Run test + working-directory: ci/misbehaviour-ics + run: | + nix shell .#cometbft .#${{ matrix.chain.package }} -c bash light_client_attack_test.sh + + ics-light-client-attack-freeze: + runs-on: ubuntu-20.04 + timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + chain: + - package: interchain-security + account_prefix: cosmos + steps: + - uses: actions/checkout@v3 + - name: Install Nix + uses: cachix/install-nix-action@v22 + with: + extra_nix_config: | + experimental-features = nix-command flakes + - name: Use cachix cache + uses: cachix/cachix-action@v12 + with: + name: cosmos + - name: Install sconfig + uses: jaxxstorm/action-install-gh-release@v1.10.0 + with: + repo: freshautomations/sconfig + platform: linux + arch: amd64 + extension-matching: disable + rename-to: sconfig + chmod: 0755 + - name: Install stoml + uses: jaxxstorm/action-install-gh-release@v1.10.0 + with: + repo: freshautomations/stoml + platform: linux + arch: amd64 + extension-matching: disable + rename-to: stoml + chmod: 0755 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Use Rust cache + uses: Swatinem/rust-cache@v1 + - name: Build Hermes + uses: actions-rs/cargo@v1 + with: + command: build + - name: Run test + working-directory: ci/misbehaviour-ics + run: | + nix shell .#${{ matrix.chain.package }} -c bash light_client_attack_freeze_test.sh + + + ics-double-sign: + runs-on: ubuntu-20.04 + timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + chain: + - package: interchain-security + account_prefix: cosmos + steps: + - uses: actions/checkout@v3 + - name: Install Nix + uses: cachix/install-nix-action@v22 + with: + extra_nix_config: | + experimental-features = nix-command flakes + - name: Use cachix cache + uses: cachix/cachix-action@v12 + with: + name: cosmos + - name: Install sconfig + uses: jaxxstorm/action-install-gh-release@v1.10.0 + with: + repo: freshautomations/sconfig + platform: linux + arch: amd64 + extension-matching: disable + rename-to: sconfig + chmod: 0755 + - name: Install stoml + uses: jaxxstorm/action-install-gh-release@v1.10.0 + with: + repo: freshautomations/stoml + platform: linux + arch: amd64 + extension-matching: disable + rename-to: stoml + chmod: 0755 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Use Rust cache + uses: Swatinem/rust-cache@v1 + - name: Build Hermes + uses: actions-rs/cargo@v1 + with: + command: build + - name: Run test + working-directory: ci/misbehaviour-ics + run: | + nix shell .#${{ matrix.chain.package }} -c bash double_sign_test.sh + diff --git a/Cargo.lock b/Cargo.lock index 4281f75f95..aa8a590362 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -43,9 +43,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] @@ -58,18 +58,18 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "1.0.2" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" dependencies = [ "memchr", ] [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "arc-swap" @@ -96,18 +96,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] name = "async-trait" -version = "0.1.72" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] @@ -145,9 +145,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", "axum-core", @@ -194,9 +194,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", "cc", @@ -221,9 +221,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "base64ct" @@ -275,9 +275,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "block-buffer" @@ -308,9 +308,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byte-unit" @@ -324,9 +324,9 @@ dependencies = [ [[package]] name = "bytecount" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c" +checksum = "ad152d03a2c813c80bb94fedbf3a3f02b28f793e39e7c214c8a0bcc196343de7" [[package]] name = "byteorder" @@ -336,9 +336,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" dependencies = [ "serde", ] @@ -360,9 +360,9 @@ checksum = "e6e9e01327e6c86e92ec72b1c798d4a94810f147209bbe3ffab6a86954937a6f" [[package]] name = "cargo-platform" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" +checksum = "2cfa25e60aea747ec7e1124f238816749faa93759c6ff5b31f1ccdda137f4479" dependencies = [ "serde", ] @@ -382,9 +382,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -488,9 +491,9 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "795bc6e66a8e340f075fcf6227e417a2dc976b92b91f3cdc778bb858778b6747" +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" [[package]] name = "contracts" @@ -589,9 +592,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" +checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" dependencies = [ "generic-array", "rand_core", @@ -611,9 +614,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.0.0" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f711ade317dd348950a9910f81c5947e3d8907ebd2b83f76203ff1807e6a2bc2" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -634,7 +637,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] @@ -652,12 +655,12 @@ dependencies = [ [[package]] name = "dashmap" -version = "5.5.0" +version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6943ae99c34386c84a470c499d3414f66502a41340aa895406e0d2e4a207b91d" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if 1.0.0", - "hashbrown 0.14.0", + "hashbrown 0.14.1", "lock_api", "once_cell", "parking_lot_core", @@ -671,14 +674,20 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" [[package]] name = "der" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ed52955ce76b1554f509074bb357d3fb8ac9b51288a65a3fd480d1dfba946" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", "zeroize", ] +[[package]] +name = "deranged" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" + [[package]] name = "derivation-path" version = "0.2.0" @@ -752,15 +761,15 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" +checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" [[package]] name = "ecdsa" -version = "0.16.7" +version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" +checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ "der", "digest 0.10.7", @@ -804,7 +813,7 @@ dependencies = [ "ed25519", "rand_core", "serde", - "sha2 0.10.7", + "sha2 0.10.8", "zeroize", ] @@ -817,20 +826,20 @@ dependencies = [ "derivation-path", "ed25519-dalek", "hmac", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elliptic-curve" -version = "0.13.5" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" +checksum = "d97ca172ae9dc9f9b779a6e3a65d308f2af74e5b8c921299075bdb4a0370e914" dependencies = [ "base16ct", "crypto-bigint", @@ -853,9 +862,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if 1.0.0", ] @@ -881,18 +890,18 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "erased-serde" -version = "0.3.28" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da96524cc884f6558f1769b6c46686af2fe8e8b4cd253bd5a3cdba8181b8e070" +checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" dependencies = [ "serde", ] [[package]] name = "errno" -version = "0.3.1" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "add4f07d43996f76ef320709726a556a9d4f965d9410d8d0271132d2f8293480" dependencies = [ "errno-dragonfly", "libc", @@ -930,12 +939,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "1.9.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "ff" @@ -949,9 +955,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.1.20" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +checksum = "d0870c84016d4b481be5c9f323c24f65e31e901ae618f0e80f4308fb00de1d2d" [[package]] name = "fixed-hash" @@ -1050,7 +1056,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] @@ -1109,9 +1115,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.3" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "glob" @@ -1152,9 +1158,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -1183,9 +1189,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" [[package]] name = "hdpath" @@ -1213,9 +1219,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -1268,9 +1274,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -1305,7 +1311,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -1348,7 +1354,7 @@ dependencies = [ "http", "ibc-proto", "ibc-relayer-types", - "itertools", + "itertools 0.10.5", "reqwest", "serde", "serde_json", @@ -1370,17 +1376,17 @@ dependencies = [ "serde_json", "tempfile", "time", - "toml 0.7.6", + "toml 0.7.8", "tonic", ] [[package]] name = "ibc-proto" -version = "0.37.0" +version = "0.38.0-pre.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "725fd83c94e9859fd967cd706996679799171eba940740f071f0046fb6f6e031" +checksum = "cf94cb1311bf2c44d160ed59e681a27108a9a041edce1f2fdb7eb80f66923c0e" dependencies = [ - "base64 0.21.2", + "base64 0.21.4", "bytes", "flex-error", "ics23", @@ -1420,7 +1426,7 @@ dependencies = [ "ibc-proto", "ibc-relayer-types", "ibc-telemetry", - "itertools", + "itertools 0.10.5", "moka", "num-bigint", "num-rational", @@ -1435,7 +1441,7 @@ dependencies = [ "serde_derive", "serde_json", "serial_test", - "sha2 0.10.7", + "sha2 0.10.8", "signature", "strum", "subtle-encoding", @@ -1450,11 +1456,11 @@ dependencies = [ "tiny-keccak", "tokio", "tokio-stream", - "toml 0.7.6", + "toml 0.7.8", "tonic", "tracing", "tracing-subscriber", - "uuid 1.4.0", + "uuid 1.4.1", ] [[package]] @@ -1480,7 +1486,7 @@ dependencies = [ "ibc-relayer-rest", "ibc-relayer-types", "ibc-telemetry", - "itertools", + "itertools 0.10.5", "once_cell", "oneline-eyre", "regex", @@ -1509,7 +1515,7 @@ dependencies = [ "reqwest", "serde", "tokio", - "toml 0.7.6", + "toml 0.7.8", "tracing", ] @@ -1525,7 +1531,7 @@ dependencies = [ "flex-error", "ibc-proto", "ics23", - "itertools", + "itertools 0.10.5", "num-rational", "primitive-types", "prost", @@ -1580,7 +1586,7 @@ dependencies = [ "ibc-relayer", "ibc-relayer-cli", "ibc-relayer-types", - "itertools", + "itertools 0.10.5", "once_cell", "prost", "rand", @@ -1588,11 +1594,11 @@ dependencies = [ "serde", "serde_json", "serde_yaml", - "sha2 0.10.7", + "sha2 0.10.8", "subtle-encoding", "tendermint-rpc", "tokio", - "toml 0.7.6", + "toml 0.7.8", "tonic", "tracing", "tracing-subscriber", @@ -1611,7 +1617,7 @@ dependencies = [ "prost", "ripemd", "serde", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", ] @@ -1658,12 +1664,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.1", ] [[package]] @@ -1676,26 +1682,6 @@ dependencies = [ "serde", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.2", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "ipnet" version = "2.8.0" @@ -1708,8 +1694,8 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.2", - "rustix 0.38.4", + "hermit-abi 0.3.3", + "rustix", "windows-sys 0.48.0", ] @@ -1722,11 +1708,20 @@ 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.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" @@ -1746,7 +1741,7 @@ dependencies = [ "cfg-if 1.0.0", "ecdsa", "elliptic-curve", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] @@ -1766,21 +1761,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.147" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" - -[[package]] -name = "linux-raw-sys" -version = "0.3.8" +version = "0.2.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "linux-raw-sys" -version = "0.4.3" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" +checksum = "3852614a3bd9ca9804678ba6be5e3b8ce76dfc902cae004e3e0c44051b6e88db" [[package]] name = "lock_api" @@ -1794,9 +1783,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "mach2" @@ -1818,9 +1807,9 @@ dependencies = [ [[package]] name = "matchit" -version = "0.7.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" [[package]] name = "maybe-uninit" @@ -1830,9 +1819,9 @@ checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] name = "memchr" -version = "2.6.3" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memoffset" @@ -1888,7 +1877,7 @@ dependencies = [ "tagptr", "thiserror", "triomphe", - "uuid 1.4.0", + "uuid 1.4.1", ] [[package]] @@ -1903,9 +1892,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -1949,9 +1938,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] @@ -1962,15 +1951,15 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi 0.3.3", "libc", ] [[package]] name = "object" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ "memchr", ] @@ -2097,14 +2086,14 @@ dependencies = [ "libc", "redox_syscall 0.3.5", "smallvec", - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] name = "paste" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b27ab7be369122c218afc2079489cdcb4b517c0a3fc386ff11e1fedfcc2b35" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pbkdf2" @@ -2150,29 +2139,29 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pin-project" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] name = "pin-project-lite" -version = "0.2.10" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2192,9 +2181,9 @@ dependencies = [ [[package]] name = "platforms" -version = "3.0.2" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" +checksum = "4503fa043bf02cee09a9582e9554b4c6403b2ef55e4612e96561d294419429f8" [[package]] name = "ppv-lite86" @@ -2239,9 +2228,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.64" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ] @@ -2278,10 +2267,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "265baba7fabd416cf5078179f7d2cbeca4ce7a9041111900675ea7c4cb8a4c32" dependencies = [ "anyhow", - "itertools", + "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] @@ -2328,9 +2317,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.29" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -2405,13 +2394,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.5" +version = "1.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" +checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.8", + "regex-automata 0.3.9", "regex-syntax 0.7.5", ] @@ -2426,9 +2415,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" +checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9" dependencies = [ "aho-corasick", "memchr", @@ -2449,11 +2438,11 @@ checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "reqwest" -version = "0.11.21" +version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78fdbab6a7e1d7b13cc8ff10197f47986b41c639300cc3c8158cac7847c9bbef" +checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ - "base64 0.21.2", + "base64 0.21.4", "bytes", "encoding_rs", "futures-core", @@ -2551,28 +2540,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.23" +version = "0.38.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" +checksum = "f25469e9ae0f3d0047ca8b93fc56843f38e6774f0914a107ff8b41be8be8e0b7" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "errno", - "io-lifetimes", "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" -dependencies = [ - "bitflags 2.3.3", - "errno", - "libc", - "linux-raw-sys 0.4.3", + "linux-raw-sys", "windows-sys 0.48.0", ] @@ -2606,14 +2581,14 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.2", + "base64 0.21.4", ] [[package]] name = "rustls-webpki" -version = "0.101.4" +version = "0.101.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" +checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" dependencies = [ "ring", "untrusted", @@ -2621,15 +2596,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "same-file" @@ -2660,9 +2635,9 @@ dependencies = [ [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" @@ -2676,9 +2651,9 @@ dependencies = [ [[package]] name = "sec1" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct", "der", @@ -2721,9 +2696,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -2734,9 +2709,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -2744,27 +2719,27 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "ad977052201c6de01a8ef2aa3378c4bd23217a056337d1d6da40468d267a4fb0" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.171" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.11" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a16be4fe5320ade08736447e3198294a5ea9a6d44dde6f35f0a5e06859c427a" +checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" dependencies = [ "serde", ] @@ -2781,20 +2756,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.171" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] name = "serde_json" -version = "1.0.102" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5062a995d481b2308b6064e9af76011f2921c35f97b0468811ed9f6cd91dfed" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa", "ryu", @@ -2803,9 +2778,9 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acc4422959dd87a76cb117c191dcbffc20467f06c9100b76721dab370f24d3a" +checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" dependencies = [ "itoa", "serde", @@ -2813,13 +2788,13 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.14" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d89a8107374290037607734c0b73a85db7ed80cae314b3c5791f192a496e731" +checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] @@ -2845,11 +2820,11 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.22" +version = "0.9.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "452e67b9c20c37fa79df53201dc03839651086ed9bbe92b3ca585ca9fdaa7d85" +checksum = "1a49e178e4452f45cb61d0cd8cebc1b0fafd3e41929e996cef79aa3aca91f574" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.0.2", "itoa", "ryu", "serde", @@ -2878,14 +2853,14 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -2907,9 +2882,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -2928,9 +2903,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] @@ -2993,18 +2968,18 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "smallvec" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "socket2" @@ -3016,6 +2991,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "spin" version = "0.5.2" @@ -3055,15 +3040,15 @@ dependencies = [ [[package]] name = "strum_macros" -version = "0.25.1" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6069ca09d878a33f883cc06aaa9718ede171841d3832450354410b718b097232" +checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" dependencies = [ "heck", "proc-macro2", "quote", "rustversion", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] @@ -3100,9 +3085,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.25" +version = "2.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" +checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" dependencies = [ "proc-macro2", "quote", @@ -3156,15 +3141,14 @@ checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" [[package]] name = "tempfile" -version = "3.6.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ - "autocfg", "cfg-if 1.0.0", "fastrand", "redox_syscall 0.3.5", - "rustix 0.37.23", + "rustix", "windows-sys 0.48.0", ] @@ -3190,7 +3174,7 @@ dependencies = [ "serde_bytes", "serde_json", "serde_repr", - "sha2 0.10.7", + "sha2 0.10.8", "signature", "subtle", "subtle-encoding", @@ -3344,9 +3328,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" dependencies = [ "winapi-util", ] @@ -3370,22 +3354,22 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.43" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" +checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.43" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" +checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] @@ -3400,10 +3384,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.22" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea9e1b3cf1243ae005d9e74085d4d542f3125458f3a81af210d901dcd7411efd" +checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" dependencies = [ + "deranged", "serde", "time-core", "time-macros", @@ -3411,15 +3396,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.9" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -3436,7 +3421,7 @@ dependencies = [ "pbkdf2", "rand", "rustc-hash", - "sha2 0.10.7", + "sha2 0.10.8", "thiserror", "unicode-normalization", "wasm-bindgen", @@ -3469,11 +3454,10 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.29.1" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ - "autocfg", "backtrace", "bytes", "libc", @@ -3482,7 +3466,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.4", "tokio-macros", "windows-sys 0.48.0", ] @@ -3505,7 +3489,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] @@ -3531,9 +3515,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" dependencies = [ "bytes", "futures-core", @@ -3554,9 +3538,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" dependencies = [ "serde", "serde_spanned", @@ -3575,11 +3559,11 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.12" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c500344a19072298cd05a7224b3c0c629348b78692bf48466c5238656e315a78" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.0.2", "serde", "serde_spanned", "toml_datetime", @@ -3595,7 +3579,7 @@ dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.21.2", + "base64 0.21.4", "bytes", "h2", "http", @@ -3670,7 +3654,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] @@ -3769,9 +3753,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "uint" @@ -3787,9 +3771,9 @@ dependencies = [ [[package]] name = "unicase" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" dependencies = [ "version_check", ] @@ -3802,9 +3786,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -3817,9 +3801,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -3829,9 +3813,9 @@ checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "unsafe-libyaml" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1865806a559042e51ab5414598446a5871b561d21b6764f2eabb0dd481d880a6" +checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" [[package]] name = "untrusted" @@ -3852,9 +3836,9 @@ dependencies = [ [[package]] name = "urlencoding" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8db7427f936968176eaa7cdf81b7f98b980b18495ec28f1b5791ac3bfe3eea9" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "utf-8" @@ -3876,9 +3860,9 @@ checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" [[package]] name = "uuid" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" dependencies = [ "getrandom", ] @@ -3906,9 +3890,9 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -3950,7 +3934,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", "wasm-bindgen-shared", ] @@ -3984,7 +3968,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4029,9 +4013,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -4057,7 +4041,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -4077,17 +4061,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "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]] @@ -4098,9 +4082,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -4110,9 +4094,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -4122,9 +4106,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -4134,9 +4118,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -4146,9 +4130,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -4158,9 +4142,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -4170,15 +4154,15 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.4.9" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a2094c43cc94775293eaa0e499fbc30048a6d824ac82c0351a8c0bf9112529" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ "memchr", ] @@ -4210,5 +4194,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] diff --git a/ci/misbehaviour-ics/double_sign_test.sh b/ci/misbehaviour-ics/double_sign_test.sh new file mode 100644 index 0000000000..f60d50355f --- /dev/null +++ b/ci/misbehaviour-ics/double_sign_test.sh @@ -0,0 +1,583 @@ +#!/bin/bash +# shellcheck disable=2086,2004 + +set -eu + +DEBUG=${DEBUG:-false} + +if [ "$DEBUG" = true ]; then + set -x +fi + +# User balance of stake tokens +USER_COINS="100000000000stake" +# Amount of stake tokens staked +STAKE="100000000stake" +# Node IP address +NODE_IP="127.0.0.1" + +# Home directory +HOME_DIR="/tmp/hermes-ics-double-sign" + +# Hermes debug +if [ "$DEBUG" = true ]; then + HERMES_DEBUG="--debug=rpc" +else + HERMES_DEBUG="" +fi +# Hermes config +HERMES_CONFIG="$HOME_DIR/hermes.toml" +# Hermes binary +HERMES_BIN="cargo run -q --bin hermes -- $HERMES_DEBUG --config $HERMES_CONFIG" + +# Validator moniker +MONIKERS=("coordinator" "alice" "bob") +LEAD_VALIDATOR_MONIKER="coordinator" + +# Hermes will connect to this node on both provider and consumer +HERMES_VALIDATOR_MONIKER="bob" + +PROV_NODES_ROOT_DIR=${HOME_DIR}/nodes/provider +CONS_NODES_ROOT_DIR=${HOME_DIR}/nodes/consumer + +# Base port. Ports assigned after these ports sequentially by nodes. +RPC_LADDR_BASEPORT=29170 +P2P_LADDR_BASEPORT=29180 +GRPC_LADDR_BASEPORT=29190 +NODE_ADDRESS_BASEPORT=29200 +PPROF_LADDR_BASEPORT=29210 +CLIENT_BASEPORT=29220 + + +# Clean start +pkill -f interchain-security-pd &> /dev/null || true +pkill -f interchain-security-cd &> /dev/null || true +pkill -f hermes &> /dev/null || true +sleep 1 + +mkdir -p "${HOME_DIR}" +rm -rf "${PROV_NODES_ROOT_DIR}" +rm -rf "${CONS_NODES_ROOT_DIR}" + +# Let lead validator create genesis file +LEAD_VALIDATOR_PROV_DIR=${PROV_NODES_ROOT_DIR}/provider-${LEAD_VALIDATOR_MONIKER} +LEAD_VALIDATOR_CONS_DIR=${CONS_NODES_ROOT_DIR}/consumer-${LEAD_VALIDATOR_MONIKER} +LEAD_PROV_KEY=${LEAD_VALIDATOR_MONIKER}-key +LEAD_PROV_LISTEN_ADDR=tcp://${NODE_IP}:${RPC_LADDR_BASEPORT} + +for index in "${!MONIKERS[@]}" +do + MONIKER=${MONIKERS[$index]} + # validator key + PROV_KEY=${MONIKER}-key + PROV_KEY2=${MONIKER}-key2 + + # home directory of this validator on provider + PROV_NODE_DIR=${PROV_NODES_ROOT_DIR}/provider-${MONIKER} + + # home directory of this validator on consumer + CONS_NODE_DIR=${CONS_NODES_ROOT_DIR}/consumer-${MONIKER} + + # Build genesis file and node directory structure + interchain-security-pd init $MONIKER --chain-id provider --home ${PROV_NODE_DIR} + jq ".app_state.gov.voting_params.voting_period = \"10s\" | .app_state.staking.params.unbonding_time = \"86400s\"" \ + ${PROV_NODE_DIR}/config/genesis.json > \ + ${PROV_NODE_DIR}/edited_genesis.json && mv ${PROV_NODE_DIR}/edited_genesis.json ${PROV_NODE_DIR}/config/genesis.json + + + sleep 1 + + # Create account keypair + interchain-security-pd keys add $PROV_KEY --home ${PROV_NODE_DIR} --keyring-backend test --output json > ${PROV_NODE_DIR}/${PROV_KEY}.json 2>&1 + interchain-security-pd keys add $PROV_KEY2 --home ${PROV_NODE_DIR} --keyring-backend test --output json > ${PROV_NODE_DIR}/${PROV_KEY2}.json 2>&1 + sleep 1 + + # copy genesis in, unless this validator is the lead validator + if [ $MONIKER != $LEAD_VALIDATOR_MONIKER ]; then + cp ${LEAD_VALIDATOR_PROV_DIR}/config/genesis.json ${PROV_NODE_DIR}/config/genesis.json + fi + + # Add stake to user + PROV_ACCOUNT_ADDR=$(jq -r '.address' ${PROV_NODE_DIR}/${PROV_KEY}.json) + interchain-security-pd add-genesis-account $PROV_ACCOUNT_ADDR $USER_COINS --home ${PROV_NODE_DIR} --keyring-backend test + + PROV_ACCOUNT_ADDR2=$(jq -r '.address' ${PROV_NODE_DIR}/${PROV_KEY2}.json) + interchain-security-pd add-genesis-account $PROV_ACCOUNT_ADDR2 $USER_COINS --home ${PROV_NODE_DIR} --keyring-backend test + sleep 1 + + # copy genesis out, unless this validator is the lead validator + if [ $MONIKER != $LEAD_VALIDATOR_MONIKER ]; then + cp ${PROV_NODE_DIR}/config/genesis.json ${LEAD_VALIDATOR_PROV_DIR}/config/genesis.json + fi + + PPROF_LADDR=${NODE_IP}:$(($PPROF_LADDR_BASEPORT + $index)) + P2P_LADDR_PORT=$(($P2P_LADDR_BASEPORT + $index)) + + # adjust configs of this node + sed -i -r 's/timeout_commit = "5s"/timeout_commit = "3s"/g' ${PROV_NODE_DIR}/config/config.toml + sed -i -r 's/timeout_propose = "3s"/timeout_propose = "1s"/g' ${PROV_NODE_DIR}/config/config.toml + + # make address book non-strict. necessary for this setup + sed -i -r 's/addr_book_strict = true/addr_book_strict = false/g' ${PROV_NODE_DIR}/config/config.toml + + # avoid port double binding + sed -i -r "s/pprof_laddr = \"localhost:6060\"/pprof_laddr = \"${PPROF_LADDR}\"/g" ${PROV_NODE_DIR}/config/config.toml + + # allow duplicate IP addresses (all nodes are on the same machine) + sed -i -r 's/allow_duplicate_ip = false/allow_duplicate_ip = true/g' ${PROV_NODE_DIR}/config/config.toml +done + +for MONIKER in "${MONIKERS[@]}" +do + # validator key + PROV_KEY=${MONIKER}-key + + # home directory of this validator on provider + PROV_NODE_DIR=${PROV_NODES_ROOT_DIR}/provider-${MONIKER} + + # copy genesis in, unless this validator is the lead validator + if [ $MONIKER != $LEAD_VALIDATOR_MONIKER ]; then + cp ${LEAD_VALIDATOR_PROV_DIR}/config/genesis.json* ${PROV_NODE_DIR}/config/genesis.json + fi + + # Stake 1/1000 user's coins + interchain-security-pd gentx $PROV_KEY $STAKE --chain-id provider --home ${PROV_NODE_DIR} --keyring-backend test --moniker $MONIKER + sleep 1 + + # Copy gentxs to the lead validator for possible future collection. + # Obviously we don't need to copy the first validator's gentx to itself + if [ $MONIKER != $LEAD_VALIDATOR_MONIKER ]; then + cp ${PROV_NODE_DIR}/config/gentx/* ${LEAD_VALIDATOR_PROV_DIR}/config/gentx/ + fi +done + +# Collect genesis transactions with lead validator +interchain-security-pd collect-gentxs --home ${LEAD_VALIDATOR_PROV_DIR} --gentx-dir ${LEAD_VALIDATOR_PROV_DIR}/config/gentx/ + +sleep 1 + + +for index in "${!MONIKERS[@]}" +do + MONIKER=${MONIKERS[$index]} + + PERSISTENT_PEERS="" + + for peer_index in "${!MONIKERS[@]}" + do + if [ $index == $peer_index ]; then + continue + fi + PEER_MONIKER=${MONIKERS[$peer_index]} + + PEER_PROV_NODE_DIR=${PROV_NODES_ROOT_DIR}/provider-${PEER_MONIKER} + + PEER_NODE_ID=$(interchain-security-pd tendermint show-node-id --home ${PEER_PROV_NODE_DIR}) + + PEER_P2P_LADDR_PORT=$(($P2P_LADDR_BASEPORT + $peer_index)) + PERSISTENT_PEERS="$PERSISTENT_PEERS,$PEER_NODE_ID@${NODE_IP}:${PEER_P2P_LADDR_PORT}" + done + + # remove trailing comma from persistent peers + PERSISTENT_PEERS=${PERSISTENT_PEERS:1} + + # validator key + PROV_KEY=${MONIKER}-key + PROV_KEY2=${MONIKER}-key2 + + # home directory of this validator on provider + PROV_NODE_DIR=${PROV_NODES_ROOT_DIR}/provider-${MONIKER} + + # home directory of this validator on consumer + CONS_NODE_DIR=${PROV_NODES_ROOT_DIR}/consumer-${MONIKER} + + # copy genesis in, unless this validator is already the lead validator and thus it already has its genesis + if [ $MONIKER != $LEAD_VALIDATOR_MONIKER ]; then + cp ${LEAD_VALIDATOR_PROV_DIR}/config/genesis.json ${PROV_NODE_DIR}/config/genesis.json + fi + + RPC_LADDR_PORT=$(($RPC_LADDR_BASEPORT + $index)) + P2P_LADDR_PORT=$(($P2P_LADDR_BASEPORT + $index)) + GRPC_LADDR_PORT=$(($GRPC_LADDR_BASEPORT + $index)) + NODE_ADDRESS_PORT=$(($NODE_ADDRESS_BASEPORT + $index)) + + if [ $MONIKER == $HERMES_VALIDATOR_MONIKER ]; then + PRPC_LADDR_PORT=$RPC_LADDR_PORT + PGRPC_LADDR_PORT=$GRPC_LADDR_PORT + fi + # Start gaia + interchain-security-pd start \ + --home ${PROV_NODE_DIR} \ + --p2p.persistent_peers ${PERSISTENT_PEERS} \ + --rpc.laddr tcp://${NODE_IP}:${RPC_LADDR_PORT} \ + --grpc.address ${NODE_IP}:${GRPC_LADDR_PORT} \ + --address tcp://${NODE_IP}:${NODE_ADDRESS_PORT} \ + --p2p.laddr tcp://${NODE_IP}:${P2P_LADDR_PORT} \ + --grpc-web.enable=false &> ${PROV_NODE_DIR}/logs & + + sleep 5 +done + +# Build consumer chain proposal file +tee ${LEAD_VALIDATOR_PROV_DIR}/consumer-proposal.json< ${CONS_NODE_DIR}/${PROV_KEY}.json 2>&1 + interchain-security-cd keys add $PROV_KEY2 --home ${CONS_NODE_DIR} --keyring-backend test --output json > ${CONS_NODE_DIR}/${PROV_KEY2}.json 2>&1 + sleep 1 + + # copy genesis in, unless this validator is the lead validator + if [ $MONIKER != $LEAD_VALIDATOR_MONIKER ]; then + cp ${LEAD_VALIDATOR_CONS_DIR}/config/genesis.json ${CONS_NODE_DIR}/config/genesis.json + fi + + # Add stake to user + CONS_ACCOUNT_ADDR=$(jq -r '.address' ${CONS_NODE_DIR}/${PROV_KEY}.json) + interchain-security-cd add-genesis-account $CONS_ACCOUNT_ADDR $USER_COINS --home ${CONS_NODE_DIR} + CONS_ACCOUNT_ADDR2=$(jq -r '.address' ${CONS_NODE_DIR}/${PROV_KEY2}.json) + interchain-security-cd add-genesis-account $CONS_ACCOUNT_ADDR2 $USER_COINS --home ${CONS_NODE_DIR} + sleep 10 + + ### this probably doesnt have to be done for each node + # Add consumer genesis states to genesis file + RPC_LADDR_PORT=$(($RPC_LADDR_BASEPORT + $index)) + RPC_LADDR=tcp://${NODE_IP}:${RPC_LADDR_PORT} + interchain-security-pd query provider consumer-genesis consumer --home ${PROV_NODE_DIR} --node ${RPC_LADDR} -o json > consumer_gen.json + jq -s '.[0].app_state.ccvconsumer = .[1] | .[0]' ${CONS_NODE_DIR}/config/genesis.json consumer_gen.json > ${CONS_NODE_DIR}/edited_genesis.json \ + && mv ${CONS_NODE_DIR}/edited_genesis.json ${CONS_NODE_DIR}/config/genesis.json + rm consumer_gen.json + ### + + # copy genesis out, unless this validator is the lead validator + if [ $MONIKER != $LEAD_VALIDATOR_MONIKER ]; then + cp ${CONS_NODE_DIR}/config/genesis.json ${LEAD_VALIDATOR_CONS_DIR}/config/genesis.json + fi + + PPROF_LADDR=${NODE_IP}:$(($PPROF_LADDR_BASEPORT + ${#MONIKERS[@]} + $index)) + P2P_LADDR_PORT=$(($P2P_LADDR_BASEPORT + ${#MONIKERS[@]} + $index)) + + # adjust configs of this node + sed -i -r 's/timeout_commit = "5s"/timeout_commit = "3s"/g' ${CONS_NODE_DIR}/config/config.toml + sed -i -r 's/timeout_propose = "3s"/timeout_propose = "1s"/g' ${CONS_NODE_DIR}/config/config.toml + + # make address book non-strict. necessary for this setup + sed -i -r 's/addr_book_strict = true/addr_book_strict = false/g' ${CONS_NODE_DIR}/config/config.toml + + # avoid port double binding + sed -i -r "s/pprof_laddr = \"localhost:6060\"/pprof_laddr = \"${PPROF_LADDR}\"/g" ${CONS_NODE_DIR}/config/config.toml + + # allow duplicate IP addresses (all nodes are on the same machine) + sed -i -r 's/allow_duplicate_ip = false/allow_duplicate_ip = true/g' ${CONS_NODE_DIR}/config/config.toml + + # Create validator states + echo '{"height": "0","round": 0,"step": 0}' > ${CONS_NODE_DIR}/data/priv_validator_state.json + + # Copy validator key files + cp ${PROV_NODE_DIR}/config/priv_validator_key.json ${CONS_NODE_DIR}/config/priv_validator_key.json + cp ${PROV_NODE_DIR}/config/node_key.json ${CONS_NODE_DIR}/config/node_key.json + + # Set default client port + CLIENT_PORT=$(($CLIENT_BASEPORT + ${#MONIKERS[@]} + $index)) + sed -i -r "/node =/ s/= .*/= \"tcp:\/\/${NODE_IP}:${CLIENT_PORT}\"/" ${CONS_NODE_DIR}/config/client.toml + +done + +sleep 1 + + +for index in "${!MONIKERS[@]}" +do + MONIKER=${MONIKERS[$index]} + + PERSISTENT_PEERS="" + + for peer_index in "${!MONIKERS[@]}" + do + if [ $index == $peer_index ]; then + continue + fi + PEER_MONIKER=${MONIKERS[$peer_index]} + + PEER_CONS_NODE_DIR=${CONS_NODES_ROOT_DIR}/consumer-${PEER_MONIKER} + + PEER_NODE_ID=$(interchain-security-pd tendermint show-node-id --home ${PEER_CONS_NODE_DIR}) + + PEER_P2P_LADDR_PORT=$(($P2P_LADDR_BASEPORT + ${#MONIKERS[@]} + $peer_index)) + PERSISTENT_PEERS="$PERSISTENT_PEERS,$PEER_NODE_ID@${NODE_IP}:${PEER_P2P_LADDR_PORT}" + done + + # remove trailing comma from persistent peers + PERSISTENT_PEERS=${PERSISTENT_PEERS:1} + + # validator key + PROV_KEY=${MONIKER}-key + + # home directory of this validator on provider + PROV_NODE_DIR=${PROV_NODES_ROOT_DIR}/provider-${MONIKER} + + # home directory of this validator on consumer + CONS_NODE_DIR=${CONS_NODES_ROOT_DIR}/consumer-${MONIKER} + + # copy genesis in, unless this validator is already the lead validator and thus it already has its genesis + if [ $MONIKER != $LEAD_VALIDATOR_MONIKER ]; then + cp ${LEAD_VALIDATOR_CONS_DIR}/config/genesis.json ${CONS_NODE_DIR}/config/genesis.json + fi + + RPC_LADDR_PORT=$(($RPC_LADDR_BASEPORT + ${#MONIKERS[@]} + $index)) + P2P_LADDR_PORT=$(($P2P_LADDR_BASEPORT + ${#MONIKERS[@]} + $index)) + GRPC_LADDR_PORT=$(($GRPC_LADDR_BASEPORT + ${#MONIKERS[@]} + $index)) + NODE_ADDRESS_PORT=$(($NODE_ADDRESS_BASEPORT + ${#MONIKERS[@]} + $index)) + + if [ $MONIKER == $HERMES_VALIDATOR_MONIKER ]; then + CRPC_LADDR_PORT=$RPC_LADDR_PORT + CGRPC_LADDR_PORT=$GRPC_LADDR_PORT + fi + # Start gaia + interchain-security-cd start \ + --home ${CONS_NODE_DIR} \ + --p2p.persistent_peers ${PERSISTENT_PEERS} \ + --rpc.laddr tcp://${NODE_IP}:${RPC_LADDR_PORT} \ + --grpc.address ${NODE_IP}:${GRPC_LADDR_PORT} \ + --address tcp://${NODE_IP}:${NODE_ADDRESS_PORT} \ + --p2p.laddr tcp://${NODE_IP}:${P2P_LADDR_PORT} \ + --grpc-web.enable=false &> ${CONS_NODE_DIR}/logs & + + sleep 6 +done + +## Cause double signing + +# create directory for double signing node +mkdir $CONS_NODES_ROOT_DIR/consumer-bob-sybil/ +cp -r $CONS_NODES_ROOT_DIR/consumer-bob/* $CONS_NODES_ROOT_DIR/consumer-bob-sybil + +# clear state in consumer-bob-sybil +echo '{"height": "0","round": 0,"step": 0,"signature":"","signbytes":""}' > $CONS_NODES_ROOT_DIR/consumer-bob-sybil/data/priv_validator_state.json + +# add new node key to sybil +# key was generated using gaiad init +# if the node key is not unique, double signing cannot be achieved +# and errors such as this can be seen in the terminal +# 5:54PM ERR found conflicting vote from ourselves; did you unsafe_reset a validator? height=1961 module=consensus round=0 type=2 +# 5:54PM ERR failed to process message err="conflicting votes from validator C888306A908A217B9A943D1DAD8790044D0947A4" +echo '{"priv_key":{"type":"tendermint/PrivKeyEd25519","value":"tj55by/yYwruSz4NxsOG9y9k2WrPvKLXKQdz/9jL9Uptmi647OYpcisjwf92TyA+wCUYVDOgW7D53Q+638l9/w=="}}' > $CONS_NODES_ROOT_DIR/consumer-bob-sybil/config/node_key.json + +# does not use persistent peers; will do a lookup in genesis.json to find peers +#ARGS="--address tcp://$CHAIN_PREFIX.252:26655 --rpc.laddr tcp://$CHAIN_PREFIX.252:26658 --grpc.address $CHAIN_PREFIX.252:9091 --log_level trace --p2p.laddr tcp://$CHAIN_PREFIX.252:26656 --grpc-web.enable=false" + +# start double signing node - it should not talk to the node with the same key +#ip netns exec $HOME/nodes/consumer/consumer-bob-sybil $BIN $ARGS --home $HOME/nodes/consumer/consumer-bob-sybil start &> $HOME/nodes/consumer/consumer-bob-sybil/logs & + +# Start gaia +interchain-security-cd start \ + --home $CONS_NODES_ROOT_DIR/consumer-bob-sybil \ + --p2p.persistent_peers ${PERSISTENT_PEERS} \ + --rpc.laddr tcp://${NODE_IP}:29179 \ + --grpc.address ${NODE_IP}:29199 \ + --address tcp://${NODE_IP}:29209 \ + --p2p.laddr tcp://${NODE_IP}:29189 \ + --grpc-web.enable=false &> $CONS_NODES_ROOT_DIR/consumer-bob-sybil/logs & + +# Setup Hermes config file + +tee $HERMES_CONFIG< $HOME_DIR/hermes-start-logs.txt & + +$HERMES_BIN evidence --chain consumer --key-name evidence &> $HOME_DIR/hermes-evidence-logs.txt & + +for _ in $(seq 1 10) +do + sleep 5 + + MSG="successfully submitted double voting evidence to chain" + + if grep -c "$MSG" $HOME_DIR/hermes-evidence-logs.txt; then + echo "[SUCCESS] Successfully submitted double voting evidence to provider chain" + exit 0 + fi +done + +echo "[ERROR] Failed to submit double voting evidence to provider chain" +echo "" +echo "---------------------------------------------------------------" +echo "Hermes start logs:" +cat $HOME_DIR/hermes-start-logs.txt +echo "---------------------------------------------------------------" +echo "Hermes evidence logs:" +cat $HOME_DIR/hermes-evidence-logs.txt +echo "---------------------------------------------------------------" + +exit 1 + diff --git a/ci/misbehaviour-ics/light_client_attack_freeze_test.sh b/ci/misbehaviour-ics/light_client_attack_freeze_test.sh new file mode 100644 index 0000000000..d71fa26c80 --- /dev/null +++ b/ci/misbehaviour-ics/light_client_attack_freeze_test.sh @@ -0,0 +1,508 @@ +#!/bin/bash +# shellcheck disable=2086 + +set -eu + +DEBUG=${DEBUG:-false} + +if [ "$DEBUG" = true ]; then + set -x +fi + +diag() { + echo ">> +>> $* +>>" 1>&2 +} + +waiting() { + secs=$1 + shift + msg="$*" + while [ $secs -gt 0 ] + do + echo -ne "|| Waiting $msg (${secs}s)\033[0K\r" + sleep 1 + : $((secs--)) + done + echo "|| Waiting $msg (done)" +} + + +# User balance of stake tokens +USER_COINS="100000000000stake" +# Amount of stake tokens staked +STAKE="100000000stake" +# Amount of stake tokens staked +STAKE2="4000000stake" +# Node IP address +NODE_IP="127.0.0.1" + +# Home directory +HOME_DIR="/tmp/hermes-ics-misbehaviour" + +# Hermes debug +if [ "$DEBUG" = true ]; then + HERMES_DEBUG="--debug=rpc" +else + HERMES_DEBUG="" +fi + +# Hermes config +HERMES_CONFIG="$HOME_DIR/hermes.toml" +HERMES_CONFIG_FORK="$HOME_DIR/hermes-fork.toml" +# Hermes binary +HERMES_BIN="cargo run -q --bin hermes -- $HERMES_DEBUG --config $HERMES_CONFIG" +HERMES_BIN_FORK="cargo run -q --bin hermes -- $HERMES_DEBUG --config $HERMES_CONFIG_FORK" + +# Validator moniker +MONIKER="coordinator" +MONIKER_SUB="sub" + +# Validator directory +PROV_NODE_DIR=${HOME_DIR}/provider-${MONIKER} +PROV_NODE_SUB_DIR=${HOME_DIR}/provider-${MONIKER_SUB} +CONS_NODE_DIR=${HOME_DIR}/consumer-${MONIKER} +CONS_NODE_SUB_DIR=${HOME_DIR}/consumer-${MONIKER_SUB} +CONS_FORK_NODE_DIR=${HOME_DIR}/consumer-fork-${MONIKER} + +# Coordinator key +PROV_KEY=${MONIKER}-key +PROV_KEY_SUB=${MONIKER_SUB}-key + + +# Clean start +pkill -f interchain-security-pd &> /dev/null || true +pkill -f interchain-security-cd &> /dev/null || true +pkill -f hermes &> /dev/null || true + +mkdir -p "${HOME_DIR}" +rm -rf "${PROV_NODE_DIR}" +rm -rf "${PROV_NODE_SUB_DIR}" +rm -rf "${CONS_NODE_DIR}" +rm -rf "${CONS_NODE_SUB_DIR}" +rm -rf "${CONS_FORK_NODE_DIR}" + +# Build genesis file and node directory structure +interchain-security-pd init $MONIKER --chain-id provider --home ${PROV_NODE_DIR} +jq ".app_state.gov.voting_params.voting_period = \"3s\" | .app_state.staking.params.unbonding_time = \"86400s\"" \ + ${PROV_NODE_DIR}/config/genesis.json > \ + ${PROV_NODE_DIR}/edited_genesis.json && mv ${PROV_NODE_DIR}/edited_genesis.json ${PROV_NODE_DIR}/config/genesis.json + +# Create account keypair +interchain-security-pd keys add $PROV_KEY --home ${PROV_NODE_DIR} --keyring-backend test --output json > ${PROV_NODE_DIR}/${PROV_KEY}.json 2>&1 + +# Add stake to user +PROV_ACCOUNT_ADDR=$(jq -r '.address' ${PROV_NODE_DIR}/${PROV_KEY}.json) +interchain-security-pd add-genesis-account "$PROV_ACCOUNT_ADDR" $USER_COINS --home ${PROV_NODE_DIR} --keyring-backend test + +# Stake 1/1000 user's coins +interchain-security-pd gentx $PROV_KEY $STAKE --chain-id provider --home ${PROV_NODE_DIR} --keyring-backend test --moniker $MONIKER + +## config second node + +rm -rf ${PROV_NODE_SUB_DIR} + +# Build genesis file and node directory structure +interchain-security-pd init $MONIKER_SUB --chain-id provider --home ${PROV_NODE_SUB_DIR} + +# Create account keypair +interchain-security-pd keys add $PROV_KEY_SUB --home ${PROV_NODE_SUB_DIR} --keyring-backend test --output json > ${PROV_NODE_SUB_DIR}/${PROV_KEY_SUB}.json 2>&1 + +cp ${PROV_NODE_DIR}/config/genesis.json ${PROV_NODE_SUB_DIR}/config/genesis.json + +# Add stake to user +PROV_ACCOUNT_ADDR=$(jq -r '.address' ${PROV_NODE_SUB_DIR}/${PROV_KEY_SUB}.json) +interchain-security-pd add-genesis-account "$PROV_ACCOUNT_ADDR" $USER_COINS --home ${PROV_NODE_SUB_DIR} --keyring-backend test + +cp -r ${PROV_NODE_DIR}/config/gentx/ ${PROV_NODE_SUB_DIR}/config/gentx/ + +# # Stake 1/1000 user's coins +interchain-security-pd gentx $PROV_KEY_SUB $STAKE2 --chain-id provider --home ${PROV_NODE_SUB_DIR} --keyring-backend test --moniker $MONIKER_SUB + +interchain-security-pd collect-gentxs --home ${PROV_NODE_SUB_DIR} --gentx-dir ${PROV_NODE_SUB_DIR}/config/gentx/ + +cp ${PROV_NODE_SUB_DIR}/config/genesis.json ${PROV_NODE_DIR}/config/genesis.json + + +# Start nodes + +sed -i -r "/node =/ s/= .*/= \"tcp:\/\/${NODE_IP}:26658\"/" ${PROV_NODE_DIR}/config/client.toml +sed -i -r 's/timeout_commit = "5s"/timeout_commit = "3s"/g' ${PROV_NODE_DIR}/config/config.toml +sed -i -r 's/timeout_propose = "3s"/timeout_propose = "1s"/g' ${PROV_NODE_DIR}/config/config.toml +sed -i -r 's/fast_sync = true/fast_sync = false/g' ${PROV_NODE_DIR}/config/config.toml + +# Start gaia +interchain-security-pd start \ + --home ${PROV_NODE_DIR} \ + --rpc.laddr tcp://${NODE_IP}:26658 \ + --grpc.address ${NODE_IP}:9091 \ + --address tcp://${NODE_IP}:26655 \ + --p2p.laddr tcp://${NODE_IP}:26656 \ + --grpc-web.enable=false &> ${PROV_NODE_DIR}/logs & + +waiting 10 "for provider node to start" + +sed -i -r "/node =/ s/= .*/= \"tcp:\/\/${NODE_IP}:26628\"/" ${PROV_NODE_SUB_DIR}/config/client.toml +sed -i -r 's/timeout_commit = "5s"/timeout_commit = "3s"/g' ${PROV_NODE_SUB_DIR}/config/config.toml +sed -i -r 's/timeout_propose = "3s"/timeout_propose = "1s"/g' ${PROV_NODE_SUB_DIR}/config/config.toml +sed -i -r 's/fast_sync = true/fast_sync = false/g' ${PROV_NODE_SUB_DIR}/config/config.toml + +# Start gaia +interchain-security-pd start \ + --home ${PROV_NODE_SUB_DIR} \ + --rpc.laddr tcp://${NODE_IP}:26628 \ + --grpc.address ${NODE_IP}:9021 \ + --address tcp://${NODE_IP}:26625 \ + --p2p.laddr tcp://${NODE_IP}:26626 \ + --grpc-web.enable=false &> ${PROV_NODE_SUB_DIR}/logs & + +waiting 10 "for provider sub-node to start" + +# Build consumer chain proposal file +tee ${PROV_NODE_DIR}/consumer-proposal.json< ${CONS_NODE_DIR}/${PROV_KEY}.json 2>&1 + +# Add stake to user account +CONS_ACCOUNT_ADDR=$(jq -r '.address' ${CONS_NODE_DIR}/${PROV_KEY}.json) +interchain-security-cd add-genesis-account "$CONS_ACCOUNT_ADDR" 1000000000stake --home ${CONS_NODE_DIR} + +# Add consumer genesis states to genesis file +interchain-security-pd query provider consumer-genesis consumer --home ${PROV_NODE_DIR} -o json > consumer_gen.json +jq -s '.[0].app_state.ccvconsumer = .[1] | .[0]' ${CONS_NODE_DIR}/config/genesis.json consumer_gen.json > ${CONS_NODE_DIR}/edited_genesis.json \ +&& mv ${CONS_NODE_DIR}/edited_genesis.json ${CONS_NODE_DIR}/config/genesis.json +rm consumer_gen.json + +# Create validator states +echo '{"height": "0","round": 0,"step": 0}' > ${CONS_NODE_DIR}/data/priv_validator_state.json + +# Copy validator key files +cp ${PROV_NODE_DIR}/config/priv_validator_key.json ${CONS_NODE_DIR}/config/priv_validator_key.json +cp ${PROV_NODE_DIR}/config/node_key.json ${CONS_NODE_DIR}/config/node_key.json + +# Set default client port +sed -i -r "/node =/ s/= .*/= \"tcp:\/\/${NODE_IP}:26648\"/" ${CONS_NODE_DIR}/config/client.toml +sed -i -r 's/fast_sync = true/fast_sync = false/g' ${CONS_NODE_DIR}/config/config.toml + + +# Start gaia +interchain-security-cd start --home ${CONS_NODE_DIR} \ + --rpc.laddr tcp://${NODE_IP}:26648 \ + --grpc.address ${NODE_IP}:9081 \ + --address tcp://${NODE_IP}:26645 \ + --p2p.laddr tcp://${NODE_IP}:26646 \ + --grpc-web.enable=false \ + &> ${CONS_NODE_DIR}/logs & + +waiting 20 "for consumer node to start" + +tee ${HERMES_CONFIG}< Height: ${height}, Hash: ${hash}" + +cp -r ${CONS_NODE_DIR} ${CONS_FORK_NODE_DIR} +# Set default client port +sed -i -r "/node =/ s/= .*/= \"tcp:\/\/${NODE_IP}:26638\"/" ${CONS_FORK_NODE_DIR}/config/client.toml +sed -i -r 's/fast_sync = true/fast_sync = false/g' ${CONS_FORK_NODE_DIR}/config/config.toml + + +# Start gaia +interchain-security-cd start --home ${CONS_FORK_NODE_DIR} \ + --rpc.laddr tcp://${NODE_IP}:26638 \ + --grpc.address ${NODE_IP}:9071 \ + --address tcp://${NODE_IP}:26635 \ + --p2p.laddr tcp://${NODE_IP}:26636 \ + --grpc-web.enable=false \ + &> ${CONS_FORK_NODE_DIR}/logs & + +waiting 5 "for forked consumer node to start" + +diag "Start Hermes relayer multi-chain mode" + +$HERMES_BIN start &> ${HOME_DIR}/hermes-start-logs.txt & + +# If we sleep 5 here and below, we end up on the forked block later +waiting 10 "for Hermes relayer to start" + +diag "Running Hermes relayer evidence command" + +# Run hermes in evidence mode +$HERMES_BIN evidence --chain consumer &> ${HOME_DIR}/hermes-evidence-logs.txt & + +# If we sleep 5 here and above, we end up on the forked block later +waiting 10 "for Hermes evidence monitor to start" + +diag "Updating client on forked chain using trusted height $TRUSTED_HEIGHT" +$HERMES_BIN_FORK update client --client 07-tendermint-0 --host-chain provider --trusted-height "$TRUSTED_HEIGHT" + +waiting 20 "for Hermes to detect and submit evidence" + +# Check the client state on provider and verify it is frozen +FROZEN_HEIGHT=$($HERMES_BIN --json query client state --chain provider --client 07-tendermint-0 | tail -n 1 | jq '.result.frozen_height.revision_height') + +diag "Frozen height: $FROZEN_HEIGHT" + +if [ "$FROZEN_HEIGHT" != "null" ]; then + diag "Client is frozen, as expected." +else + diag "Client is not frozen, aborting." + exit 1 +fi + +if grep -q "found light client attack evidence" ${HOME_DIR}/hermes-evidence-logs.txt; then + diag "Evidence found, proceeding." +else + diag "Evidence not found, aborting." + exit 1 +fi + +waiting 20 "for Hermes to submit evidence and freeze client" + +if grep -q "successfully submitted light client attack evidence" ${HOME_DIR}/hermes-evidence-logs.txt; then + diag "Evidence successfully submitted, success!" +else + if grep -q "provider is frozen" ${HOME_DIR}/hermes-evidence-logs.txt; then + diag "Client on provider is already frozen, as expected. Success!" + exit 0 + elif grep -q "client is frozen and does not have a consensus state at height" ${HOME_DIR}/hermes-evidence-logs.txt; then + diag "Client already frozen and does not have a consensus state at common height, cannot do anything." + exit 0 + else + diag "Evidence not submitted, failed." + echo "" + + diag "Hermes evidence logs:" + cat ${HOME_DIR}/hermes-evidence-logs.txt + + exit 1 + fi +fi + diff --git a/ci/misbehaviour-ics/light_client_attack_test.sh b/ci/misbehaviour-ics/light_client_attack_test.sh new file mode 100644 index 0000000000..8637882887 --- /dev/null +++ b/ci/misbehaviour-ics/light_client_attack_test.sh @@ -0,0 +1,556 @@ +#!/bin/bash +# shellcheck disable=2086 + +set -eu + +DEBUG=${DEBUG:-false} + +if [ "$DEBUG" = true ]; then + set -x +fi + +diag() { + echo ">> +>> $* +>>" 1>&2 +} + +waiting() { + secs=$1 + shift + msg="$*" + while [ $secs -gt 0 ] + do + echo -ne "|| Waiting $msg (${secs}s)\033[0K\r" + sleep 1 + : $((secs--)) + done + echo "|| Waiting $msg (done)" +} + + +# User balance of stake tokens +USER_COINS="100000000000stake" +# Amount of stake tokens staked +STAKE="100000000stake" +# Amount of stake tokens staked +STAKE2="4000000stake" +# Node IP address +NODE_IP="127.0.0.1" + +# Home directory +HOME_DIR="/tmp/hermes-ics-misbehaviour" + +# Hermes debug +if [ "$DEBUG" = true ]; then + HERMES_DEBUG="--debug=rpc" +else + HERMES_DEBUG="" +fi + +# Hermes config +HERMES_CONFIG="$HOME_DIR/hermes.toml" +HERMES_CONFIG_FORK="$HOME_DIR/hermes-fork.toml" +# Hermes binary +HERMES_BIN="cargo run -q --bin hermes -- $HERMES_DEBUG --config $HERMES_CONFIG" +HERMES_BIN_FORK="cargo run -q --bin hermes -- $HERMES_DEBUG --config $HERMES_CONFIG_FORK" + +# Validator moniker +MONIKER="coordinator" +MONIKER_SUB="sub" + +# Validator directory +PROV_NODE_DIR=${HOME_DIR}/provider-${MONIKER} +PROV_NODE_SUB_DIR=${HOME_DIR}/provider-${MONIKER_SUB} +CONS_NODE_DIR=${HOME_DIR}/consumer-${MONIKER} +CONS_NODE_SUB_DIR=${HOME_DIR}/consumer-${MONIKER_SUB} +CONS_FORK_NODE_DIR=${HOME_DIR}/consumer-fork-${MONIKER} + +# Coordinator key +PROV_KEY=${MONIKER}-key +PROV_KEY_SUB=${MONIKER_SUB}-key + + +# Clean start +pkill -f interchain-security-pd &> /dev/null || true +pkill -f interchain-security-cd &> /dev/null || true +pkill -f hermes &> /dev/null || true + +mkdir -p "${HOME_DIR}" +rm -rf "${PROV_NODE_DIR}" +rm -rf "${PROV_NODE_SUB_DIR}" +rm -rf "${CONS_NODE_DIR}" +rm -rf "${CONS_NODE_SUB_DIR}" +rm -rf "${CONS_FORK_NODE_DIR}" + +# Build genesis file and node directory structure +interchain-security-pd init $MONIKER --chain-id provider --home ${PROV_NODE_DIR} +jq ".app_state.gov.voting_params.voting_period = \"3s\" | .app_state.staking.params.unbonding_time = \"86400s\"" \ + ${PROV_NODE_DIR}/config/genesis.json > \ + ${PROV_NODE_DIR}/edited_genesis.json && mv ${PROV_NODE_DIR}/edited_genesis.json ${PROV_NODE_DIR}/config/genesis.json + +# Create account keypair +interchain-security-pd keys add $PROV_KEY --home ${PROV_NODE_DIR} --keyring-backend test --output json > ${PROV_NODE_DIR}/${PROV_KEY}.json 2>&1 + +# Add stake to user +PROV_ACCOUNT_ADDR=$(jq -r '.address' ${PROV_NODE_DIR}/${PROV_KEY}.json) +interchain-security-pd add-genesis-account "$PROV_ACCOUNT_ADDR" $USER_COINS --home ${PROV_NODE_DIR} --keyring-backend test + +# Stake 1/1000 user's coins +interchain-security-pd gentx $PROV_KEY $STAKE --chain-id provider --home ${PROV_NODE_DIR} --keyring-backend test --moniker $MONIKER + +## config second node + +rm -rf ${PROV_NODE_SUB_DIR} + +# Build genesis file and node directory structure +interchain-security-pd init $MONIKER_SUB --chain-id provider --home ${PROV_NODE_SUB_DIR} + +waiting 1 "" + +# Create account keypair +interchain-security-pd keys add $PROV_KEY_SUB --home ${PROV_NODE_SUB_DIR} --keyring-backend test --output json > ${PROV_NODE_SUB_DIR}/${PROV_KEY_SUB}.json 2>&1 +waiting 1 "" + +cp ${PROV_NODE_DIR}/config/genesis.json ${PROV_NODE_SUB_DIR}/config/genesis.json + +# Add stake to user +PROV_ACCOUNT_ADDR=$(jq -r '.address' ${PROV_NODE_SUB_DIR}/${PROV_KEY_SUB}.json) +interchain-security-pd add-genesis-account "$PROV_ACCOUNT_ADDR" $USER_COINS --home ${PROV_NODE_SUB_DIR} --keyring-backend test +waiting 1 "" + + + +cp -r ${PROV_NODE_DIR}/config/gentx/ ${PROV_NODE_SUB_DIR}/config/gentx/ + +# # Stake 1/1000 user's coins +interchain-security-pd gentx $PROV_KEY_SUB $STAKE2 --chain-id provider --home ${PROV_NODE_SUB_DIR} --keyring-backend test --moniker $MONIKER_SUB +waiting 1 "" + + +interchain-security-pd collect-gentxs --home ${PROV_NODE_SUB_DIR} --gentx-dir ${PROV_NODE_SUB_DIR}/config/gentx/ + +cp ${PROV_NODE_SUB_DIR}/config/genesis.json ${PROV_NODE_DIR}/config/genesis.json + + + +# Start nodes + +sed -i -r "/node =/ s/= .*/= \"tcp:\/\/${NODE_IP}:26658\"/" ${PROV_NODE_DIR}/config/client.toml +sed -i -r 's/timeout_commit = "5s"/timeout_commit = "3s"/g' ${PROV_NODE_DIR}/config/config.toml +sed -i -r 's/timeout_propose = "3s"/timeout_propose = "1s"/g' ${PROV_NODE_DIR}/config/config.toml +sed -i -r 's/fast_sync = true/fast_sync = false/g' ${PROV_NODE_DIR}/config/config.toml + + + +# Start gaia +interchain-security-pd start \ + --home ${PROV_NODE_DIR} \ + --rpc.laddr tcp://${NODE_IP}:26658 \ + --grpc.address ${NODE_IP}:9091 \ + --address tcp://${NODE_IP}:26655 \ + --p2p.laddr tcp://${NODE_IP}:26656 \ + --grpc-web.enable=false &> ${PROV_NODE_DIR}/logs & + +waiting 5 "for provider node to start" + +sed -i -r "/node =/ s/= .*/= \"tcp:\/\/${NODE_IP}:26628\"/" ${PROV_NODE_SUB_DIR}/config/client.toml +sed -i -r 's/timeout_commit = "5s"/timeout_commit = "3s"/g' ${PROV_NODE_SUB_DIR}/config/config.toml +sed -i -r 's/timeout_propose = "3s"/timeout_propose = "1s"/g' ${PROV_NODE_SUB_DIR}/config/config.toml +sed -i -r 's/fast_sync = true/fast_sync = false/g' ${PROV_NODE_SUB_DIR}/config/config.toml + + + +# # Start gaia +interchain-security-pd start \ + --home ${PROV_NODE_SUB_DIR} \ + --rpc.laddr tcp://${NODE_IP}:26628 \ + --grpc.address ${NODE_IP}:9021 \ + --address tcp://${NODE_IP}:26625 \ + --p2p.laddr tcp://${NODE_IP}:26626 \ + --grpc-web.enable=false &> ${PROV_NODE_SUB_DIR}/logs & + +waiting 5 "for provider sub-node to start" + +# Build consumer chain proposal file +tee ${PROV_NODE_DIR}/consumer-proposal.json< ${CONS_NODE_DIR}/${PROV_KEY}.json 2>&1 + +# Add stake to user account +CONS_ACCOUNT_ADDR=$(jq -r '.address' ${CONS_NODE_DIR}/${PROV_KEY}.json) +interchain-security-cd add-genesis-account "$CONS_ACCOUNT_ADDR" 1000000000stake --home ${CONS_NODE_DIR} + +# Add consumer genesis states to genesis file +interchain-security-pd query provider consumer-genesis consumer --home ${PROV_NODE_DIR} -o json > consumer_gen.json +jq -s '.[0].app_state.ccvconsumer = .[1] | .[0]' ${CONS_NODE_DIR}/config/genesis.json consumer_gen.json > ${CONS_NODE_DIR}/edited_genesis.json \ +&& mv ${CONS_NODE_DIR}/edited_genesis.json ${CONS_NODE_DIR}/config/genesis.json +rm consumer_gen.json + +# Create validator states +echo '{"height": "0","round": 0,"step": 0}' > ${CONS_NODE_DIR}/data/priv_validator_state.json + +# Copy validator key files +cp ${PROV_NODE_DIR}/config/priv_validator_key.json ${CONS_NODE_DIR}/config/priv_validator_key.json +cp ${PROV_NODE_DIR}/config/node_key.json ${CONS_NODE_DIR}/config/node_key.json + +# Set default client port +sed -i -r "/node =/ s/= .*/= \"tcp:\/\/${NODE_IP}:26648\"/" ${CONS_NODE_DIR}/config/client.toml +sed -i -r 's/fast_sync = true/fast_sync = false/g' ${CONS_NODE_DIR}/config/config.toml + + +# Start gaia +interchain-security-cd start --home ${CONS_NODE_DIR} \ + --rpc.laddr tcp://${NODE_IP}:26648 \ + --grpc.address ${NODE_IP}:9081 \ + --address tcp://${NODE_IP}:26645 \ + --p2p.laddr tcp://${NODE_IP}:26646 \ + --grpc-web.enable=false \ + &> ${CONS_NODE_DIR}/logs & + +waiting 20 "for consumer node to start" + +tee ${HERMES_CONFIG}< Height: ${height}, Hash: ${hash}" + +cp -r ${CONS_NODE_DIR} ${CONS_FORK_NODE_DIR} +# Set default client port +sed -i -r "/node =/ s/= .*/= \"tcp:\/\/${NODE_IP}:26638\"/" ${CONS_FORK_NODE_DIR}/config/client.toml +sed -i -r 's/fast_sync = true/fast_sync = false/g' ${CONS_FORK_NODE_DIR}/config/config.toml + + +# Start gaia +interchain-security-cd start --home ${CONS_FORK_NODE_DIR} \ + --rpc.laddr tcp://${NODE_IP}:26638 \ + --grpc.address ${NODE_IP}:9071 \ + --address tcp://${NODE_IP}:26635 \ + --p2p.laddr tcp://${NODE_IP}:26636 \ + --grpc-web.enable=false \ + &> ${CONS_FORK_NODE_DIR}/logs & + +waiting 5 "for forked consumer node to start" + +diag "Start Hermes relayer multi-chain mode" + +$HERMES_BIN start &> ${HOME_DIR}/hermes-start-logs.txt & + +# If we sleep 5 here and below, we end up on the forked block later +waiting 10 "for Hermes relayer to start" + +diag "Running Hermes relayer evidence command" + +# Run hermes in evidence mode +$HERMES_BIN evidence --chain consumer &> ${HOME_DIR}/hermes-evidence-logs.txt & + +# If we sleep 5 here and above, we end up on the forked block later +waiting 10 "for Hermes evidence monitor to start" + +read -r CD_HEIGHT < <( + curl -s "localhost:26638"/commit \ + | jq -r '(.result//.).signed_header.header.height') + +diag "Running light client between primary and fork as witness using trusted height $CD_TRUSTED_HEIGHT and hash $CD_TRUSTED_HASH at height $CD_HEIGHT" + +# Rust light client +# tendermint-light-client-cli \ +# --chain-id consumer \ +# --primary "http://$NODE_IP:26638" \ +# --witnesses "http://$NODE_IP:26648" \ +# --trusted-height $CD_TRUSTED_HEIGHT \ +# --trusted-hash $CD_TRUSTED_HASH \ +# --height $CD_HEIGHT + +# Go light client +rm -rf $HOME/.cometbft-light/ +cometbft light consumer \ + --primary "http://$NODE_IP:26638" \ + --witnesses "http://$NODE_IP:26648" \ + --height $CD_TRUSTED_HEIGHT \ + --hash $CD_TRUSTED_HASH > ${HOME_DIR}/light-client-logs.txt 2>&1 & + +echo $! > ${HOME_DIR}/light-client.pid + +waiting 5 "for light client to start" +BLOCK="$(curl -s "localhost:8888/block?height=$CD_HEIGHT" | jq)" +echo $BLOCK +waiting 1 "before killing light client" + +kill -9 "$(cat ${HOME_DIR}/light-client.pid)" + +waiting 20 "for Hermes to detect evidence" + +if grep -q "found light client attack evidence" ${HOME_DIR}/hermes-evidence-logs.txt; then + diag "Evidence found, proceeding!" +else + diag "Evidence not found, aborting." + exit 1 +fi + +waiting 20 "for Hermes to submit evidence and freeze client" + +if grep -q "successfully submitted light client attack evidence" ${HOME_DIR}/hermes-evidence-logs.txt; then + diag "Evidence successfully submitted, success!" +else + if grep -q "provider is frozen" ${HOME_DIR}/hermes-evidence-logs.txt; then + diag "Client on provider is already frozen, cannot do anything." + exit 0 + elif grep -q "client is frozen and does not have a consensus state at height" ${HOME_DIR}/hermes-evidence-logs.txt; then + diag "Client already frozen and does not have a consensus state at common height, cannot do anything." + exit 0 + else + diag "Evidence not submitted, failed." + echo "" + + diag "Hermes evidence logs:" + cat ${HOME_DIR}/hermes-evidence-logs.txt + + exit 1 + fi +fi + diff --git a/ci/misbehaviour/misbehaviour_test.sh b/ci/misbehaviour/misbehaviour_test.sh index d79b8ca854..32d91a23c3 100755 --- a/ci/misbehaviour/misbehaviour_test.sh +++ b/ci/misbehaviour/misbehaviour_test.sh @@ -42,7 +42,7 @@ info "Update client on ibc-0 against the forked chain ibc-1-f" $HERMES --config config_fork.toml update client --client 07-tendermint-0 --host-chain ibc-0 info "Wait for chain ibc-1 to stop..." -sleep 5 +sleep 10 info "Killing Hermes" kill -9 "$HERMES_PID" diff --git a/config.toml b/config.toml index ce371027e6..9dc469bf0c 100644 --- a/config.toml +++ b/config.toml @@ -263,7 +263,8 @@ max_gas = 400000 # paid for each unit of gas per transaction. # # Required -gas_price = { price = 0.001, denom = 'stake' } +#gas_price = { price = 0.025, denom = 'stake' } +gas_price = { price = 0, denom = 'stake' } # Multiply this amount with the gas estimate, used to compute the fee # and account for potential estimation error. @@ -384,7 +385,7 @@ key_name = 'testkey' store_prefix = 'ibc' default_gas = 100000 max_gas = 400000 -gas_price = { price = 0.001, denom = 'stake' } +gas_price = { price = 0.025, denom = 'stake' } gas_multiplier = 1.1 max_msg_num = 30 max_tx_size = 2097152 diff --git a/crates/chain-registry/Cargo.toml b/crates/chain-registry/Cargo.toml index 78d394b9d0..158ddcb63e 100644 --- a/crates/chain-registry/Cargo.toml +++ b/crates/chain-registry/Cargo.toml @@ -12,7 +12,7 @@ description = """ """ [dependencies] -ibc-proto = { version = "0.37.0", features = ["serde"] } +ibc-proto = { version = "0.38.0-pre.1", features = ["serde"] } ibc-relayer-types = { version = "0.25.0", path = "../relayer-types" } tendermint-rpc = { version = "0.34.0", features = [ "http-client", diff --git a/crates/relayer-cli/src/cli_utils.rs b/crates/relayer-cli/src/cli_utils.rs index 5a2aae7fc0..d96761b0a7 100644 --- a/crates/relayer-cli/src/cli_utils.rs +++ b/crates/relayer-cli/src/cli_utils.rs @@ -5,18 +5,13 @@ use eyre::eyre; use tokio::runtime::Runtime as TokioRuntime; use tracing::debug; +use ibc_relayer::chain::counterparty::{channel_connection_client, ChannelConnectionClient}; +use ibc_relayer::chain::handle::{BaseChainHandle, ChainHandle}; use ibc_relayer::chain::requests::{ IncludeProof, QueryChannelRequest, QueryClientStateRequest, QueryConnectionRequest, QueryHeight, }; -use ibc_relayer::{ - chain::{ - counterparty::{channel_connection_client, ChannelConnectionClient}, - handle::{BaseChainHandle, ChainHandle}, - }, - config::Config, - spawn, -}; -use ibc_relayer_types::core::ics02_client::client_state::ClientState; +use ibc_relayer::config::Config; +use ibc_relayer::spawn; use ibc_relayer_types::core::ics24_host::identifier::{ChainId, ChannelId, PortId}; use crate::error::Error; diff --git a/crates/relayer-cli/src/commands.rs b/crates/relayer-cli/src/commands.rs index 51e7022bd6..f455cfa5c2 100644 --- a/crates/relayer-cli/src/commands.rs +++ b/crates/relayer-cli/src/commands.rs @@ -4,6 +4,7 @@ mod clear; mod completions; mod config; mod create; +mod evidence; mod fee; mod health; mod keys; @@ -19,9 +20,9 @@ mod version; use self::{ clear::ClearCmds, completions::CompletionsCmd, config::ConfigCmd, create::CreateCmds, - fee::FeeCmd, health::HealthCheckCmd, keys::KeysCmd, listen::ListenCmd, logs::LogsCmd, - misbehaviour::MisbehaviourCmd, query::QueryCmd, start::StartCmd, tx::TxCmd, update::UpdateCmds, - upgrade::UpgradeCmds, version::VersionCmd, + evidence::EvidenceCmd, fee::FeeCmd, health::HealthCheckCmd, keys::KeysCmd, listen::ListenCmd, + logs::LogsCmd, misbehaviour::MisbehaviourCmd, query::QueryCmd, start::StartCmd, tx::TxCmd, + update::UpdateCmds, upgrade::UpgradeCmds, version::VersionCmd, }; use core::time::Duration; @@ -86,12 +87,15 @@ pub enum CliCmd { /// Listen to and display IBC events emitted by a chain Listen(ListenCmd), + /// Listen to client update IBC events and handle misbehaviour + Misbehaviour(MisbehaviourCmd), + /// Update tracing log directives #[clap(subcommand)] Logs(LogsCmd), - /// Listen to client update IBC events and handles misbehaviour - Misbehaviour(MisbehaviourCmd), + /// Listen to block events and handles evidence + Evidence(EvidenceCmd), /// The `version` subcommand, retained for backward compatibility. Version(VersionCmd), diff --git a/crates/relayer-cli/src/commands/create/channel.rs b/crates/relayer-cli/src/commands/create/channel.rs index 3de03a257a..b949adff72 100644 --- a/crates/relayer-cli/src/commands/create/channel.rs +++ b/crates/relayer-cli/src/commands/create/channel.rs @@ -11,7 +11,6 @@ use ibc_relayer::chain::requests::{ use ibc_relayer::channel::Channel; use ibc_relayer::connection::Connection; use ibc_relayer::foreign_client::ForeignClient; -use ibc_relayer_types::core::ics02_client::client_state::ClientState; use ibc_relayer_types::core::ics03_connection::connection::IdentifiedConnectionEnd; use ibc_relayer_types::core::ics04_channel::channel::Ordering; use ibc_relayer_types::core::ics04_channel::version::Version; diff --git a/crates/relayer-cli/src/commands/create/connection.rs b/crates/relayer-cli/src/commands/create/connection.rs index 16c0fa1e6e..052411d069 100644 --- a/crates/relayer-cli/src/commands/create/connection.rs +++ b/crates/relayer-cli/src/commands/create/connection.rs @@ -7,7 +7,6 @@ use ibc_relayer::chain::handle::ChainHandle; use ibc_relayer::chain::requests::{IncludeProof, QueryClientStateRequest, QueryHeight}; use ibc_relayer::connection::Connection; use ibc_relayer::foreign_client::ForeignClient; -use ibc_relayer_types::core::ics02_client::client_state::ClientState; use ibc_relayer_types::core::ics24_host::identifier::{ChainId, ClientId}; use crate::cli_utils::{spawn_chain_runtime, ChainHandlePair}; diff --git a/crates/relayer-cli/src/commands/evidence.rs b/crates/relayer-cli/src/commands/evidence.rs new file mode 100644 index 0000000000..2dd786380e --- /dev/null +++ b/crates/relayer-cli/src/commands/evidence.rs @@ -0,0 +1,778 @@ +use std::collections::HashMap; +use std::ops::Deref; +use std::sync::Arc; +use std::thread::sleep; +use std::time::Duration; + +use abscissa_core::clap::Parser; +use abscissa_core::{Command, Runnable}; +use tokio::runtime::Runtime as TokioRuntime; + +use tendermint::block::Height as TendermintHeight; +use tendermint::evidence::{DuplicateVoteEvidence, LightClientAttackEvidence}; +use tendermint::validator; +use tendermint_rpc::{Client, Paging}; + +use ibc_relayer::chain::cosmos::CosmosSdkChain; +use ibc_relayer::chain::endpoint::ChainEndpoint; +use ibc_relayer::chain::handle::{BaseChainHandle, ChainHandle}; +use ibc_relayer::chain::requests::{IncludeProof, PageRequest, QueryHeight}; +use ibc_relayer::chain::tracking::TrackedMsgs; +use ibc_relayer::chain::ChainType; +use ibc_relayer::foreign_client::ForeignClient; +use ibc_relayer::spawn::spawn_chain_runtime_with_modified_config; +use ibc_relayer_types::applications::ics28_ccv::msgs::ccv_double_voting::MsgSubmitIcsConsumerDoubleVoting; +use ibc_relayer_types::applications::ics28_ccv::msgs::ccv_misbehaviour::MsgSubmitIcsConsumerMisbehaviour; +use ibc_relayer_types::clients::ics07_tendermint::header::Header as TendermintHeader; +use ibc_relayer_types::clients::ics07_tendermint::misbehaviour::Misbehaviour as TendermintMisbehaviour; +use ibc_relayer_types::core::ics02_client::height::Height; +use ibc_relayer_types::core::ics02_client::msgs::misbehaviour::MsgSubmitMisbehaviour; +use ibc_relayer_types::core::ics24_host::identifier::{ChainId, ClientId}; +use ibc_relayer_types::events::IbcEvent; +use ibc_relayer_types::tx_msg::Msg; + +use crate::conclude::Output; +use crate::prelude::*; + +#[derive(Clone, Command, Debug, Parser, PartialEq, Eq)] +pub struct EvidenceCmd { + #[clap( + long = "chain", + required = true, + value_name = "CHAIN_ID", + help_heading = "REQUIRED", + help = "Identifier of the chain where blocks are monitored for misbehaviour" + )] + chain_id: ChainId, + + #[clap( + long = "check-past-blocks", + value_name = "NUM_BLOCKS", + help = "Check the last NUM_BLOCKS blocks for misbehaviour (default: 100)", + default_value = "100" + )] + check_past_blocks: u64, + + #[clap( + long = "key-name", + value_name = "KEY_NAME", + help = "Use the given signing key name for sending the misbehaviour evidence detected (default: `key_name` config)" + )] + key_name: Option, +} + +impl Runnable for EvidenceCmd { + fn run(&self) { + let config = app_config(); + + let mut chain_config = config + .find_chain(&self.chain_id) + .cloned() + .unwrap_or_else(|| { + Output::error(format!( + "chain `{}` not found in configuration", + self.chain_id + )) + .exit() + }); + + if chain_config.r#type != ChainType::CosmosSdk { + Output::error(format!( + "chain `{}` is not a Cosmos SDK chain", + self.chain_id + )) + .exit(); + } + + if let Some(ref key_name) = self.key_name { + chain_config.key_name = key_name.to_string(); + } + + let rt = Arc::new( + tokio::runtime::Builder::new_current_thread() + .enable_all() + .build() + .unwrap(), + ); + + let chain = CosmosSdkChain::bootstrap(chain_config, rt.clone()).unwrap(); + let res = monitor_misbehaviours(rt, chain, self.key_name.as_ref(), self.check_past_blocks); + + match res { + Ok(()) => Output::success(()).exit(), + Err(e) => Output::error(e).exit(), + } + } +} + +fn monitor_misbehaviours( + rt: Arc, + mut chain: CosmosSdkChain, + key_name: Option<&String>, + check_past_blocks: u64, +) -> eyre::Result<()> { + let subscription = chain.subscribe()?; + + // Check previous blocks for equivocation that may have been missed + let tm_latest_height = rt + .block_on(chain.rpc_client.status())? + .sync_info + .latest_block_height; + + let latest_height = Height::new(chain.id().version(), tm_latest_height.value()).unwrap(); + let target_height = { + let target = tm_latest_height.value().saturating_sub(check_past_blocks); + let height = std::cmp::max(1, target); + Height::new(chain.id().version(), height).unwrap() + }; + + info!( + "checking past {check_past_blocks} blocks for misbehaviour evidence: {}..{}", + latest_height, target_height + ); + + let mut height = latest_height; + + while height >= target_height { + debug!("checking for evidence at height {height}"); + + if let Err(e) = check_misbehaviour_at(rt.clone(), &chain, key_name, height) { + warn!("error while checking for misbehaviour at height {height}: {e}"); + } + + if height.revision_height() == 1 { + break; + } + + height = height.decrement().unwrap(); + + sleep(Duration::from_millis(100)); + } + + info!("waiting for new blocks..."); + + // process new block events + while let Ok(event_batch) = subscription.recv() { + match event_batch.deref() { + Ok(event_batch) => { + for event_with_height in &event_batch.events { + if let IbcEvent::NewBlock(new_block) = &event_with_height.event { + info!("checking for evidence at height {}", new_block.height); + + if let Err(e) = + check_misbehaviour_at(rt.clone(), &chain, key_name, new_block.height) + { + error!( + "error while checking for misbehaviour at height {}: {e}", + new_block.height + ); + } + } + } + } + Err(e) => { + error!("error while receiving event batch: {e}"); + } + } + } + + Ok(()) +} + +/// Check for misbehaviour evidence in the block at the given height. +/// If such evidence is found, handle it by submitting it to all counterparty +/// clients of the chain, freezing them. +fn check_misbehaviour_at( + rt: Arc, + chain: &CosmosSdkChain, + key_name: Option<&String>, + height: Height, +) -> eyre::Result<()> { + let block = rt + .block_on(chain.rpc_client.block(TendermintHeight::from(height)))? + .block; + + for evidence in block.evidence.into_vec() { + match evidence { + tendermint::evidence::Evidence::DuplicateVote(dv) => { + warn!("found duplicate vote evidence"); + trace!("{dv:#?}"); + + handle_duplicate_vote(rt.clone(), chain, key_name, *dv)?; + } + tendermint::evidence::Evidence::LightClientAttack(lc) => { + warn!("found light client attack evidence"); + trace!("{lc:#?}"); + + handle_light_client_attack(rt.clone(), chain, key_name, *lc)?; + } + } + } + + Ok(()) +} + +fn handle_duplicate_vote( + rt: Arc, + chain: &CosmosSdkChain, + key_name: Option<&String>, + dv: DuplicateVoteEvidence, +) -> eyre::Result<()> { + use ibc_relayer::chain::requests::QueryConsensusStateHeightsRequest; + + let config = app_config(); + + // Fetch all the counterparty clients of this chain. + let counterparty_clients = fetch_all_counterparty_clients(chain)?; + + let mut chains = HashMap::new(); + + // For each counterparty client, build the double voting evidence and submit it to the chain, + // freezing that client. + for (counterparty_chain_id, counterparty_client_id) in counterparty_clients { + if !chains.contains_key(&counterparty_chain_id) { + let chain_handle = spawn_chain_runtime_with_modified_config::( + &config, + &counterparty_chain_id, + rt.clone(), + |chain_config| { + if let Some(key_name) = key_name { + chain_config.key_name = key_name.to_string(); + } + }, + )?; + + chains.insert(counterparty_chain_id.clone(), chain_handle); + }; + + let counterparty_chain_handle = chains.get(&counterparty_chain_id).unwrap(); + + let signer = counterparty_chain_handle.get_signer()?; + + if !is_counterparty_provider(chain, counterparty_chain_handle, &counterparty_client_id) { + debug!("counterparty client `{counterparty_client_id}` on chain `{counterparty_chain_id}` is not a CCV client, skipping..."); + continue; + } + + let infraction_height = dv.vote_a.height; + + // Get the trusted height in the same way we do for client updates, + // ie. retrieve the consensus state at the highest height smaller than the infraction height. + // + // Note: The consensus state heights are sorted in increasing order. + let consensus_state_heights = + chain.query_consensus_state_heights(QueryConsensusStateHeightsRequest { + client_id: counterparty_client_id.clone(), + pagination: Some(PageRequest::all()), + })?; + + // Retrieve the consensus state at the highest height smaller than the infraction height. + let consensus_state_height_before_infraction_height = consensus_state_heights + .into_iter() + .filter(|height| height.revision_height() < infraction_height.value()) + .last(); + + let Some(trusted_height) = consensus_state_height_before_infraction_height else { + error!( + "cannot build infraction block header for client `{counterparty_client_id}` on chain `{counterparty_chain_id}`,\ + reason: could not find consensus state at highest height smaller than infraction height {infraction_height}" + ); + + continue; + }; + + // Construct the light client block header for the consumer chain at the infraction height + let infraction_block_header = + fetch_infraction_block_header(&rt, chain, infraction_height, trusted_height)?; + + let submit_msg = MsgSubmitIcsConsumerDoubleVoting { + submitter: signer.clone(), + duplicate_vote_evidence: dv.clone(), + infraction_block_header, + } + .to_any(); + + info!( + "submitting consumer double voting evidence to provider chain `{counterparty_chain_id}`" + ); + + let tracked_msgs = TrackedMsgs::new_static(vec![submit_msg], "double_voting_evidence"); + let responses = counterparty_chain_handle.send_messages_and_wait_check_tx(tracked_msgs)?; + + for response in responses { + if response.code.is_ok() { + info!("successfully submitted double voting evidence to chain `{counterparty_chain_id}`, tx hash: {}", response.hash); + } else { + error!( + "failed to submit double voting evidence to chain `{counterparty_chain_id}`: {response:?}" + ); + } + } + + // We have submitted the evidence to the provider, and because there can only be a single + // provider for a consumer chain, we can stop now. No need to check all the other + // counteparties. + break; + } + + Ok(()) +} + +fn fetch_infraction_block_header( + rt: &Arc, + chain: &CosmosSdkChain, + infraction_height: TendermintHeight, + trusted_height: Height, +) -> Result { + let signed_header = rt + .block_on(chain.rpc_client.commit(infraction_height))? + .signed_header; + + let validators = rt + .block_on(chain.rpc_client.validators(infraction_height, Paging::All))? + .validators; + + let validator_set = + validator::Set::with_proposer(validators, signed_header.header.proposer_address)?; + + let trusted_header = rt + .block_on(chain.rpc_client.commit(trusted_height))? + .signed_header; + + let trusted_validators = rt + .block_on(chain.rpc_client.validators(trusted_height, Paging::All))? + .validators; + + let trusted_validator_set = + validator::Set::with_proposer(trusted_validators, trusted_header.header.proposer_address)?; + + Ok(TendermintHeader { + signed_header, + validator_set, + trusted_height, + trusted_validator_set, + }) +} + +fn handle_light_client_attack( + rt: Arc, + chain: &CosmosSdkChain, + key_name: Option<&String>, + evidence: LightClientAttackEvidence, +) -> eyre::Result<()> { + let config = app_config(); + + // Build the two headers to submit as part of the `MsgSubmitMisbehaviour` message. + let (header1, header2) = build_evidence_headers(rt.clone(), chain, evidence.clone())?; + + // Fetch all the counterparty clients of this chain. + let counterparty_clients = fetch_all_counterparty_clients(chain)?; + + let mut chains = HashMap::new(); + + // For each counterparty client, build the misbehaviour evidence and submit it to the chain, + // freezing that client. + for (counterparty_chain_id, counterparty_client_id) in counterparty_clients { + let misbehaviour = TendermintMisbehaviour { + client_id: counterparty_client_id.clone(), + header1: header1.clone(), + header2: header2.clone(), + }; + + if !chains.contains_key(chain.id()) { + let chain_handle = spawn_chain_runtime_with_modified_config::( + &config, + chain.id(), + rt.clone(), + |chain_config| { + if let Some(key_name) = key_name { + chain_config.key_name = key_name.to_string(); + } + }, + )?; + + chains.insert(chain.id().clone(), chain_handle); + } + + if !chains.contains_key(&counterparty_chain_id) { + let chain_handle = spawn_chain_runtime_with_modified_config::( + &config, + &counterparty_chain_id, + rt.clone(), + |chain_config| { + if let Some(key_name) = key_name { + chain_config.key_name = key_name.to_string(); + } + }, + )?; + + chains.insert(counterparty_chain_id.clone(), chain_handle); + }; + + let chain_handle = chains.get(chain.id()).unwrap(); + let counterparty_chain_handle = chains.get(&counterparty_chain_id).unwrap(); + + let counterparty_client = ForeignClient::restore( + counterparty_client_id.clone(), + counterparty_chain_handle.clone(), + chain_handle.clone(), + ); + + let result = submit_light_client_attack_evidence( + &evidence, + chain, + counterparty_client, + counterparty_client_id, + counterparty_chain_handle, + misbehaviour, + ); + + if let Err(error) = result { + error!("{error}"); + } + } + + Ok(()) +} + +fn submit_light_client_attack_evidence( + evidence: &LightClientAttackEvidence, + chain: &CosmosSdkChain, + counterparty_client: ForeignClient, + counterparty_client_id: ClientId, + counterparty: &BaseChainHandle, + misbehaviour: TendermintMisbehaviour, +) -> Result<(), eyre::Error> { + info!( + "building light client attack evidence for client `{}` on counterparty chain `{}`", + counterparty_client_id, + counterparty.id(), + ); + + let counterparty_is_provider = + is_counterparty_provider(chain, counterparty, &counterparty_client_id); + + let counterparty_client_is_frozen = counterparty_client.is_frozen(); + + if !counterparty_is_provider && counterparty_client_is_frozen { + warn!( + "cannot submit light client attack evidence to client `{}` on counterparty chain `{}`", + counterparty_client_id, + counterparty.id() + ); + warn!("reason: client is frozen and chain is not a CCV provider chain"); + + return Ok(()); + } + + let signer = counterparty.get_signer()?; + let common_height = Height::from_tm(evidence.common_height, chain.id()); + + let counterparty_has_common_consensus_state = + has_consensus_state(counterparty, &counterparty_client_id, common_height); + + if counterparty_is_provider + && counterparty_client_is_frozen + && !counterparty_has_common_consensus_state + { + warn!( + "cannot submit light client attack evidence to client `{}` on provider chain `{}`", + counterparty_client_id, + counterparty.id() + ); + warn!("reason: client is frozen and does not have a consensus state at height {common_height}"); + + return Ok(()); + } + + let mut msgs = if counterparty_has_common_consensus_state { + info!( + "skip building update client message for client `{}` on counterparty chain `{}`", + counterparty_client_id, + counterparty.id() + ); + info!( + "reason: counterparty chain already has consensus state at common height {common_height}" + ); + + Vec::new() + } else { + match counterparty_client.wait_and_build_update_client(common_height) { + Ok(msgs) => msgs, + + Err(e) => { + warn!( + "skipping UpdateClient message for client `{}` on counterparty chain `{}`", + counterparty_client_id, + counterparty.id() + ); + warn!("reason: failed to build UpdateClient message: {e}"); + + Vec::new() + } + } + }; + + if counterparty_is_provider { + info!( + "will submit consumer light client attack evidence to client `{}` on provider chain `{}`", + counterparty_client_id, + counterparty.id(), + ); + + let msg = MsgSubmitIcsConsumerMisbehaviour { + submitter: signer.clone(), + misbehaviour: misbehaviour.clone(), + } + .to_any(); + + msgs.push(msg); + }; + + // We do not need to submit the misbehaviour if the client is already frozen. + if !counterparty_client_is_frozen { + info!( + "will submit light client attack evidence to client `{}` on counterparty chain `{}`", + counterparty_client_id, + counterparty.id(), + ); + + let msg = MsgSubmitMisbehaviour { + client_id: counterparty_client_id.clone(), + misbehaviour: misbehaviour.to_any(), + signer, + } + .to_any(); + + msgs.push(msg); + } + + if msgs.is_empty() { + warn!( + "skipping light client attack evidence for client `{}` on counterparty chain `{}`", + counterparty_client_id, + counterparty.id() + ); + + warn!("reason: no messages to submit"); + + return Ok(()); + } + + let tracked_msgs = TrackedMsgs::new_static(msgs, "light_client_attack_evidence"); + let responses = counterparty.send_messages_and_wait_check_tx(tracked_msgs)?; + + match responses.first() { + Some(response) if response.code.is_ok() => { + info!( + "successfully submitted light client attack evidence for client `{}` to counterparty chain `{}`, tx hash: {}", + counterparty_client_id, + counterparty.id(), + response.hash + ); + + Ok(()) + } + Some(response) => Err(eyre::eyre!( + "failed to submit light client attack evidence to counterparty chain `{}`: {response:?}", + counterparty.id() + )), + + None => Err(eyre::eyre!( + "failed to submit light client attack evidence to counterparty chain `{}`: no response from chain", + counterparty.id() + )), + } +} + +fn has_consensus_state( + chain: &BaseChainHandle, + client_id: &ClientId, + consensus_height: Height, +) -> bool { + use ibc_relayer::chain::requests::QueryConsensusStateRequest; + + let res = chain.query_consensus_state( + QueryConsensusStateRequest { + client_id: client_id.clone(), + consensus_height, + query_height: QueryHeight::Latest, + }, + IncludeProof::No, + ); + + res.is_ok() +} + +/// If the misbehaving chain is a CCV consumer chain, +/// then try fetch the consumer chains of the counterparty chains. +/// If that fails, then the counterparty chain is not a provider chain. +/// Otherwise, check if the misbehaving chain is a consumer of the counterparty chain, +/// which is then definitely a provider. +fn is_counterparty_provider( + chain: &CosmosSdkChain, + counterparty_chain_handle: &BaseChainHandle, + counterparty_client_id: &ClientId, +) -> bool { + if chain.config().ccv_consumer_chain { + let consumer_chains = counterparty_chain_handle + .query_consumer_chains() + .unwrap_or_default(); // If the query fails, use an empty list of consumers + + consumer_chains.iter().any(|(chain_id, client_id)| { + chain_id == chain.id() && client_id == counterparty_client_id + }) + } else { + false + } +} + +/// Fetch all the counterparty clients of the given chain. +/// A counterparty client is a client that has a connection with that chain. +/// +/// 1. Fetch all connections on the given chain +/// 2. For each connection: +/// 2.1. Fetch the client state of the counterparty client of that connection. +/// 2.2. From the client state, extract the chain id of the counterparty chain. +/// 4. Return a list of all counterparty chains and counterparty clients. +fn fetch_all_counterparty_clients( + chain: &CosmosSdkChain, +) -> eyre::Result> { + use ibc_relayer::chain::requests::{QueryClientStateRequest, QueryConnectionsRequest}; + + let connections = chain.query_connections(QueryConnectionsRequest { + pagination: Some(PageRequest::all()), + })?; + + debug!("found {} connections", connections.len()); + + let mut counterparty_clients = vec![]; + + for connection in connections { + debug!( + "fetching counterparty client state for connection `{}`", + connection.connection_id + ); + + let client_id = connection.connection_end.client_id(); + + let client_state = chain.query_client_state( + QueryClientStateRequest { + client_id: client_id.clone(), + height: QueryHeight::Latest, + }, + IncludeProof::No, + ); + + let client_state = match client_state { + Ok((client_state, _)) => client_state, + Err(e) => { + error!( + "failed to fetch client state for counterparty client `{client_id}`, skipping..." + ); + error!("reason: {e}"); + + continue; + } + }; + + let counterparty_chain_id = client_state.chain_id(); + info!("found counterparty client with id `{client_id}` on counterparty chain `{counterparty_chain_id}`"); + + counterparty_clients.push((counterparty_chain_id, client_id.clone())); + } + + Ok(counterparty_clients) +} + +/// Build the two headers to submit as part of the `MsgSubmitMisbehaviour` message. +fn build_evidence_headers( + rt: Arc, + chain: &CosmosSdkChain, + lc: LightClientAttackEvidence, +) -> eyre::Result<(TendermintHeader, TendermintHeader)> { + if lc.conflicting_block.signed_header.header.height == lc.common_height { + return Err(eyre::eyre!( + "invalid evidence: header height ({}) is equal to common height ({})! cannot submit evidence", + lc.conflicting_block.signed_header.header.height, + lc.common_height + )); + } + + let trusted_height = lc.common_height; + + let trusted_validators = rt + .block_on(chain.rpc_client.validators(trusted_height, Paging::All))? + .validators; + + let trusted_header = rt + .block_on(chain.rpc_client.commit(trusted_height))? + .signed_header; + + let trusted_proposer = trusted_header.header.proposer_address; + + let trusted_validator_set = + validator::Set::with_proposer(trusted_validators, trusted_proposer)?; + + let trusted_height = Height::from_tm(trusted_height, chain.id()); + + let header1 = { + TendermintHeader { + signed_header: lc.conflicting_block.signed_header, + validator_set: lc.conflicting_block.validator_set, + trusted_height, + trusted_validator_set: trusted_validator_set.clone(), + } + }; + + let header2 = { + let signed_header = rt + .block_on(chain.rpc_client.commit(header1.signed_header.header.height))? + .signed_header; + + let validators = rt + .block_on( + chain + .rpc_client + .validators(header1.signed_header.header.height, Paging::All), + )? + .validators; + + let validator_set = + validator::Set::with_proposer(validators, signed_header.header.proposer_address)?; + + TendermintHeader { + signed_header, + validator_set, + trusted_height, + trusted_validator_set, + } + }; + + Ok((header1, header2)) +} + +#[cfg(test)] +mod tests { + use super::EvidenceCmd; + + use abscissa_core::clap::Parser; + use ibc_relayer_types::core::ics24_host::identifier::ChainId; + + #[test] + fn test_misbehaviour() { + assert_eq!( + EvidenceCmd { + chain_id: ChainId::from_string("chain_id"), + check_past_blocks: 100, + key_name: None, + }, + EvidenceCmd::parse_from(["test", "--chain", "chain_id"]) + ) + } + + #[test] + fn test_misbehaviour_no_chain() { + assert!(EvidenceCmd::try_parse_from(["test"]).is_err()) + } +} diff --git a/crates/relayer-cli/src/commands/query/channel_ends.rs b/crates/relayer-cli/src/commands/query/channel_ends.rs index 83a94fdf76..aaa668beb1 100644 --- a/crates/relayer-cli/src/commands/query/channel_ends.rs +++ b/crates/relayer-cli/src/commands/query/channel_ends.rs @@ -9,7 +9,6 @@ use ibc_relayer::chain::requests::{ }; use ibc_relayer::client_state::AnyClientState; use ibc_relayer::registry::Registry; -use ibc_relayer_types::core::ics02_client::client_state::ClientState; use ibc_relayer_types::core::ics03_connection::connection::ConnectionEnd; use ibc_relayer_types::core::ics04_channel::channel::{ChannelEnd, State}; use ibc_relayer_types::core::ics24_host::identifier::ChainId; diff --git a/crates/relayer-cli/src/commands/query/channels.rs b/crates/relayer-cli/src/commands/query/channels.rs index fce0441b1d..a516854416 100644 --- a/crates/relayer-cli/src/commands/query/channels.rs +++ b/crates/relayer-cli/src/commands/query/channels.rs @@ -11,7 +11,6 @@ use ibc_relayer::chain::requests::{ QueryConnectionRequest, QueryHeight, }; use ibc_relayer::registry::Registry; -use ibc_relayer_types::core::ics02_client::client_state::ClientState; use ibc_relayer_types::core::ics04_channel::channel::{ChannelEnd, State}; use ibc_relayer_types::core::ics24_host::identifier::{ ChainId, ChannelId, ConnectionId, PortChannelId, PortId, diff --git a/crates/relayer-cli/src/commands/query/clients.rs b/crates/relayer-cli/src/commands/query/clients.rs index 2290b5661c..0ced719b2b 100644 --- a/crates/relayer-cli/src/commands/query/clients.rs +++ b/crates/relayer-cli/src/commands/query/clients.rs @@ -4,7 +4,6 @@ use ibc_relayer::chain::handle::ChainHandle; use serde::Serialize; use ibc_relayer::chain::requests::{PageRequest, QueryClientStatesRequest}; -use ibc_relayer_types::core::ics02_client::client_state::ClientState; use ibc_relayer_types::core::ics24_host::identifier::{ChainId, ClientId}; use crate::cli_utils::spawn_chain_runtime; diff --git a/crates/relayer-cli/src/commands/query/connections.rs b/crates/relayer-cli/src/commands/query/connections.rs index f3a19e3585..dadef9d6a2 100644 --- a/crates/relayer-cli/src/commands/query/connections.rs +++ b/crates/relayer-cli/src/commands/query/connections.rs @@ -5,7 +5,6 @@ use ibc_relayer::chain::handle::ChainHandle; use ibc_relayer::chain::requests::{ IncludeProof, PageRequest, QueryClientStateRequest, QueryConnectionsRequest, QueryHeight, }; -use ibc_relayer_types::core::ics02_client::client_state::ClientState; use ibc_relayer_types::core::ics24_host::identifier::{ChainId, ConnectionId}; use crate::cli_utils::spawn_chain_runtime; @@ -61,19 +60,27 @@ impl Runnable for QueryConnectionsCmd { connections.retain(|connection| { let client_id = connection.end().client_id().to_owned(); let chain_height = chain.query_latest_height(); - let (client_state, _) = chain - .query_client_state( - QueryClientStateRequest { - client_id, - height: QueryHeight::Specific(chain_height.unwrap()), - }, - IncludeProof::No, - ) - .unwrap(); - - let counterparty_chain_id = client_state.chain_id(); - - counterparty_chain_id == counterparty_filter_id + + let client_state = chain.query_client_state( + QueryClientStateRequest { + client_id: client_id.clone(), + height: QueryHeight::Specific(chain_height.unwrap()), + }, + IncludeProof::No, + ); + + match client_state { + Ok((client_state, _)) => { + let counterparty_chain_id = client_state.chain_id(); + counterparty_chain_id == counterparty_filter_id + } + Err(e) => { + warn!("failed to query client state for client {client_id}, skipping..."); + warn!("reason: {e}"); + + false + } + } }); } diff --git a/crates/relayer-cli/src/commands/tx/channel.rs b/crates/relayer-cli/src/commands/tx/channel.rs index 83b6c702de..0531c85dfe 100644 --- a/crates/relayer-cli/src/commands/tx/channel.rs +++ b/crates/relayer-cli/src/commands/tx/channel.rs @@ -1,3 +1,5 @@ +#![allow(clippy::redundant_closure_call)] + use abscissa_core::clap::Parser; use abscissa_core::{Command, Runnable}; diff --git a/crates/relayer-cli/src/commands/tx/client.rs b/crates/relayer-cli/src/commands/tx/client.rs index e528e0a4bc..8014baacee 100644 --- a/crates/relayer-cli/src/commands/tx/client.rs +++ b/crates/relayer-cli/src/commands/tx/client.rs @@ -14,7 +14,6 @@ use ibc_relayer::config::Config; use ibc_relayer::event::IbcEventWithHeight; use ibc_relayer::foreign_client::{CreateOptions, ForeignClient}; use ibc_relayer::{chain::handle::ChainHandle, config::GenesisRestart}; -use ibc_relayer_types::core::ics02_client::client_state::ClientState; use ibc_relayer_types::core::ics24_host::identifier::{ChainId, ClientId}; use ibc_relayer_types::events::IbcEvent; use ibc_relayer_types::Height; diff --git a/crates/relayer-cli/src/commands/tx/connection.rs b/crates/relayer-cli/src/commands/tx/connection.rs index a16484bdc3..fb88a61d2e 100644 --- a/crates/relayer-cli/src/commands/tx/connection.rs +++ b/crates/relayer-cli/src/commands/tx/connection.rs @@ -1,3 +1,5 @@ +#![allow(clippy::redundant_closure_call)] + use abscissa_core::clap::Parser; use abscissa_core::{Command, Runnable}; diff --git a/crates/relayer-types/Cargo.toml b/crates/relayer-types/Cargo.toml index 0b20dc7dc4..57169443e1 100644 --- a/crates/relayer-types/Cargo.toml +++ b/crates/relayer-types/Cargo.toml @@ -24,7 +24,7 @@ mocks = ["tendermint-testgen", "clock"] [dependencies] # Proto definitions for all IBC-related interfaces, e.g., connections or channels. -ibc-proto = { version = "0.37.0" } +ibc-proto = { version = "0.38.0-pre.1" } ics23 = { version = "0.11.0", features = ["std", "host-functions"] } time = { version = "0.3" } serde_derive = { version = "1.0.104" } diff --git a/crates/relayer-types/src/applications/ics28_ccv/mod.rs b/crates/relayer-types/src/applications/ics28_ccv/mod.rs new file mode 100644 index 0000000000..7ba0198166 --- /dev/null +++ b/crates/relayer-types/src/applications/ics28_ccv/mod.rs @@ -0,0 +1,4 @@ +//! The implementation of the ICS 28 Cross-Chain Validation (CCV). +//! Please see the [specification](https://github.com/cosmos/ibc/tree/main/spec/app/ics-028-cross-chain-validation#readme). + +pub mod msgs; diff --git a/crates/relayer-types/src/applications/ics28_ccv/msgs/ccv_double_voting.rs b/crates/relayer-types/src/applications/ics28_ccv/msgs/ccv_double_voting.rs new file mode 100644 index 0000000000..1ec44e4568 --- /dev/null +++ b/crates/relayer-types/src/applications/ics28_ccv/msgs/ccv_double_voting.rs @@ -0,0 +1,85 @@ +use core::fmt; + +use ibc_proto::interchain_security::ccv::provider::v1::MsgSubmitConsumerDoubleVoting as RawIcsDoubleVoting; +use ibc_proto::protobuf::Protobuf; +use tendermint::evidence::DuplicateVoteEvidence; + +use crate::clients::ics07_tendermint::header::Header; +use crate::signer::Signer; +use crate::tx_msg::Msg; + +use super::error::Error; + +pub const ICS_DOUBLE_VOTING_TYPE_URL: &str = + "/interchain_security.ccv.provider.v1.MsgSubmitConsumerDoubleVoting"; + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct MsgSubmitIcsConsumerDoubleVoting { + pub submitter: Signer, + pub duplicate_vote_evidence: DuplicateVoteEvidence, + pub infraction_block_header: Header, +} + +impl Msg for MsgSubmitIcsConsumerDoubleVoting { + type ValidationError = crate::core::ics24_host::error::ValidationError; + type Raw = RawIcsDoubleVoting; + + fn route(&self) -> String { + crate::keys::ROUTER_KEY.to_string() + } + + fn type_url(&self) -> String { + ICS_DOUBLE_VOTING_TYPE_URL.to_string() + } +} + +impl Protobuf for MsgSubmitIcsConsumerDoubleVoting {} + +impl TryFrom for MsgSubmitIcsConsumerDoubleVoting { + type Error = Error; + + fn try_from(raw: RawIcsDoubleVoting) -> Result { + Ok(Self { + submitter: raw.submitter.parse().map_err(Error::signer)?, + duplicate_vote_evidence: raw + .duplicate_vote_evidence + .ok_or_else(|| Error::invalid_raw_double_voting("missing evidence".into()))? + .try_into() + .map_err(|e| { + Error::invalid_raw_double_voting(format!("cannot convert evidence: {e}")) + })?, + infraction_block_header: raw + .infraction_block_header + .ok_or_else(|| { + Error::invalid_raw_double_voting("missing infraction block header".into()) + })? + .try_into() + .map_err(|e| { + Error::invalid_raw_double_voting(format!("cannot convert header: {e}")) + })?, + }) + } +} + +impl From for RawIcsDoubleVoting { + fn from(value: MsgSubmitIcsConsumerDoubleVoting) -> Self { + RawIcsDoubleVoting { + submitter: value.submitter.to_string(), + duplicate_vote_evidence: Some(value.duplicate_vote_evidence.into()), + infraction_block_header: Some(value.infraction_block_header.into()), + } + } +} + +impl fmt::Display for MsgSubmitIcsConsumerDoubleVoting { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> { + f.debug_struct("MsgSubmitIcsConsumerDoubleVoting") + .field("submitter", &self.submitter) + .field("duplicate_vote_evidence", &"[...]") + .field( + "infraction_block_header", + &self.infraction_block_header.signed_header.header.height, + ) + .finish() + } +} diff --git a/crates/relayer-types/src/applications/ics28_ccv/msgs/ccv_misbehaviour.rs b/crates/relayer-types/src/applications/ics28_ccv/msgs/ccv_misbehaviour.rs new file mode 100644 index 0000000000..2c767149f1 --- /dev/null +++ b/crates/relayer-types/src/applications/ics28_ccv/msgs/ccv_misbehaviour.rs @@ -0,0 +1,71 @@ +use core::fmt; + +use serde::{Deserialize, Serialize}; + +use ibc_proto::interchain_security::ccv::provider::v1::MsgSubmitConsumerMisbehaviour as RawIcsMisbehaviour; +use ibc_proto::protobuf::Protobuf; + +use crate::clients::ics07_tendermint::misbehaviour::Misbehaviour; +use crate::signer::Signer; +use crate::tx_msg::Msg; + +use super::error::Error; + +pub const ICS_MISBEHAVIOR_TYPE_URL: &str = + "/interchain_security.ccv.provider.v1.MsgSubmitConsumerMisbehaviour"; + +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +pub struct MsgSubmitIcsConsumerMisbehaviour { + pub submitter: Signer, + pub misbehaviour: Misbehaviour, +} + +impl Msg for MsgSubmitIcsConsumerMisbehaviour { + type ValidationError = crate::core::ics24_host::error::ValidationError; + type Raw = RawIcsMisbehaviour; + + fn route(&self) -> String { + crate::keys::ROUTER_KEY.to_string() + } + + fn type_url(&self) -> String { + ICS_MISBEHAVIOR_TYPE_URL.to_string() + } +} + +impl Protobuf for MsgSubmitIcsConsumerMisbehaviour {} + +impl TryFrom for MsgSubmitIcsConsumerMisbehaviour { + type Error = Error; + + fn try_from(raw: RawIcsMisbehaviour) -> Result { + Ok(Self { + submitter: raw.submitter.parse().map_err(Error::signer)?, + misbehaviour: raw + .misbehaviour + .ok_or_else(|| Error::invalid_raw_misbehaviour("missing misbehaviour".into()))? + .try_into() + .map_err(|_e| { + Error::invalid_raw_misbehaviour("cannot convert misbehaviour".into()) + })?, + }) + } +} + +impl From for RawIcsMisbehaviour { + fn from(value: MsgSubmitIcsConsumerMisbehaviour) -> Self { + RawIcsMisbehaviour { + submitter: value.submitter.to_string(), + misbehaviour: Some(value.misbehaviour.into()), + } + } +} + +impl fmt::Display for MsgSubmitIcsConsumerMisbehaviour { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> { + f.debug_struct("MsgSubmitIcsConsumerMisbehaviour") + .field("submitter", &self.submitter) + .field("misbehaviour", &self.misbehaviour) + .finish() + } +} diff --git a/crates/relayer-types/src/applications/ics28_ccv/msgs/error.rs b/crates/relayer-types/src/applications/ics28_ccv/msgs/error.rs new file mode 100644 index 0000000000..ee5d3a2a36 --- /dev/null +++ b/crates/relayer-types/src/applications/ics28_ccv/msgs/error.rs @@ -0,0 +1,20 @@ +use flex_error::define_error; + +use crate::signer::SignerError; + +define_error! { + #[derive(Debug, PartialEq, Eq)] + Error { + InvalidRawMisbehaviour + { reason: String } + | e | { format_args!("invalid raw misbehaviour: {}", e.reason) }, + + InvalidRawDoubleVoting + { reason: String } + | e | { format_args!("invalid raw double voting: {}", e.reason) }, + + Signer + [ SignerError ] + | _ | { "failed to parse signer" }, + } +} diff --git a/crates/relayer-types/src/applications/ics28_ccv/msgs/mod.rs b/crates/relayer-types/src/applications/ics28_ccv/msgs/mod.rs new file mode 100644 index 0000000000..df28e4a73a --- /dev/null +++ b/crates/relayer-types/src/applications/ics28_ccv/msgs/mod.rs @@ -0,0 +1,3 @@ +pub mod ccv_double_voting; +pub mod ccv_misbehaviour; +pub mod error; diff --git a/crates/relayer-types/src/applications/mod.rs b/crates/relayer-types/src/applications/mod.rs index 539225bf08..7080c37fc4 100644 --- a/crates/relayer-types/src/applications/mod.rs +++ b/crates/relayer-types/src/applications/mod.rs @@ -1,6 +1,7 @@ //! Various packet encoding semantics which underpin the various types of transactions. pub mod ics27_ica; +pub mod ics28_ccv; pub mod ics29_fee; pub mod ics31_icq; pub mod transfer; 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 0e0f800653..f561ac4439 100644 --- a/crates/relayer-types/src/clients/ics07_tendermint/client_state.rs +++ b/crates/relayer-types/src/clients/ics07_tendermint/client_state.rs @@ -351,7 +351,10 @@ impl TryFrom for ClientState { TENDERMINT_CLIENT_STATE_TYPE_URL => { decode_client_state(raw.value.deref()).map_err(Into::into) } - _ => Err(Ics02Error::unknown_client_state_type(raw.type_url)), + _ => Err(Ics02Error::unexpected_client_state_type( + TENDERMINT_CLIENT_STATE_TYPE_URL.to_string(), + raw.type_url, + )), } } } diff --git a/crates/relayer-types/src/clients/ics07_tendermint/misbehaviour.rs b/crates/relayer-types/src/clients/ics07_tendermint/misbehaviour.rs index f8d1034a3e..54fec5425a 100644 --- a/crates/relayer-types/src/clients/ics07_tendermint/misbehaviour.rs +++ b/crates/relayer-types/src/clients/ics07_tendermint/misbehaviour.rs @@ -5,6 +5,7 @@ use serde::{Deserialize, Serialize}; use crate::clients::ics07_tendermint::error::Error; use crate::clients::ics07_tendermint::header::Header; use crate::core::ics24_host::identifier::ClientId; +use crate::tx_msg::Msg; use crate::Height; pub const TENDERMINT_MISBEHAVIOR_TYPE_URL: &str = "/ibc.lightclients.tendermint.v1.Misbehaviour"; @@ -26,6 +27,19 @@ impl crate::core::ics02_client::misbehaviour::Misbehaviour for Misbehaviour { } } +impl Msg for Misbehaviour { + type ValidationError = Error; + type Raw = RawMisbehaviour; + + fn route(&self) -> String { + crate::keys::ROUTER_KEY.to_string() + } + + fn type_url(&self) -> String { + TENDERMINT_MISBEHAVIOR_TYPE_URL.to_string() + } +} + impl Protobuf for Misbehaviour {} impl TryFrom for Misbehaviour { diff --git a/crates/relayer-types/src/core/ics02_client/error.rs b/crates/relayer-types/src/core/ics02_client/error.rs index c01dd19714..96f6dce8f0 100644 --- a/crates/relayer-types/src/core/ics02_client/error.rs +++ b/crates/relayer-types/src/core/ics02_client/error.rs @@ -63,6 +63,13 @@ define_error! { { client_state_type: String } | e | { format_args!("unknown client state type: {0}", e.client_state_type) }, + UnexpectedClientStateType + { + expected: String, + got: String, + } + | e | { format_args!("unexpected client state type, expected: {0}, got: {1}", e.expected, e.got) }, + EmptyClientStateResponse | _ | { "the client state was not found" }, diff --git a/crates/relayer-types/src/core/ics02_client/msgs/misbehaviour.rs b/crates/relayer-types/src/core/ics02_client/msgs/misbehaviour.rs index 707ffe01cb..75fbedbd65 100644 --- a/crates/relayer-types/src/core/ics02_client/msgs/misbehaviour.rs +++ b/crates/relayer-types/src/core/ics02_client/msgs/misbehaviour.rs @@ -38,27 +38,25 @@ impl Protobuf for MsgSubmitMisbehaviour {} impl TryFrom for MsgSubmitMisbehaviour { type Error = Error; - // NOTE: The `MsgSubmitMisbehaviour` message is has been deprecated in IBC-Go v7 in favor of a + // NOTE: The `MsgSubmitMisbehaviour` message has been deprecated in IBC-Go v7 in favor of a // regular `MsgUpdateClient`, but will keep working for the foreseeable future. #[allow(deprecated)] fn try_from(raw: RawMsgSubmitMisbehaviour) -> Result { - let raw_misbehaviour = raw - .misbehaviour - .ok_or_else(Error::missing_raw_misbehaviour)?; - Ok(MsgSubmitMisbehaviour { client_id: raw .client_id .parse() .map_err(Error::invalid_raw_misbehaviour)?, - misbehaviour: raw_misbehaviour, + misbehaviour: raw + .misbehaviour + .ok_or_else(Error::missing_raw_misbehaviour)?, signer: raw.signer.parse().map_err(Error::signer)?, }) } } impl From for RawMsgSubmitMisbehaviour { - // NOTE: The `MsgSubmitMisbehaviour` message is has been deprecated in IBC-Go v7 in favor of a + // NOTE: The `MsgSubmitMisbehaviour` message has been deprecated in IBC-Go v7 in favor of a // regular `MsgUpdateClient`, but will keep working for the foreseeable future. #[allow(deprecated)] fn from(ics_msg: MsgSubmitMisbehaviour) -> Self { diff --git a/crates/relayer-types/src/core/ics03_connection/connection.rs b/crates/relayer-types/src/core/ics03_connection/connection.rs index a73a692949..55c867ae9b 100644 --- a/crates/relayer-types/src/core/ics03_connection/connection.rs +++ b/crates/relayer-types/src/core/ics03_connection/connection.rs @@ -241,9 +241,9 @@ impl ConnectionEnd { #[derive(Clone, Debug, Default, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct Counterparty { - client_id: ClientId, + pub client_id: ClientId, pub connection_id: Option, - prefix: CommitmentPrefix, + pub prefix: CommitmentPrefix, } impl Protobuf for Counterparty {} diff --git a/crates/relayer-types/src/mock/client_state.rs b/crates/relayer-types/src/mock/client_state.rs index 320d15aafb..3c2070d0a9 100644 --- a/crates/relayer-types/src/mock/client_state.rs +++ b/crates/relayer-types/src/mock/client_state.rs @@ -101,7 +101,10 @@ impl TryFrom for MockClientState { MOCK_CLIENT_STATE_TYPE_URL => { decode_client_state(raw.value.deref()).map_err(Into::into) } - _ => Err(Error::unknown_client_state_type(raw.type_url)), + _ => Err(Error::unexpected_client_state_type( + MOCK_CLIENT_STATE_TYPE_URL.to_string(), + raw.type_url, + )), } } } diff --git a/crates/relayer/Cargo.toml b/crates/relayer/Cargo.toml index bed5adf649..1891d48536 100644 --- a/crates/relayer/Cargo.toml +++ b/crates/relayer/Cargo.toml @@ -20,7 +20,7 @@ default = ["flex-error/std", "flex-error/eyre_tracer"] telemetry = ["ibc-telemetry"] [dependencies] -ibc-proto = { version = "0.37.0", features = ["serde"] } +ibc-proto = { version = "0.38.0-pre.1", features = ["serde"] } ibc-telemetry = { version = "0.25.0", path = "../telemetry", optional = true } ibc-relayer-types = { version = "0.25.0", path = "../relayer-types", features = ["mocks"] } diff --git a/crates/relayer/src/chain/cosmos.rs b/crates/relayer/src/chain/cosmos.rs index b2f71a1c37..7c10fcae42 100644 --- a/crates/relayer/src/chain/cosmos.rs +++ b/crates/relayer/src/chain/cosmos.rs @@ -15,15 +15,12 @@ use tonic::codegen::http::Uri; use tonic::metadata::AsciiMetadataValue; use tracing::{debug, error, info, instrument, trace, warn}; -use ibc_proto::cosmos::{ - base::node::v1beta1::ConfigResponse, staking::v1beta1::Params as StakingParams, -}; - -use ibc_proto::interchain_security::ccv::consumer::v1::Params as CcvConsumerParams; - +use ibc_proto::cosmos::base::node::v1beta1::ConfigResponse; +use ibc_proto::cosmos::staking::v1beta1::Params as StakingParams; use ibc_proto::ibc::apps::fee::v1::{ QueryIncentivizedPacketRequest, QueryIncentivizedPacketResponse, }; +use ibc_proto::interchain_security::ccv::v1::ConsumerParams as CcvConsumerParams; use ibc_proto::protobuf::Protobuf; use ibc_relayer_types::applications::ics31_icq::response::CrossChainQueryResponse; use ibc_relayer_types::clients::ics07_tendermint::client_state::{ @@ -142,7 +139,7 @@ pub const BLOCK_MAX_BYTES_MAX_FRACTION: f64 = 0.9; pub struct CosmosSdkChain { config: ChainConfig, tx_config: TxConfig, - rpc_client: HttpClient, + pub rpc_client: HttpClient, compat_mode: CompatMode, grpc_addr: Uri, light_client: TmLightClient, @@ -568,7 +565,7 @@ impl CosmosSdkChain { prove, ))?; - // TODO - Verify response proof, if requested. + // TODO: Verify response proof, if requested. Ok(response) } @@ -2253,6 +2250,40 @@ impl ChainEndpoint for CosmosSdkChain { self.block_on(query_incentivized_packet(&self.grpc_addr, request))?; Ok(incentivized_response) } + + fn query_consumer_chains(&self) -> Result, Error> { + crate::time!( + "query_consumer_chains", + { + "src_chain": self.config().id.to_string(), + } + ); + crate::telemetry!(query, self.id(), "query_consumer_chains"); + + let mut client = self.block_on( + ibc_proto::interchain_security::ccv::provider::v1::query_client::QueryClient::connect( + self.grpc_addr.clone(), + ), + ) + .map_err(Error::grpc_transport)?; + + let request = tonic::Request::new( + ibc_proto::interchain_security::ccv::provider::v1::QueryConsumerChainsRequest {}, + ); + + let response = self + .block_on(client.query_consumer_chains(request)) + .map_err(|e| Error::grpc_status(e, "query_consumer_chains".to_owned()))? + .into_inner(); + + let result = response + .chains + .into_iter() + .map(|c| (c.chain_id.parse().unwrap(), c.client_id.parse().unwrap())) + .collect(); + + Ok(result) + } } fn sort_events_by_sequence(events: &mut [IbcEventWithHeight]) { diff --git a/crates/relayer/src/chain/cosmos/query/account.rs b/crates/relayer/src/chain/cosmos/query/account.rs index 0a424d1693..e24c414ff7 100644 --- a/crates/relayer/src/chain/cosmos/query/account.rs +++ b/crates/relayer/src/chain/cosmos/query/account.rs @@ -39,9 +39,9 @@ pub async fn refresh_account<'a>( let account = query_account(grpc_address, account_address).await?; info!( - sequence = %account.sequence, - number = %account.account_number, - "refresh: retrieved account", + old = %m_account.sequence, + new = %account.sequence, + "refreshed account sequence number", ); *m_account = account.into(); diff --git a/crates/relayer/src/chain/counterparty.rs b/crates/relayer/src/chain/counterparty.rs index ac34d84f40..be9425aae2 100644 --- a/crates/relayer/src/chain/counterparty.rs +++ b/crates/relayer/src/chain/counterparty.rs @@ -2,7 +2,6 @@ use std::collections::HashSet; use ibc_relayer_types::{ core::{ - ics02_client::client_state::ClientState, ics03_connection::connection::{ ConnectionEnd, IdentifiedConnectionEnd, State as ConnectionState, }, diff --git a/crates/relayer/src/chain/endpoint.rs b/crates/relayer/src/chain/endpoint.rs index 4c0134dfb3..8627e396c1 100644 --- a/crates/relayer/src/chain/endpoint.rs +++ b/crates/relayer/src/chain/endpoint.rs @@ -695,4 +695,6 @@ pub trait ChainEndpoint: Sized { &self, request: QueryIncentivizedPacketRequest, ) -> Result; + + fn query_consumer_chains(&self) -> Result, Error>; } diff --git a/crates/relayer/src/chain/handle.rs b/crates/relayer/src/chain/handle.rs index be905173cb..f46353ad38 100644 --- a/crates/relayer/src/chain/handle.rs +++ b/crates/relayer/src/chain/handle.rs @@ -367,6 +367,10 @@ pub enum ChainRequest { request: QueryIncentivizedPacketRequest, reply_to: ReplyTo, }, + + QueryConsumerChains { + reply_to: ReplyTo>, + }, } pub trait ChainHandle: Clone + Display + Send + Sync + Debug + 'static { @@ -678,4 +682,6 @@ pub trait ChainHandle: Clone + Display + Send + Sync + Debug + 'static { &self, request: QueryIncentivizedPacketRequest, ) -> Result; + + fn query_consumer_chains(&self) -> Result, Error>; } diff --git a/crates/relayer/src/chain/handle/base.rs b/crates/relayer/src/chain/handle/base.rs index 2c2264f55c..38e1c7b453 100644 --- a/crates/relayer/src/chain/handle/base.rs +++ b/crates/relayer/src/chain/handle/base.rs @@ -515,4 +515,8 @@ impl ChainHandle for BaseChainHandle { ) -> Result { self.send(|reply_to| ChainRequest::QueryIncentivizedPacket { request, reply_to }) } + + fn query_consumer_chains(&self) -> Result, Error> { + self.send(|reply_to| ChainRequest::QueryConsumerChains { reply_to }) + } } diff --git a/crates/relayer/src/chain/handle/cache.rs b/crates/relayer/src/chain/handle/cache.rs index d09bc6927f..2b2809748f 100644 --- a/crates/relayer/src/chain/handle/cache.rs +++ b/crates/relayer/src/chain/handle/cache.rs @@ -510,4 +510,8 @@ impl ChainHandle for CachingChainHandle { ) -> Result { self.inner.query_incentivized_packet(request) } + + fn query_consumer_chains(&self) -> Result, Error> { + self.inner.query_consumer_chains() + } } diff --git a/crates/relayer/src/chain/handle/counting.rs b/crates/relayer/src/chain/handle/counting.rs index 66b83e5686..271ef86b2c 100644 --- a/crates/relayer/src/chain/handle/counting.rs +++ b/crates/relayer/src/chain/handle/counting.rs @@ -503,4 +503,9 @@ impl ChainHandle for CountingChainHandle { self.inc_metric("query_incentivized_packet"); self.inner.query_incentivized_packet(request) } + + fn query_consumer_chains(&self) -> Result, Error> { + self.inc_metric("query_consumer_chains"); + self.inner.query_consumer_chains() + } } diff --git a/crates/relayer/src/chain/runtime.rs b/crates/relayer/src/chain/runtime.rs index 0426f6377d..571e25bfac 100644 --- a/crates/relayer/src/chain/runtime.rs +++ b/crates/relayer/src/chain/runtime.rs @@ -21,7 +21,7 @@ use ibc_relayer_types::{ packet::{PacketMsgType, Sequence}, }, ics23_commitment::{commitment::CommitmentPrefix, merkle::MerkleProof}, - ics24_host::identifier::{ChannelId, ClientId, ConnectionId, PortId}, + ics24_host::identifier::{ChainId, ChannelId, ClientId, ConnectionId, PortId}, }, proofs::Proofs, signer::Signer, @@ -349,6 +349,10 @@ where ChainRequest::QueryIncentivizedPacket { request, reply_to } => { self.query_incentivized_packet(request, reply_to)? }, + + ChainRequest::QueryConsumerChains { reply_to } => { + self.query_consumer_chains(reply_to)? + }, } }, } @@ -850,4 +854,14 @@ where Ok(()) } + + fn query_consumer_chains( + &self, + reply_to: ReplyTo>, + ) -> Result<(), Error> { + let result = self.chain.query_consumer_chains(); + reply_to.send(result).map_err(Error::send)?; + + Ok(()) + } } diff --git a/crates/relayer/src/channel/error.rs b/crates/relayer/src/channel/error.rs index 7fc820ce89..c6d3b40391 100644 --- a/crates/relayer/src/channel/error.rs +++ b/crates/relayer/src/channel/error.rs @@ -196,16 +196,27 @@ define_error! { } impl HasExpiredOrFrozenError for ChannelErrorDetail { - fn is_expired_or_frozen_error(&self) -> bool { + fn is_frozen_error(&self) -> bool { match self { - Self::ClientOperation(e) => e.source.is_expired_or_frozen_error(), + Self::ClientOperation(e) => e.source.is_frozen_error(), + _ => false, + } + } + + fn is_expired_error(&self) -> bool { + match self { + Self::ClientOperation(e) => e.source.is_expired_error(), _ => false, } } } impl HasExpiredOrFrozenError for ChannelError { - fn is_expired_or_frozen_error(&self) -> bool { - self.detail().is_expired_or_frozen_error() + fn is_frozen_error(&self) -> bool { + self.detail().is_frozen_error() + } + + fn is_expired_error(&self) -> bool { + self.detail().is_expired_error() } } diff --git a/crates/relayer/src/client_state.rs b/crates/relayer/src/client_state.rs index 8c5eff288b..451bdb90c3 100644 --- a/crates/relayer/src/client_state.rs +++ b/crates/relayer/src/client_state.rs @@ -1,13 +1,13 @@ use core::time::Duration; +use serde::{Deserialize, Serialize}; + +use ibc_proto::google::protobuf::Any; use ibc_proto::ibc::core::client::v1::IdentifiedClientState; -use ibc_proto::ibc::lightclients::tendermint::v1::ClientState as RawClientState; +use ibc_proto::ibc::lightclients::tendermint::v1::ClientState as RawTmClientState; #[cfg(test)] use ibc_proto::ibc::mock::ClientState as RawMockClientState; use ibc_proto::protobuf::Protobuf; -use serde::{Deserialize, Serialize}; - -use ibc_proto::google::protobuf::Any; use ibc_relayer_types::clients::ics07_tendermint::client_state::{ ClientState as TmClientState, UpgradeOptions as TmUpgradeOptions, TENDERMINT_CLIENT_STATE_TYPE_URL, @@ -58,6 +58,15 @@ pub enum AnyClientState { } impl AnyClientState { + pub fn chain_id(&self) -> ChainId { + match self { + AnyClientState::Tendermint(tm_state) => tm_state.chain_id(), + + #[cfg(test)] + AnyClientState::Mock(mock_state) => mock_state.chain_id(), + } + } + pub fn latest_height(&self) -> Height { match self { Self::Tendermint(tm_state) => tm_state.latest_height(), @@ -123,7 +132,7 @@ impl TryFrom for AnyClientState { "" => Err(Error::empty_client_state_response()), TENDERMINT_CLIENT_STATE_TYPE_URL => Ok(AnyClientState::Tendermint( - Protobuf::::decode_vec(&raw.value) + Protobuf::::decode_vec(&raw.value) .map_err(Error::decode_raw_client_state)?, )), @@ -143,7 +152,7 @@ impl From for Any { match value { AnyClientState::Tendermint(value) => Any { type_url: TENDERMINT_CLIENT_STATE_TYPE_URL.to_string(), - value: Protobuf::::encode_vec(&value), + value: Protobuf::::encode_vec(&value), }, #[cfg(test)] AnyClientState::Mock(value) => Any { diff --git a/crates/relayer/src/connection/error.rs b/crates/relayer/src/connection/error.rs index f8f026bcfa..ee017b5cc9 100644 --- a/crates/relayer/src/connection/error.rs +++ b/crates/relayer/src/connection/error.rs @@ -187,16 +187,27 @@ define_error! { } impl HasExpiredOrFrozenError for ConnectionErrorDetail { - fn is_expired_or_frozen_error(&self) -> bool { + fn is_frozen_error(&self) -> bool { match self { - Self::ClientOperation(e) => e.source.is_expired_or_frozen_error(), + Self::ClientOperation(e) => e.source.is_frozen_error(), + _ => false, + } + } + + fn is_expired_error(&self) -> bool { + match self { + Self::ClientOperation(e) => e.source.is_expired_error(), _ => false, } } } impl HasExpiredOrFrozenError for ConnectionError { - fn is_expired_or_frozen_error(&self) -> bool { - self.detail().is_expired_or_frozen_error() + fn is_frozen_error(&self) -> bool { + self.detail().is_frozen_error() + } + + fn is_expired_error(&self) -> bool { + self.detail().is_expired_error() } } diff --git a/crates/relayer/src/error.rs b/crates/relayer/src/error.rs index 10e97c08b7..73e96c467a 100644 --- a/crates/relayer/src/error.rs +++ b/crates/relayer/src/error.rs @@ -691,6 +691,7 @@ impl GrpcStatusSubdetail { fn parse_sequences_in_mismatch_error_message(message: &str) -> Option<(u64, u64)> { let re = Regex::new(r"account sequence mismatch, expected (?P\d+), got (?P\d+)") .unwrap(); + match re.captures(message) { None => None, Some(captures) => match (captures["expected"].parse(), captures["got"].parse()) { diff --git a/crates/relayer/src/foreign_client.rs b/crates/relayer/src/foreign_client.rs index 008737e052..72a955c2ff 100644 --- a/crates/relayer/src/foreign_client.rs +++ b/crates/relayer/src/foreign_client.rs @@ -13,6 +13,7 @@ use itertools::Itertools; use tracing::{debug, error, info, instrument, trace, warn}; use flex_error::define_error; +use ibc_relayer_types::applications::ics28_ccv::msgs::ccv_misbehaviour::MsgSubmitIcsConsumerMisbehaviour; use ibc_relayer_types::core::ics02_client::client_state::ClientState; use ibc_relayer_types::core::ics02_client::error::Error as ClientError; use ibc_relayer_types::core::ics02_client::events::UpdateClient; @@ -38,7 +39,7 @@ use crate::consensus_state::AnyConsensusState; use crate::error::Error as RelayerError; use crate::event::IbcEventWithHeight; use crate::light_client::AnyHeader; -use crate::misbehaviour::MisbehaviourEvidence; +use crate::misbehaviour::{AnyMisbehaviour, MisbehaviourEvidence}; use crate::telemetry; use crate::util::collate::CollatedIterExt; use crate::util::pretty::{PrettyDuration, PrettySlice}; @@ -47,6 +48,21 @@ const MAX_MISBEHAVIOUR_CHECK_DURATION: Duration = Duration::from_secs(120); const MAX_RETRIES: usize = 5; +#[derive(Copy, Clone, Debug, PartialEq, Eq)] +pub enum ExpiredOrFrozen { + Expired, + Frozen, +} + +impl fmt::Display for ExpiredOrFrozen { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + ExpiredOrFrozen::Expired => write!(f, "expired"), + ExpiredOrFrozen::Frozen => write!(f, "frozen"), + } + } +} + define_error! { ForeignClientError { ClientCreate @@ -224,13 +240,14 @@ define_error! { ExpiredOrFrozen { + status: ExpiredOrFrozen, client_id: ClientId, chain_id: ChainId, description: String, } |e| { - format_args!("client {0} on chain id {1} is expired or frozen: {2}", - e.client_id, e.chain_id, e.description) + format_args!("client {0} on chain id {1} is {2}: {3}", + e.client_id, e.chain_id, e.status, e.description) }, ConsensusStateNotTrusted @@ -252,6 +269,14 @@ define_error! { format_args!("error raised while checking for misbehaviour evidence: {0}", e.description) }, + MisbehaviourDesc + { + description: String, + } + |e| { + format_args!("error raised while checking for misbehaviour evidence: {0}", e.description) + }, + MisbehaviourExit { reason: String } |e| { @@ -286,18 +311,39 @@ define_error! { } pub trait HasExpiredOrFrozenError { - fn is_expired_or_frozen_error(&self) -> bool; + fn is_expired_error(&self) -> bool; + fn is_frozen_error(&self) -> bool; + + fn is_expired_or_frozen_error(&self) -> bool { + self.is_expired_error() || self.is_frozen_error() + } } impl HasExpiredOrFrozenError for ForeignClientErrorDetail { - fn is_expired_or_frozen_error(&self) -> bool { - matches!(self, Self::ExpiredOrFrozen(_)) + fn is_expired_error(&self) -> bool { + if let Self::ExpiredOrFrozen(e) = self { + e.status == ExpiredOrFrozen::Expired + } else { + false + } + } + + fn is_frozen_error(&self) -> bool { + if let Self::ExpiredOrFrozen(e) = self { + e.status == ExpiredOrFrozen::Frozen + } else { + false + } } } impl HasExpiredOrFrozenError for ForeignClientError { - fn is_expired_or_frozen_error(&self) -> bool { - self.detail().is_expired_or_frozen_error() + fn is_expired_error(&self) -> bool { + self.detail().is_expired_error() + } + + fn is_frozen_error(&self) -> bool { + self.detail().is_frozen_error() } } @@ -706,6 +752,7 @@ impl ForeignClient ForeignClient Ok((client_state, Some(elapsed))), @@ -786,6 +834,20 @@ impl ForeignClient bool { + match self.validated_client_state() { + Ok(_) => false, + Err(e) => e.is_frozen_error(), + } + } + + pub fn is_expired(&self) -> bool { + match self.validated_client_state() { + Ok(_) => false, + Err(e) => e.is_expired_error(), + } + } + pub fn is_expired_or_frozen(&self) -> bool { match self.validated_client_state() { Ok(_) => false, @@ -1467,10 +1529,7 @@ impl ForeignClient ForeignClient ForeignClient ForeignClient Some(tm_misbehaviour.clone()), + #[cfg(test)] + _ => None, + } + .ok_or_else(|| { + ForeignClientError::misbehaviour_desc(format!( + "underlying evidence is not a Tendermint misbehaviour: {:?}", + evidence.misbehaviour + )) + })?; + + // If the misbehaving chain is a CCV consumer chain, we need to add + // the corresponding CCV message for the provider. + if is_ccv_consumer_chain { + msgs.push( + MsgSubmitIcsConsumerMisbehaviour { + submitter: signer.clone(), + misbehaviour: tm_misbehaviour, + } + .to_any(), + ); + } + msgs.push( MsgSubmitMisbehaviour { misbehaviour: evidence.misbehaviour.into(), @@ -1686,7 +1780,7 @@ impl ForeignClient ForeignClient match e.detail() { ForeignClientErrorDetail::MisbehaviourExit(s) => { - error!("misbehaviour checking is being disabled, reason: {}", s); + error!("misbehaviour checking is being disabled, reason: {s}"); MisbehaviourResults::CannotExecute } ForeignClientErrorDetail::ExpiredOrFrozen(_) => { - error!("cannot check misbehavior on frozen or expired client",); + error!("cannot check misbehavior on frozen or expired client"); MisbehaviourResults::CannotExecute } // FIXME: This is fishy - _ if update_event.is_some() => MisbehaviourResults::CannotExecute, + e if update_event.is_some() => { + error!("encountered unexpected error while checking misbehaviour: {e}"); + debug!("update event: {}", update_event.unwrap()); + + MisbehaviourResults::CannotExecute + } // FIXME: This is fishy _ => { - warn!("misbehaviour checking result: {}", e); + warn!("misbehaviour checking result: {e}"); MisbehaviourResults::ValidClient } diff --git a/crates/relayer/src/light_client/tendermint.rs b/crates/relayer/src/light_client/tendermint.rs index 5e3d4c3fae..c1648353ea 100644 --- a/crates/relayer/src/light_client/tendermint.rs +++ b/crates/relayer/src/light_client/tendermint.rs @@ -207,13 +207,18 @@ impl super::LightClient for LightClient { challenging_block, })) => { warn!("misbehavior detected, reporting evidence to RPC witness node and primary chain"); + debug!("evidence: {evidence:#?}"); + debug!("challenging block: {challenging_block:#?}"); + + warn!("waiting 5 seconds before reporting evidence to RPC witness node"); + std::thread::sleep(Duration::from_secs(5)); match detector::report_evidence( self.io.rpc_client().clone(), evidence.against_primary, ) { Ok(hash) => warn!("evidence reported to RPC witness node with hash: {hash}"), - Err(e) => error!("failed to report evidence to RPC witness node: {}", e), + Err(e) => error!("failed to report evidence to RPC witness node: {e}"), } let target_block = self.fetch(update_header.height())?; diff --git a/crates/relayer/src/link/error.rs b/crates/relayer/src/link/error.rs index 697c8cf994..adf8142ec8 100644 --- a/crates/relayer/src/link/error.rs +++ b/crates/relayer/src/link/error.rs @@ -152,16 +152,27 @@ define_error! { } impl HasExpiredOrFrozenError for LinkErrorDetail { - fn is_expired_or_frozen_error(&self) -> bool { + fn is_frozen_error(&self) -> bool { match self { - Self::Client(e) => e.source.is_expired_or_frozen_error(), + Self::Client(e) => e.source.is_frozen_error(), + _ => false, + } + } + + fn is_expired_error(&self) -> bool { + match self { + Self::Client(e) => e.source.is_expired_error(), _ => false, } } } impl HasExpiredOrFrozenError for LinkError { - fn is_expired_or_frozen_error(&self) -> bool { - self.detail().is_expired_or_frozen_error() + fn is_frozen_error(&self) -> bool { + self.detail().is_frozen_error() + } + + fn is_expired_error(&self) -> bool { + self.detail().is_expired_error() } } diff --git a/crates/relayer/src/object.rs b/crates/relayer/src/object.rs index 9f7349734d..285856d041 100644 --- a/crates/relayer/src/object.rs +++ b/crates/relayer/src/object.rs @@ -5,7 +5,7 @@ use serde::{Deserialize, Serialize}; use ibc_relayer_types::applications::ics29_fee::events::IncentivizedPacket; use ibc_relayer_types::core::{ - ics02_client::{client_state::ClientState, events::UpdateClient}, + ics02_client::events::UpdateClient, ics03_connection::events::Attributes as ConnectionAttributes, ics04_channel::events::{ Attributes, CloseInit, SendPacket, TimeoutPacket, WriteAcknowledgement, diff --git a/crates/relayer/src/spawn.rs b/crates/relayer/src/spawn.rs index f71a65eb70..1d6cd87737 100644 --- a/crates/relayer/src/spawn.rs +++ b/crates/relayer/src/spawn.rs @@ -7,7 +7,7 @@ use ibc_relayer_types::core::ics24_host::identifier::ChainId; use crate::{ chain::{cosmos::CosmosSdkChain, handle::ChainHandle, runtime::ChainRuntime, ChainType}, - config::Config, + config::{ChainConfig, Config}, error::Error as RelayerError, }; @@ -52,8 +52,36 @@ pub fn spawn_chain_runtime( .cloned() .ok_or_else(|| SpawnError::missing_chain_config(chain_id.clone()))?; - let handle = match chain_config.r#type { - ChainType::CosmosSdk => ChainRuntime::::spawn::(chain_config, rt), + spawn_chain_runtime_with_config(chain_config, rt) +} + +/// Spawns a chain runtime from the configuration and given a chain identifier, +/// allowing the caller to modify the chain config. +/// Returns the corresponding handle if successful. +pub fn spawn_chain_runtime_with_modified_config( + config: &Config, + chain_id: &ChainId, + rt: Arc, + modify: impl FnOnce(&mut ChainConfig), +) -> Result { + let mut chain_config = config + .find_chain(chain_id) + .cloned() + .ok_or_else(|| SpawnError::missing_chain_config(chain_id.clone()))?; + + modify(&mut chain_config); + + spawn_chain_runtime_with_config(chain_config, rt) +} + +/// Spawns a chain runtime from the given chain configuration +/// Returns the corresponding handle if successful. +pub fn spawn_chain_runtime_with_config( + config: ChainConfig, + rt: Arc, +) -> Result { + let handle = match config.r#type { + ChainType::CosmosSdk => ChainRuntime::::spawn::(config, rt), } .map_err(SpawnError::relayer)?; diff --git a/crates/relayer/src/supervisor/client_state_filter.rs b/crates/relayer/src/supervisor/client_state_filter.rs index 0203b563f4..87133e89b7 100644 --- a/crates/relayer/src/supervisor/client_state_filter.rs +++ b/crates/relayer/src/supervisor/client_state_filter.rs @@ -4,7 +4,6 @@ use flex_error::define_error; use ibc_relayer_types::core::ics02_client::trust_threshold::TrustThreshold; use tracing::{debug, trace}; -use ibc_relayer_types::core::ics02_client::client_state::ClientState; use ibc_relayer_types::core::ics03_connection::connection::ConnectionEnd; use ibc_relayer_types::core::ics04_channel::error::Error as ChannelError; use ibc_relayer_types::core::ics24_host::identifier::{ diff --git a/crates/relayer/src/supervisor/scan.rs b/crates/relayer/src/supervisor/scan.rs index 1b4cf705e2..b4ff88cc0b 100644 --- a/crates/relayer/src/supervisor/scan.rs +++ b/crates/relayer/src/supervisor/scan.rs @@ -5,7 +5,6 @@ use itertools::Itertools; use tracing::{debug, error, error_span, info, warn}; use ibc_relayer_types::core::{ - ics02_client::client_state::ClientState, ics03_connection::connection::{IdentifiedConnectionEnd, State as ConnectionState}, ics04_channel::{ channel::{IdentifiedChannelEnd, State as ChannelState}, diff --git a/crates/relayer/src/supervisor/spawn.rs b/crates/relayer/src/supervisor/spawn.rs index c7ffd2a240..b1b608875c 100644 --- a/crates/relayer/src/supervisor/spawn.rs +++ b/crates/relayer/src/supervisor/spawn.rs @@ -1,7 +1,7 @@ use tracing::{error, info}; use ibc_relayer_types::core::{ - ics02_client::client_state::ClientState, ics03_connection::connection::IdentifiedConnectionEnd, + ics03_connection::connection::IdentifiedConnectionEnd, ics04_channel::channel::State as ChannelState, }; diff --git a/flake.lock b/flake.lock index 6c1750e11d..bfe6dd2ef7 100644 --- a/flake.lock +++ b/flake.lock @@ -54,17 +54,34 @@ "centauri-src": { "flake": false, "locked": { - "lastModified": 1692209286, - "narHash": "sha256-fabsZyaSCnWnhvG9nO8y39t85u+MZNyEKzU+0fSueLM=", + "lastModified": 1697027127, + "narHash": "sha256-zdEJr4VfwKq20rGx7JZYV7cnz5APwnPSMJrjX9S/bT8=", "owner": "dzmitry-lahoda-forks", "repo": "composable-centauri", - "rev": "9fa53d8b47d17219d1270146a146e4e386bc2a29", + "rev": "9a296e3dcca3ff390dd5622ab3cfbdfa0b68d2e9", "type": "github" }, "original": { "owner": "dzmitry-lahoda-forks", "repo": "composable-centauri", - "rev": "9fa53d8b47d17219d1270146a146e4e386bc2a29", + "rev": "9a296e3dcca3ff390dd5622ab3cfbdfa0b68d2e9", + "type": "github" + } + }, + "cometbft-src": { + "flake": false, + "locked": { + "lastModified": 1694550324, + "narHash": "sha256-G5gchJMn/BFzwYx8/ikPDL5fS/TuFIBF4DKJbkalp/M=", + "owner": "cometbft", + "repo": "cometbft", + "rev": "66a5a9da9f7a3306f382eb9142ccb9c9f7997d3f", + "type": "github" + }, + "original": { + "owner": "cometbft", + "ref": "v0.38.0", + "repo": "cometbft", "type": "github" } }, @@ -74,6 +91,7 @@ "apalache-src": "apalache-src", "beaker-src": "beaker-src", "centauri-src": "centauri-src", + "cometbft-src": "cometbft-src", "cosmos-sdk-src": "cosmos-sdk-src", "cosmwasm-src": "cosmwasm-src", "crescent-src": "crescent-src", @@ -136,15 +154,16 @@ "wasmvm_1_beta7-src": "wasmvm_1_beta7-src" }, "locked": { - "lastModified": 1697035289, - "narHash": "sha256-2yPPi/n4IrKZ0Y0BwPSmHGP5UJoY5u5XY6BnKxsuGnc=", + "lastModified": 1697211608, + "narHash": "sha256-YlzCO80psDkP3hGNaXHMq3K8LfTldUZt3K/hALV8j+g=", "owner": "informalsystems", "repo": "cosmos.nix", - "rev": "e26774d7889a508ad3ac021a886bc6b8cf11cf7e", + "rev": "07651f41e38276acd7e8c4f20519f6c4cbf00f7b", "type": "github" }, "original": { "owner": "informalsystems", + "ref": "update-ics", "repo": "cosmos.nix", "type": "github" } @@ -716,16 +735,16 @@ "interchain-security-src": { "flake": false, "locked": { - "lastModified": 1662985265, - "narHash": "sha256-MhH5R1eEKel8nX1UIw4PAsSTPraP7ivrPU/+StqaD6U=", + "lastModified": 1694449275, + "narHash": "sha256-yLB2utj3hSB4jw/fc/TJhDcybzZJ+soc8tZlL4jxtk8=", "owner": "cosmos", "repo": "interchain-security", - "rev": "1162655c89221588d4b440717b2ca1c65170aec2", + "rev": "c881a1aad37f2f8041c913468602edaf69fef9bf", "type": "github" }, "original": { "owner": "cosmos", - "ref": "v0.1.4", + "ref": "feat/ics-misbehaviour-handling", "repo": "interchain-security", "type": "github" } @@ -896,11 +915,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1696757521, - "narHash": "sha256-cfgtLNCBLFx2qOzRLI6DHfqTdfWI+UbvsKYa3b3fvaA=", + "lastModified": 1697009197, + "narHash": "sha256-viVRhBTFT8fPJTb1N3brQIpFZnttmwo3JVKNuWRVc3s=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2646b294a146df2781b1ca49092450e8a32814e1", + "rev": "01441e14af5e29c9d27ace398e6dd0b293e25a54", "type": "github" }, "original": { @@ -913,16 +932,16 @@ "osmosis-src": { "flake": false, "locked": { - "lastModified": 1692886846, - "narHash": "sha256-VdM6hGqcDyCNx7AR8s7SxE3pEMxHiIhCJ7592sDp3uc=", + "lastModified": 1695859760, + "narHash": "sha256-Ad2Z4rzD0HQtnj2aQ4GD6ic5sxOHVPsaW4iNKZEDTiw=", "owner": "osmosis-labs", "repo": "osmosis", - "rev": "1c5f25d04f19d6302e0bdd585ba1d7a2cc96e397", + "rev": "38d1d2b748d161fd23f966d88b23b66a63c9a284", "type": "github" }, "original": { "owner": "osmosis-labs", - "ref": "v18.0.0", + "ref": "v19.2.0", "repo": "osmosis", "type": "github" } diff --git a/flake.nix b/flake.nix index 7cadfe5970..5ce8b295ce 100644 --- a/flake.nix +++ b/flake.nix @@ -4,7 +4,7 @@ inputs = { nixpkgs.url = github:nixos/nixpkgs/nixpkgs-unstable; flake-utils.url = github:numtide/flake-utils; - cosmos-nix.url = github:informalsystems/cosmos.nix; + cosmos-nix.url = github:informalsystems/cosmos.nix/update-ics; }; outputs = inputs: let @@ -27,6 +27,7 @@ packages = { inherit (cosmos-nix) + cometbft gaia6-ordered gaia12 osmosis @@ -37,6 +38,7 @@ ibc-go-v5-simapp ibc-go-v6-simapp ibc-go-v7-simapp + interchain-security apalache evmos juno diff --git a/guide/src/templates/commands/hermes/evidence_1.md b/guide/src/templates/commands/hermes/evidence_1.md new file mode 100644 index 0000000000..4db7cc285b --- /dev/null +++ b/guide/src/templates/commands/hermes/evidence_1.md @@ -0,0 +1 @@ +[[#BINARY hermes]][[#GLOBALOPTIONS]] evidence[[#OPTIONS]] --chain [[#CHAIN_ID]] \ No newline at end of file diff --git a/guide/src/templates/help_templates/evidence.md b/guide/src/templates/help_templates/evidence.md new file mode 100644 index 0000000000..a8a2cdea05 --- /dev/null +++ b/guide/src/templates/help_templates/evidence.md @@ -0,0 +1,19 @@ +DESCRIPTION: +Listen to block events and handles evidence + +USAGE: + hermes evidence [OPTIONS] --chain + +OPTIONS: + --check-past-blocks + Check the last NUM_BLOCKS blocks for misbehaviour (default: 100) [default: 100] + + -h, --help + Print help information + + --key-name + Use the given signing key name for sending the misbehaviour evidence detected (default: + `key_name` config) + +REQUIRED: + --chain Identifier of the chain where blocks are monitored for misbehaviour diff --git a/guide/src/templates/help_templates/help.md b/guide/src/templates/help_templates/help.md index 11aa32e2af..8a0011bd76 100644 --- a/guide/src/templates/help_templates/help.md +++ b/guide/src/templates/help_templates/help.md @@ -17,13 +17,14 @@ SUBCOMMANDS: clear Clear objects, such as outstanding packets on a channel config Generate a new Hermes configuration file or validate an existing one create Create objects (client, connection, or channel) on chains + evidence Listen to block events and handles evidence fee Interact with the fee middleware health-check Performs a health check of all chains in the the config help Print this message or the help of the given subcommand(s) keys Manage keys in the relayer for each chain listen Listen to and display IBC events emitted by a chain logs Update tracing log directives - misbehaviour Listen to client update IBC events and handles misbehaviour + misbehaviour Listen to client update IBC events and handle misbehaviour query Query objects from the chain start Start the relayer in multi-chain mode tx Create and send IBC transactions diff --git a/guide/src/templates/help_templates/misbehaviour.md b/guide/src/templates/help_templates/misbehaviour.md index 5344c12d13..e669d63344 100644 --- a/guide/src/templates/help_templates/misbehaviour.md +++ b/guide/src/templates/help_templates/misbehaviour.md @@ -1,5 +1,5 @@ DESCRIPTION: -Listen to client update IBC events and handles misbehaviour +Listen to client update IBC events and handle misbehaviour USAGE: hermes misbehaviour --chain --client diff --git a/scripts/one-chain b/scripts/one-chain index 30a1af787b..47bf41365e 100755 --- a/scripts/one-chain +++ b/scripts/one-chain @@ -146,7 +146,7 @@ fi # Start gaia echo "Start gaia on grpc port: $GRPC_PORT..." -$BINARY --home $CHAIN_DIR/$CHAIN_ID start --pruning=nothing --grpc.address="0.0.0.0:$GRPC_PORT" --log_level error > $CHAIN_DIR/$CHAIN_ID.log 2>&1 & +$BINARY --home $CHAIN_DIR/$CHAIN_ID start --pruning=nothing --grpc.address="0.0.0.0:$GRPC_PORT" --log_level info > $CHAIN_DIR/$CHAIN_ID.log 2>&1 & # Show validator's and user's balance sleep 3 diff --git a/tools/check-guide/Cargo.lock b/tools/check-guide/Cargo.lock index b6e0dbe517..cbe99718c4 100644 --- a/tools/check-guide/Cargo.lock +++ b/tools/check-guide/Cargo.lock @@ -43,9 +43,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] @@ -58,18 +58,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" -dependencies = [ - "memchr", -] - -[[package]] -name = "aho-corasick" -version = "1.0.2" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" +checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" dependencies = [ "memchr", ] @@ -104,30 +95,29 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" dependencies = [ "utf8parse", ] @@ -143,9 +133,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.1" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -153,9 +143,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.71" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "arc-swap" @@ -182,18 +172,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] name = "async-trait" -version = "0.1.72" +version = "0.1.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc6dde6e4ed435a4c1ee4e73592f5ba9da2151af10076cc04858746af9352d09" +checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] @@ -209,7 +199,7 @@ dependencies = [ "rustls-native-certs", "tokio", "tokio-rustls", - "tungstenite 0.20.1", + "tungstenite", ] [[package]] @@ -231,9 +221,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", "axum-core", @@ -280,9 +270,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", "cc", @@ -307,9 +297,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "base64ct" @@ -376,9 +366,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "block-buffer" @@ -409,9 +399,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.6.0" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" +checksum = "4c2f7349907b712260e64b0afe2f84692af14a454be26187d9df565c7f69266a" dependencies = [ "memchr", "regex-automata 0.3.9", @@ -420,9 +410,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "byte-unit" @@ -436,9 +426,9 @@ dependencies = [ [[package]] name = "bytecount" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c676a478f63e9fa2dd5368a42f28bba0d6c560b775f38583c8bbaa7fcd67c9c" +checksum = "ad152d03a2c813c80bb94fedbf3a3f02b28f793e39e7c214c8a0bcc196343de7" [[package]] name = "byteorder" @@ -448,9 +438,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" dependencies = [ "serde", ] @@ -472,9 +462,9 @@ checksum = "e6e9e01327e6c86e92ec72b1c798d4a94810f147209bbe3ffab6a86954937a6f" [[package]] name = "cargo-platform" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" +checksum = "2cfa25e60aea747ec7e1124f238816749faa93759c6ff5b31f1ccdda137f4479" dependencies = [ "serde", ] @@ -494,9 +484,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +dependencies = [ + "libc", +] [[package]] name = "cfg-if" @@ -524,14 +517,14 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", - "winapi", + "windows-targets 0.48.5", ] [[package]] @@ -553,23 +546,22 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.11" +version = "4.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1640e5cc7fb47dbb8338fd471b105e7ed6c3cb2aeb00c2e067127ffd3764a05d" +checksum = "d04704f56c2cde07f43e8e2c154b43f216dc5c92fc98ada720177362f953b956" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.3.11" +version = "4.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c59138d527eeaf9b53f35a77fcc1fad9d883116070c63d5de1c7dc7b00c72b" +checksum = "0e231faeaca65ebd1ea3c737966bf858971cd38c3849107aa3ea7de90a804e45" dependencies = [ "anstream", "anstyle", - "clap_lex 0.5.0", - "once_cell", + "clap_lex 0.5.1", "strsim", "terminal_size", ] @@ -585,11 +577,11 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.3.2" +version = "4.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc443334c81a804575546c5a8a79b4913b50e28d69232903604cada1de817ce" +checksum = "e3ae8ba90b9d8b007efe66e55e48fb936272f5ca00349b5b0e89877520d35ea7" dependencies = [ - "clap 4.3.11", + "clap 4.4.6", ] [[package]] @@ -616,9 +608,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "color-eyre" @@ -668,9 +660,9 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "795bc6e66a8e340f075fcf6227e417a2dc976b92b91f3cdc778bb858778b6747" +checksum = "28c122c3980598d243d63d9a704629a2d748d101f278052ff068be5a4423ab6f" [[package]] name = "contracts" @@ -769,9 +761,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" +checksum = "740fe28e594155f10cfc383984cbefd529d7396050557148f79cb0f621204124" dependencies = [ "generic-array", "rand_core", @@ -791,9 +783,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.0.0" +version = "4.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f711ade317dd348950a9910f81c5947e3d8907ebd2b83f76203ff1807e6a2bc2" +checksum = "e89b8c6a2e4b1f45971ad09761aafb85514a84744b67a95e32c3cc1352d1f65c" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -814,7 +806,7 @@ checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] @@ -832,12 +824,12 @@ dependencies = [ [[package]] name = "dashmap" -version = "5.5.0" +version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6943ae99c34386c84a470c499d3414f66502a41340aa895406e0d2e4a207b91d" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if 1.0.0", - "hashbrown 0.14.0", + "hashbrown 0.14.1", "lock_api", "once_cell", "parking_lot_core", @@ -851,14 +843,20 @@ checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" [[package]] name = "der" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ed52955ce76b1554f509074bb357d3fb8ac9b51288a65a3fd480d1dfba946" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ "const-oid", "zeroize", ] +[[package]] +name = "deranged" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946" + [[package]] name = "derivation-path" version = "0.2.0" @@ -932,15 +930,15 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" +checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" [[package]] name = "ecdsa" -version = "0.16.7" +version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" +checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" dependencies = [ "der", "digest 0.10.7", @@ -984,7 +982,7 @@ dependencies = [ "ed25519", "rand_core", "serde", - "sha2 0.10.7", + "sha2 0.10.8", "zeroize", ] @@ -997,14 +995,14 @@ dependencies = [ "derivation-path", "ed25519-dalek", "hmac", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] name = "either" -version = "1.8.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elasticlunr-rs" @@ -1020,9 +1018,9 @@ dependencies = [ [[package]] name = "elliptic-curve" -version = "0.13.5" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" +checksum = "d97ca172ae9dc9f9b779a6e3a65d308f2af74e5b8c921299075bdb4a0370e914" dependencies = [ "base16ct", "crypto-bigint", @@ -1045,9 +1043,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if 1.0.0", ] @@ -1086,18 +1084,18 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "erased-serde" -version = "0.3.27" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f94c0e13118e7d7533271f754a168ae8400e6a1cc043f2bfd53cc7290f1a1de3" +checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" dependencies = [ "serde", ] [[package]] name = "errno" -version = "0.3.1" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "add4f07d43996f76ef320709726a556a9d4f965d9410d8d0271132d2f8293480" dependencies = [ "errno-dragonfly", "libc", @@ -1145,12 +1143,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "1.9.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "ff" @@ -1164,19 +1159,19 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.1.20" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" +checksum = "d0870c84016d4b481be5c9f323c24f65e31e901ae618f0e80f4308fb00de1d2d" [[package]] name = "filetime" -version = "0.2.21" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" +checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.2.16", + "redox_syscall 0.3.5", "windows-sys 0.48.0", ] @@ -1296,7 +1291,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] @@ -1355,9 +1350,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.3" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "glob" @@ -1367,11 +1362,11 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.10" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" +checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" dependencies = [ - "aho-corasick 0.7.20", + "aho-corasick", "bstr", "fnv", "log", @@ -1411,9 +1406,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -1436,9 +1431,9 @@ checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" [[package]] name = "handlebars" -version = "4.3.7" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c3372087601b532857d332f5957cbae686da52bb7810bf038c3e3c3cc2fa0d" +checksum = "c39b3bc2a8f715298032cf5087e58573809374b08160aa7d750582bdb82d2683" dependencies = [ "log", "pest", @@ -1456,9 +1451,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "7dfda62a12f55daeae5015f81b0baea145391cb4520f86c248fc615d72640d12" [[package]] name = "hdpath" @@ -1471,12 +1466,11 @@ dependencies = [ [[package]] name = "headers" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" +checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" dependencies = [ - "base64 0.13.1", - "bitflags 1.3.2", + "base64 0.21.4", "bytes", "headers-core", "http", @@ -1511,9 +1505,9 @@ dependencies = [ [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -1580,9 +1574,9 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "httpdate" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" @@ -1617,7 +1611,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", - "socket2", + "socket2 0.4.9", "tokio", "tower-service", "tracing", @@ -1683,7 +1677,7 @@ dependencies = [ "http", "ibc-proto", "ibc-relayer-types", - "itertools", + "itertools 0.10.5", "reqwest", "serde", "serde_json", @@ -1694,11 +1688,11 @@ dependencies = [ [[package]] name = "ibc-proto" -version = "0.37.0" +version = "0.38.0-pre.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "725fd83c94e9859fd967cd706996679799171eba940740f071f0046fb6f6e031" +checksum = "cf94cb1311bf2c44d160ed59e681a27108a9a041edce1f2fdb7eb80f66923c0e" dependencies = [ - "base64 0.21.2", + "base64 0.21.4", "bytes", "flex-error", "ics23", @@ -1737,7 +1731,7 @@ dependencies = [ "ibc-proto", "ibc-relayer-types", "ibc-telemetry", - "itertools", + "itertools 0.10.5", "moka", "num-bigint", "num-rational", @@ -1751,7 +1745,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "sha2 0.10.7", + "sha2 0.10.8", "signature", "strum", "subtle-encoding", @@ -1764,10 +1758,10 @@ dependencies = [ "tiny-keccak", "tokio", "tokio-stream", - "toml 0.7.6", + "toml 0.7.8", "tonic", "tracing", - "uuid 1.4.0", + "uuid 1.4.1", ] [[package]] @@ -1793,7 +1787,7 @@ dependencies = [ "ibc-relayer-rest", "ibc-relayer-types", "ibc-telemetry", - "itertools", + "itertools 0.10.5", "oneline-eyre", "regex", "serde", @@ -1833,7 +1827,7 @@ dependencies = [ "flex-error", "ibc-proto", "ics23", - "itertools", + "itertools 0.10.5", "num-rational", "primitive-types", "prost", @@ -1882,7 +1876,7 @@ dependencies = [ "prost", "ripemd", "serde", - "sha2 0.10.7", + "sha2 0.10.8", "sha3", ] @@ -1946,12 +1940,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.1", ] [[package]] @@ -1984,26 +1978,6 @@ dependencies = [ "libc", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.2", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "ipnet" version = "2.8.0" @@ -2016,8 +1990,8 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.2", - "rustix 0.38.4", + "hermit-abi 0.3.3", + "rustix", "windows-sys 0.48.0", ] @@ -2030,11 +2004,20 @@ 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.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" +checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" @@ -2054,7 +2037,7 @@ dependencies = [ "cfg-if 1.0.0", "ecdsa", "elliptic-curve", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] @@ -2068,9 +2051,9 @@ dependencies = [ [[package]] name = "kqueue" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c8fc60ba15bf51257aa9807a48a61013db043fcf3a78cb0d916e8e396dcad98" +checksum = "7447f1ca1b7b563588a205fe93dea8df60fd981423a768bc1c0ded35ed147d0c" dependencies = [ "kqueue-sys", "libc", @@ -2078,9 +2061,9 @@ dependencies = [ [[package]] name = "kqueue-sys" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8367585489f01bc55dd27404dcf56b95e6da061a256a666ab23be9ba96a2e587" +checksum = "ed9625ffda8729b85e45cf04090035ac368927b8cebc34898e7c120f52e4838b" dependencies = [ "bitflags 1.3.2", "libc", @@ -2094,21 +2077,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.147" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" - -[[package]] -name = "linux-raw-sys" -version = "0.3.8" +version = "0.2.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "linux-raw-sys" -version = "0.4.3" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" +checksum = "3852614a3bd9ca9804678ba6be5e3b8ce76dfc902cae004e3e0c44051b6e88db" [[package]] name = "lock_api" @@ -2122,9 +2099,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "mac" @@ -2172,9 +2149,9 @@ dependencies = [ [[package]] name = "matchit" -version = "0.7.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" [[package]] name = "maybe-uninit" @@ -2184,15 +2161,15 @@ checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] name = "mdbook" -version = "0.4.31" +version = "0.4.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b67ee4a744f36e6280792016c17e69921b51df357181d1eb17d620fcc3609f3" +checksum = "1c3f88addd34930bc5f01b9dc19f780447e51c92bf2536e3ded058018271775d" dependencies = [ "ammonia", "anyhow", "chrono", - "clap 4.3.11", - "clap_complete 4.3.2", + "clap 4.4.6", + "clap_complete 4.4.3", "elasticlunr-rs", "env_logger 0.10.0", "futures-util", @@ -2304,7 +2281,7 @@ dependencies = [ "tagptr", "thiserror", "triomphe", - "uuid 1.4.0", + "uuid 1.4.1", ] [[package]] @@ -2313,29 +2290,39 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +[[package]] +name = "normpath" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec60c60a693226186f5d6edf073232bfb6464ed97eb22cf3b01c1e8198fd97f5" +dependencies = [ + "windows-sys 0.48.0", +] + [[package]] name = "notify" -version = "5.2.0" +version = "6.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "729f63e1ca555a43fe3efa4f3efdf4801c479da85b432242a7b726f353c88486" +checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "crossbeam-channel 0.5.8", "filetime", "fsevent-sys", "inotify", "kqueue", "libc", + "log", "mio", "walkdir", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "notify-debouncer-mini" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e23e9fa24f094b143c1eb61f90ac6457de87be6987bc70746e0179f7dbc9007b" +checksum = "e55ee272914f4563a2f8b8553eb6811f3c0caea81c756346bad15b7e3ef969f0" dependencies = [ "crossbeam-channel 0.5.8", "notify", @@ -2353,9 +2340,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -2399,9 +2386,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] @@ -2412,15 +2399,15 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi 0.3.3", "libc", ] [[package]] name = "object" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ "memchr", ] @@ -2448,11 +2435,12 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "opener" -version = "0.5.2" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "293c15678e37254c15bd2f092314abb4e51d7fdde05c2021279c12631b54f005" +checksum = "6c62dcb6174f9cb326eac248f07e955d5d559c272730b6c03e396b443b562788" dependencies = [ "bstr", + "normpath", "winapi", ] @@ -2557,14 +2545,14 @@ dependencies = [ "libc", "redox_syscall 0.3.5", "smallvec", - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] name = "paste" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b27ab7be369122c218afc2079489cdcb4b517c0a3fc386ff11e1fedfcc2b35" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "pbkdf2" @@ -2610,19 +2598,20 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.7.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f73935e4d55e2abf7f130186537b19e7a4abc886a0252380b59248af473a3fc9" +checksum = "c022f1e7b65d6a24c0dbbd5fb344c66881bc01f3e5ae74a1c8100f2f985d98a4" dependencies = [ + "memchr", "thiserror", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.7.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aef623c9bbfa0eedf5a0efba11a5ee83209c326653ca31ff019bec3a95bfff2b" +checksum = "35513f630d46400a977c4cb58f78e1bfbe01434316e60c37d27b9ad6139c66d8" dependencies = [ "pest", "pest_generator", @@ -2630,26 +2619,26 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e8cba4ec22bada7fc55ffe51e2deb6a0e0db2d0b7ab0b103acc80d2510c190" +checksum = "bc9fc1b9e7057baba189b5c626e2d6f40681ae5b6eb064dc7c7834101ec8123a" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] name = "pest_meta" -version = "2.7.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01f71cb40bd8bb94232df14b946909e14660e33fc05db3e50ae2a82d7ea0ca0" +checksum = "1df74e9e7ec4053ceb980e7c0c8bd3594e977fde1af91daba9c928e8e8c6708d" dependencies = [ "once_cell", "pest", - "sha2 0.10.7", + "sha2 0.10.8", ] [[package]] @@ -2692,29 +2681,29 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" +checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" +checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] name = "pin-project-lite" -version = "0.2.10" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2734,9 +2723,9 @@ dependencies = [ [[package]] name = "platforms" -version = "3.0.2" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630" +checksum = "4503fa043bf02cee09a9582e9554b4c6403b2ef55e4612e96561d294419429f8" [[package]] name = "ppv-lite86" @@ -2787,9 +2776,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.64" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ] @@ -2826,10 +2815,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "265baba7fabd416cf5078179f7d2cbeca4ce7a9041111900675ea7c4cb8a4c32" dependencies = [ "anyhow", - "itertools", + "itertools 0.11.0", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] @@ -2876,9 +2865,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.29" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -2957,7 +2946,7 @@ version = "1.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff" dependencies = [ - "aho-corasick 1.0.2", + "aho-corasick", "memchr", "regex-automata 0.3.9", "regex-syntax 0.7.5", @@ -2978,7 +2967,7 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9" dependencies = [ - "aho-corasick 1.0.2", + "aho-corasick", "memchr", "regex-syntax 0.7.5", ] @@ -3001,7 +2990,7 @@ version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ - "base64 0.21.2", + "base64 0.21.4", "bytes", "encoding_rs", "futures-core", @@ -3099,28 +3088,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.23" +version = "0.38.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" +checksum = "f25469e9ae0f3d0047ca8b93fc56843f38e6774f0914a107ff8b41be8be8e0b7" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "errno", - "io-lifetimes", "libc", - "linux-raw-sys 0.3.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "rustix" -version = "0.38.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" -dependencies = [ - "bitflags 2.3.3", - "errno", - "libc", - "linux-raw-sys 0.4.3", + "linux-raw-sys", "windows-sys 0.48.0", ] @@ -3154,7 +3129,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.2", + "base64 0.21.4", ] [[package]] @@ -3169,15 +3144,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" +checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" [[package]] name = "same-file" @@ -3214,9 +3189,9 @@ checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sct" @@ -3230,9 +3205,9 @@ dependencies = [ [[package]] name = "sec1" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct", "der", @@ -3275,9 +3250,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -3288,9 +3263,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ "core-foundation-sys", "libc", @@ -3298,27 +3273,27 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "ad977052201c6de01a8ef2aa3378c4bd23217a056337d1d6da40468d267a4fb0" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.171" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.11" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a16be4fe5320ade08736447e3198294a5ea9a6d44dde6f35f0a5e06859c427a" +checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" dependencies = [ "serde", ] @@ -3335,20 +3310,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.171" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] name = "serde_json" -version = "1.0.102" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5062a995d481b2308b6064e9af76011f2921c35f97b0468811ed9f6cd91dfed" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa", "ryu", @@ -3357,9 +3332,9 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acc4422959dd87a76cb117c191dcbffc20467f06c9100b76721dab370f24d3a" +checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" dependencies = [ "itoa", "serde", @@ -3367,13 +3342,13 @@ dependencies = [ [[package]] name = "serde_repr" -version = "0.1.14" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d89a8107374290037607734c0b73a85db7ed80cae314b3c5791f192a496e731" +checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] @@ -3399,9 +3374,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -3423,9 +3398,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if 1.0.0", "cpufeatures", @@ -3444,9 +3419,9 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] @@ -3459,9 +3434,9 @@ checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" [[package]] name = "shlex" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" +checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" [[package]] name = "signal-hook" @@ -3500,9 +3475,9 @@ checksum = "cc47a29ce97772ca5c927f75bac34866b16d64e07f330c3248e2d7226623901b" [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "skeptic" @@ -3521,18 +3496,18 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "smallvec" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "socket2" @@ -3544,6 +3519,16 @@ dependencies = [ "winapi", ] +[[package]] +name = "socket2" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "spin" version = "0.5.2" @@ -3609,15 +3594,15 @@ dependencies = [ [[package]] name = "strum_macros" -version = "0.25.1" +version = "0.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6069ca09d878a33f883cc06aaa9718ede171841d3832450354410b718b097232" +checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" dependencies = [ "heck", "proc-macro2", "quote", "rustversion", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] @@ -3654,9 +3639,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.25" +version = "2.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" +checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" dependencies = [ "proc-macro2", "quote", @@ -3710,15 +3695,14 @@ checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" [[package]] name = "tempfile" -version = "3.6.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ - "autocfg", "cfg-if 1.0.0", "fastrand", "redox_syscall 0.3.5", - "rustix 0.37.23", + "rustix", "windows-sys 0.48.0", ] @@ -3744,7 +3728,7 @@ dependencies = [ "serde_bytes", "serde_json", "serde_repr", - "sha2 0.10.7", + "sha2 0.10.8", "signature", "subtle", "subtle-encoding", @@ -3909,20 +3893,20 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" +checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64" dependencies = [ "winapi-util", ] [[package]] name = "terminal_size" -version = "0.2.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6bf6f19e9f8ed8d4048dc22981458ebcf406d67e94cd422e5ecd73d63b3237" +checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" dependencies = [ - "rustix 0.37.23", + "rustix", "windows-sys 0.48.0", ] @@ -3934,22 +3918,22 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.43" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" +checksum = "1177e8c6d7ede7afde3585fd2513e611227efd6481bd78d2e82ba1ce16557ed4" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.43" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" +checksum = "10712f02019e9288794769fba95cd6847df9874d49d871d062172f9dd41bc4cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] @@ -3964,10 +3948,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.23" +version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" +checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe" dependencies = [ + "deranged", "serde", "time-core", "time-macros", @@ -3975,15 +3960,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.10" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ba15a897f3c86766b757e5ac7221554c6750054d74d5b28844fce5fb36a6c4" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -4000,7 +3985,7 @@ dependencies = [ "pbkdf2", "rand", "rustc-hash", - "sha2 0.10.7", + "sha2 0.10.8", "thiserror", "unicode-normalization", "wasm-bindgen", @@ -4033,11 +4018,10 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.29.1" +version = "1.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" +checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ - "autocfg", "backtrace", "bytes", "libc", @@ -4046,7 +4030,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.5.4", "tokio-macros", "windows-sys 0.48.0", ] @@ -4069,7 +4053,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] @@ -4095,21 +4079,21 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.18.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" dependencies = [ "futures-util", "log", "tokio", - "tungstenite 0.18.0", + "tungstenite", ] [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" dependencies = [ "bytes", "futures-core", @@ -4130,9 +4114,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" dependencies = [ "serde", "serde_spanned", @@ -4151,11 +4135,11 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.12" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c500344a19072298cd05a7224b3c0c629348b78692bf48466c5238656e315a78" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.0.2", "serde", "serde_spanned", "toml_datetime", @@ -4171,7 +4155,7 @@ dependencies = [ "async-stream", "async-trait", "axum", - "base64 0.21.2", + "base64 0.21.4", "bytes", "h2", "http", @@ -4252,7 +4236,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] [[package]] @@ -4329,25 +4313,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" -[[package]] -name = "tungstenite" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788" -dependencies = [ - "base64 0.13.1", - "byteorder", - "bytes", - "http", - "httparse", - "log", - "rand", - "sha1", - "thiserror", - "url", - "utf-8", -] - [[package]] name = "tungstenite" version = "0.20.1" @@ -4370,9 +4335,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" @@ -4394,9 +4359,9 @@ dependencies = [ [[package]] name = "unicase" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" dependencies = [ "version_check", ] @@ -4409,9 +4374,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.10" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -4424,9 +4389,9 @@ dependencies = [ [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" @@ -4453,9 +4418,9 @@ dependencies = [ [[package]] name = "urlencoding" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8db7427f936968176eaa7cdf81b7f98b980b18495ec28f1b5791ac3bfe3eea9" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "utf-8" @@ -4483,9 +4448,9 @@ checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" [[package]] name = "uuid" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" dependencies = [ "getrandom", ] @@ -4513,9 +4478,9 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -4532,9 +4497,9 @@ dependencies = [ [[package]] name = "warp" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba431ef570df1287f7f8b07e376491ad54f84d26ac473489427231e1718e1f69" +checksum = "c1e92e22e03ff1230c03a1a8ee37d2f89cd489e2e541b7550d6afad96faed169" dependencies = [ "bytes", "futures-channel", @@ -4587,7 +4552,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", "wasm-bindgen-shared", ] @@ -4621,7 +4586,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4666,9 +4631,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -4685,7 +4650,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -4703,7 +4668,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.5", ] [[package]] @@ -4723,17 +4688,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "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]] @@ -4744,9 +4709,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" @@ -4756,9 +4721,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" @@ -4768,9 +4733,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" @@ -4780,9 +4745,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" @@ -4792,9 +4757,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" @@ -4804,9 +4769,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" @@ -4816,15 +4781,15 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.4.9" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81a2094c43cc94775293eaa0e499fbc30048a6d824ac82c0351a8c0bf9112529" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ "memchr", ] @@ -4856,5 +4821,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.37", ] diff --git a/tools/check-guide/Cargo.toml b/tools/check-guide/Cargo.toml index 59b5956262..a69316ec10 100644 --- a/tools/check-guide/Cargo.toml +++ b/tools/check-guide/Cargo.toml @@ -13,3 +13,4 @@ lazy_static = "1.4.0" mdbook-template = "1.1.0" regex = "1" walkdir = "2.3.3" + diff --git a/tools/test-framework/Cargo.toml b/tools/test-framework/Cargo.toml index b9540e1141..2a64660ef0 100644 --- a/tools/test-framework/Cargo.toml +++ b/tools/test-framework/Cargo.toml @@ -17,7 +17,7 @@ description = """ ibc-relayer-types = { version = "=0.25.0", path = "../../crates/relayer-types" } ibc-relayer = { version = "=0.25.0", path = "../../crates/relayer" } ibc-relayer-cli = { version = "=1.6.0", path = "../../crates/relayer-cli" } -ibc-proto = { version = "0.37.0", features = ["serde"] } +ibc-proto = { version = "0.38.0-pre.1", features = ["serde"] } tendermint-rpc = { version = "0.34.0", features = ["http-client", "websocket-client"] } http = "0.2.9" diff --git a/tools/test-framework/src/relayer/chain.rs b/tools/test-framework/src/relayer/chain.rs index f4913315ec..10eed648e3 100644 --- a/tools/test-framework/src/relayer/chain.rs +++ b/tools/test-framework/src/relayer/chain.rs @@ -430,4 +430,8 @@ where ) -> Result { self.value().query_incentivized_packet(request) } + + fn query_consumer_chains(&self) -> Result, Error> { + self.value().query_consumer_chains() + } }