diff --git a/flake.lock b/flake.lock index 61a86981..48f562f0 100644 --- a/flake.lock +++ b/flake.lock @@ -137,15 +137,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" } @@ -194,6 +195,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", @@ -259,14 +261,15 @@ "wasmvm_2_0_0-src": "wasmvm_2_0_0-src", "wasmvm_2_0_3-src": "wasmvm_2_0_3-src", "wasmvm_2_1_0-src": "wasmvm_2_1_0-src", - "wasmvm_2_1_2-src": "wasmvm_2_1_2-src" + "wasmvm_2_1_2-src": "wasmvm_2_1_2-src", + "wasmvm_2_1_3-src": "wasmvm_2_1_3-src" }, "locked": { - "lastModified": 1728982270, - "narHash": "sha256-iAzKmzrUm6BD6Vwb6rtbkTy1e/nFTsgo+Y5WNrrY2vc=", + "lastModified": 1733317488, + "narHash": "sha256-Kr/h0A92hdsnFGAX4ujwLrwlk1voYJkkBp7pHwa4/ag=", "owner": "informalsystems", "repo": "cosmos.nix", - "rev": "8b7f6e8d2c2e6455fcc9d86ef098e7f182827637", + "rev": "a615496057a069e03674f804e2b089ac67aac925", "type": "github" }, "original": { @@ -552,11 +555,11 @@ "systems": "systems_7" }, "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -728,6 +731,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": { @@ -1186,15 +1206,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" } @@ -1515,11 +1536,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1729265718, - "narHash": "sha256-4HQI+6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo=", + "lastModified": 1733097829, + "narHash": "sha256-9hbb1rqGelllb4kVUCZ307G2k3/UhmA8PPGBoyuWaSw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ccc0c2126893dd20963580b6478d1a10a4512185", + "rev": "2c15aa59df0017ca140d9ba302412298ab4bf22a", "type": "github" }, "original": { @@ -1548,16 +1569,16 @@ "osmosis-src": { "flake": false, "locked": { - "lastModified": 1719537675, - "narHash": "sha256-8Lb2SppNfq3+JwP3uanmCxuCek6tXOO/GcG27XGxRrE=", + "lastModified": 1731942173, + "narHash": "sha256-Ie+LKLrWthkGgJGlVpiTDwBvgA+Mo77Isa65vIOr1Ao=", "owner": "osmosis-labs", "repo": "osmosis", - "rev": "b973bffdf127866f45624d7e5a81f31fdc8e8e0b", + "rev": "100ba81036f01a348271ed59917881e2b83d0fbc", "type": "github" }, "original": { "owner": "osmosis-labs", - "ref": "v25.2.0", + "ref": "v27.0.1", "repo": "osmosis", "type": "github" } @@ -1695,11 +1716,11 @@ "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1729477859, - "narHash": "sha256-r0VyeJxy4O4CgTB/PNtfQft9fPfN1VuGvnZiCxDArvg=", + "lastModified": 1733279627, + "narHash": "sha256-NCNDAGPkdFdu+DLErbmNbavmVW9AwkgP7azROFFSB0U=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "ada8266712449c4c0e6ee6fcbc442b3c217c79e1", + "rev": "4da5a80ef76039e80468c902f1e9f5c0eab87d96", "type": "github" }, "original": { @@ -1825,11 +1846,11 @@ "starknet-devnet-src": { "flake": false, "locked": { - "lastModified": 1728925224, - "narHash": "sha256-Be+k9Y3jcYUDKKjf5QIoNQNeuFSJwKF4OgX3d85By80=", + "lastModified": 1732210861, + "narHash": "sha256-8PT1hGYu6AuF8vfzgGja0R9ZpIwgJxSLoqCGSqyJtxQ=", "owner": "0xSpaceShard", "repo": "starknet-devnet-rs", - "rev": "093add70f99c6a3f46b28a377b04a981f0dab341", + "rev": "038d94612c6b6e51f06dc124bb320085485f588d", "type": "github" }, "original": { @@ -2286,6 +2307,23 @@ "repo": "wasmvm", "type": "github" } + }, + "wasmvm_2_1_3-src": { + "flake": false, + "locked": { + "lastModified": 1727089467, + "narHash": "sha256-gYrK2EHhXnearJgLX38O6NLI6TfoGtpzA9be/7S/0ZU=", + "owner": "CosmWasm", + "repo": "wasmvm", + "rev": "2a104d140a5b2974dab7c15044da652769018cbe", + "type": "github" + }, + "original": { + "owner": "CosmWasm", + "ref": "v2.1.3", + "repo": "wasmvm", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index ee9b415c..05a5ce20 100644 --- a/flake.nix +++ b/flake.nix @@ -61,6 +61,8 @@ wasm-simapp = cosmos-nix.ibc-go-v8-wasm-simapp; + osmosis = cosmos-nix.osmosis; + starknet-devnet = import ./nix/starknet-devnet.nix { inherit nixpkgs; inherit (inputs) starknet-devnet-src; @@ -92,6 +94,7 @@ scarb universal-sierra-compiler wasm-simapp + osmosis ; }; diff --git a/relayer/Cargo.lock b/relayer/Cargo.lock index ffd1966d..eb2bc018 100644 --- a/relayer/Cargo.lock +++ b/relayer/Cargo.lock @@ -1942,7 +1942,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermes-any-counterparty" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "hermes-cosmos-chain-components", @@ -1959,7 +1959,7 @@ dependencies = [ [[package]] name = "hermes-async-runtime-components" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "async-trait", "cgp", @@ -1982,7 +1982,7 @@ dependencies = [ [[package]] name = "hermes-chain-components" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "hermes-chain-type-components", @@ -1993,7 +1993,7 @@ dependencies = [ [[package]] name = "hermes-chain-type-components" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", ] @@ -2001,7 +2001,7 @@ dependencies = [ [[package]] name = "hermes-cli-components" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "clap", @@ -2019,7 +2019,7 @@ dependencies = [ [[package]] name = "hermes-comet-light-client-components" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "hermes-chain-type-components", @@ -2028,7 +2028,7 @@ dependencies = [ [[package]] name = "hermes-comet-light-client-context" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "eyre", @@ -2044,7 +2044,7 @@ dependencies = [ [[package]] name = "hermes-cosmos-chain-components" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "bech32 0.9.1", "cgp", @@ -2086,7 +2086,7 @@ dependencies = [ [[package]] name = "hermes-cosmos-encoding-components" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "hermes-encoding-components", @@ -2100,7 +2100,7 @@ dependencies = [ [[package]] name = "hermes-cosmos-integration-tests" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "eyre", @@ -2134,7 +2134,7 @@ dependencies = [ [[package]] name = "hermes-cosmos-relayer" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "dirs-next", @@ -2185,7 +2185,7 @@ dependencies = [ [[package]] name = "hermes-cosmos-test-components" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "hdpath", @@ -2212,7 +2212,7 @@ dependencies = [ [[package]] name = "hermes-cosmos-wasm-relayer" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "eyre", @@ -2263,7 +2263,7 @@ dependencies = [ [[package]] name = "hermes-encoding-components" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", ] @@ -2271,7 +2271,7 @@ dependencies = [ [[package]] name = "hermes-error" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "eyre", @@ -2281,7 +2281,7 @@ dependencies = [ [[package]] name = "hermes-ibc-test-suite" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "hermes-logging-components", @@ -2292,7 +2292,7 @@ dependencies = [ [[package]] name = "hermes-logger" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "hermes-logging-components", @@ -2304,7 +2304,7 @@ dependencies = [ [[package]] name = "hermes-logging-components" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", ] @@ -2312,7 +2312,7 @@ dependencies = [ [[package]] name = "hermes-protobuf-encoding-components" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "hermes-encoding-components", @@ -2323,7 +2323,7 @@ dependencies = [ [[package]] name = "hermes-relayer-components" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "hermes-chain-components", @@ -2336,7 +2336,7 @@ dependencies = [ [[package]] name = "hermes-relayer-components-extra" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "hermes-chain-type-components", @@ -2348,7 +2348,7 @@ dependencies = [ [[package]] name = "hermes-runtime" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "hermes-async-runtime-components", @@ -2360,7 +2360,7 @@ dependencies = [ [[package]] name = "hermes-runtime-components" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", ] @@ -2479,6 +2479,7 @@ dependencies = [ "hermes-starknet-relayer", "hermes-starknet-test-components", "hermes-test-components", + "hermes-wasm-test-components", "ibc", "ibc-proto", "prost", @@ -2487,7 +2488,9 @@ dependencies = [ "serde_json", "sha2 0.10.8", "starknet", + "tendermint-rpc", "tokio", + "toml", "tracing", "url", ] @@ -2528,7 +2531,7 @@ dependencies = [ [[package]] name = "hermes-test-components" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "hermes-chain-type-components", @@ -2540,7 +2543,7 @@ dependencies = [ [[package]] name = "hermes-tokio-runtime-components" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "futures", @@ -2554,7 +2557,7 @@ dependencies = [ [[package]] name = "hermes-tracing-logging-components" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "hermes-logging-components", @@ -2566,7 +2569,7 @@ dependencies = [ [[package]] name = "hermes-wasm-client-components" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "hermes-cosmos-chain-components", @@ -2585,7 +2588,7 @@ dependencies = [ [[package]] name = "hermes-wasm-encoding-components" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "hermes-cosmos-encoding-components", @@ -2599,7 +2602,7 @@ dependencies = [ [[package]] name = "hermes-wasm-test-components" version = "0.1.0" -source = "git+https://github.com/informalsystems/hermes-sdk.git#e7bbfad66cf3bcd10f204c705b206252f7f10e2e" +source = "git+https://github.com/informalsystems/hermes-sdk.git#c262e33a44149267cbd3c992739e6f7626536832" dependencies = [ "cgp", "hermes-chain-type-components", @@ -4654,7 +4657,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" dependencies = [ "anyhow", - "itertools 0.13.0", + "itertools 0.12.1", "proc-macro2", "quote", "syn 2.0.87", diff --git a/relayer/Cargo.toml b/relayer/Cargo.toml index 779d548b..a27f55fb 100644 --- a/relayer/Cargo.toml +++ b/relayer/Cargo.toml @@ -53,6 +53,7 @@ http = { version = "1.0.0" } ibc = { version = "0.56.0" } ibc-proto = { version = "0.51.1" } ibc-client-starknet-types = { version = "0.1.0" } +tendermint-rpc = { version = "0.40" } hermes-runtime-components = { version = "0.1.0" } hermes-async-runtime-components = { version = "0.1.0" } @@ -74,6 +75,7 @@ hermes-cosmos-test-components = { version = "0.1.0" } hermes-cosmos-integration-tests = { version = "0.1.0" } hermes-any-counterparty = { version = "0.1.0" } hermes-wasm-client-components = { version = "0.1.0" } +hermes-wasm-test-components = { version = "0.1.0" } hermes-wasm-encoding-components = { version = "0.1.0" } hermes-cli-components = { version = "0.1.0" } hermes-test-components = { version = "0.1.0" } diff --git a/relayer/crates/starknet-integration-tests/Cargo.toml b/relayer/crates/starknet-integration-tests/Cargo.toml index 5c458cc3..8841043b 100644 --- a/relayer/crates/starknet-integration-tests/Cargo.toml +++ b/relayer/crates/starknet-integration-tests/Cargo.toml @@ -22,14 +22,16 @@ hermes-starknet-test-components = { workspace = true } hermes-starknet-chain-context = { workspace = true } hermes-starknet-relayer = { workspace = true } hermes-cosmos-test-components = { workspace = true } +hermes-wasm-test-components = { workspace = true } hermes-chain-components = { workspace = true } hermes-cosmos-chain-components = { workspace = true } hermes-cosmos-integration-tests = { workspace = true } hermes-cosmos-relayer = { workspace = true } hermes-cosmos-wasm-relayer = { workspace = true } -ibc = { workspace = true } -ibc-proto = { workspace = true } +ibc = { workspace = true } +ibc-proto = { workspace = true } +tendermint-rpc = { workspace = true } starknet = { workspace = true } url = { workspace = true } @@ -38,6 +40,7 @@ tokio = { workspace = true } serde_json = { workspace = true } rand = { workspace = true } sha2 = { workspace = true } +toml = { workspace = true } prost = { workspace = true } prost-types = { workspace = true } tracing = { workspace = true } diff --git a/relayer/crates/starknet-integration-tests/src/contexts/mod.rs b/relayer/crates/starknet-integration-tests/src/contexts/mod.rs index dce731ca..9e0d0983 100644 --- a/relayer/crates/starknet-integration-tests/src/contexts/mod.rs +++ b/relayer/crates/starknet-integration-tests/src/contexts/mod.rs @@ -1,2 +1,3 @@ pub mod bootstrap; pub mod chain_driver; +pub mod osmosis_bootstrap; diff --git a/relayer/crates/starknet-integration-tests/src/contexts/osmosis_bootstrap.rs b/relayer/crates/starknet-integration-tests/src/contexts/osmosis_bootstrap.rs new file mode 100644 index 00000000..679fa7f1 --- /dev/null +++ b/relayer/crates/starknet-integration-tests/src/contexts/osmosis_bootstrap.rs @@ -0,0 +1,121 @@ +use std::path::PathBuf; + +use cgp::core::component::UseContext; +use cgp::core::error::{ErrorRaiserComponent, ErrorTypeComponent}; +use cgp::core::field::impls::use_field::WithField; +use cgp::core::types::impls::WithType; +use cgp::prelude::*; +use hermes_cosmos_chain_components::types::config::gas::dynamic_gas_config::DynamicGasConfig; +use hermes_cosmos_integration_tests::impls::bootstrap::build_cosmos_chain::BuildCosmosChainWithNodeConfig; +use hermes_cosmos_integration_tests::impls::bootstrap::build_cosmos_chain_driver::BuildCosmosChainDriver; +use hermes_cosmos_integration_tests::impls::bootstrap::relayer_chain_config::BuildRelayerChainConfig; +use hermes_cosmos_integration_tests::impls::bootstrap::types::ProvideCosmosBootstrapChainTypes; +use hermes_cosmos_integration_tests::traits::bootstrap::build_chain::ChainBuilderWithNodeConfigComponent; +use hermes_cosmos_integration_tests::traits::bootstrap::compat_mode::{ + CompatModeGetterComponent, UseCompatMode37, +}; +use hermes_cosmos_integration_tests::traits::bootstrap::cosmos_builder::CosmosBuilderGetterComponent; +use hermes_cosmos_integration_tests::traits::bootstrap::relayer_chain_config::RelayerChainConfigBuilderComponent; +use hermes_cosmos_relayer::contexts::build::CosmosBuilder; +use hermes_cosmos_test_components::bootstrap::components::cosmos_sdk_legacy::*; +use hermes_cosmos_test_components::bootstrap::impls::chain::build_wait::BuildAndWaitChainDriver; +use hermes_cosmos_test_components::bootstrap::impls::generator::wallet_config::GenerateStandardWalletConfig; +use hermes_cosmos_test_components::bootstrap::impls::modifiers::no_modify_comet_config::NoModifyCometConfig; +use hermes_cosmos_test_components::bootstrap::impls::modifiers::no_modify_cosmos_sdk_config::NoModifyCosmosSdkConfig; +use hermes_cosmos_test_components::bootstrap::impls::modifiers::no_modify_genesis_config::NoModifyGenesisConfig; +use hermes_cosmos_test_components::bootstrap::traits::chain::build_chain_driver::ChainDriverBuilderComponent; +use hermes_cosmos_test_components::bootstrap::traits::fields::account_prefix::AccountPrefixGetterComponent; +use hermes_cosmos_test_components::bootstrap::traits::fields::chain_command_path::ChainCommandPathGetterComponent; +use hermes_cosmos_test_components::bootstrap::traits::fields::chain_store_dir::ChainStoreDirGetterComponent; +use hermes_cosmos_test_components::bootstrap::traits::fields::denom::DenomPrefixGetterComponent; +use hermes_cosmos_test_components::bootstrap::traits::fields::dynamic_gas_fee::DynamicGasGetterComponent; +use hermes_cosmos_test_components::bootstrap::traits::fields::random_id::RandomIdFlagGetterComponent; +use hermes_cosmos_test_components::bootstrap::traits::generator::generate_wallet_config::WalletConfigGeneratorComponent; +use hermes_cosmos_test_components::bootstrap::traits::modifiers::modify_comet_config::CometConfigModifierComponent; +use hermes_cosmos_test_components::bootstrap::traits::modifiers::modify_cosmos_sdk_config::CosmosSdkConfigModifierComponent; +use hermes_cosmos_test_components::bootstrap::traits::modifiers::modify_genesis_config::CosmosGenesisConfigModifierComponent; +use hermes_error::handlers::debug::DebugError; +use hermes_error::impls::ProvideHermesError; +use hermes_runtime::types::runtime::HermesRuntime; +use hermes_runtime_components::traits::runtime::{RuntimeGetterComponent, RuntimeTypeComponent}; +use hermes_test_components::chain_driver::traits::types::chain::ChainTypeComponent; +use hermes_test_components::driver::traits::types::chain_driver::ChainDriverTypeComponent; +use hermes_wasm_test_components::impls::bootstrap::build_chain_driver::BuildChainDriverAndInitWasmClient; +use hermes_wasm_test_components::impls::bootstrap::genesis_config::ModifyWasmGenesisConfig; +use hermes_wasm_test_components::impls::bootstrap::node_config::ModifyWasmNodeConfig; +use hermes_wasm_test_components::traits::bootstrap::client_byte_code::WasmClientByteCodeGetterComponent; +use hermes_wasm_test_components::traits::bootstrap::gov_authority::GovernanceProposalAuthorityGetterComponent; + +/** + A bootstrap context for bootstrapping a new Cosmos chain, and builds + a `CosmosChainDriver`. +*/ +#[derive(HasField)] +pub struct OsmosisBootstrap { + pub runtime: HermesRuntime, + pub cosmos_builder: CosmosBuilder, + pub should_randomize_identifiers: bool, + pub chain_store_dir: PathBuf, + pub chain_command_path: PathBuf, + pub account_prefix: String, + pub staking_denom_prefix: String, + pub transfer_denom_prefix: String, + pub wasm_client_byte_code: Vec, + pub governance_proposal_authority: String, + pub dynamic_gas: Option, +} + +impl CanUseLegacyCosmosSdkChainBootstrapper for OsmosisBootstrap {} + +pub struct OsmosisBootstrapComponents; + +impl HasComponents for OsmosisBootstrap { + type Components = OsmosisBootstrapComponents; +} + +impl DelegateComponent for OsmosisBootstrapComponents +where + Self: IsLegacyCosmosSdkBootstrapComponents, +{ + type Delegate = LegacyCosmosSdkBootstrapComponents; +} + +delegate_components! { + OsmosisBootstrapComponents { + ErrorTypeComponent: ProvideHermesError, + ErrorRaiserComponent: DebugError, + RuntimeTypeComponent: WithType, + RuntimeGetterComponent: WithField, + WalletConfigGeneratorComponent: GenerateStandardWalletConfig, + [ + ChainTypeComponent, + ChainDriverTypeComponent, + ]: + ProvideCosmosBootstrapChainTypes, + [ + ChainStoreDirGetterComponent, + ChainCommandPathGetterComponent, + AccountPrefixGetterComponent, + DenomPrefixGetterComponent, + DynamicGasGetterComponent, + RandomIdFlagGetterComponent, + WasmClientByteCodeGetterComponent, + GovernanceProposalAuthorityGetterComponent, + CosmosBuilderGetterComponent, + ]: + UseContext, + CosmosSdkConfigModifierComponent: + NoModifyCosmosSdkConfig, + RelayerChainConfigBuilderComponent: + BuildRelayerChainConfig, + ChainBuilderWithNodeConfigComponent: + BuildCosmosChainWithNodeConfig, + ChainDriverBuilderComponent: + BuildChainDriverAndInitWasmClient>, + CosmosGenesisConfigModifierComponent: + ModifyWasmGenesisConfig, + CometConfigModifierComponent: + ModifyWasmNodeConfig, + CompatModeGetterComponent: UseCompatMode37, + } +} diff --git a/relayer/crates/starknet-integration-tests/src/lib.rs b/relayer/crates/starknet-integration-tests/src/lib.rs index 4c4e8044..392380c0 100644 --- a/relayer/crates/starknet-integration-tests/src/lib.rs +++ b/relayer/crates/starknet-integration-tests/src/lib.rs @@ -1,5 +1,7 @@ #![recursion_limit = "256"] +extern crate alloc; + pub mod contexts; #[cfg(test)] diff --git a/relayer/crates/starknet-integration-tests/src/tests/light_client.rs b/relayer/crates/starknet-integration-tests/src/tests/light_client.rs index 79936c87..832cced9 100644 --- a/relayer/crates/starknet-integration-tests/src/tests/light_client.rs +++ b/relayer/crates/starknet-integration-tests/src/tests/light_client.rs @@ -8,6 +8,8 @@ use std::time::{Duration, SystemTime, UNIX_EPOCH}; use flate2::write::GzEncoder; use flate2::Compression; use hermes_cosmos_chain_components::traits::message::ToCosmosMessage; +use hermes_cosmos_chain_components::types::config::gas::dynamic_gas_config::DynamicGasConfig; +use hermes_cosmos_chain_components::types::config::gas::eip_type::EipQueryType; use hermes_cosmos_chain_components::types::messages::channel::open_ack::CosmosChannelOpenAckMessage; use hermes_cosmos_chain_components::types::messages::channel::open_init::CosmosChannelOpenInitMessage; use hermes_cosmos_chain_components::types::messages::connection::open_ack::CosmosConnectionOpenAckMessage; @@ -16,7 +18,6 @@ use hermes_cosmos_integration_tests::init::init_test_runtime; use hermes_cosmos_relayer::contexts::build::CosmosBuilder; use hermes_cosmos_relayer::contexts::chain::CosmosChain; use hermes_cosmos_relayer::contexts::encoding::CosmosEncoding; -use hermes_cosmos_wasm_relayer::context::cosmos_bootstrap::CosmosWithWasmClientBootstrap; use hermes_encoding_components::traits::convert::CanConvert; use hermes_error::types::Error; use hermes_relayer_components::chain::traits::payload_builders::create_client::CanBuildCreateClientPayload; @@ -47,6 +48,7 @@ use starknet::macros::short_string; use tracing::info; use crate::contexts::bootstrap::StarknetBootstrap; +use crate::contexts::osmosis_bootstrap::OsmosisBootstrap; #[test] fn test_starknet_light_client() -> Result<(), Error> { @@ -81,20 +83,23 @@ fn test_starknet_light_client() -> Result<(), Error> { encoder.finish()? }; - info!("Reduced wasm client code size from {} to {} bytes", wasm_client_byte_code.len(), wasm_client_byte_code_gzip.len()); - - let cosmos_bootstrap = Arc::new(CosmosWithWasmClientBootstrap { + let cosmos_bootstrap = Arc::new(OsmosisBootstrap { runtime: runtime.clone(), cosmos_builder, should_randomize_identifiers: true, chain_store_dir: store_dir.join("chains"), - chain_command_path: "simd".into(), - account_prefix: "cosmos".into(), + chain_command_path: "osmosisd".into(), + account_prefix: "osmo".into(), staking_denom_prefix: "stake".into(), transfer_denom_prefix: "coin".into(), wasm_client_byte_code: wasm_client_byte_code_gzip, - governance_proposal_authority: "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn".into(), // TODO: don't hard code this - dynamic_gas: None, + governance_proposal_authority: "osmo10d07y265gmmuvt4z0w9aw880jnsr700jjeq4qp".into(), // TODO: don't hard code this + dynamic_gas: Some(DynamicGasConfig { + multiplier: 1.1, + max: 1.6, + eip_query_type: EipQueryType::Osmosis, + denom: "stake".to_owned(), + }), }); let starknet_bootstrap = StarknetBootstrap {