diff --git a/.github/workflows/misbehaviour.yml b/.github/workflows/misbehaviour.yml index 43dfc6635d..135ef7c9a1 100644 --- a/.github/workflows/misbehaviour.yml +++ b/.github/workflows/misbehaviour.yml @@ -43,20 +43,20 @@ jobs: fail-fast: false matrix: chain: - - package: gaia18 + - package: gaia20 command: gaiad account_prefix: cosmos steps: - uses: actions/checkout@v4 - name: Install Nix uses: DeterminateSystems/nix-installer-action@main - with: + with: extra-conf: | substituters = https://cache.nixos.org trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= - name: Install Cachix uses: cachix/cachix-action@v15 - with: + with: name: cosmos-nix - name: Install sconfig uses: jaxxstorm/action-install-gh-release@v1.12.0 @@ -102,13 +102,13 @@ jobs: - uses: actions/checkout@v4 - name: Install Nix uses: DeterminateSystems/nix-installer-action@main - with: + with: extra-conf: | substituters = https://cache.nixos.org trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= - name: Install Cachix uses: cachix/cachix-action@v15 - with: + with: name: cosmos-nix - name: Install sconfig uses: jaxxstorm/action-install-gh-release@v1.12.0 @@ -154,13 +154,13 @@ jobs: - uses: actions/checkout@v4 - name: Install Nix uses: DeterminateSystems/nix-installer-action@main - with: + with: extra-conf: | substituters = https://cache.nixos.org trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= - name: Install Cachix uses: cachix/cachix-action@v15 - with: + with: name: cosmos-nix - name: Install sconfig uses: jaxxstorm/action-install-gh-release@v1.12.0 @@ -193,7 +193,6 @@ jobs: 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 @@ -207,13 +206,13 @@ jobs: - uses: actions/checkout@v4 - name: Install Nix uses: DeterminateSystems/nix-installer-action@main - with: + with: extra-conf: | substituters = https://cache.nixos.org trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= - name: Install Cachix uses: cachix/cachix-action@v15 - with: + with: name: cosmos-nix - name: Install sconfig uses: jaxxstorm/action-install-gh-release@v1.12.0 @@ -245,4 +244,3 @@ jobs: 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 68c3ac756f..a07f65d1d9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -116,9 +116,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.89" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" +checksum = "37bf3594c4c988a53154954629820791dde498571819ae4ca50ca811e060cc95" [[package]] name = "arc-swap" @@ -128,9 +128,9 @@ checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457" [[package]] name = "arrayref" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" @@ -140,9 +140,9 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "async-stream" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" dependencies = [ "async-stream-impl", "futures-core", @@ -151,13 +151,13 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.82", ] [[package]] @@ -168,7 +168,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.82", ] [[package]] @@ -207,9 +207,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "axum" @@ -224,7 +224,7 @@ dependencies = [ "futures-util", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.30", + "hyper 0.14.31", "itoa", "matchit", "memchr", @@ -238,19 +238,19 @@ dependencies = [ "serde_urlencoded", "sync_wrapper 0.1.2", "tokio", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", ] [[package]] name = "axum" -version = "0.7.5" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" +checksum = "504e3947307ac8326a5437504c517c4b56716c9d98fac0028c2acc7ca47d70ae" dependencies = [ "async-trait", - "axum-core 0.4.3", + "axum-core 0.4.5", "bytes", "futures-util", "http 1.1.0", @@ -265,7 +265,7 @@ dependencies = [ "rustversion", "serde", "sync_wrapper 1.0.1", - "tower", + "tower 0.5.1", "tower-layer", "tower-service", ] @@ -289,9 +289,9 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" dependencies = [ "async-trait", "bytes", @@ -302,7 +302,7 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper 0.1.2", + "sync_wrapper 1.0.1", "tower-layer", "tower-service", ] @@ -478,9 +478,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.2" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" dependencies = [ "serde", ] @@ -493,9 +493,9 @@ checksum = "e6e9e01327e6c86e92ec72b1c798d4a94810f147209bbe3ffab6a86954937a6f" [[package]] name = "cc" -version = "1.1.15" +version = "1.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" dependencies = [ "shlex", ] @@ -639,11 +639,24 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "cosmos-sdk-proto" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8ce7f4797cdf5cd18be6555ff3f0a8d37023c2d60f3b2708895d601b85c1c46" +dependencies = [ + "informalsystems-pbjson", + "prost", + "serde", + "tendermint-proto", + "tonic", +] + [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -724,7 +737,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.82", ] [[package]] @@ -792,7 +805,7 @@ checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.82", ] [[package]] @@ -1071,9 +1084,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -1086,9 +1099,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -1096,15 +1109,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -1113,38 +1126,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.82", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -1231,7 +1244,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.4.0", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -1250,7 +1263,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.4.0", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", @@ -1275,6 +1288,12 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" + [[package]] name = "hdpath" version = "0.6.3" @@ -1390,9 +1409,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -1418,9 +1437,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" dependencies = [ "bytes", "futures-channel", @@ -1442,9 +1461,9 @@ dependencies = [ [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" dependencies = [ "bytes", "futures-channel", @@ -1469,7 +1488,7 @@ checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", "http 0.2.12", - "hyper 0.14.30", + "hyper 0.14.31", "rustls 0.21.12", "tokio", "tokio-rustls 0.24.1", @@ -1481,7 +1500,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" dependencies = [ - "hyper 1.4.1", + "hyper 1.5.0", "hyper-util", "pin-project-lite", "tokio", @@ -1490,20 +1509,19 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" dependencies = [ "bytes", "futures-channel", "futures-util", "http 1.1.0", "http-body 1.0.1", - "hyper 1.4.1", + "hyper 1.5.0", "pin-project-lite", "socket2", "tokio", - "tower", "tower-service", "tracing", ] @@ -1549,12 +1567,12 @@ dependencies = [ [[package]] name = "ibc-proto" -version = "0.47.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c852d22b782d2d793f4a646f968de419be635e02bc8798d5d74a6e44eef27733" +version = "0.49.1" +source = "git+https://github.com/cosmos/ibc-proto-rs?branch=romac/permissionless-ics#c9ad1e657c1bd01d5c065bbaa3b902f381a9c203" dependencies = [ "base64 0.22.1", "bytes", + "cosmos-sdk-proto", "flex-error", "ics23", "informalsystems-pbjson", @@ -1835,12 +1853,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.4.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.0", ] [[package]] @@ -1855,9 +1873,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" [[package]] name = "is_terminal_polyfill" @@ -1882,18 +1900,18 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] [[package]] name = "k256" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" +checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ "cfg-if", "ecdsa", @@ -1918,9 +1936,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.158" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libredox" @@ -2090,9 +2108,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "oneline-eyre" @@ -2263,22 +2281,22 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" +checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" +checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.82", ] [[package]] @@ -2355,9 +2373,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" dependencies = [ "unicode-ident", ] @@ -2379,9 +2397,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2ecbe40f08db5c006b5764a2645f7f3f141ce756412ac9e1dd6087e6d32995" +checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" dependencies = [ "bytes", "prost-derive", @@ -2389,24 +2407,15 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.13.2" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf0c195eebb4af52c752bec4f52f645da98b6e92077a04110c7f349477ae5ac" +checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" dependencies = [ "anyhow", "itertools", "proc-macro2", "quote", - "syn 2.0.76", -] - -[[package]] -name = "prost-types" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee5168b05f49d4b0ca581206eb14a7b22fafd963efe729ac48eb03266e25cc2" -dependencies = [ - "prost", + "syn 2.0.82", ] [[package]] @@ -2471,18 +2480,18 @@ dependencies = [ [[package]] name = "raw-cpuid" -version = "11.1.0" +version = "11.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb9ee317cfe3fbd54b36a511efc1edd42e216903c9cd575e686dd68a2ba90d8d" +checksum = "1ab240315c661615f2ee9f0f2cd32d5a7343a84d5ebcccb99d46e6637565e7b0" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags 2.6.0", ] @@ -2556,7 +2565,7 @@ dependencies = [ "h2 0.3.26", "http 0.2.12", "http-body 0.4.6", - "hyper 0.14.30", + "hyper 0.14.31", "hyper-rustls", "ipnet", "js-sys", @@ -2646,9 +2655,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.35" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags 2.6.0", "errno", @@ -2678,22 +2687,22 @@ dependencies = [ "log", "ring", "rustls-pki-types", - "rustls-webpki 0.102.7", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] [[package]] name = "rustls" -version = "0.23.12" +version = "0.23.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" dependencies = [ "log", "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.7", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] @@ -2717,7 +2726,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" dependencies = [ "openssl-probe", - "rustls-pemfile 2.1.3", + "rustls-pemfile 2.2.0", + "rustls-pki-types", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-native-certs" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcaf18a4f2be7326cd874a5fa579fae794320a0f388d365dca7e480e55f83f8a" +dependencies = [ + "openssl-probe", + "rustls-pemfile 2.2.0", "rustls-pki-types", "schannel", "security-framework", @@ -2734,19 +2756,18 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "2.1.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.22.1", "rustls-pki-types", ] [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-webpki" @@ -2760,9 +2781,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.7" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", @@ -2771,9 +2792,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" @@ -2792,20 +2813,20 @@ dependencies = [ [[package]] name = "scc" -version = "2.1.16" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeb7ac86243095b70a7920639507b71d51a63390d1ba26c4f60a552fbb914a37" +checksum = "f2c1f7fc6deb21665a9060dfc7d271be784669295a31babdcd4dd2c79ae8cbfb" dependencies = [ "sdd", ] [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "01227be5826fa0690321a2ba6c5cd57a19cf3f6a09e76973b58e61de6ab9d1c1" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2826,9 +2847,9 @@ dependencies = [ [[package]] name = "sdd" -version = "3.0.2" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0495e4577c672de8254beb68d01a9b62d0e8a13c099edecdbedccce3223cd29f" +checksum = "49c1eeaf4b6a87c7479688c6d52b9f1153cedd3c489300564f932b065c6eab95" [[package]] name = "sec1" @@ -2890,9 +2911,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" dependencies = [ "core-foundation-sys", "libc", @@ -2909,9 +2930,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.210" +version = "1.0.211" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "1ac55e59090389fb9f0dd9e0f3c09615afed1d19094284d0b200441f13550793" dependencies = [ "serde_derive", ] @@ -2937,20 +2958,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.211" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "54be4f245ce16bc58d57ef2716271d0d4519e0f6defa147f6e081005bcb278ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.82", ] [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", "memchr", @@ -2976,14 +2997,14 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.82", ] [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -3006,7 +3027,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.4.0", + "indexmap 2.6.0", "itoa", "ryu", "serde", @@ -3035,7 +3056,7 @@ checksum = "82fe9db325bcef1fbcde82e078a5cc4efdf787e96b3b9cf45b50b529f2083d67" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.82", ] [[package]] @@ -3211,7 +3232,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.76", + "syn 2.0.82", ] [[package]] @@ -3248,9 +3269,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.76" +version = "2.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" +checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" dependencies = [ "proc-macro2", "quote", @@ -3310,9 +3331,9 @@ checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" [[package]] name = "tempfile" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ "cfg-if", "fastrand", @@ -3323,9 +3344,8 @@ dependencies = [ [[package]] name = "tendermint" -version = "0.38.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "505d9d6ffeb83b1de47c307c6e0d2dff56c6256989299010ad03cd80a8491e97" +version = "0.39.1" +source = "git+https://github.com/informalsystems/tendermint-rs.git?branch=romac/v038-evidence#ccc53d4bc0e0a975754771f8e62fc299a2aa59f2" dependencies = [ "bytes", "digest 0.10.7", @@ -3337,7 +3357,6 @@ dependencies = [ "num-traits", "once_cell", "prost", - "prost-types", "ripemd", "serde", "serde_bytes", @@ -3354,9 +3373,8 @@ dependencies = [ [[package]] name = "tendermint-config" -version = "0.38.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de111ea653b2adaef627ac2452b463c77aa615c256eaaddf279ec5a1cf9775f" +version = "0.39.1" +source = "git+https://github.com/informalsystems/tendermint-rs.git?branch=romac/v038-evidence#ccc53d4bc0e0a975754771f8e62fc299a2aa59f2" dependencies = [ "flex-error", "serde", @@ -3368,9 +3386,8 @@ dependencies = [ [[package]] name = "tendermint-light-client" -version = "0.38.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91e5abb448c65e8abdfe0e17a3a189e005a71b4169b89f36aaa2053ff239577" +version = "0.39.1" +source = "git+https://github.com/informalsystems/tendermint-rs.git?branch=romac/v038-evidence#ccc53d4bc0e0a975754771f8e62fc299a2aa59f2" dependencies = [ "contracts", "crossbeam-channel", @@ -3393,9 +3410,8 @@ dependencies = [ [[package]] name = "tendermint-light-client-detector" -version = "0.38.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1ac1607eb7a3393313558b339c36eebeba15aa7f2d101d1d47299e65825152" +version = "0.39.1" +source = "git+https://github.com/informalsystems/tendermint-rs.git?branch=romac/v038-evidence#ccc53d4bc0e0a975754771f8e62fc299a2aa59f2" dependencies = [ "crossbeam-channel", "derive_more", @@ -3416,9 +3432,8 @@ dependencies = [ [[package]] name = "tendermint-light-client-verifier" -version = "0.38.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2674adbf0dc51aa0c8eaf8462c7d6692ec79502713e50ed5432a442002be90" +version = "0.39.1" +source = "git+https://github.com/informalsystems/tendermint-rs.git?branch=romac/v038-evidence#ccc53d4bc0e0a975754771f8e62fc299a2aa59f2" dependencies = [ "derive_more", "flex-error", @@ -3429,14 +3444,12 @@ dependencies = [ [[package]] name = "tendermint-proto" -version = "0.38.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ed14abe3b0502a3afe21ca74ca5cdd6c7e8d326d982c26f98a394445eb31d6e" +version = "0.39.1" +source = "git+https://github.com/informalsystems/tendermint-rs.git?branch=romac/v038-evidence#ccc53d4bc0e0a975754771f8e62fc299a2aa59f2" dependencies = [ "bytes", "flex-error", "prost", - "prost-types", "serde", "serde_bytes", "subtle-encoding", @@ -3445,9 +3458,8 @@ dependencies = [ [[package]] name = "tendermint-rpc" -version = "0.38.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02f96a2b8a0d3d0b59e4024b1a6bdc1589efc6af4709d08a480a20cc4ba90f63" +version = "0.39.1" +source = "git+https://github.com/informalsystems/tendermint-rs.git?branch=romac/v038-evidence#ccc53d4bc0e0a975754771f8e62fc299a2aa59f2" dependencies = [ "async-trait", "async-tungstenite", @@ -3479,9 +3491,8 @@ dependencies = [ [[package]] name = "tendermint-testgen" -version = "0.38.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae007e2918414ae96e4835426aace7538d23b8ddf96d71e23d241f58f386e877" +version = "0.39.1" +source = "git+https://github.com/informalsystems/tendermint-rs.git?branch=romac/v038-evidence#ccc53d4bc0e0a975754771f8e62fc299a2aa59f2" dependencies = [ "ed25519-consensus", "gumdrop", @@ -3521,7 +3532,7 @@ checksum = "5999e24eaa32083191ba4e425deb75cdf25efefabe5aaccb7446dd0d4122a3f5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.82", ] [[package]] @@ -3547,7 +3558,7 @@ checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.82", ] [[package]] @@ -3635,9 +3646,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.3" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" dependencies = [ "backtrace", "bytes", @@ -3659,7 +3670,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.82", ] [[package]] @@ -3689,7 +3700,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ - "rustls 0.23.12", + "rustls 0.23.15", "rustls-pki-types", "tokio", ] @@ -3707,9 +3718,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -3750,11 +3761,11 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "indexmap 2.4.0", + "indexmap 2.6.0", "serde", "serde_spanned", "toml_datetime", @@ -3763,32 +3774,32 @@ dependencies = [ [[package]] name = "tonic" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6f6ba989e4b2c58ae83d862d3a3e27690b6e3ae630d0deb59f3697f32aa88ad" +checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" dependencies = [ "async-stream", "async-trait", - "axum 0.7.5", + "axum 0.7.7", "base64 0.22.1", "bytes", "h2 0.4.6", "http 1.1.0", "http-body 1.0.1", "http-body-util", - "hyper 1.4.1", + "hyper 1.5.0", "hyper-timeout", "hyper-util", "percent-encoding", "pin-project", "prost", - "rustls-native-certs 0.7.3", - "rustls-pemfile 2.1.3", + "rustls-native-certs 0.8.0", + "rustls-pemfile 2.2.0", "socket2", "tokio", "tokio-rustls 0.26.0", "tokio-stream", - "tower", + "tower 0.4.13", "tower-layer", "tower-service", "tracing", @@ -3814,6 +3825,20 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "tower-layer", + "tower-service", +] + [[package]] name = "tower-layer" version = "0.3.3" @@ -3846,7 +3871,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.82", ] [[package]] @@ -3975,36 +4000,36 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5ab17db44d7388991a428b2ee655ce0c212e862eff1768a455c58f9aad6e7893" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] name = "unicode-xid" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unsafe-libyaml" @@ -4055,9 +4080,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", ] @@ -4110,9 +4135,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", "once_cell", @@ -4121,24 +4146,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.82", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -4148,9 +4173,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4158,28 +4183,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.82", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -4366,9 +4391,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -4401,7 +4426,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.82", ] [[package]] @@ -4421,5 +4446,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn 2.0.82", ] diff --git a/Cargo.toml b/Cargo.toml index 6a4913f61c..9870a60cbe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,14 +29,19 @@ ibc-telemetry = { version = "0.29.3", path = "crates/telemetry" } ibc-test-framework = { version = "0.29.3", path = "tools/test-framework" } ibc-integration-test = { version = "0.29.3", path = "tools/integration-test" } +# IBC dependencies +ibc-proto = "0.49.1" +ics23 = "0.12.0" + # Tendermint dependencies -tendermint = { version = "0.38.1", default-features = false } -tendermint-light-client = { version = "0.38.1", default-features = false } -tendermint-light-client-detector = { version = "0.38.1", default-features = false } -tendermint-light-client-verifier = { version = "0.38.1", default-features = false } -tendermint-proto = { version = "0.38.1" } -tendermint-rpc = { version = "0.38.1" } -tendermint-testgen = { version = "0.38.1" } +tendermint = { version = "0.39.1", default-features = false } +tendermint-light-client = { version = "0.39.1", default-features = false } +tendermint-light-client-detector = { version = "0.39.1", default-features = false } +tendermint-light-client-verifier = { version = "0.39.1", default-features = false } +tendermint-proto = { version = "0.39.1" } +tendermint-rpc = { version = "0.39.1" } +tendermint-testgen = { version = "0.39.1" } + # Other dependencies abscissa_core = "=0.6.0" @@ -72,8 +77,6 @@ hex = "0.4.3" http = "1.0.0" humantime = "2.1.0" humantime-serde = "1.1.1" -ibc-proto = "0.47.1" -ics23 = "0.12.0" itertools = "0.13.0" moka = "0.12.8" num-bigint = "0.4" @@ -120,10 +123,11 @@ uuid = "1.10.0" overflow-checks = true [patch.crates-io] -# tendermint = { git = "https://github.com/informalsystems/tendermint-rs.git", branch = "main" } -# tendermint-rpc = { git = "https://github.com/informalsystems/tendermint-rs.git", branch = "main" } -# tendermint-proto = { git = "https://github.com/informalsystems/tendermint-rs.git", branch = "main" } -# tendermint-light-client = { git = "https://github.com/informalsystems/tendermint-rs.git", branch = "main" } -# tendermint-light-client-verifier = { git = "https://github.com/informalsystems/tendermint-rs.git", branch = "main" } -# tendermint-light-client-detector = { git = "https://github.com/informalsystems/tendermint-rs.git", branch = "main" } -# tendermint-testgen = { git = "https://github.com/informalsystems/tendermint-rs.git", branch = "main" } +ibc-proto = { git = "https://github.com/cosmos/ibc-proto-rs", branch = "romac/permissionless-ics" } +tendermint = { git = "https://github.com/informalsystems/tendermint-rs.git", branch = "romac/v038-evidence" } +tendermint-rpc = { git = "https://github.com/informalsystems/tendermint-rs.git", branch = "romac/v038-evidence" } +tendermint-proto = { git = "https://github.com/informalsystems/tendermint-rs.git", branch = "romac/v038-evidence" } +tendermint-light-client = { git = "https://github.com/informalsystems/tendermint-rs.git", branch = "romac/v038-evidence" } +tendermint-light-client-verifier = { git = "https://github.com/informalsystems/tendermint-rs.git", branch = "romac/v038-evidence" } +tendermint-light-client-detector = { git = "https://github.com/informalsystems/tendermint-rs.git", branch = "romac/v038-evidence" } +tendermint-testgen = { git = "https://github.com/informalsystems/tendermint-rs.git", branch = "romac/v038-evidence" } diff --git a/ci/misbehaviour-ics/double_sign_test.sh b/ci/misbehaviour-ics/double_sign_test.sh index 3685868433..83f5c2609f 100644 --- a/ci/misbehaviour-ics/double_sign_test.sh +++ b/ci/misbehaviour-ics/double_sign_test.sh @@ -1,6 +1,10 @@ #!/bin/bash # shellcheck disable=2086,2004 +## Prerequisites: +# * ICS v6.x +# * Hermes v1.10.3+45a29cc00 + set -eu DEBUG=${DEBUG:-false} @@ -9,13 +13,6 @@ 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" @@ -25,11 +22,19 @@ if [ "$DEBUG" = true ]; then 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" +# User balance of stake tokens +USER_COINS="100000000000stake" +# Amount of stake tokens staked +STAKE="100000000stake" +# Node IP address +NODE_IP="127.0.0.1" + # Validator moniker MONIKERS=("coordinator" "alice" "bob") LEAD_VALIDATOR_MONIKER="coordinator" @@ -51,13 +56,8 @@ 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}" +rm -rf ${PROV_NODES_ROOT_DIR} # Let lead validator create genesis file LEAD_VALIDATOR_PROV_DIR=${PROV_NODES_ROOT_DIR}/provider-${LEAD_VALIDATOR_MONIKER} @@ -70,7 +70,6 @@ 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} @@ -80,16 +79,17 @@ do # Build genesis file and node directory structure interchain-security-pd init $MONIKER --chain-id provider --home ${PROV_NODE_DIR} - jq ".app_state.gov.params.voting_period = \"5s\" | .app_state.staking.params.unbonding_time = \"86400s\"" \ + jq ".app_state.gov.params.voting_period = \"10s\" \ + | .app_state.gov.params.expedited_voting_period = \"9s\" \ + | .app_state.staking.params.unbonding_time = \"86400s\" \ + | .app_state.provider.params.blocks_per_epoch = \"5\"" \ ${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 + interchain-security-pd keys add $PROV_KEY --home ${PROV_NODE_DIR} --keyring-backend test --output json > ${PROV_NODE_DIR}/${PROV_KEY}.json 2>&1 sleep 1 # copy genesis in, unless this validator is the lead validator @@ -100,9 +100,6 @@ do # Add stake to user PROV_ACCOUNT_ADDR=$(jq -r '.address' ${PROV_NODE_DIR}/${PROV_KEY}.json) interchain-security-pd genesis 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 genesis 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 @@ -141,10 +138,10 @@ do fi # Stake 1/1000 user's coins - interchain-security-pd genesis gentx $PROV_KEY $STAKE --chain-id provider --home ${PROV_NODE_DIR} --keyring-backend test --moniker $MONIKER + interchain-security-pd genesis 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. + # 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/ @@ -183,7 +180,6 @@ do # 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} @@ -219,89 +215,192 @@ do done # Build consumer chain proposal file -tee ${LEAD_VALIDATOR_PROV_DIR}/consumer-proposal.json< /dev/null || true +sleep 1 +rm -rf ${CONS_NODES_ROOT_DIR} + for index in "${!MONIKERS[@]}" do MONIKER=${MONIKERS[$index]} # validator key PROV_KEY=${MONIKER}-key - PROV_KEY2=${MONIKER}-key2 PROV_NODE_DIR=${PROV_NODES_ROOT_DIR}/provider-${MONIKER} @@ -314,8 +413,7 @@ do sleep 1 # Create account keypair - interchain-security-cd keys add $PROV_KEY --home ${CONS_NODE_DIR} --keyring-backend test --output 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 + interchain-security-cd keys add $PROV_KEY --home ${CONS_NODE_DIR} --keyring-backend test --output json > ${CONS_NODE_DIR}/${PROV_KEY}.json 2>&1 sleep 1 # copy genesis in, unless this validator is the lead validator @@ -326,15 +424,15 @@ do # Add stake to user CONS_ACCOUNT_ADDR=$(jq -r '.address' ${CONS_NODE_DIR}/${PROV_KEY}.json) interchain-security-cd genesis 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 genesis add-genesis-account $CONS_ACCOUNT_ADDR2 $USER_COINS --home ${CONS_NODE_DIR} - sleep 10 ### this probably does not 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 + interchain-security-pd query provider consumer-genesis $CONSUMER_ID \ + --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 @@ -376,7 +474,6 @@ done sleep 1 - for index in "${!MONIKERS[@]}" do MONIKER=${MONIKERS[$index]} @@ -437,42 +534,13 @@ do 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 +## Setup Hermes -# 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 +HERMES_PROV_NODE_DIR=${PROV_NODES_ROOT_DIR}/provider-${HERMES_VALIDATOR_MONIKER} +HERMES_KEY=${HERMES_VALIDATOR_MONIKER}-key +HERMES_CONS_NODE_DIR=${CONS_NODES_ROOT_DIR}/consumer-${HERMES_VALIDATOR_MONIKER} -tee $HERMES_CONFIG< $HOME_DIR/hermes-start-logs.txt & +sleep 5 + +## Cause double signing + +CONS_NODE_SYBIL_DIR=${CONS_NODES_ROOT_DIR}/consumer-${MONIKER}-sybil + +# create directory for double signing node +mkdir $CONS_NODE_SYBIL_DIR +cp -r $CONS_NODE_DIR/* $CONS_NODE_SYBIL_DIR + +# clear state in sybil node directory +echo '{"height": "0","round": 0,"step": 0,"signature":"","signbytes":""}' \ + > $CONS_NODE_SYBIL_DIR/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_NODE_SYBIL_DIR/config/node_key.json + +# does not use persistent peers; will do a lookup in genesis.json to find peers +# start double signing node - it should not talk to the node with the same key + +# Start gaia +interchain-security-cd start \ + --home ${CONS_NODE_SYBIL_DIR} \ + --rpc.laddr tcp://${NODE_IP}:$((RPC_LADDR_PORT+1)) \ + --grpc.address ${NODE_IP}:$((GRPC_LADDR_PORT+1)) \ + --address tcp://${NODE_IP}:$((NODE_ADDRESS_PORT+1)) \ + --p2p.laddr tcp://${NODE_IP}:$((P2P_LADDR_PORT+1)) \ + --grpc-web.enable=false &> ${CONS_NODE_SYBIL_DIR}/logs & + +sleep 5 + +## start Hermes in evidence mode +$HERMES_BIN evidence --chain consumer --check-past-blocks 0 &> $HOME_DIR/hermes-evidence-logs.txt & -$HERMES_BIN evidence --chain consumer --key-name evidence &> $HOME_DIR/hermes-evidence-logs.txt & +sleep 1 + +# Wait for Hermes to submit double signing evidence +$HERMES_BIN update client --host-chain consumer --client 07-tendermint-0 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 @@ -600,9 +692,6 @@ 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 "---------------------------------------------------------------" diff --git a/ci/misbehaviour-ics/light_client_attack_freeze_test.sh b/ci/misbehaviour-ics/light_client_attack_freeze_test.sh index 24661ace22..887f18b313 100644 --- a/ci/misbehaviour-ics/light_client_attack_freeze_test.sh +++ b/ci/misbehaviour-ics/light_client_attack_freeze_test.sh @@ -85,7 +85,10 @@ 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.params.voting_period = \"5s\" | .app_state.staking.params.unbonding_time = \"86400s\"" \ +jq ".app_state.gov.params.voting_period = \"5s\" \ +| .app_state.gov.params.expedited_voting_period = \"4s\" \ +| .app_state.staking.params.unbonding_time = \"86400s\" \ +| .app_state.provider.params.blocks_per_epoch = \"5\"" \ ${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 @@ -160,31 +163,146 @@ interchain-security-pd start \ waiting 10 "for provider sub-node to start" # Build consumer chain proposal file -tee ${PROV_NODE_DIR}/consumer-proposal.json< consumer_gen.json +interchain-security-pd query provider consumer-genesis $CONSUMER_ID --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 @@ -296,7 +414,7 @@ rpc_addr = "http://${NODE_IP}:26648" rpc_timeout = "10s" store_prefix = "ibc" trusting_period = "2days" -event_source = { mode = 'push', url = 'ws://${NODE_IP}:26648/websocket' , batch_delay = '50ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 4 } [chains.gas_price] denom = "stake" @@ -319,7 +437,7 @@ rpc_addr = "http://${NODE_IP}:26658" rpc_timeout = "10s" store_prefix = "ibc" trusting_period = "2days" -event_source = { mode = 'push', url = 'ws://${NODE_IP}:26658/websocket' , batch_delay = '50ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 4 } [chains.gas_price] denom = "stake" @@ -419,7 +537,7 @@ rpc_addr = "http://${NODE_IP}:26638" rpc_timeout = "10s" store_prefix = "ibc" trusting_period = "2days" -event_source = { mode = 'push', url = 'ws://${NODE_IP}:26638/websocket' , batch_delay = '50ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 4 } [chains.gas_price] denom = "stake" @@ -442,7 +560,7 @@ rpc_addr = "http://${NODE_IP}:26658" rpc_timeout = "10s" store_prefix = "ibc" trusting_period = "2days" -event_source = { mode = 'push', url = 'ws://${NODE_IP}:26658/websocket' , batch_delay = '50ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 4 } [chains.gas_price] denom = "stake" @@ -506,6 +624,7 @@ if [ "$FROZEN_HEIGHT" != "null" ]; then diag "Client is frozen, as expected." else diag "Client is not frozen, aborting." + ${HOME_DIR}/hermes-evidence-logs.txt exit 1 fi @@ -513,6 +632,7 @@ if grep -q "found light client attack evidence" ${HOME_DIR}/hermes-evidence-logs diag "Evidence found, proceeding." else diag "Evidence not found, aborting." + cat ${HOME_DIR}/hermes-evidence-logs.txt exit 1 fi diff --git a/ci/misbehaviour-ics/light_client_attack_test.sh b/ci/misbehaviour-ics/light_client_attack_test.sh index f42982c353..5b03d3d324 100644 --- a/ci/misbehaviour-ics/light_client_attack_test.sh +++ b/ci/misbehaviour-ics/light_client_attack_test.sh @@ -85,7 +85,10 @@ 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.params.voting_period = \"5s\" | .app_state.staking.params.unbonding_time = \"86400s\"" \ +jq ".app_state.gov.params.voting_period = \"5s\" \ +| .app_state.gov.params.expedited_voting_period = \"4s\" \ +| .app_state.staking.params.unbonding_time = \"86400s\" \ +| .app_state.provider.params.blocks_per_epoch = \"5\"" \ ${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 @@ -169,33 +172,148 @@ interchain-security-pd start \ waiting 5 "for provider sub-node to start" # Build consumer chain proposal file -tee ${PROV_NODE_DIR}/consumer-proposal.json< consumer_gen.json +interchain-security-pd query provider consumer-genesis $CONSUMER_ID --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 @@ -305,7 +423,7 @@ rpc_addr = "http://${NODE_IP}:26648" rpc_timeout = "10s" store_prefix = "ibc" trusting_period = "2days" -event_source = { mode = 'push', url = 'ws://${NODE_IP}:26648/websocket' , batch_delay = '50ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 4 } [chains.gas_price] denom = "stake" @@ -328,7 +446,7 @@ rpc_addr = "http://${NODE_IP}:26658" rpc_timeout = "10s" store_prefix = "ibc" trusting_period = "2days" -event_source = { mode = 'push', url = 'ws://${NODE_IP}:26658/websocket' , batch_delay = '50ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 4 } [chains.gas_price] denom = "stake" @@ -445,7 +563,7 @@ rpc_addr = "http://${NODE_IP}:26638" rpc_timeout = "10s" store_prefix = "ibc" trusting_period = "2days" -event_source = { mode = 'push', url = 'ws://${NODE_IP}:26638/websocket' , batch_delay = '50ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 4 } [chains.gas_price] denom = "stake" @@ -467,7 +585,7 @@ rpc_addr = "http://${NODE_IP}:26658" rpc_timeout = "10s" store_prefix = "ibc" trusting_period = "2days" -event_source = { mode = 'push', url = 'ws://${NODE_IP}:26658/websocket' , batch_delay = '50ms' } +event_source = { mode = 'pull', interval = '500ms', max_retries = 4 } [chains.gas_price] denom = "stake" @@ -479,6 +597,7 @@ event_source = { mode = 'push', url = 'ws://${NODE_IP}:26658/websocket' , batch_ EOF waiting 10 "for a couple blocks" +sleep 5 read -r height hash < <( curl -s "localhost:26648"/commit \ @@ -512,7 +631,7 @@ 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 & +$HERMES_BIN --debug=rpc 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" @@ -555,6 +674,7 @@ if grep -q "found light client attack evidence" ${HOME_DIR}/hermes-evidence-logs diag "Evidence found, proceeding!" else diag "Evidence not found, aborting." + cat ${HOME_DIR}/hermes-evidence-logs.txt exit 1 fi diff --git a/crates/relayer-cli/src/commands/evidence.rs b/crates/relayer-cli/src/commands/evidence.rs index fa54be707b..30a9dbe069 100644 --- a/crates/relayer-cli/src/commands/evidence.rs +++ b/crates/relayer-cli/src/commands/evidence.rs @@ -6,6 +6,7 @@ use std::time::Duration; use abscissa_core::clap::Parser; use ibc_relayer::config::{ChainConfig, Config}; +use ibc_relayer_types::applications::ics28_ccv::msgs::ConsumerId; use tokio::runtime::Runtime as TokioRuntime; use tendermint::block::Height as TendermintHeight; @@ -18,7 +19,7 @@ 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::foreign_client::ForeignClient; +use ibc_relayer::foreign_client::{fetch_ccv_consumer_id, 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; @@ -318,7 +319,14 @@ fn submit_duplicate_vote_evidence( let signer = counterparty_chain_handle.get_signer()?; - if !is_counterparty_provider(chain, counterparty_chain_handle, counterparty_client_id) { + let consumer_id = fetch_ccv_consumer_id(counterparty_chain_handle, counterparty_client_id)?; + + if !is_counterparty_provider( + chain, + &consumer_id, + counterparty_chain_handle, + counterparty_client_id, + ) { debug!("counterparty client `{counterparty_client_id}` on chain `{counterparty_chain_id}` is not a CCV client, skipping..."); return Ok(ControlFlow::Continue(())); } @@ -359,6 +367,7 @@ fn submit_duplicate_vote_evidence( submitter: signer.clone(), duplicate_vote_evidence: evidence.clone(), infraction_block_header, + consumer_id, } .to_any(); @@ -507,8 +516,10 @@ fn submit_light_client_attack_evidence( counterparty.id(), ); + let consumer_id = fetch_ccv_consumer_id(counterparty, &counterparty_client_id)?; + let counterparty_is_provider = - is_counterparty_provider(chain, counterparty, &counterparty_client_id); + is_counterparty_provider(chain, &consumer_id, counterparty, &counterparty_client_id); let counterparty_client_is_frozen = counterparty_client.is_frozen(); @@ -578,13 +589,24 @@ fn submit_light_client_attack_evidence( counterparty.id(), ); - let msg = MsgSubmitIcsConsumerMisbehaviour { - submitter: signer.clone(), - misbehaviour: misbehaviour.clone(), + match fetch_ccv_consumer_id(counterparty, &counterparty_client_id) { + Ok(consumer_id) => { + msgs.push( + MsgSubmitIcsConsumerMisbehaviour { + submitter: signer.clone(), + misbehaviour: misbehaviour.clone(), + consumer_id, + } + .to_any(), + ); + } + Err(e) => { + error!( + "cannot submit CCV light client attack evidence to client `{}` on provider chain `{}`: {e}", + counterparty_client_id, counterparty.id() + ); + } } - .to_any(); - - msgs.push(msg); }; // We do not need to submit the misbehaviour if the client is already frozen. @@ -669,6 +691,7 @@ fn has_consensus_state( /// which is then definitely a provider. fn is_counterparty_provider( chain: &CosmosSdkChain, + consumer_id: &ConsumerId, counterparty_chain_handle: &BaseChainHandle, counterparty_client_id: &ClientId, ) -> bool { @@ -677,8 +700,10 @@ fn is_counterparty_provider( .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 + consumer_chains.iter().any(|consumer| { + &consumer.chain_id == chain.id() + && &consumer.client_id == counterparty_client_id + && &consumer.consumer_id == consumer_id }) } else { false @@ -716,6 +741,11 @@ fn fetch_all_counterparty_clients( connection.connection_id ); + if client_id.as_str() == "09-localhost" { + debug!("skipping localhost client `{client_id}`..."); + continue; + } + debug!( "fetching client state for client `{client_id}` on connection `{}`", connection.connection_id 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 index a1ce4291d9..9f07f31539 100644 --- 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 @@ -9,6 +9,7 @@ use crate::signer::Signer; use crate::tx_msg::Msg; use super::error::Error; +use super::ConsumerId; pub const ICS_DOUBLE_VOTING_TYPE_URL: &str = "/interchain_security.ccv.provider.v1.MsgSubmitConsumerDoubleVoting"; @@ -18,6 +19,7 @@ pub struct MsgSubmitIcsConsumerDoubleVoting { pub submitter: Signer, pub duplicate_vote_evidence: DuplicateVoteEvidence, pub infraction_block_header: Header, + pub consumer_id: ConsumerId, } impl Msg for MsgSubmitIcsConsumerDoubleVoting { @@ -57,6 +59,7 @@ impl TryFrom for MsgSubmitIcsConsumerDoubleVoting { .map_err(|e| { Error::invalid_raw_double_voting(format!("cannot convert header: {e}")) })?, + consumer_id: ConsumerId::new(raw.consumer_id), }) } } @@ -67,6 +70,7 @@ impl From for RawIcsDoubleVoting { submitter: value.submitter.to_string(), duplicate_vote_evidence: Some(value.duplicate_vote_evidence.into()), infraction_block_header: Some(value.infraction_block_header.into()), + consumer_id: value.consumer_id.to_string(), } } } 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 index 8b5c6c2750..67a7d20102 100644 --- a/crates/relayer-types/src/applications/ics28_ccv/msgs/ccv_misbehaviour.rs +++ b/crates/relayer-types/src/applications/ics28_ccv/msgs/ccv_misbehaviour.rs @@ -10,6 +10,7 @@ use crate::signer::Signer; use crate::tx_msg::Msg; use super::error::Error; +use super::ConsumerId; pub const ICS_MISBEHAVIOR_TYPE_URL: &str = "/interchain_security.ccv.provider.v1.MsgSubmitConsumerMisbehaviour"; @@ -18,6 +19,7 @@ pub const ICS_MISBEHAVIOR_TYPE_URL: &str = pub struct MsgSubmitIcsConsumerMisbehaviour { pub submitter: Signer, pub misbehaviour: Misbehaviour, + pub consumer_id: ConsumerId, } impl Msg for MsgSubmitIcsConsumerMisbehaviour { @@ -48,6 +50,7 @@ impl TryFrom for MsgSubmitIcsConsumerMisbehaviour { .map_err(|_e| { Error::invalid_raw_misbehaviour("cannot convert misbehaviour".into()) })?, + consumer_id: ConsumerId::new(raw.consumer_id), }) } } @@ -57,6 +60,7 @@ impl From for RawIcsMisbehaviour { RawIcsMisbehaviour { submitter: value.submitter.to_string(), misbehaviour: Some(value.misbehaviour.into()), + consumer_id: value.consumer_id.to_string(), } } } diff --git a/crates/relayer-types/src/applications/ics28_ccv/msgs/mod.rs b/crates/relayer-types/src/applications/ics28_ccv/msgs/mod.rs index df28e4a73a..6f992ae0f7 100644 --- a/crates/relayer-types/src/applications/ics28_ccv/msgs/mod.rs +++ b/crates/relayer-types/src/applications/ics28_ccv/msgs/mod.rs @@ -1,3 +1,52 @@ pub mod ccv_double_voting; pub mod ccv_misbehaviour; pub mod error; + +use std::convert::Infallible; + +use derive_more::Display; +use ibc_proto::interchain_security::ccv::provider::v1::Chain; +use serde::{Deserialize, Serialize}; + +use crate::core::ics24_host; +use crate::core::ics24_host::identifier::{ChainId, ClientId}; + +#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Display, Serialize, Deserialize)] +pub struct ConsumerId(String); + +impl ConsumerId { + pub const fn new(id: String) -> Self { + Self(id) + } + + pub fn as_str(&self) -> &str { + &self.0 + } +} + +impl std::str::FromStr for ConsumerId { + type Err = Infallible; + + fn from_str(s: &str) -> Result { + Ok(Self(s.to_string())) + } +} + +#[derive(Clone, Debug, PartialEq, Eq)] +pub struct ConsumerChain { + pub chain_id: ChainId, + pub consumer_id: ConsumerId, + pub client_id: ClientId, +} + +impl TryFrom for ConsumerChain { + type Error = ics24_host::error::ValidationError; + + fn try_from(value: Chain) -> Result { + Ok(Self { + chain_id: ChainId::from_string(&value.chain_id), + consumer_id: ConsumerId::new(value.consumer_id), + client_id: value.client_id.parse()?, + }) + } +} diff --git a/crates/relayer-types/src/applications/ics31_icq/response.rs b/crates/relayer-types/src/applications/ics31_icq/response.rs index 98b45acf06..7a5c9bb638 100644 --- a/crates/relayer-types/src/applications/ics31_icq/response.rs +++ b/crates/relayer-types/src/applications/ics31_icq/response.rs @@ -52,11 +52,13 @@ impl CrossChainQueryResponse { pub fn try_to_any(&self, signer: Signer) -> Result { let mut encoded = vec![]; + let proof_ops = into_proof_ops(self.proof.clone()); + let msg_submit_cross_chain_query_result = MsgSubmitQueryResponse { chain_id: self.chain_id.to_string(), query_id: self.query_id.to_string(), result: self.result.clone(), - proof_ops: Some(into_proof_ops(self.proof.clone())), + proof_ops: Some(proof_ops), height: self.height, from_address: signer.as_ref().to_string(), }; diff --git a/crates/relayer-types/src/applications/transfer/error.rs b/crates/relayer-types/src/applications/transfer/error.rs index f0e52d946d..71c8d04b0f 100644 --- a/crates/relayer-types/src/applications/transfer/error.rs +++ b/crates/relayer-types/src/applications/transfer/error.rs @@ -4,7 +4,6 @@ use std::string::FromUtf8Error; use flex_error::{define_error, DisplayOnly, TraceError}; use subtle_encoding::Error as EncodingError; -use tendermint_proto::Error as TendermintProtoError; use uint::FromDecStrErr; use crate::core::ics04_channel::channel::Ordering; @@ -127,7 +126,7 @@ define_error! { | _ | { "no trace associated with specified hash" }, DecodeRawMsg - [ TraceError ] + [ TraceError ] | _ | { "error decoding raw msg" }, UnknownMsgType diff --git a/crates/relayer-types/src/applications/transfer/msgs/send.rs b/crates/relayer-types/src/applications/transfer/msgs/send.rs index 36e71dc66b..fcbb34a6bb 100644 --- a/crates/relayer-types/src/applications/transfer/msgs/send.rs +++ b/crates/relayer-types/src/applications/transfer/msgs/send.rs @@ -43,11 +43,11 @@ where type Error = Error; fn try_from(value: RawMsgSend) -> Result { - let amount: Vec> = value + let amount = value .amount .into_iter() - .map(Coin::try_from) - .collect::>, _>>()?; + .map(Coin::::try_from) + .collect::, _>>()?; Ok(MsgSend { from_address: value.from_address, to_address: value.to_address, 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 818cf13347..44888d8afa 100644 --- a/crates/relayer-types/src/clients/ics07_tendermint/client_state.rs +++ b/crates/relayer-types/src/clients/ics07_tendermint/client_state.rs @@ -305,9 +305,9 @@ impl From for RawTmClientState { Self { chain_id: value.chain_id.to_string(), trust_level: Some(value.trust_threshold.into()), - trusting_period: Some(value.trusting_period.into()), - unbonding_period: Some(value.unbonding_period.into()), - max_clock_drift: Some(value.max_clock_drift.into()), + trusting_period: Some(value.trusting_period.try_into().unwrap()), + unbonding_period: Some(value.unbonding_period.try_into().unwrap()), + max_clock_drift: Some(value.max_clock_drift.try_into().unwrap()), frozen_height: Some(value.frozen_height.map(|height| height.into()).unwrap_or( RawHeight { revision_number: 0, diff --git a/crates/relayer-types/src/core/ics02_client/error.rs b/crates/relayer-types/src/core/ics02_client/error.rs index a560a499f1..27316e2747 100644 --- a/crates/relayer-types/src/core/ics02_client/error.rs +++ b/crates/relayer-types/src/core/ics02_client/error.rs @@ -1,5 +1,4 @@ use flex_error::{define_error, TraceError}; -use tendermint_proto::Error as TendermintProtoError; use crate::core::ics02_client::client_type::ClientType; use crate::core::ics02_client::height::HeightError; @@ -109,14 +108,14 @@ define_error! { }, DecodeRawClientState - [ TraceError ] + [ TraceError ] | _ | { "error decoding raw client state" }, MissingRawClientState | _ | { "missing raw client state" }, InvalidRawConsensusState - [ TraceError ] + [ TraceError ] | _ | { "invalid raw client consensus state" }, MissingRawConsensusState @@ -138,7 +137,7 @@ define_error! { | _ | { "invalid client identifier" }, InvalidRawHeader - [ TraceError ] + [ TraceError ] | _ | { "invalid raw header" }, MalformedHeader @@ -148,7 +147,7 @@ define_error! { | _ | { "missing raw header" }, DecodeRawMisbehaviour - [ TraceError ] + [ TraceError ] | _ | { "invalid raw misbehaviour" }, InvalidRawMisbehaviour @@ -254,19 +253,19 @@ define_error! { | e | { format_args!("the local consensus state could not be retrieved for height {}", e.height) }, InvalidConnectionEnd - [ TraceError] + [ TraceError] | _ | { "invalid connection end" }, InvalidChannelEnd - [ TraceError] + [ TraceError] | _ | { "invalid channel end" }, InvalidAnyClientState - [ TraceError] + [ TraceError] | _ | { "invalid any client state" }, InvalidAnyConsensusState - [ TraceError ] + [ TraceError ] | _ | { "invalid any client consensus state" }, Signer diff --git a/crates/relayer-types/src/core/ics02_client/events.rs b/crates/relayer-types/src/core/ics02_client/events.rs index 3abe9b7b8d..da295833ef 100644 --- a/crates/relayer-types/src/core/ics02_client/events.rs +++ b/crates/relayer-types/src/core/ics02_client/events.rs @@ -1,9 +1,10 @@ //! Types for the IBC events emitted from Tendermint Websocket by the client module. -use serde_derive::{Deserialize, Serialize}; use std::fmt::{Display, Error as FmtError, Formatter}; + +use ibc_proto::Protobuf; +use serde_derive::{Deserialize, Serialize}; use tendermint::abci; -use tendermint_proto::Protobuf; use super::header::AnyHeader; use crate::core::ics02_client::client_type::ClientType; diff --git a/crates/relayer-types/src/core/ics26_routing/error.rs b/crates/relayer-types/src/core/ics26_routing/error.rs index f51581b6e0..5a4773e5af 100644 --- a/crates/relayer-types/src/core/ics26_routing/error.rs +++ b/crates/relayer-types/src/core/ics26_routing/error.rs @@ -29,7 +29,7 @@ define_error! { | e | { format_args!("unknown type URL {0}", e.url) }, MalformedMessageBytes - [ TraceError ] + [ TraceError ] | _ | { "the message is malformed and cannot be decoded" }, } } diff --git a/crates/relayer/src/chain/cosmos.rs b/crates/relayer/src/chain/cosmos.rs index e7729c7382..4dc9abdd5a 100644 --- a/crates/relayer/src/chain/cosmos.rs +++ b/crates/relayer/src/chain/cosmos.rs @@ -22,6 +22,7 @@ use ibc_proto::ibc::apps::fee::v1::{ use ibc_proto::ibc::core::channel::v1::{QueryUpgradeErrorRequest, QueryUpgradeRequest}; use ibc_proto::interchain_security::ccv::v1::ConsumerParams as CcvConsumerParams; use ibc_proto::Protobuf; +use ibc_relayer_types::applications::ics28_ccv::msgs::{ConsumerChain, ConsumerId}; use ibc_relayer_types::applications::ics31_icq::response::CrossChainQueryResponse; use ibc_relayer_types::clients::ics07_tendermint::client_state::{ AllowUpdate, ClientState as TmClientState, @@ -147,7 +148,7 @@ pub mod wait; /// might be un-necessarily restrictive on the relayer side. /// The [default max. block size in Tendermint 0.37 is 21MB](tm-37-max). /// With a fraction of `0.9`, then Hermes will never permit the configuration -/// of `max_tx_size` to exceed ~18.9MB. +/// of `max_tx_size` to exceed ~18.9MB /// /// [tm-37-max]: https://github.com/tendermint/tendermint/blob/v0.37.0-rc1/types/params.go#L79 pub const BLOCK_MAX_BYTES_MAX_FRACTION: f64 = 0.9; @@ -367,6 +368,7 @@ impl CosmosSdkChain { } /// Performs a gRPC query to fetch CCV Consumer chain staking parameters. + /// Assumes we are the consumer chain. pub fn query_ccv_consumer_chain_params(&self) -> Result { crate::time!( "query_ccv_consumer_chain_params", @@ -400,6 +402,14 @@ impl CosmosSdkChain { Ok(params) } + /// Performs a gRPC query to fetch the CCV ConsumerID corresponding + /// to the given ClientID. + /// + /// Assumes we are the provider chain. + pub fn query_ccv_consumer_id(&self, client_id: &ClientId) -> Result { + self.block_on(query_ccv_consumer_id(&self.config, client_id)) + } + /// Performs a gRPC query for Cosmos chain staking parameters. pub fn query_staking_params(&self) -> Result { crate::time!( @@ -2542,7 +2552,10 @@ impl ChainEndpoint for CosmosSdkChain { Ok(incentivized_response) } - fn query_consumer_chains(&self) -> Result, Error> { + fn query_consumer_chains(&self) -> Result, Error> { + use ibc_proto::interchain_security::ccv::provider::v1::ConsumerPhase; + use ibc_proto::interchain_security::ccv::provider::v1::QueryConsumerChainsRequest; + crate::time!( "query_consumer_chains", { @@ -2556,9 +2569,10 @@ impl ChainEndpoint for CosmosSdkChain { ibc_proto::interchain_security::ccv::provider::v1::query_client::QueryClient::new, ))?; - let request = tonic::Request::new( - ibc_proto::interchain_security::ccv::provider::v1::QueryConsumerChainsRequest {}, - ); + let request = tonic::Request::new(QueryConsumerChainsRequest { + phase: ConsumerPhase::Launched as i32, + pagination: Some(PageRequest::all().into()), + }); let response = self .block_on(client.query_consumer_chains(request)) @@ -2568,8 +2582,8 @@ impl ChainEndpoint for CosmosSdkChain { let result = response .chains .into_iter() - .map(|c| (c.chain_id.parse().unwrap(), c.client_id.parse().unwrap())) - .collect(); + .map(|c| ConsumerChain::try_from(c).map_err(Error::ics24_host_validation_error)) + .collect::, _>>()?; Ok(result) } @@ -2814,7 +2828,46 @@ pub async fn fetch_compat_mode( } }?; - Ok(compat_mode.into()) + Ok(compat_mode) +} + +/// Performs a gRPC query to fetch the CCV ConsumerID corresponding +/// to the given ClientID. +/// +/// Assumes we are the provider chain. +pub async fn query_ccv_consumer_id( + config: &CosmosSdkConfig, + client_id: &ClientId, +) -> Result { + use ibc_proto::interchain_security::ccv::provider::v1::query_client::QueryClient; + use ibc_proto::interchain_security::ccv::provider::v1::QueryConsumerIdFromClientIdRequest; + + crate::telemetry!(query, &config.id, "query_ccv_consumer_id"); + crate::time!( + "query_ccv_consumer_id", + { + "src_chain": &config.id, + } + ); + + let grpc_addr = Uri::from_str(&config.grpc_addr.to_string()) + .map_err(|e| Error::invalid_uri(config.grpc_addr.to_string(), e))?; + + let mut client = create_grpc_client(&grpc_addr, QueryClient::new) + .await? + .max_decoding_message_size(config.max_grpc_decoding_size.get_bytes() as usize); + + let request = tonic::Request::new(QueryConsumerIdFromClientIdRequest { + client_id: client_id.to_string(), + }); + + let response = client + .query_consumer_id_from_client_id(request) + .await + .map_err(|e| Error::grpc_status(e, "query_ccv_consumer_id".to_owned()))?; + + let consumer_id = response.into_inner().consumer_id; + Ok(ConsumerId::new(consumer_id)) } #[cfg(test)] diff --git a/crates/relayer/src/chain/cosmos/encode.rs b/crates/relayer/src/chain/cosmos/encode.rs index 447785f97e..a64ebd51e8 100644 --- a/crates/relayer/src/chain/cosmos/encode.rs +++ b/crates/relayer/src/chain/cosmos/encode.rs @@ -185,6 +185,7 @@ pub fn encode_to_bech32(address: &str, account_prefix: &str) -> Result Result<(AuthInfo, Vec), Error> { + #[allow(deprecated)] let auth_info = AuthInfo { signer_infos: vec![signer_info], fee: Some(fee), diff --git a/crates/relayer/src/chain/cosmos/query/account.rs b/crates/relayer/src/chain/cosmos/query/account.rs index 19d9ac5b34..ac4f908338 100644 --- a/crates/relayer/src/chain/cosmos/query/account.rs +++ b/crates/relayer/src/chain/cosmos/query/account.rs @@ -1,6 +1,6 @@ use http::uri::Uri; use ibc_proto::cosmos::auth::v1beta1::query_client::QueryClient; -use ibc_proto::cosmos::auth::v1beta1::{BaseAccount, EthAccount, QueryAccountRequest}; +use ibc_proto::cosmos::auth::v1beta1::{BaseAccount, QueryAccountRequest}; use prost::Message; use tracing::info; @@ -9,6 +9,19 @@ use crate::config::default::max_grpc_decoding_size; use crate::error::Error; use crate::util::create_grpc_client; +/// EthAccount defines an Ethermint account. +/// TODO: remove when/if a canonical `EthAccount` +/// lands in the next Cosmos SDK release +/// (note https://github.com/cosmos/cosmos-sdk/pull/9981 +/// only adds the PubKey type) +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EthAccount { + #[prost(message, optional, tag = "1")] + pub base_account: ::core::option::Option, + #[prost(bytes = "vec", tag = "2")] + pub code_hash: ::prost::alloc::vec::Vec, +} + /// Get a `&mut Account` from an `&mut Option` if it is `Some(Account)`. /// Otherwise query for the account information, update the `Option` to `Some`, /// and return the underlying `&mut` reference. diff --git a/crates/relayer/src/chain/cosmos/query/balance.rs b/crates/relayer/src/chain/cosmos/query/balance.rs index 2b8a93e6de..23053fd807 100644 --- a/crates/relayer/src/chain/cosmos/query/balance.rs +++ b/crates/relayer/src/chain/cosmos/query/balance.rs @@ -53,6 +53,7 @@ pub async fn query_all_balances( let request = tonic::Request::new(QueryAllBalancesRequest { address: account_address.to_string(), pagination: None, + resolve_denom: false, // TODO: Correctly handle resolve_denom argument }); let response = client diff --git a/crates/relayer/src/chain/endpoint.rs b/crates/relayer/src/chain/endpoint.rs index 0a12e73341..5545f74966 100644 --- a/crates/relayer/src/chain/endpoint.rs +++ b/crates/relayer/src/chain/endpoint.rs @@ -1,6 +1,7 @@ use alloc::sync::Arc; use ibc_proto::ibc::core::channel::v1::{QueryUpgradeErrorRequest, QueryUpgradeRequest}; +use ibc_relayer_types::applications::ics28_ccv::msgs::ConsumerChain; use ibc_relayer_types::core::ics02_client::height::Height; use tokio::runtime::Runtime as TokioRuntime; @@ -688,7 +689,7 @@ pub trait ChainEndpoint: Sized { request: QueryIncentivizedPacketRequest, ) -> Result; - fn query_consumer_chains(&self) -> Result, Error>; + fn query_consumer_chains(&self) -> Result, Error>; fn query_upgrade( &self, diff --git a/crates/relayer/src/chain/handle.rs b/crates/relayer/src/chain/handle.rs index 2137821e61..466017c360 100644 --- a/crates/relayer/src/chain/handle.rs +++ b/crates/relayer/src/chain/handle.rs @@ -8,6 +8,7 @@ use ibc_proto::ibc::apps::fee::v1::{ QueryIncentivizedPacketRequest, QueryIncentivizedPacketResponse, }; use ibc_proto::ibc::core::channel::v1::{QueryUpgradeErrorRequest, QueryUpgradeRequest}; +use ibc_relayer_types::applications::ics28_ccv::msgs::ConsumerChain; use ibc_relayer_types::{ applications::ics31_icq::response::CrossChainQueryResponse, core::{ @@ -371,7 +372,7 @@ pub enum ChainRequest { }, QueryConsumerChains { - reply_to: ReplyTo>, + reply_to: ReplyTo>, }, QueryUpgrade { @@ -699,7 +700,7 @@ pub trait ChainHandle: Clone + Display + Send + Sync + Debug + 'static { request: QueryIncentivizedPacketRequest, ) -> Result; - fn query_consumer_chains(&self) -> Result, Error>; + fn query_consumer_chains(&self) -> Result, Error>; fn query_upgrade( &self, diff --git a/crates/relayer/src/chain/handle/base.rs b/crates/relayer/src/chain/handle/base.rs index 0898269281..d07595eb08 100644 --- a/crates/relayer/src/chain/handle/base.rs +++ b/crates/relayer/src/chain/handle/base.rs @@ -8,20 +8,20 @@ use ibc_proto::ibc::{ core::channel::v1::{QueryUpgradeErrorRequest, QueryUpgradeRequest}, }; use ibc_relayer_types::{ - applications::ics31_icq::response::CrossChainQueryResponse, + applications::{ics28_ccv::msgs::ConsumerChain, ics31_icq::response::CrossChainQueryResponse}, core::{ ics02_client::{events::UpdateClient, header::AnyHeader}, - ics03_connection::connection::{ConnectionEnd, IdentifiedConnectionEnd}, - ics03_connection::version::Version, - ics04_channel::channel::{ChannelEnd, IdentifiedChannelEnd}, + ics03_connection::{ + connection::{ConnectionEnd, IdentifiedConnectionEnd}, + version::Version, + }, ics04_channel::{ + channel::{ChannelEnd, IdentifiedChannelEnd}, packet::{PacketMsgType, Sequence}, upgrade::{ErrorReceipt, Upgrade}, }, ics23_commitment::{commitment::CommitmentPrefix, merkle::MerkleProof}, - ics24_host::identifier::ChainId, - ics24_host::identifier::ChannelId, - ics24_host::identifier::{ClientId, ConnectionId, PortId}, + ics24_host::identifier::{ChainId, ChannelId, ClientId, ConnectionId, PortId}, }, proofs::Proofs, signer::Signer, @@ -522,7 +522,7 @@ impl ChainHandle for BaseChainHandle { self.send(|reply_to| ChainRequest::QueryIncentivizedPacket { request, reply_to }) } - fn query_consumer_chains(&self) -> Result, Error> { + 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 6a1731f903..d5e481dac1 100644 --- a/crates/relayer/src/chain/handle/cache.rs +++ b/crates/relayer/src/chain/handle/cache.rs @@ -1,20 +1,21 @@ use core::fmt::{Display, Error as FmtError, Formatter}; use crossbeam_channel as channel; -use ibc_relayer_types::core::ics02_client::header::AnyHeader; -use ibc_relayer_types::core::ics04_channel::upgrade::ErrorReceipt; use tracing::Span; use ibc_proto::ibc::apps::fee::v1::QueryIncentivizedPacketRequest; use ibc_proto::ibc::apps::fee::v1::QueryIncentivizedPacketResponse; use ibc_proto::ibc::core::channel::v1::{QueryUpgradeErrorRequest, QueryUpgradeRequest}; +use ibc_relayer_types::applications::ics28_ccv::msgs::ConsumerChain; use ibc_relayer_types::applications::ics31_icq::response::CrossChainQueryResponse; use ibc_relayer_types::core::ics02_client::events::UpdateClient; +use ibc_relayer_types::core::ics02_client::header::AnyHeader; use ibc_relayer_types::core::ics03_connection::connection::ConnectionEnd; use ibc_relayer_types::core::ics03_connection::connection::IdentifiedConnectionEnd; use ibc_relayer_types::core::ics03_connection::version::Version; use ibc_relayer_types::core::ics04_channel::channel::ChannelEnd; use ibc_relayer_types::core::ics04_channel::channel::IdentifiedChannelEnd; use ibc_relayer_types::core::ics04_channel::packet::{PacketMsgType, Sequence}; +use ibc_relayer_types::core::ics04_channel::upgrade::ErrorReceipt; use ibc_relayer_types::core::ics04_channel::upgrade::Upgrade; use ibc_relayer_types::core::ics23_commitment::commitment::CommitmentPrefix; use ibc_relayer_types::core::ics23_commitment::merkle::MerkleProof; @@ -515,7 +516,7 @@ impl ChainHandle for CachingChainHandle { self.inner.query_incentivized_packet(request) } - fn query_consumer_chains(&self) -> Result, Error> { + 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 1096e1b0bf..fc1e5e6516 100644 --- a/crates/relayer/src/chain/handle/counting.rs +++ b/crates/relayer/src/chain/handle/counting.rs @@ -3,13 +3,13 @@ use std::collections::HashMap; use std::sync::{Arc, RwLock, RwLockReadGuard}; use crossbeam_channel as channel; -use ibc_proto::ibc::core::channel::v1::{QueryUpgradeErrorRequest, QueryUpgradeRequest}; -use ibc_relayer_types::core::ics04_channel::upgrade::{ErrorReceipt, Upgrade}; use tracing::{debug, Span}; use ibc_proto::ibc::apps::fee::v1::{ QueryIncentivizedPacketRequest, QueryIncentivizedPacketResponse, }; +use ibc_proto::ibc::core::channel::v1::{QueryUpgradeErrorRequest, QueryUpgradeRequest}; +use ibc_relayer_types::applications::ics28_ccv::msgs::ConsumerChain; use ibc_relayer_types::applications::ics31_icq::response::CrossChainQueryResponse; use ibc_relayer_types::core::ics02_client::events::UpdateClient; use ibc_relayer_types::core::ics02_client::header::AnyHeader; @@ -19,6 +19,7 @@ use ibc_relayer_types::core::ics03_connection::version::Version; use ibc_relayer_types::core::ics04_channel::channel::ChannelEnd; use ibc_relayer_types::core::ics04_channel::channel::IdentifiedChannelEnd; use ibc_relayer_types::core::ics04_channel::packet::{PacketMsgType, Sequence}; +use ibc_relayer_types::core::ics04_channel::upgrade::{ErrorReceipt, Upgrade}; use ibc_relayer_types::core::ics23_commitment::commitment::CommitmentPrefix; use ibc_relayer_types::core::ics23_commitment::merkle::MerkleProof; use ibc_relayer_types::core::ics24_host::identifier::{ @@ -507,7 +508,7 @@ impl ChainHandle for CountingChainHandle { self.inner.query_incentivized_packet(request) } - fn query_consumer_chains(&self) -> Result, Error> { + 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 1422f386b3..d19b544245 100644 --- a/crates/relayer/src/chain/runtime.rs +++ b/crates/relayer/src/chain/runtime.rs @@ -10,10 +10,9 @@ use ibc_proto::ibc::{ core::channel::v1::{QueryUpgradeErrorRequest, QueryUpgradeRequest}, }; use ibc_relayer_types::{ - applications::ics31_icq::response::CrossChainQueryResponse, + applications::{ics28_ccv::msgs::ConsumerChain, ics31_icq::response::CrossChainQueryResponse}, core::{ - ics02_client::events::UpdateClient, - ics02_client::header::AnyHeader, + ics02_client::{events::UpdateClient, header::AnyHeader}, ics03_connection::{ connection::{ConnectionEnd, IdentifiedConnectionEnd}, version::Version, @@ -24,7 +23,7 @@ use ibc_relayer_types::{ upgrade::{ErrorReceipt, Upgrade}, }, ics23_commitment::{commitment::CommitmentPrefix, merkle::MerkleProof}, - ics24_host::identifier::{ChainId, ChannelId, ClientId, ConnectionId, PortId}, + ics24_host::identifier::{ChannelId, ClientId, ConnectionId, PortId}, }, proofs::Proofs, signer::Signer, @@ -865,10 +864,7 @@ where Ok(()) } - fn query_consumer_chains( - &self, - reply_to: ReplyTo>, - ) -> Result<(), Error> { + 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)?; diff --git a/crates/relayer/src/config/compat_mode.rs b/crates/relayer/src/config/compat_mode.rs index cb2a035855..795081ea6f 100644 --- a/crates/relayer/src/config/compat_mode.rs +++ b/crates/relayer/src/config/compat_mode.rs @@ -1,95 +1 @@ -use core::fmt::{Display, Error as FmtError, Formatter}; -use core::str::FromStr; -use serde::Deserialize; -use serde::Deserializer; -use serde::Serialize; -use serde::Serializer; - -use tendermint_rpc::client::CompatMode as TmCompatMode; - -use crate::config::Error; - -/// CometBFT RPC compatibility mode -#[derive(Clone, Debug, Eq, PartialEq)] -pub enum CompatMode { - /// Use version 0.34 of the protocol. - V0_34, - /// Use version 0.37+ of the protocol. - V0_37, -} - -impl Display for CompatMode { - fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), FmtError> { - match self { - Self::V0_34 => write!(f, "v0.34"), - Self::V0_37 => write!(f, "v0.37"), - } - } -} - -impl FromStr for CompatMode { - type Err = Error; - - fn from_str(s: &str) -> Result { - const VALID_COMPAT_MODES: &str = "0.34, 0.37, 0.38"; - - // Trim leading 'v', if present - match s.trim_start_matches('v') { - "0.34" => Ok(CompatMode::V0_34), - "0.37" => Ok(CompatMode::V0_37), - "0.38" => Ok(CompatMode::V0_37), // v0.38 is compatible with v0.37 - _ => Err(Error::invalid_compat_mode( - s.to_string(), - VALID_COMPAT_MODES, - )), - } - } -} - -impl<'de> Deserialize<'de> for CompatMode { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - use serde::de; - - let s = String::deserialize(deserializer)?; - FromStr::from_str(&s).map_err(de::Error::custom) - } -} - -impl Serialize for CompatMode { - fn serialize(&self, serializer: S) -> Result - where - S: Serializer, - { - self.to_string().serialize(serializer) - } -} - -impl From for CompatMode { - fn from(value: TmCompatMode) -> Self { - match value { - TmCompatMode::V0_34 => Self::V0_34, - TmCompatMode::V0_37 => Self::V0_37, - } - } -} - -impl From for TmCompatMode { - fn from(value: CompatMode) -> Self { - match value { - CompatMode::V0_34 => Self::V0_34, - CompatMode::V0_37 => Self::V0_37, - } - } -} - -impl CompatMode { - pub fn equal_to_tm_compat_mode(&self, tm_compat_mode: TmCompatMode) -> bool { - match self { - Self::V0_34 => tm_compat_mode == TmCompatMode::V0_34, - Self::V0_37 => tm_compat_mode == TmCompatMode::V0_37, - } - } -} +pub use tendermint_rpc::client::CompatMode; diff --git a/crates/relayer/src/error.rs b/crates/relayer/src/error.rs index 6d46f90fe0..8fa5bd4847 100644 --- a/crates/relayer/src/error.rs +++ b/crates/relayer/src/error.rs @@ -30,6 +30,7 @@ use ibc_relayer_types::clients::ics07_tendermint::error as tendermint_error; use ibc_relayer_types::core::ics02_client::{client_type::ClientType, error as client_error}; use ibc_relayer_types::core::ics03_connection::error as connection_error; use ibc_relayer_types::core::ics23_commitment::error as commitment_error; +use ibc_relayer_types::core::ics24_host::error::ValidationError; use ibc_relayer_types::core::ics24_host::identifier::{ChainId, ChannelId, ConnectionId}; use ibc_relayer_types::proofs::ProofError; @@ -633,6 +634,10 @@ define_error! { InvalidChannelString { channel: String } |e| { format!("invalid channel string {}", e.channel) }, + + Ics24HostValidationError + [ ValidationError ] + |_| { "ICS24 host validation error" }, } } diff --git a/crates/relayer/src/foreign_client.rs b/crates/relayer/src/foreign_client.rs index c05a5739f4..744ddb7e04 100644 --- a/crates/relayer/src/foreign_client.rs +++ b/crates/relayer/src/foreign_client.rs @@ -9,6 +9,7 @@ use std::thread; use std::time::Instant; use ibc_proto::google::protobuf::Any; +use ibc_relayer_types::applications::ics28_ccv::msgs::ConsumerId; use itertools::Itertools; use tracing::{debug, error, info, instrument, trace, warn}; @@ -31,6 +32,7 @@ use ibc_relayer_types::tx_msg::Msg; use ibc_relayer_types::Height; use crate::chain::client::ClientSettings; +use crate::chain::cosmos::query_ccv_consumer_id; use crate::chain::handle::ChainHandle; use crate::chain::requests::*; use crate::chain::tracking::TrackedMsgs; @@ -41,6 +43,7 @@ use crate::error::Error as RelayerError; use crate::event::IbcEventWithHeight; use crate::misbehaviour::{AnyMisbehaviour, MisbehaviourEvidence}; use crate::telemetry; +use crate::util::block_on; use crate::util::collate::CollatedIterExt; use crate::util::pretty::{PrettyDuration, PrettySlice}; @@ -365,7 +368,7 @@ pub enum ConsensusStateTrusted { NotTrusted { elapsed: Duration, network_timestamp: Timestamp, - consensus_state_timestmap: Timestamp, + consensus_state_timestamp: Timestamp, }, Trusted { elapsed: Duration, @@ -767,12 +770,12 @@ impl ForeignClient { error!( latest_height = %client_state.latest_height(), - network_timestmap = %network_timestamp, - consensus_state_timestamp = %consensus_state_timestmap, + network_timestamp = %network_timestamp, + consensus_state_timestamp = %consensus_state_timestamp, elapsed = ?elapsed, "client state is not valid: latest height is outside of trusting period!", ); @@ -829,7 +832,7 @@ impl ForeignClient ForeignClient ForeignClient { + msgs.push( + MsgSubmitIcsConsumerMisbehaviour { + submitter: signer.clone(), + misbehaviour: tm_misbehaviour, + consumer_id, + } + .to_any(), + ); } - .to_any(), - ); + Err(e) => { + error!( + "cannot build CCV misbehaviour evidence: failed to fetch CCV consumer id for client {}: {}", + self.id, e + ); + } + } } msgs.push( @@ -1931,3 +1945,31 @@ pub fn extract_client_id(event: &IbcEvent) -> Result<&ClientId, ForeignClientErr )), } } + +pub fn fetch_ccv_consumer_id( + provider: &impl ChainHandle, + client_id: &ClientId, +) -> Result { + let provider_config = provider.config().map_err(|e| { + ForeignClientError::misbehaviour( + format!("failed to get config of provider chain {}", provider.id(),), + e, + ) + })?; + + let ChainConfig::CosmosSdk(provider_config) = provider_config; + + let consumer_id = + block_on(query_ccv_consumer_id(&provider_config, client_id)).map_err(|e| { + ForeignClientError::misbehaviour( + format!( + "failed to query CCV consumer id corresponding to client {} from provider {}", + client_id, + provider.id() + ), + e, + ) + })?; + + Ok(consumer_id) +} diff --git a/crates/relayer/src/upgrade_chain.rs b/crates/relayer/src/upgrade_chain.rs index 2889d7ab62..bcd2c4b688 100644 --- a/crates/relayer/src/upgrade_chain.rs +++ b/crates/relayer/src/upgrade_chain.rs @@ -296,6 +296,7 @@ fn build_upgrade_proposal( metadata: "".to_string(), title: "proposal 0".to_string(), summary: "upgrade the chain software and unbonding period".to_string(), + expedited: true, // TODO: Correctly handle expedited argument }; let mut buf_msg = Vec::new(); diff --git a/crates/relayer/src/util/compat_mode.rs b/crates/relayer/src/util/compat_mode.rs index 716534bb95..c637d5a247 100644 --- a/crates/relayer/src/util/compat_mode.rs +++ b/crates/relayer/src/util/compat_mode.rs @@ -1,7 +1,6 @@ use tracing::warn; use tendermint::Version; -use tendermint_rpc::client::CompatMode as TmCompatMode; use crate::chain::cosmos::version::ConsensusVersion; use crate::config::compat_mode::CompatMode; @@ -11,21 +10,21 @@ pub fn compat_mode_from_node_version( configured_version: &Option, version: Version, ) -> Result { - let queried_version = TmCompatMode::from_version(version); + let queried_version = CompatMode::from_version(version); // This will prioritize the use of the CompatMode specified in Hermes configuration file match (configured_version, queried_version) { - (Some(configured), Ok(queried)) if !configured.equal_to_tm_compat_mode(queried) => { + (Some(configured), Ok(queried)) if configured != &queried => { warn!( "potential `compat_mode` misconfiguration! Configured version '{configured}' does not match chain version '{queried}'. \ Hermes will use the configured `compat_mode` version '{configured}'. \ If this configuration is done on purpose this message can be ignored.", ); - Ok(configured.clone()) + Ok(*configured) } - (Some(configured), _) => Ok(configured.clone()), - (_, Ok(queried)) => Ok(queried.into()), + (Some(configured), _) => Ok(*configured), + (_, Ok(queried)) => Ok(queried), (_, Err(e)) => Err(Error::invalid_compat_mode(e)), } } @@ -50,7 +49,7 @@ pub fn compat_mode_from_version_specs( If this configuration is done on purpose this message can be ignored." ); - Ok(configured.clone()) + Ok(*configured) } (Some(configured), None) => { warn!( @@ -58,7 +57,7 @@ pub fn compat_mode_from_version_specs( and will use the configured `compat_mode` version `{configured}`." ); - Ok(configured.clone()) + Ok(*configured) } (None, Some(queried)) => Ok(queried), (None, None) => { @@ -77,7 +76,7 @@ fn compat_mode_from_semver(v: semver::Version) -> Option { match (v.major, v.minor) { (0, 34) => Some(CompatMode::V0_34), (0, 37) => Some(CompatMode::V0_37), - (0, 38) => Some(CompatMode::V0_37), + (0, 38) => Some(CompatMode::V0_38), _ => None, } } diff --git a/flake.lock b/flake.lock index d78d62da6b..f2e2bf4b71 100644 --- a/flake.lock +++ b/flake.lock @@ -101,15 +101,16 @@ "cometbft-src": { "flake": false, "locked": { - "narHash": "sha256-G5gchJMn/BFzwYx8/ikPDL5fS/TuFIBF4DKJbkalp/M=", + "lastModified": 1723450629, + "narHash": "sha256-2QO4KeEUX4HHT1AKhEdPplJHjBhalfM11Dn3/urIVig=", "owner": "cometbft", "repo": "cometbft", - "rev": "66a5a9da9f7a3306f382eb9142ccb9c9f7997d3f", + "rev": "e1b4453baf0af6487ad187c7f17dc50517126673", "type": "github" }, "original": { "owner": "cometbft", - "ref": "v0.38.0", + "ref": "v0.38.11", "repo": "cometbft", "type": "github" } @@ -158,6 +159,7 @@ "gaia17-src": "gaia17-src", "gaia18-src": "gaia18-src", "gaia19-src": "gaia19-src", + "gaia20-src": "gaia20-src", "gaia5-src": "gaia5-src", "gaia6-ordered-src": "gaia6-ordered-src", "gaia6-src": "gaia6-src", @@ -218,6 +220,7 @@ "wasmvm_1_5_0-src": "wasmvm_1_5_0-src", "wasmvm_1_5_2-src": "wasmvm_1_5_2-src", "wasmvm_1_5_4-src": "wasmvm_1_5_4-src", + "wasmvm_1_5_5-src": "wasmvm_1_5_5-src", "wasmvm_1_beta7-src": "wasmvm_1_beta7-src", "wasmvm_2_0_0-src": "wasmvm_2_0_0-src", "wasmvm_2_0_3-src": "wasmvm_2_0_3-src", @@ -225,15 +228,16 @@ "wasmvm_2_1_2-src": "wasmvm_2_1_2-src" }, "locked": { - "lastModified": 1727709426, - "narHash": "sha256-Q+uchaRWUNGOksfHY8x6HAz7nADkRtLHUl11A0mBc7Y=", + "lastModified": 1729603468, + "narHash": "sha256-Ym4WfC/Iogqft2KOoHEv2FlWlgsxOAA5CZCbGXPf65o=", "owner": "informalsystems", "repo": "cosmos.nix", - "rev": "706d3206feb0c816765768dd164790874c221bd3", + "rev": "6abc05a6ada63de610adfb8c41a6a276bc77a5d8", "type": "github" }, "original": { "owner": "informalsystems", + "ref": "luca_joss/add-gaia-v20-alpha", "repo": "cosmos.nix", "type": "github" } @@ -673,6 +677,23 @@ "type": "github" } }, + "gaia20-src": { + "flake": false, + "locked": { + "lastModified": 1726853009, + "narHash": "sha256-N7x3k56AtPbIbbJjqKmlEJIytKElALJwj14lZ2pewZg=", + "owner": "cosmos", + "repo": "gaia", + "rev": "2dba9d471ef73b0a99e844bf55a44ddae700ea06", + "type": "github" + }, + "original": { + "owner": "cosmos", + "ref": "v20.0.0", + "repo": "gaia", + "type": "github" + } + }, "gaia5-src": { "flake": false, "locked": { @@ -1131,15 +1152,16 @@ "interchain-security-src": { "flake": false, "locked": { - "narHash": "sha256-adBzn51PKoRsCL9gIzC5Tcqmu7u3GjxTcDj2jpZ/da8=", + "lastModified": 1726849313, + "narHash": "sha256-1WEvV3LoXfGvZC9fXOb8mBLKVGCVBiXZcwUewSPit+8=", "owner": "cosmos", "repo": "interchain-security", - "rev": "03aada4af3243dbf739a12adfacc7b37232df694", + "rev": "1e60637f9d8f3505208282416abfbb87fabc4795", "type": "github" }, "original": { "owner": "cosmos", - "ref": "feat/ics-misbehaviour-handling", + "ref": "v6.1.0", "repo": "interchain-security", "type": "github" } @@ -1179,16 +1201,16 @@ "juno-src": { "flake": false, "locked": { - "lastModified": 1724278445, - "narHash": "sha256-XvJqp36HSYqm6OMLQqJPX5sCT52GxSLFDMO+fJovh+0=", + "lastModified": 1727102451, + "narHash": "sha256-UaTCcK+I6Wl4yCpbNckx+lRi55kTSucJxzw5irJOVh4=", "owner": "CosmosContracts", "repo": "juno", - "rev": "2f119adacca3a1668ff150c225a3f423501e748c", + "rev": "de3c4d145c7a96c31e3fca6fe8850ce4ab559e33", "type": "github" }, "original": { "owner": "CosmosContracts", - "ref": "v24.0.0", + "ref": "v25.0.0", "repo": "juno", "type": "github" } @@ -1444,11 +1466,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1727648392, - "narHash": "sha256-VTlVv1nSxImFxY6RPQpNZxvEOQ0u5s1wBFDgixySNDo=", + "lastModified": 1729428082, + "narHash": "sha256-xb4/Y+Y7ZlkQaA5rXnrXplDzdt2Jfgdmar3+qkb56UA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "4e0c36e4dd53f35d5a6385bdae88895ec5832f70", + "rev": "ca30f584e18024baf39c395001262ed936f27ebd", "type": "github" }, "original": { @@ -2010,6 +2032,23 @@ "type": "github" } }, + "wasmvm_1_5_5-src": { + "flake": false, + "locked": { + "lastModified": 1727088523, + "narHash": "sha256-ysS2pMMm+s1JsHVv9RhiMHt5g4UGcE5jqOI5YKdC4vU=", + "owner": "CosmWasm", + "repo": "wasmvm", + "rev": "0c5b9ce8446189f07d2bf65fbb902817cf57a563", + "type": "github" + }, + "original": { + "owner": "CosmWasm", + "ref": "v1.5.5", + "repo": "wasmvm", + "type": "github" + } + }, "wasmvm_1_beta7-src": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index 1a9ae4229a..891a19b4d8 100644 --- a/flake.nix +++ b/flake.nix @@ -2,9 +2,9 @@ description = "Nix development dependencies for ibc-rs"; inputs = { - nixpkgs.url = github:nixos/nixpkgs/nixpkgs-unstable; - flake-utils.url = github:numtide/flake-utils; - cosmos-nix.url = github:informalsystems/cosmos.nix; + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + cosmos-nix.url = "github:informalsystems/cosmos.nix/luca_joss/add-gaia-v20-alpha"; }; outputs = inputs: let @@ -33,6 +33,7 @@ evmos gaia6-ordered gaia18 + gaia20 ibc-go-v2-simapp ibc-go-v3-simapp ibc-go-v4-simapp diff --git a/tools/test-framework/src/chain/driver.rs b/tools/test-framework/src/chain/driver.rs index 85830caf5e..27d6919304 100644 --- a/tools/test-framework/src/chain/driver.rs +++ b/tools/test-framework/src/chain/driver.rs @@ -5,11 +5,11 @@ use alloc::sync::Arc; use core::time::Duration; use eyre::eyre; -use ibc_relayer::config::compat_mode::CompatMode; use std::cmp::max; use tokio::runtime::Runtime; use ibc_relayer::chain::cosmos::types::config::TxConfig; +use ibc_relayer::config::compat_mode::CompatMode; use ibc_relayer_types::applications::transfer::amount::Amount; use ibc_relayer_types::core::ics24_host::identifier::ChainId; diff --git a/tools/test-framework/src/chain/tagged.rs b/tools/test-framework/src/chain/tagged.rs index b574c6eef1..af7a73c06a 100644 --- a/tools/test-framework/src/chain/tagged.rs +++ b/tools/test-framework/src/chain/tagged.rs @@ -132,7 +132,7 @@ impl<'a, Chain: Send> TaggedChainDriverExt for MonoTagged Result, Error> { + fn query_consumer_chains(&self) -> Result, Error> { self.value().query_consumer_chains() }