From 03c7620e4878816f000a1844b39168ed865666f7 Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Mon, 27 Nov 2023 22:55:28 +0000 Subject: [PATCH 01/11] clean up --- ci/cw-check/Cargo.lock | 313 +++++++++++++---------------------------- ci/cw-check/Cargo.toml | 11 +- ci/cw-check/README.md | 1 + ci/cw-check/src/lib.rs | 8 +- 4 files changed, 107 insertions(+), 226 deletions(-) create mode 100644 ci/cw-check/README.md diff --git a/ci/cw-check/Cargo.lock b/ci/cw-check/Cargo.lock index 3a32eebf2..65c2e8007 100644 --- a/ci/cw-check/Cargo.lock +++ b/ci/cw-check/Cargo.lock @@ -33,9 +33,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "base16ct" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] name = "base64" @@ -55,6 +55,12 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + [[package]] name = "block-buffer" version = "0.9.0" @@ -75,9 +81,9 @@ dependencies = [ [[package]] name = "bnum" -version = "0.7.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "845141a4fade3f790628b7daaaa298a25b204fb28907eb54febe5142db6ce653" +checksum = "ab9008b6bb9fc80b5277f2fe481c09e828743d9151203e804583eb4c9e15b31d" [[package]] name = "byte-slice-cast" @@ -114,11 +120,12 @@ checksum = "795bc6e66a8e340f075fcf6227e417a2dc976b92b91f3cdc778bb858778b6747" [[package]] name = "cosmwasm-crypto" -version = "1.3.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e272708a9745dad8b591ef8a718571512130f2b39b33e3d7a27c558e3069394" +checksum = "d8bb3c77c3b7ce472056968c745eb501c440fbc07be5004eba02782c35bfbbe3" dependencies = [ "digest 0.10.7", + "ecdsa", "ed25519-zebra", "k256", "rand_core 0.6.4", @@ -127,18 +134,18 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.3.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "296db6a3caca5283425ae0cf347f4e46999ba3f6620dbea8939a0e00347831ce" +checksum = "fea73e9162e6efde00018d55ed0061e93a108b5d6ec4548b4f8ce3c706249687" dependencies = [ "syn 1.0.109", ] [[package]] name = "cosmwasm-schema" -version = "1.3.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63c337e097a089e5b52b5d914a7ff6613332777f38ea6d9d36e1887cd0baa72e" +checksum = "0df41ea55f2946b6b43579659eec048cc2f66e8c8e2e3652fc5e5e476f673856" dependencies = [ "cosmwasm-schema-derive", "schemars", @@ -149,9 +156,9 @@ dependencies = [ [[package]] name = "cosmwasm-schema-derive" -version = "1.3.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "766cc9e7c1762d8fc9c0265808910fcad755200cd0e624195a491dd885a61169" +checksum = "43609e92ce1b9368aa951b334dd354a2d0dd4d484931a5f83ae10e12a26c8ba9" dependencies = [ "proc-macro2", "quote", @@ -160,11 +167,12 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.3.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5e05a95fd2a420cca50f4e94eb7e70648dac64db45e90403997ebefeb143bd" +checksum = "04d6864742e3a7662d024b51a94ea81c9af21db6faea2f9a6d2232bb97c6e53e" dependencies = [ - "base64 0.13.1", + "base64 0.21.2", + "bech32", "bnum", "cosmwasm-crypto", "cosmwasm-derive", @@ -175,6 +183,7 @@ dependencies = [ "serde", "serde-json-wasm 0.5.1", "sha2 0.10.8", + "static_assertions", "thiserror", ] @@ -195,9 +204,9 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "crypto-bigint" -version = "0.4.9" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", "rand_core 0.6.4", @@ -228,26 +237,14 @@ dependencies = [ "zeroize", ] -[[package]] -name = "curve25519-dalek-ng" -version = "4.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.6.4", - "subtle-ng", - "zeroize", -] - [[package]] name = "cw-check" version = "0.1.0" dependencies = [ "cosmwasm-schema", "cosmwasm-std", - "ibc", + "ibc-apps", + "ibc-core", "serde-json-wasm 1.0.0", "thiserror", ] @@ -287,16 +284,6 @@ dependencies = [ "syn 2.0.28", ] -[[package]] -name = "der" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" -dependencies = [ - "const-oid", - "zeroize", -] - [[package]] name = "der" version = "0.7.7" @@ -345,6 +332,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", + "const-oid", "crypto-common", "subtle", ] @@ -368,14 +356,16 @@ checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" [[package]] name = "ecdsa" -version = "0.14.8" +version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ - "der 0.6.1", + "der", + "digest 0.10.7", "elliptic-curve", "rfc6979", - "signature 1.6.4", + "signature", + "spki", ] [[package]] @@ -384,21 +374,8 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fb04eee5d9d907f29e80ee6b0e78f7e2c82342c63e3580d8c4f69d9d5aad963" dependencies = [ - "pkcs8 0.10.2", - "signature 2.1.0", -] - -[[package]] -name = "ed25519-consensus" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c8465edc8ee7436ffea81d21a019b16676ee3db267aa8d5a8d729581ecf998b" -dependencies = [ - "curve25519-dalek-ng", - "hex", - "rand_core 0.6.4", - "sha2 0.9.9", - "zeroize", + "pkcs8", + "signature", ] [[package]] @@ -424,18 +401,17 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "elliptic-curve" -version = "0.12.3" +version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct", "crypto-bigint", - "der 0.6.1", "digest 0.10.7", "ff", "generic-array", "group", - "pkcs8 0.9.0", + "pkcs8", "rand_core 0.6.4", "sec1", "subtle", @@ -448,11 +424,21 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +[[package]] +name = "eyre" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80f656be11ddf91bd709454d15d5bd896fbaf4cc3314e69349e4d1569f5b46cd" +dependencies = [ + "indenter", + "once_cell", +] + [[package]] name = "ff" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ "rand_core 0.6.4", "subtle", @@ -473,6 +459,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c606d892c9de11507fa0dcffc116434f94e105d0bbdc4e405b61519464c49d7b" dependencies = [ + "eyre", "paste", ] @@ -557,6 +544,7 @@ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", + "zeroize", ] [[package]] @@ -572,9 +560,9 @@ dependencies = [ [[package]] name = "group" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", "rand_core 0.6.4", @@ -611,18 +599,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "ibc" -version = "0.48.1" -dependencies = [ - "ibc-apps", - "ibc-clients", - "ibc-core", - "ibc-core-host-cosmos", - "ibc-derive", - "ibc-primitives", -] - [[package]] name = "ibc-app-transfer" version = "0.48.1" @@ -643,6 +619,7 @@ dependencies = [ "parity-scale-codec", "primitive-types", "scale-info", + "schemars", "serde", "uint", ] @@ -654,49 +631,6 @@ dependencies = [ "ibc-app-transfer", ] -[[package]] -name = "ibc-client-tendermint" -version = "0.48.1" -dependencies = [ - "ibc-client-tendermint-types", - "ibc-core-client", - "ibc-core-commitment-types", - "ibc-core-handler-types", - "ibc-core-host", - "ibc-primitives", - "prost", - "serde", - "tendermint", - "tendermint-light-client-verifier", -] - -[[package]] -name = "ibc-client-tendermint-types" -version = "0.48.1" -dependencies = [ - "bytes", - "displaydoc", - "ibc-core-client-types", - "ibc-core-commitment-types", - "ibc-core-host-types", - "ibc-primitives", - "ibc-proto", - "parity-scale-codec", - "prost", - "scale-info", - "serde", - "tendermint", - "tendermint-light-client-verifier", - "tendermint-proto", -] - -[[package]] -name = "ibc-clients" -version = "0.48.1" -dependencies = [ - "ibc-client-tendermint", -] - [[package]] name = "ibc-core" version = "0.48.1" @@ -741,6 +675,7 @@ dependencies = [ "parity-scale-codec", "prost", "scale-info", + "schemars", "serde", "sha2 0.10.8", "subtle-encoding", @@ -790,6 +725,7 @@ dependencies = [ "parity-scale-codec", "prost", "scale-info", + "schemars", "serde", "subtle-encoding", "tendermint", @@ -807,6 +743,7 @@ dependencies = [ "parity-scale-codec", "prost", "scale-info", + "schemars", "serde", "subtle-encoding", ] @@ -837,6 +774,7 @@ dependencies = [ "parity-scale-codec", "prost", "scale-info", + "schemars", "serde", "subtle-encoding", "tendermint", @@ -873,6 +811,7 @@ dependencies = [ "parity-scale-codec", "prost", "scale-info", + "schemars", "serde", "subtle-encoding", "tendermint", @@ -896,31 +835,6 @@ dependencies = [ "subtle-encoding", ] -[[package]] -name = "ibc-core-host-cosmos" -version = "0.48.1" -dependencies = [ - "derive_more", - "displaydoc", - "ibc-app-transfer-types", - "ibc-client-tendermint", - "ibc-core-client-context", - "ibc-core-client-types", - "ibc-core-commitment-types", - "ibc-core-connection-types", - "ibc-core-handler-types", - "ibc-core-host-types", - "ibc-primitives", - "ibc-proto", - "parity-scale-codec", - "prost", - "scale-info", - "serde", - "sha2 0.10.8", - "subtle-encoding", - "tendermint", -] - [[package]] name = "ibc-core-host-types" version = "0.48.1" @@ -930,6 +844,7 @@ dependencies = [ "ibc-primitives", "parity-scale-codec", "scale-info", + "schemars", "serde", ] @@ -960,6 +875,7 @@ dependencies = [ "parity-scale-codec", "prost", "scale-info", + "schemars", "serde", "subtle-encoding", "tendermint", @@ -985,6 +901,7 @@ dependencies = [ "parity-scale-codec", "prost", "scale-info", + "schemars", "serde", "tendermint", "time", @@ -1003,6 +920,7 @@ dependencies = [ "parity-scale-codec", "prost", "scale-info", + "schemars", "serde", "subtle-encoding", "tendermint-proto", @@ -1051,6 +969,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + [[package]] name = "indexmap" version = "2.0.0" @@ -1088,14 +1012,16 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "k256" -version = "0.11.6" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c1e0b51e7ec0a97369623508396067a486bd0cbed95a2659a4b863d28cfc8b" +checksum = "3f01b677d82ef7a676aa37e099defd83a28e15687112cafdd112d60236b6115b" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", + "once_cell", "sha2 0.10.8", + "signature", ] [[package]] @@ -1193,24 +1119,14 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkcs8" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" -dependencies = [ - "der 0.6.1", - "spki 0.6.0", -] - [[package]] name = "pkcs8" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.7", - "spki 0.7.2", + "der", + "spki", ] [[package]] @@ -1301,13 +1217,12 @@ dependencies = [ [[package]] name = "rfc6979" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" dependencies = [ - "crypto-bigint", "hmac", - "zeroize", + "subtle", ] [[package]] @@ -1351,9 +1266,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.12" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" +checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" dependencies = [ "dyn-clone", "schemars_derive", @@ -1363,9 +1278,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.12" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" +checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" dependencies = [ "proc-macro2", "quote", @@ -1375,14 +1290,14 @@ dependencies = [ [[package]] name = "sec1" -version = "0.3.0" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct", - "der 0.6.1", + "der", "generic-array", - "pkcs8 0.9.0", + "pkcs8", "subtle", "zeroize", ] @@ -1501,30 +1416,14 @@ dependencies = [ "keccak", ] -[[package]] -name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" -dependencies = [ - "digest 0.10.7", - "rand_core 0.6.4", -] - [[package]] name = "signature" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" - -[[package]] -name = "spki" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" dependencies = [ - "base64ct", - "der 0.6.1", + "digest 0.10.7", + "rand_core 0.6.4", ] [[package]] @@ -1534,7 +1433,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", - "der 0.7.7", + "der", ] [[package]] @@ -1564,12 +1463,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "subtle-ng" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" - [[package]] name = "syn" version = "1.0.109" @@ -1601,7 +1494,6 @@ dependencies = [ "bytes", "digest 0.10.7", "ed25519", - "ed25519-consensus", "flex-error", "futures", "num-traits", @@ -1612,8 +1504,7 @@ dependencies = [ "serde_bytes", "serde_json", "serde_repr", - "sha2 0.10.8", - "signature 2.1.0", + "signature", "subtle", "subtle-encoding", "tendermint-proto", @@ -1621,19 +1512,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "tendermint-light-client-verifier" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74994da9de4b1144837a367ca2c60c650f5526a7c1a54760a3020959b522e474" -dependencies = [ - "derive_more", - "flex-error", - "serde", - "tendermint", - "time", -] - [[package]] name = "tendermint-proto" version = "0.34.0" @@ -1678,6 +1556,7 @@ version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" dependencies = [ + "serde", "time-core", "time-macros", ] @@ -1761,9 +1640,9 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" dependencies = [ "zeroize_derive", ] diff --git a/ci/cw-check/Cargo.toml b/ci/cw-check/Cargo.toml index 12d7e8076..6cde096a8 100644 --- a/ci/cw-check/Cargo.toml +++ b/ci/cw-check/Cargo.toml @@ -7,11 +7,12 @@ version = "0.1.0" crate-type = ["cdylib", "rlib"] [dependencies] -ibc = { path = "../../ibc", default_features = false, features = ["serde", "parity-scale-codec"] } -cosmwasm-std = { version = "1.2.5", default-features = false } -cosmwasm-schema = { version = "1.2.5", default-features = false } -serde_json = { package = "serde-json-wasm", version = "1.0.0", default-features = false } -thiserror = { version = "*", default-features = false } +ibc-apps = { path = "../../ibc-apps", default_features = false, features = ["serde", "parity-scale-codec", "schema", "std"] } +ibc-core = { path = "../../ibc-core", default_features = false, features = ["serde", "parity-scale-codec", "schema", "std"] } +cosmwasm-std = { version = "^1.5.0", default-features = false } +cosmwasm-schema = { version = "^1.5.0", default-features = false } +serde_json = { package = "serde-json-wasm", version = "^1.0.0", default-features = false } +thiserror = { version = "^1.0", default-features = false } [profile.release] lto = true diff --git a/ci/cw-check/README.md b/ci/cw-check/README.md new file mode 100644 index 000000000..5223d4bb8 --- /dev/null +++ b/ci/cw-check/README.md @@ -0,0 +1 @@ +CosmWasm is `std` targeting `wasm32-unknown-unknown` with `stable` rust which provides precompiled extensions `alloc/core/std` which has only features available in `wasmd` runner and passed `cosmwasm-check` \ No newline at end of file diff --git a/ci/cw-check/src/lib.rs b/ci/cw-check/src/lib.rs index 185e0270f..7ebe4effb 100644 --- a/ci/cw-check/src/lib.rs +++ b/ci/cw-check/src/lib.rs @@ -3,10 +3,10 @@ use std::str::FromStr; use cosmwasm_schema::cw_serde; use cosmwasm_std::{DepsMut, Env, MessageInfo, Response}; -use ibc::apps::transfer::types::msgs::transfer::MsgTransfer; -use ibc::apps::transfer::types::packet::PacketData; -use ibc::apps::transfer::types::{Amount, BaseDenom, PrefixedCoin, PrefixedDenom, TracePath}; -use ibc::core::host::types::identifiers::*; +use ibc_apps::transfer::types::msgs::transfer::MsgTransfer; +use ibc_apps::transfer::types::packet::PacketData; +use ibc_apps::transfer::types::{Amount, BaseDenom, PrefixedCoin, PrefixedDenom, TracePath}; +use ibc_core::host::types::identifiers::*; use thiserror::Error; #[cw_serde] From 68fa07380926693a7e6ff4df07ae69e57ba2bf5d Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Mon, 27 Nov 2023 23:01:52 +0000 Subject: [PATCH 02/11] remaining --- .../improvements/991-making-cosmwasm-compule-app-transfers.md | 2 ++ ibc-apps/ics20-transfer/types/Cargo.toml | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .changelog/unreleased/improvements/991-making-cosmwasm-compule-app-transfers.md diff --git a/.changelog/unreleased/improvements/991-making-cosmwasm-compule-app-transfers.md b/.changelog/unreleased/improvements/991-making-cosmwasm-compule-app-transfers.md new file mode 100644 index 000000000..2cb2e1af2 --- /dev/null +++ b/.changelog/unreleased/improvements/991-making-cosmwasm-compule-app-transfers.md @@ -0,0 +1,2 @@ +- Reduce vector allocations in Commitment computation. + ([\#991](https://github.com/cosmos/ibc-rs/pull/991)) diff --git a/ibc-apps/ics20-transfer/types/Cargo.toml b/ibc-apps/ics20-transfer/types/Cargo.toml index 150ba8d63..04ca63c87 100644 --- a/ibc-apps/ics20-transfer/types/Cargo.toml +++ b/ibc-apps/ics20-transfer/types/Cargo.toml @@ -46,7 +46,6 @@ std = [ "serde_json/std", "displaydoc/std", "uint/std", - "primitive-types/std", "ibc-core/std", "ibc-proto/std", ] From b1d29c45d35a4281c49f239ced36ef2d0c01972f Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Mon, 27 Nov 2023 23:02:23 +0000 Subject: [PATCH 03/11] up --- .../improvements/991-making-cosmwasm-compule-app-transfers.md | 2 -- .../improvements/992-making-cosmwasm-compile-apps-transfers.md | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 .changelog/unreleased/improvements/991-making-cosmwasm-compule-app-transfers.md create mode 100644 .changelog/unreleased/improvements/992-making-cosmwasm-compile-apps-transfers.md diff --git a/.changelog/unreleased/improvements/991-making-cosmwasm-compule-app-transfers.md b/.changelog/unreleased/improvements/991-making-cosmwasm-compule-app-transfers.md deleted file mode 100644 index 2cb2e1af2..000000000 --- a/.changelog/unreleased/improvements/991-making-cosmwasm-compule-app-transfers.md +++ /dev/null @@ -1,2 +0,0 @@ -- Reduce vector allocations in Commitment computation. - ([\#991](https://github.com/cosmos/ibc-rs/pull/991)) diff --git a/.changelog/unreleased/improvements/992-making-cosmwasm-compile-apps-transfers.md b/.changelog/unreleased/improvements/992-making-cosmwasm-compile-apps-transfers.md new file mode 100644 index 000000000..46724d8a1 --- /dev/null +++ b/.changelog/unreleased/improvements/992-making-cosmwasm-compile-apps-transfers.md @@ -0,0 +1,2 @@ +- Making cosmwasm compile apps transfers. + ([\#992](https://github.com/cosmos/ibc-rs/pull/992ss)) From 97e3df536396bff824a7bc777d1026e1d8c71a52 Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Mon, 27 Nov 2023 23:02:49 +0000 Subject: [PATCH 04/11] spelling --- .../992-making-cosmwasm-compile-apps-transfers.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.changelog/unreleased/improvements/992-making-cosmwasm-compile-apps-transfers.md b/.changelog/unreleased/improvements/992-making-cosmwasm-compile-apps-transfers.md index 46724d8a1..5d86e80c3 100644 --- a/.changelog/unreleased/improvements/992-making-cosmwasm-compile-apps-transfers.md +++ b/.changelog/unreleased/improvements/992-making-cosmwasm-compile-apps-transfers.md @@ -1,2 +1,2 @@ -- Making cosmwasm compile apps transfers. - ([\#992](https://github.com/cosmos/ibc-rs/pull/992ss)) +- Making cosmwasm compile apps transfers + ([\#992](https://github.com/cosmos/ibc-rs/pull/992)) From 982a0b9071ca44f8870c30289009bbd34ab44666 Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Mon, 27 Nov 2023 23:07:58 +0000 Subject: [PATCH 05/11] true check --- ci/cw-check/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/cw-check/README.md b/ci/cw-check/README.md index 5223d4bb8..a93e0d51e 100644 --- a/ci/cw-check/README.md +++ b/ci/cw-check/README.md @@ -1 +1 @@ -CosmWasm is `std` targeting `wasm32-unknown-unknown` with `stable` rust which provides precompiled extensions `alloc/core/std` which has only features available in `wasmd` runner and passed `cosmwasm-check` \ No newline at end of file +CosmWasm is `std` targeting `wasm32-unknown-unknown` with `stable` rust which provides precompiled extensions `alloc/core/std` which has only features available in `wasmd` runner and passed `cosmwasm-check` (precompile extensions check and cosmwasm-check are not same set). \ No newline at end of file From 8d92ad0486429bbfb9a181d962479c852dcf9346 Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Mon, 27 Nov 2023 23:15:47 +0000 Subject: [PATCH 06/11] better nix - features enabled + gh cache integration --- .github/workflows/cw-check.yaml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/cw-check.yaml b/.github/workflows/cw-check.yaml index f4a6a89dc..3ec2a9cf9 100644 --- a/.github/workflows/cw-check.yaml +++ b/.github/workflows/cw-check.yaml @@ -29,14 +29,8 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v4 - - - name: Install Nix - uses: cachix/install-nix-action@v22 - with: - nix_path: nixpkgs=channel:nixos-unstable - extra_nix_config: | - experimental-features = nix-command flakes - + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main - name: Run cw-check run: | cd ci/cw-check From a1dac42a261ac1c168d8e0d8ed6768b696018322 Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Mon, 27 Nov 2023 23:21:58 +0000 Subject: [PATCH 07/11] flag --- .github/workflows/cw-check.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cw-check.yaml b/.github/workflows/cw-check.yaml index 3ec2a9cf9..72e16df29 100644 --- a/.github/workflows/cw-check.yaml +++ b/.github/workflows/cw-check.yaml @@ -31,6 +31,8 @@ jobs: - uses: actions/checkout@v4 - uses: DeterminateSystems/nix-installer-action@main - uses: DeterminateSystems/magic-nix-cache-action@main + with: + is_ci : true - name: Run cw-check run: | cd ci/cw-check From 5a6ca5bf9a4ba3c14d5443aa5b49fd17d026a6e0 Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Fri, 1 Dec 2023 09:02:07 +0000 Subject: [PATCH 08/11] Update ci/cw-check/Cargo.toml Co-authored-by: Farhad Shabani Signed-off-by: dzmitry-lahoda --- ci/cw-check/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/cw-check/Cargo.toml b/ci/cw-check/Cargo.toml index 6cde096a8..f7b3d1769 100644 --- a/ci/cw-check/Cargo.toml +++ b/ci/cw-check/Cargo.toml @@ -7,8 +7,8 @@ version = "0.1.0" crate-type = ["cdylib", "rlib"] [dependencies] -ibc-apps = { path = "../../ibc-apps", default_features = false, features = ["serde", "parity-scale-codec", "schema", "std"] } -ibc-core = { path = "../../ibc-core", default_features = false, features = ["serde", "parity-scale-codec", "schema", "std"] } +ibc-apps = { path = "../../ibc-apps", default_features = false, features = ["serde", "parity-scale-codec"] } +ibc-core = { path = "../../ibc-core", features = ["serde", "parity-scale-codec", "schema"] } cosmwasm-std = { version = "^1.5.0", default-features = false } cosmwasm-schema = { version = "^1.5.0", default-features = false } serde_json = { package = "serde-json-wasm", version = "^1.0.0", default-features = false } From 2026aa9d01bc3e6178f77ccfb244148fc46b708d Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Fri, 1 Dec 2023 09:03:01 +0000 Subject: [PATCH 09/11] Update ci/cw-check/README.md Co-authored-by: Farhad Shabani Signed-off-by: dzmitry-lahoda --- ci/cw-check/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ci/cw-check/README.md b/ci/cw-check/README.md index a93e0d51e..0f5ba12cb 100644 --- a/ci/cw-check/README.md +++ b/ci/cw-check/README.md @@ -1 +1,5 @@ -CosmWasm is `std` targeting `wasm32-unknown-unknown` with `stable` rust which provides precompiled extensions `alloc/core/std` which has only features available in `wasmd` runner and passed `cosmwasm-check` (precompile extensions check and cosmwasm-check are not same set). \ No newline at end of file +# CosmWasm Check + +This crate contains a simple CosmWasm contract, which incorporates `ibc-rs`, to ensure the compatibility of `ibc-rs` with the CosmWasm environment. + +CosmWasm is `std` targeting `wasm32-unknown-unknown` with `stable` rust which provides precompiled extensions `alloc/core/std` which has only features available in `wasmd` runner and passed `cosmwasm-check` (precompile extensions check and cosmwasm-check are not same set). From d0a785a0f96474b6ec03427b61a61f2631083a21 Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Fri, 1 Dec 2023 09:03:19 +0000 Subject: [PATCH 10/11] Update .changelog/unreleased/improvements/992-making-cosmwasm-compile-apps-transfers.md Co-authored-by: Farhad Shabani Signed-off-by: dzmitry-lahoda --- .../992-making-cosmwasm-compile-apps-transfers.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.changelog/unreleased/improvements/992-making-cosmwasm-compile-apps-transfers.md b/.changelog/unreleased/improvements/992-making-cosmwasm-compile-apps-transfers.md index 5d86e80c3..961a043a6 100644 --- a/.changelog/unreleased/improvements/992-making-cosmwasm-compile-apps-transfers.md +++ b/.changelog/unreleased/improvements/992-making-cosmwasm-compile-apps-transfers.md @@ -1,2 +1,4 @@ -- Making cosmwasm compile apps transfers +- More rigorous CosmWasm check by upgrading dependencies and including `std` and + `schema` features for `ibc-core`. ([\#992](https://github.com/cosmos/ibc-rs/pull/992)) + From 45724dcc16e3edbdf7ab27fa54bd88ef1a68bcb9 Mon Sep 17 00:00:00 2001 From: dzmitry-lahoda Date: Fri, 1 Dec 2023 10:05:25 +0000 Subject: [PATCH 11/11] Update Cargo.toml Signed-off-by: dzmitry-lahoda --- ibc-apps/ics20-transfer/types/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/ibc-apps/ics20-transfer/types/Cargo.toml b/ibc-apps/ics20-transfer/types/Cargo.toml index 04ca63c87..150ba8d63 100644 --- a/ibc-apps/ics20-transfer/types/Cargo.toml +++ b/ibc-apps/ics20-transfer/types/Cargo.toml @@ -46,6 +46,7 @@ std = [ "serde_json/std", "displaydoc/std", "uint/std", + "primitive-types/std", "ibc-core/std", "ibc-proto/std", ]