diff --git a/orchestrator/Cargo.lock b/orchestrator/Cargo.lock index 0597e9c59..b17db30f5 100644 --- a/orchestrator/Cargo.lock +++ b/orchestrator/Cargo.lock @@ -97,7 +97,7 @@ dependencies = [ "futures-core", "futures-sink", "log", - "pin-project 0.4.28", + "pin-project 0.4.30", "tokio 0.2.25", "tokio-util 0.3.1", ] @@ -141,9 +141,9 @@ dependencies = [ [[package]] name = "actix-http" -version = "2.2.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "452299e87817ae5673910e53c243484ca38be3828db819b6011736fc6982e874" +checksum = "2be6b66b62a794a8e6d366ac9415bb7d475ffd1e9f4671f38c1d8a8a5df950b3" dependencies = [ "actix-codec 0.3.0", "actix-connect", @@ -154,7 +154,7 @@ dependencies = [ "actix-utils 2.0.0", "base64 0.13.0", "bitflags", - "brotli2", + "brotli", "bytes 0.5.6", "cookie", "copyless", @@ -316,7 +316,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0052435d581b5be835d11f4eb3bce417c8af18d87ddf8ace99f8e67e595882bb" dependencies = [ "futures-util", - "pin-project 0.4.28", + "pin-project 0.4.30", ] [[package]] @@ -408,7 +408,7 @@ dependencies = [ "futures-sink", "futures-util", "log", - "pin-project 0.4.28", + "pin-project 0.4.30", "slab", ] @@ -424,12 +424,12 @@ dependencies = [ [[package]] name = "actix-web" -version = "3.3.2" +version = "3.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e641d4a172e7faa0862241a20ff4f1f5ab0ab7c279f00c2d4587b77483477b86" +checksum = "b6534a126df581caf443ba2751cab42092c89b3f1d06a9d829b1e17edfe3e277" dependencies = [ "actix-codec 0.3.0", - "actix-http 2.2.0", + "actix-http 2.2.2", "actix-macros 0.1.3", "actix-router", "actix-rt 1.1.1", @@ -531,6 +531,21 @@ dependencies = [ "memchr", ] +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + [[package]] name = "anomaly" version = "0.2.0" @@ -652,7 +667,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b381e490e7b0cfc37ebc54079b0413d8093ef43d14a4e4747083f7fa47a9e691" dependencies = [ "actix-codec 0.3.0", - "actix-http 2.2.0", + "actix-http 2.2.2", "actix-rt 1.1.1", "actix-service 1.0.6", "base64 0.13.0", @@ -803,7 +818,7 @@ checksum = "c2d0f0fc59c7ba0333eed9dcc1b6980baa7b7a4dc7c6c5885994d0674f7adf34" dependencies = [ "bs58", "hkd32", - "hmac 0.11.0", + "hmac", "k256", "ripemd160", "sha2 0.9.8", @@ -811,27 +826,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "bitcoin" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a41df6ad9642c5c15ae312dd3d074de38fd3eb7cc87ad4ce10f90292a83fe4d" -dependencies = [ - "bech32 0.8.1", - "bitcoin_hashes", - "secp256k1 0.20.3", - "serde", -] - -[[package]] -name = "bitcoin_hashes" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006cc91e1a1d99819bc5b8214be3555c1f0611b169f527a1fdc54ed1f2b745b0" -dependencies = [ - "serde", -] - [[package]] name = "bitflags" version = "1.2.1" @@ -918,23 +912,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] -name = "brotli-sys" -version = "0.3.2" +name = "brotli" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4445dea95f4c2b41cde57cc9fee236ae4dbae88d8fcbdb4750fc1bb5d86aaecd" +checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" dependencies = [ - "cc", - "libc", + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", ] [[package]] -name = "brotli2" -version = "0.3.2" +name = "brotli-decompressor" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cb036c3eade309815c15ddbacec5b22c4d1f3983a774ab2eac2e3e9ea85568e" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" dependencies = [ - "brotli-sys", - "libc", + "alloc-no-stdlib", + "alloc-stdlib", ] [[package]] @@ -1107,15 +1102,15 @@ dependencies = [ [[package]] name = "clarity" -version = "0.4.12" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef8749bcae70d65c0705636ee675020490f35e05cf4ec2d4b78455aeca2194f7" +checksum = "309ac0ae526b740d40038944bf41c3679acb212657154e1f6bb678704cba37da" dependencies = [ "lazy_static", - "num-bigint 0.4.0", + "num-bigint 0.4.3", "num-traits", "num256", - "secp256k1 0.20.3", + "secp256k1", "serde", "serde-rlp", "serde_bytes", @@ -1133,7 +1128,7 @@ dependencies = [ "bs58", "coins-core", "digest 0.9.0", - "hmac 0.11.0", + "hmac", "k256", "lazy_static", "serde", @@ -1151,7 +1146,7 @@ dependencies = [ "coins-bip32", "getrandom 0.2.3", "hex", - "hmac 0.11.0", + "hmac", "pbkdf2 0.8.0", "rand 0.8.4", "sha2 0.9.8", @@ -1221,22 +1216,6 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "076a6803b0dacd6a88cfe64deba628b01533ff5ef265687e6938280c1afd0a28" -[[package]] -name = "contact" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46eb2b658f7d46ac4a9737d8d69f4784796aea04b7388935d3eddd4470b883f4" -dependencies = [ - "actix-web", - "deep_space 0.2.5", - "log", - "num256", - "serde", - "serde_derive", - "serde_json", - "tokio 0.2.25", -] - [[package]] name = "convert_case" version = "0.4.0" @@ -1290,13 +1269,13 @@ dependencies = [ [[package]] name = "cosmos_gravity" -version = "2.0.4" +version = "2.0.5" dependencies = [ "actix", "bytes 1.1.0", "clarity", "cosmos-sdk-proto", - "deep_space 2.4.7", + "deep_space", "env_logger", "ethereum_gravity", "ethers", @@ -1312,7 +1291,6 @@ dependencies = [ "sha3", "tokio 1.13.0", "tonic", - "web30", ] [[package]] @@ -1409,16 +1387,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "crypto-mac" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4857fd85a0c34b3c3297875b747c1e02e06b6a0ea32dd892d8192b9ce0813ea6" -dependencies = [ - "generic-array 0.14.4", - "subtle", -] - [[package]] name = "crypto-mac" version = "0.11.0" @@ -1438,29 +1406,6 @@ dependencies = [ "cipher", ] -[[package]] -name = "deep_space" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afd044e670beb23ce6a2007d139ed3787b99c85b5ff3982b8fdfda66c3682e53" -dependencies = [ - "base64 0.13.0", - "bech32 0.7.3", - "hmac 0.10.1", - "num-bigint 0.3.2", - "num-traits", - "num256", - "pbkdf2 0.6.0", - "rand 0.7.3", - "ripemd160", - "secp256k1 0.19.0", - "serde", - "serde_derive", - "serde_json", - "sha2 0.9.8", - "unicode-normalization", -] - [[package]] name = "deep_space" version = "2.4.7" @@ -1470,9 +1415,9 @@ dependencies = [ "bech32 0.8.1", "bytes 1.1.0", "cosmos-sdk-proto", - "hmac 0.11.0", + "hmac", "log", - "num-bigint 0.4.0", + "num-bigint 0.4.3", "num-traits", "num256", "pbkdf2 0.9.0", @@ -1481,7 +1426,7 @@ dependencies = [ "rand 0.8.4", "ripemd160", "rust_decimal", - "secp256k1 0.20.3", + "secp256k1", "serde", "serde_derive", "serde_json", @@ -1578,7 +1523,7 @@ checksum = "43ee23aa5b4f68c7a092b5c3beb25f50c406adc75e2363634f242f28ab255372" dependencies = [ "der 0.4.4", "elliptic-curve 0.10.6", - "hmac 0.11.0", + "hmac", "signature", ] @@ -1629,11 +1574,11 @@ dependencies = [ [[package]] name = "enum-as-inner" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595" +checksum = "570d109b813e904becc80d8d5da38376818a143348413f7149f1340fe04754d4" dependencies = [ - "heck 0.3.2", + "heck 0.4.0", "proc-macro2", "quote", "syn", @@ -1672,7 +1617,7 @@ dependencies = [ "ctr", "digest 0.9.0", "hex", - "hmac 0.11.0", + "hmac", "pbkdf2 0.8.0", "rand 0.8.4", "scrypt", @@ -1727,17 +1672,14 @@ dependencies = [ [[package]] name = "ethereum_gravity" -version = "0.1.0" +version = "2.0.5" dependencies = [ - "clarity", - "deep_space 2.4.7", + "deep_space", "ethers", "gravity_abi", "gravity_utils", "log", - "sha3", "tokio 1.13.0", - "web30", ] [[package]] @@ -2196,10 +2138,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ "cfg-if 1.0.0", - "js-sys", "libc", "wasi 0.9.0+wasi-snapshot-preview1", - "wasm-bindgen", ] [[package]] @@ -2229,7 +2169,7 @@ checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" [[package]] name = "gorc" -version = "2.0.4" +version = "2.0.5" dependencies = [ "abscissa_core", "abscissa_tokio", @@ -2239,8 +2179,7 @@ dependencies = [ "clap", "clarity", "cosmos_gravity", - "deep_space 2.4.7", - "env_logger", + "deep_space", "ethereum_gravity", "ethers", "gravity_proto", @@ -2251,7 +2190,6 @@ dependencies = [ "openssl-probe", "orchestrator", "pkcs8", - "proc-macro2", "prost", "rand_core 0.6.2", "regex", @@ -2262,8 +2200,6 @@ dependencies = [ "thiserror", "tokio 1.13.0", "toml", - "tonic", - "web30", ] [[package]] @@ -2288,20 +2224,16 @@ dependencies = [ [[package]] name = "gravity_bridge" -version = "2.0.4" +version = "2.0.5" dependencies = [ "cosmos_gravity", "ethereum_gravity", "gorc", "gravity_abi", - "gravity_abi_build", "gravity_proto", - "gravity_proto_build", "gravity_utils", "orchestrator", - "register_delegate_keys", "relayer", - "test_runner", ] [[package]] @@ -2330,20 +2262,18 @@ dependencies = [ [[package]] name = "gravity_utils" -version = "0.1.0" +version = "2.0.5" dependencies = [ "actix", - "bitcoin", "clarity", "cosmos-sdk-proto", - "deep_space 2.4.7", + "deep_space", "ethers", "gravity_abi", "gravity_proto", - "hdpath", "lazy_static", "log", - "num-bigint 0.4.0", + "num-bigint 0.4.3", "num256", "rand 0.8.4", "rustc-hex", @@ -2351,11 +2281,9 @@ dependencies = [ "serde_derive", "serde_json", "sha3", - "tiny-bip39", "tokio 1.13.0", "tonic", "url", - "web30", ] [[package]] @@ -2414,16 +2342,6 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" -[[package]] -name = "hdpath" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72adf5a17a0952ecfcddf8d46d071271d5ee52e78443f07ba0b2dcfe3063a132" -dependencies = [ - "bitcoin", - "byteorder", -] - [[package]] name = "heck" version = "0.3.2" @@ -2460,7 +2378,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84f2a5541afe0725f0b95619d6af614f48c1b176385b8aa30918cfb8c4bfafc8" dependencies = [ - "hmac 0.11.0", + "hmac", "once_cell", "pbkdf2 0.8.0", "rand_core 0.6.2", @@ -2468,26 +2386,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "hmac" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" -dependencies = [ - "crypto-mac 0.8.0", - "digest 0.9.0", -] - -[[package]] -name = "hmac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" -dependencies = [ - "crypto-mac 0.10.0", - "digest 0.9.0", -] - [[package]] name = "hmac" version = "0.11.0" @@ -2800,15 +2698,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.106" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a60553f9a9e039a333b4e9b20573b9e9b9c0bb3a11e201ccc48ef4283456d673" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "linked-hash-map" -version = "0.5.4" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "local-channel" @@ -2997,9 +2895,9 @@ dependencies = [ [[package]] name = "net2" -version = "0.2.37" +version = "0.2.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" +checksum = "b13b648036a2339d06de780866fbdfda0dde886de7b3af2ddeba8b14f4ee34ac" dependencies = [ "cfg-if 0.1.10", "libc", @@ -3035,7 +2933,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43db66d1170d347f9a065114077f7dccb00c1b9478c89384490a3425279a4606" dependencies = [ - "num-bigint 0.4.0", + "num-bigint 0.4.3", "num-complex 0.4.0", "num-integer", "num-iter", @@ -3056,20 +2954,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d0a3d5e207573f948a9e5376662aa743a2ea13f7c50a554d7af443a73fbfeba" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.4.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d047c1062aa51e256408c560894e5251f08925980e53cf1aa5bd00eec6512" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" dependencies = [ "autocfg", "num-integer", @@ -3147,7 +3034,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" dependencies = [ "autocfg", - "num-bigint 0.4.0", + "num-bigint 0.4.3", "num-integer", "num-traits", ] @@ -3254,15 +3141,13 @@ dependencies = [ [[package]] name = "orchestrator" -version = "2.0.4" +version = "2.0.5" dependencies = [ "actix-rt 2.5.0", "axum", "clarity", "cosmos_gravity", - "deep_space 2.4.7", - "docopt", - "env_logger", + "deep_space", "ethereum_gravity", "ethers", "futures", @@ -3282,7 +3167,6 @@ dependencies = [ "serde_json", "tokio 1.13.0", "tonic", - "web30", ] [[package]] @@ -3379,30 +3263,6 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" -[[package]] -name = "pbkdf2" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" -dependencies = [ - "crypto-mac 0.8.0", -] - -[[package]] -name = "pbkdf2" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3b8c0d71734018084da0c0354193a5edfb81b20d2d57a92c5b154aefc554a4a" -dependencies = [ - "base64 0.13.0", - "crypto-mac 0.10.0", - "hmac 0.10.1", - "rand 0.7.3", - "rand_core 0.5.1", - "sha2 0.9.8", - "subtle", -] - [[package]] name = "pbkdf2" version = "0.8.0" @@ -3411,7 +3271,7 @@ checksum = "d95f5254224e617595d2cc3cc73ff0a5eaf2637519e25f03388154e9378b6ffa" dependencies = [ "base64ct", "crypto-mac 0.11.0", - "hmac 0.11.0", + "hmac", "password-hash 0.2.3", "sha2 0.9.8", ] @@ -3423,7 +3283,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f05894bce6a1ba4be299d0c5f29563e08af2bc18bb7d48313113bed71e904739" dependencies = [ "crypto-mac 0.11.0", - "hmac 0.11.0", + "hmac", "password-hash 0.3.2", "sha2 0.9.8", ] @@ -3465,11 +3325,11 @@ dependencies = [ [[package]] name = "pin-project" -version = "0.4.28" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "918192b5c59119d51e0cd221f4d49dde9112824ba717369e903c97d076083d0f" +checksum = "3ef0f924a5ee7ea9cbcea77529dba45f8a9ba9f622419fe3386ca581a3ae9d5a" dependencies = [ - "pin-project-internal 0.4.28", + "pin-project-internal 0.4.30", ] [[package]] @@ -3483,9 +3343,9 @@ dependencies = [ [[package]] name = "pin-project-internal" -version = "0.4.28" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be26700300be6d9d23264c73211d8190e755b6b5ca7a1b28230025511b52a5e" +checksum = "851c8d0ce9bebe43790dedfc86614c23494ac9f423dd618d3a61fc693eafe61e" dependencies = [ "proc-macro2", "quote", @@ -3861,13 +3721,12 @@ checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" [[package]] name = "register_delegate_keys" -version = "2.0.0" +version = "2.0.5" dependencies = [ "actix-rt 2.5.0", "clarity", - "contact", "cosmos_gravity", - "deep_space 2.4.7", + "deep_space", "docopt", "env_logger", "ethereum_gravity", @@ -3886,13 +3745,13 @@ dependencies = [ [[package]] name = "relayer" -version = "2.0.0" +version = "2.0.5" dependencies = [ "actix", "actix-rt 2.5.0", "clarity", "cosmos_gravity", - "deep_space 2.4.7", + "deep_space", "docopt", "env_logger", "ethereum_gravity", @@ -3907,7 +3766,6 @@ dependencies = [ "serde_derive", "tokio 1.13.0", "tonic", - "web30", ] [[package]] @@ -4043,12 +3901,6 @@ version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - [[package]] name = "rustc-hex" version = "2.1.0" @@ -4141,7 +3993,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879588d8f90906e73302547e20fffefdd240eb3e0e744e142321f5d49dea0518" dependencies = [ "base64ct", - "hmac 0.11.0", + "hmac", "password-hash 0.2.3", "pbkdf2 0.8.0", "salsa20", @@ -4158,32 +4010,13 @@ dependencies = [ "untrusted", ] -[[package]] -name = "secp256k1" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6179428c22c73ac0fbb7b5579a56353ce78ba29759b3b8575183336ea74cdfb" -dependencies = [ - "secp256k1-sys 0.3.0", -] - [[package]] name = "secp256k1" version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97d03ceae636d0fed5bae6a7f4f664354c5f4fcedf6eef053fef17e49f837d0a" dependencies = [ - "secp256k1-sys 0.4.0", - "serde", -] - -[[package]] -name = "secp256k1-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11553d210db090930f4432bea123b31f70bbf693ace14504ea2a35e796c28dd2" -dependencies = [ - "cc", + "secp256k1-sys", ] [[package]] @@ -4661,8 +4494,7 @@ dependencies = [ "actix-web", "clarity", "cosmos_gravity", - "deep_space 2.4.7", - "docopt", + "deep_space", "env_logger", "ethereum_gravity", "ethers", @@ -4673,14 +4505,12 @@ dependencies = [ "hex", "lazy_static", "log", - "orchestrator", "rand 0.8.4", "serde", "serde_derive", "tokio 1.13.0", "tonic", "url", - "web30", ] [[package]] @@ -4775,25 +4605,6 @@ dependencies = [ "syn", ] -[[package]] -name = "tiny-bip39" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" -dependencies = [ - "anyhow", - "hmac 0.8.1", - "once_cell", - "pbkdf2 0.4.0", - "rand 0.7.3", - "rustc-hash", - "sha2 0.9.8", - "thiserror", - "unicode-normalization", - "wasm-bindgen", - "zeroize", -] - [[package]] name = "tiny-keccak" version = "2.0.2" diff --git a/orchestrator/Cargo.toml b/orchestrator/Cargo.toml index 686b4f2c6..759cb9298 100644 --- a/orchestrator/Cargo.toml +++ b/orchestrator/Cargo.toml @@ -2,7 +2,7 @@ # Also, the name was changed from orchestrator to gravity_bridge. [package] name = "gravity_bridge" -version = "2.0.4" +version = "2.0.5" authors = ["PeggyJV"] license = "Apache-2.0" edition = "2018" @@ -28,18 +28,17 @@ members = [ "gravity_abi", ] +[workspace.dependencies] +clarity = "0.4.16" + [dependencies] orchestrator = { path = "./orchestrator" } cosmos_gravity = { path = "./cosmos_gravity" } ethereum_gravity = { path = "./ethereum_gravity" } gravity_utils = { path = "./gravity_utils" } -gravity_proto_build = { path = "./gravity_proto_build" } -test_runner = { path = "./test_runner" } gravity_proto = { path = "./gravity_proto" } -register_delegate_keys = { path = "./register_delegate_keys" } gorc = { path = "./gorc" } relayer = { path = "./relayer" } -gravity_abi_build = { path = "./gravity_abi_build" } gravity_abi = { path = "./gravity_abi" } [features] @@ -48,5 +47,4 @@ ethermint = [ "cosmos_gravity/ethermint", "relayer/ethermint", "gorc/ethermint", - "register_delegate_keys/ethermint", ] diff --git a/orchestrator/Dockerfile b/orchestrator/Dockerfile index 0f991b524..6296203e9 100644 --- a/orchestrator/Dockerfile +++ b/orchestrator/Dockerfile @@ -1,6 +1,6 @@ # Reference: https://www.lpalmieri.com/posts/fast-rust-docker-builds/ -FROM rust:1.63 as cargo-chef-rust +FROM rust:1.68 as cargo-chef-rust RUN cargo install cargo-chef --version 0.1.51 FROM cargo-chef-rust as planner diff --git a/orchestrator/cosmos_gravity/Cargo.toml b/orchestrator/cosmos_gravity/Cargo.toml index 3780ae4d8..c8a7daddf 100644 --- a/orchestrator/cosmos_gravity/Cargo.toml +++ b/orchestrator/cosmos_gravity/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cosmos_gravity" -version = "2.0.4" +version = "2.0.5" authors = ["Justin Kilpatrick "] edition = "2018" @@ -13,12 +13,11 @@ gravity_proto = {path = "../gravity_proto/"} deep_space = { git = "https://github.com/iqlusioninc/deep_space/", branch = "master" } ethers = { git = "https://github.com/iqlusioninc/ethers-rs.git", branch="zaki/error_abi_support", features = ["abigen"] } -clarity = "0.4.11" +clarity.workspace = true serde = "1.0" log = "0.4" sha3 = "0.9" tokio = "1.4" -web30 = "0.15.4" tonic = "0.4" cosmos-sdk-proto = "0.6.3" prost = "0.7" diff --git a/orchestrator/cosmos_gravity/src/build.rs b/orchestrator/cosmos_gravity/src/build.rs index d5ffd46fc..731e632b8 100644 --- a/orchestrator/cosmos_gravity/src/build.rs +++ b/orchestrator/cosmos_gravity/src/build.rs @@ -16,7 +16,7 @@ use std::collections::BTreeMap; use crate::crypto::PrivateKey as CosmosPrivateKey; -lazy_static!{ +lazy_static! { static ref DENOM_REGEX: Regex = Regex::new("^[a-zA-Z][a-zA-Z0-9/-]{2,127}$").unwrap(); } @@ -247,7 +247,7 @@ pub fn ethereum_event_messages( // be rejected by the chain when processed. pub fn denom_string(input_denom: String) -> String { if !DENOM_REGEX.is_match(input_denom.as_str()) { - return "invalid".to_string() + return "invalid".to_string(); } input_denom diff --git a/orchestrator/cosmos_gravity/src/query.rs b/orchestrator/cosmos_gravity/src/query.rs index 2c1e4ef4b..7ea12004e 100644 --- a/orchestrator/cosmos_gravity/src/query.rs +++ b/orchestrator/cosmos_gravity/src/query.rs @@ -1,3 +1,4 @@ +use clarity::Signature; use deep_space::address::Address; use ethers::types::Address as EthAddress; use gravity_proto::gravity::query_client::QueryClient as GravityQueryClient; @@ -63,6 +64,16 @@ pub async fn get_all_valset_confirms( let confirms = request.into_inner().signatures; let mut parsed_confirms = Vec::new(); for item in confirms { + if let Err(e) = Signature::from_bytes(&item.signature)?.error_check() { + warn!( + "ignoring valset confirmation with invalid signature from {}", + item.ethereum_signer + ); + debug!("reason given for invalid signature: {e:?}"); + + continue; + } + parsed_confirms.push(ValsetConfirmResponse::from_proto(item)?) } Ok(parsed_confirms) @@ -124,6 +135,16 @@ pub async fn get_transaction_batch_signatures( let batch_confirms = request.into_inner().signatures; let mut out = Vec::new(); for confirm in batch_confirms { + if let Err(e) = Signature::from_bytes(&confirm.signature)?.error_check() { + warn!( + "ignoring batch confirmation with invalid signature from {}", + confirm.ethereum_signer + ); + debug!("reason given for invalid signature: {e:?}"); + + continue; + } + out.push(BatchConfirmResponse::from_proto(confirm)?) } Ok(out) @@ -179,6 +200,16 @@ pub async fn get_logic_call_signatures( let call_confirms = request.into_inner().signatures; let mut out = Vec::new(); for confirm in call_confirms { + if let Err(e) = Signature::from_bytes(&confirm.signature)?.error_check() { + warn!( + "ignoring logic call confirmation with invalid signature from {}", + confirm.ethereum_signer + ); + debug!("reason given for invalid signature: {e:?}"); + + continue; + } + out.push(LogicCallConfirmResponse::from_proto(confirm)?) } Ok(out) diff --git a/orchestrator/cosmos_gravity/src/send.rs b/orchestrator/cosmos_gravity/src/send.rs index ba520a6b5..f9271b8fe 100644 --- a/orchestrator/cosmos_gravity/src/send.rs +++ b/orchestrator/cosmos_gravity/src/send.rs @@ -226,4 +226,4 @@ fn log_send_error(messages: &Vec, err: GravityError) { msg_types, err ); -} \ No newline at end of file +} diff --git a/orchestrator/ethereum_gravity/Cargo.toml b/orchestrator/ethereum_gravity/Cargo.toml index ce38e1d33..0db24330d 100644 --- a/orchestrator/ethereum_gravity/Cargo.toml +++ b/orchestrator/ethereum_gravity/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ethereum_gravity" -version = "0.1.0" +version = "2.0.5" authors = ["Justin Kilpatrick "] edition = "2018" @@ -12,8 +12,5 @@ gravity_utils = { path = "../gravity_utils" } deep_space = { git = "https://github.com/iqlusioninc/deep_space/", branch = "master" } ethers = { git = "https://github.com/iqlusioninc/ethers-rs.git", branch = "zaki/error_abi_support", features = ["abigen"] } -clarity = "0.4.11" -web30 = "0.15.4" log = "0.4" -sha3 = "0.9" tokio = "1.13.0" diff --git a/orchestrator/ethereum_gravity/src/logic_call.rs b/orchestrator/ethereum_gravity/src/logic_call.rs index 82d99320c..80d241a5d 100644 --- a/orchestrator/ethereum_gravity/src/logic_call.rs +++ b/orchestrator/ethereum_gravity/src/logic_call.rs @@ -9,7 +9,7 @@ use gravity_abi::gravity::*; use gravity_utils::ethereum::{bytes_to_hex_str, vec_u8_to_fixed_32}; use gravity_utils::types::*; use gravity_utils::{error::GravityError, message_signatures::encode_logic_call_confirm_hashed}; -use std::{result::Result, time::Duration, collections::HashMap}; +use std::{collections::HashMap, result::Result, time::Duration}; /// this function generates an appropriate Ethereum transaction /// to submit the provided logic call @@ -262,7 +262,8 @@ impl LogicCallSkips { if id_skips.is_none() { // first time we've seen this invalidation id, start at 2 skips let new_id_skips = HashMap::from([(call.invalidation_nonce, new_skip_state)]); - self.skip_map.insert(call.invalidation_id.clone(), new_id_skips); + self.skip_map + .insert(call.invalidation_id.clone(), new_id_skips); } else { let id_skips = id_skips.unwrap(); let skip_state = id_skips.get_mut(&call.invalidation_nonce); diff --git a/orchestrator/ethereum_gravity/src/utils.rs b/orchestrator/ethereum_gravity/src/utils.rs index fb4acca31..fd9442817 100644 --- a/orchestrator/ethereum_gravity/src/utils.rs +++ b/orchestrator/ethereum_gravity/src/utils.rs @@ -5,7 +5,7 @@ use ethers::prelude::*; use ethers::types::Address as EthAddress; use gravity_abi::gravity::*; use gravity_utils::error::GravityError; -use gravity_utils::ethereum::{downcast_to_u64, vec_u8_to_fixed_32, hex_str_to_bytes}; +use gravity_utils::ethereum::{downcast_to_u64, hex_str_to_bytes, vec_u8_to_fixed_32}; use gravity_utils::types::{decode_gravity_error, GravityContractError}; use std::result::Result; @@ -199,15 +199,23 @@ pub fn handle_contract_error(gravity_error: GravityError) -> bool { if gravity_contract_error.is_some() { match gravity_contract_error.unwrap() { GravityContractError::InvalidLogicCallNonce(nonce_error) => { - info!("LogicCall already processed, skipping until observed on chain: {}", nonce_error.message()); + info!( + "LogicCall already processed, skipping until observed on chain: {}", + nonce_error.message() + ); return true; } GravityContractError::LogicCallTimedOut(timeout_error) => { - info!("LogicCall is timed out, will be skipped until timeout on chain: {}", timeout_error.message()); + info!( + "LogicCall is timed out, will be skipped until timeout on chain: {}", + timeout_error.message() + ); return true; } // TODO(bolten): implement other cases if necessary - _ => { error!("Unspecified gravity contract error: {}", error_string) } + _ => { + error!("Unspecified gravity contract error: {}", error_string) + } } } else { error!("Non-gravity contract error: {}", error_string); @@ -220,48 +228,47 @@ pub fn handle_contract_error(gravity_error: GravityError) -> bool { // results in this nightmare pub fn extract_gravity_contract_error(gravity_error: GravityError) -> Option { match gravity_error { - GravityError::EthersContractError(ce) => { - match ce { - ethers::contract::ContractError::MiddlewareError(me) => { - match me { - ethers::middleware::signer::SignerMiddlewareError::MiddlewareError(sme) => { - match sme { - ethers::providers::ProviderError::JsonRpcClientError(jrpce) => { - if jrpce.is::() { - let httpe = *jrpce.downcast::().unwrap(); - match httpe { - ethers::providers::HttpClientError::JsonRpcError(jre) => { - if jre.code == 3 && jre.data.is_some() { - let data = jre.data.unwrap(); - if data.is_string() { - let data_bytes = hex_str_to_bytes(data.as_str().unwrap()); - if data_bytes.is_ok() { - decode_gravity_error(data_bytes.unwrap()) - } else { - None - } - } else { - None - } + GravityError::EthersContractError(ce) => match ce { + ethers::contract::ContractError::MiddlewareError(me) => match me { + ethers::middleware::signer::SignerMiddlewareError::MiddlewareError(sme) => { + match sme { + ethers::providers::ProviderError::JsonRpcClientError(jrpce) => { + if jrpce.is::() { + let httpe = *jrpce + .downcast::() + .unwrap(); + match httpe { + ethers::providers::HttpClientError::JsonRpcError(jre) => { + if jre.code == 3 && jre.data.is_some() { + let data = jre.data.unwrap(); + if data.is_string() { + let data_bytes = + hex_str_to_bytes(data.as_str().unwrap()); + if data_bytes.is_ok() { + decode_gravity_error(data_bytes.unwrap()) } else { None } + } else { + None } - _ => None + } else { + None } - } else { - None } + _ => None, } - _ => None + } else { + None } } - _ => None + _ => None, } } - _ => None - } - } - _ => None + _ => None, + }, + _ => None, + }, + _ => None, } } diff --git a/orchestrator/gorc/Cargo.toml b/orchestrator/gorc/Cargo.toml index df1127b36..229c8386b 100644 --- a/orchestrator/gorc/Cargo.toml +++ b/orchestrator/gorc/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "gorc" authors = [] -version = "2.0.4" +version = "2.0.5" edition = "2021" rust-version = "1.63" @@ -31,16 +31,12 @@ rand_core = { version = "0.6", features = ["std"] } openssl-probe = "0.1.4" abscissa_tokio = { version = "0.6.0", features = ["actix"] } -web30 = "0.15" tokio = "1" -tonic = "0.4" toml = "0.5" -env_logger = "0.8" log = "0.4" prost = "0.7" bytes = "1" -proc-macro2 = "1.0.28" [dependencies.abscissa_core] version = "0.6.0" diff --git a/orchestrator/gravity_abi/src/lib.rs b/orchestrator/gravity_abi/src/lib.rs index 8cbc06205..dce4f7034 100644 --- a/orchestrator/gravity_abi/src/lib.rs +++ b/orchestrator/gravity_abi/src/lib.rs @@ -1,2 +1,2 @@ pub mod erc20; -pub mod gravity; \ No newline at end of file +pub mod gravity; diff --git a/orchestrator/gravity_utils/Cargo.toml b/orchestrator/gravity_utils/Cargo.toml index 2dfe65978..9002d6002 100644 --- a/orchestrator/gravity_utils/Cargo.toml +++ b/orchestrator/gravity_utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "gravity_utils" -version = "0.1.0" +version = "2.0.5" authors = ["Justin Kilpatrick "] edition = "2018" @@ -12,8 +12,7 @@ gravity_proto = { path = "../gravity_proto/" } cosmos-sdk-proto = "0.6.3" deep_space = { git = "https://github.com/iqlusioninc/deep_space/", branch = "master" } ethers = { git = "https://github.com/iqlusioninc/ethers-rs.git", branch = "zaki/error_abi_support", features = ["abigen"] } -web30 = "0.15" -clarity = "0.4.11" +clarity.workspace = true lazy_static = "1.4.0" num256 = "0.3" serde_derive = "1.0" @@ -25,9 +24,6 @@ num-bigint = "0.4" log = "0.4" url = "2" sha3 = "0.9" -tiny-bip39 = "0.8.0" -bitcoin = { version = "=0.27", features = ["use-serde"] } -hdpath = { version = "0.6.0", features = ["with-bitcoin"] } rustc-hex = "2.1.0" [dev_dependencies] diff --git a/orchestrator/gravity_utils/src/types/gravity_contract_errors.rs b/orchestrator/gravity_utils/src/types/gravity_contract_errors.rs index 1c260b2f4..ef32aa014 100644 --- a/orchestrator/gravity_utils/src/types/gravity_contract_errors.rs +++ b/orchestrator/gravity_utils/src/types/gravity_contract_errors.rs @@ -1,7 +1,7 @@ -use std::convert::TryInto; use ethers::prelude::*; use ethers::utils::keccak256; use lazy_static::lazy_static; +use std::convert::TryInto; fn err_to_selector(error: &str) -> [u8; 4] { keccak256(error)[0..4].try_into().unwrap() @@ -11,15 +11,19 @@ fn err_to_selector(error: &str) -> [u8; 4] { // here by calculating the first hash bytes rather than computing them by hand in advance lazy_static! { static ref INVALID_SIGNATURE: [u8; 4] = err_to_selector("InvalidSignature()"); - static ref INVALID_VALSET_NONCE: [u8; 4] = err_to_selector("InvalidValsetNonce(uint256,uint256)"); + static ref INVALID_VALSET_NONCE: [u8; 4] = + err_to_selector("InvalidValsetNonce(uint256,uint256)"); static ref INVALID_BATCH_NONCE: [u8; 4] = err_to_selector("InvalidBatchNonce(uint256,uint256)"); - static ref INVALID_LOGIC_CALL_NONCE: [u8; 4] = err_to_selector("InvalidLogicCallNonce(uint256,uint256)"); - static ref INVALID_LOGIC_CALL_TRANSFERS: [u8; 4] = err_to_selector("InvalidLogicCallTransfers()"); + static ref INVALID_LOGIC_CALL_NONCE: [u8; 4] = + err_to_selector("InvalidLogicCallNonce(uint256,uint256)"); + static ref INVALID_LOGIC_CALL_TRANSFERS: [u8; 4] = + err_to_selector("InvalidLogicCallTransfers()"); static ref INVALID_LOGIC_CALL_FEES: [u8; 4] = err_to_selector("InvalidLogicCallFees()"); static ref INVALID_SEND_TO_COSMOS: [u8; 4] = err_to_selector("InvalidSendToCosmos()"); static ref INCORRECT_CHECKPOINT: [u8; 4] = err_to_selector("IncorrectCheckpoint()"); static ref MALFORMED_NEW_VALIDATOR_SET: [u8; 4] = err_to_selector("MalformedNewValidatorSet()"); - static ref MALFORMED_CURRENT_VALIDATOR_SET: [u8; 4] = err_to_selector("MalformedCurrentValidatorSet()"); + static ref MALFORMED_CURRENT_VALIDATOR_SET: [u8; 4] = + err_to_selector("MalformedCurrentValidatorSet()"); static ref MALFORMED_BATCH: [u8; 4] = err_to_selector("MalformedBatch()"); static ref INSUFFICIENT_POWER: [u8; 4] = err_to_selector("InsufficientPower(uint256,uint256)"); static ref BATCH_TIMED_OUT: [u8; 4] = err_to_selector("BatchTimedOut()"); @@ -53,87 +57,105 @@ pub fn decode_gravity_error(data: Vec) -> Option { let selector: [u8; 4] = data[0..4].try_into().unwrap(); if selector == INVALID_SIGNATURE.as_slice() { - return Some(GravityContractError::InvalidSignature(InvalidSignature{})) + return Some(GravityContractError::InvalidSignature(InvalidSignature {})); } if selector == INVALID_VALSET_NONCE.as_slice() { if data.len() != 68 { - return None + return None; } - return Some(GravityContractError::InvalidValsetNonce(InvalidValsetNonce{ - new_nonce: data[4..36].into(), - current_nonce: data[36..].into(), - })) + return Some(GravityContractError::InvalidValsetNonce( + InvalidValsetNonce { + new_nonce: data[4..36].into(), + current_nonce: data[36..].into(), + }, + )); } if selector == INVALID_BATCH_NONCE.as_slice() { if data.len() != 68 { - return None + return None; } - return Some(GravityContractError::InvalidBatchNonce(InvalidBatchNonce{ + return Some(GravityContractError::InvalidBatchNonce(InvalidBatchNonce { new_nonce: data[4..36].into(), current_nonce: data[36..].into(), - })) + })); } if selector == INVALID_LOGIC_CALL_NONCE.as_slice() { if data.len() != 68 { - return None + return None; } - return Some(GravityContractError::InvalidLogicCallNonce(InvalidLogicCallNonce{ - new_nonce: data[4..36].into(), - current_nonce: data[36..].into(), - })) + return Some(GravityContractError::InvalidLogicCallNonce( + InvalidLogicCallNonce { + new_nonce: data[4..36].into(), + current_nonce: data[36..].into(), + }, + )); } if selector == INVALID_LOGIC_CALL_TRANSFERS.as_slice() { - return Some(GravityContractError::InvalidLogicCallTransfers(InvalidLogicCallTransfers{})) + return Some(GravityContractError::InvalidLogicCallTransfers( + InvalidLogicCallTransfers {}, + )); } if selector == INVALID_LOGIC_CALL_FEES.as_slice() { - return Some(GravityContractError::InvalidLogicCallFees(InvalidLogicCallFees{})) + return Some(GravityContractError::InvalidLogicCallFees( + InvalidLogicCallFees {}, + )); } if selector == INVALID_SEND_TO_COSMOS.as_slice() { - return Some(GravityContractError::InvalidSendToCosmos(InvalidSendToCosmos{})) + return Some(GravityContractError::InvalidSendToCosmos( + InvalidSendToCosmos {}, + )); } if selector == INCORRECT_CHECKPOINT.as_slice() { - return Some(GravityContractError::InvalidLogicCallTransfers(InvalidLogicCallTransfers{})) + return Some(GravityContractError::InvalidLogicCallTransfers( + InvalidLogicCallTransfers {}, + )); } if selector == MALFORMED_NEW_VALIDATOR_SET.as_slice() { - return Some(GravityContractError::MalformedNewValidatorSet(MalformedNewValidatorSet{})) + return Some(GravityContractError::MalformedNewValidatorSet( + MalformedNewValidatorSet {}, + )); } if selector == MALFORMED_CURRENT_VALIDATOR_SET.as_slice() { - return Some(GravityContractError::MalformedCurrentValidatorSet(MalformedCurrentValidatorSet{})) + return Some(GravityContractError::MalformedCurrentValidatorSet( + MalformedCurrentValidatorSet {}, + )); } if selector == MALFORMED_BATCH.as_slice() { - return Some(GravityContractError::MalformedBatch(MalformedBatch{})) + return Some(GravityContractError::MalformedBatch(MalformedBatch {})); } if selector == INSUFFICIENT_POWER.as_slice() { if data.len() != 68 { - return None + return None; } - return Some(GravityContractError::InsufficientPower(InsufficientPower{ + return Some(GravityContractError::InsufficientPower(InsufficientPower { cumulative_power: data[4..36].into(), power_threshold: data[36..].into(), - })) + })); } if selector == BATCH_TIMED_OUT.as_slice() { - return Some(GravityContractError::BatchTimedOut(BatchTimedOut{})) + return Some(GravityContractError::BatchTimedOut(BatchTimedOut {})); } if selector == LOGIC_CALL_TIMED_OUT.as_slice() { - return Some(GravityContractError::LogicCallTimedOut(LogicCallTimedOut{})) + return Some(GravityContractError::LogicCallTimedOut( + LogicCallTimedOut {}, + )); } info!("Did not find gravity error"); @@ -156,8 +178,10 @@ pub struct InvalidValsetNonce { impl InvalidValsetNonce { pub fn message(&self) -> String { - format!("Invalid valset nonce, new nonce {}, current nonce {}", - self.new_nonce, self.current_nonce) + format!( + "Invalid valset nonce, new nonce {}, current nonce {}", + self.new_nonce, self.current_nonce + ) } } @@ -168,8 +192,10 @@ pub struct InvalidBatchNonce { impl InvalidBatchNonce { pub fn message(&self) -> String { - format!("Invalid batch nonce, new nonce {}, current nonce {}", - self.new_nonce, self.current_nonce) + format!( + "Invalid batch nonce, new nonce {}, current nonce {}", + self.new_nonce, self.current_nonce + ) } } @@ -180,8 +206,10 @@ pub struct InvalidLogicCallNonce { impl InvalidLogicCallNonce { pub fn message(&self) -> String { - format!("Invalid logic call nonce, new nonce {}, current nonce {}", - self.new_nonce, self.current_nonce) + format!( + "Invalid logic call nonce, new nonce {}, current nonce {}", + self.new_nonce, self.current_nonce + ) } } @@ -248,8 +276,10 @@ pub struct InsufficientPower { impl InsufficientPower { pub fn message(&self) -> String { - format!("Insufficient power, cumulative power {}, power threshold {}", - self.cumulative_power, self.power_threshold) + format!( + "Insufficient power, cumulative power {}, power threshold {}", + self.cumulative_power, self.power_threshold + ) } } @@ -267,4 +297,4 @@ impl LogicCallTimedOut { pub fn message(&self) -> String { "Logic call timed out".to_string() } -} \ No newline at end of file +} diff --git a/orchestrator/orchestrator/Cargo.toml b/orchestrator/orchestrator/Cargo.toml index fa36d9627..877f7ce71 100644 --- a/orchestrator/orchestrator/Cargo.toml +++ b/orchestrator/orchestrator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "orchestrator" -version = "2.0.4" +version = "2.0.5" authors = ["Justin Kilpatrick "] edition = "2018" @@ -19,14 +19,11 @@ gravity_proto = { path = "../gravity_proto" } deep_space = { git = "https://github.com/iqlusioninc/deep_space/", branch = "master" } ethers = { git = "https://github.com/iqlusioninc/ethers-rs.git", branch = "zaki/error_abi_support", features = ["abigen"] } serde_derive = "1.0" -clarity = "0.4.11" -docopt = "1" +clarity.workspace = true serde = "1.0" actix-rt = "2.5" lazy_static = "1" -web30 = "0.15" log = "0.4" -env_logger = "0.8" serde_json = "1.0" tokio = "1.4.0" rand = "0.8" diff --git a/orchestrator/orchestrator/src/ethereum_event_watcher.rs b/orchestrator/orchestrator/src/ethereum_event_watcher.rs index 430aa50db..6251c56a0 100644 --- a/orchestrator/orchestrator/src/ethereum_event_watcher.rs +++ b/orchestrator/orchestrator/src/ethereum_event_watcher.rs @@ -5,8 +5,8 @@ use crate::get_with_retry::get_block_number_with_retry; use crate::get_with_retry::get_chain_id_with_retry; use crate::metrics; use cosmos_gravity::build; -use cosmos_gravity::query::get_last_event_nonce; use cosmos_gravity::crypto::PrivateKey as CosmosPrivateKey; +use cosmos_gravity::query::get_last_event_nonce; use deep_space::{Contact, Msg}; use ethereum_gravity::types::EthClient; use ethers::prelude::*; @@ -242,7 +242,6 @@ pub async fn check_for_events( Ok(ending_block) } - /// The number of blocks behind the 'latest block' on Ethereum our event checking should be. /// Ethereum does not have finality and as such is subject to chain reorgs and temporary forks /// if we check for events up to the very latest block we may process an event which did not diff --git a/orchestrator/orchestrator/src/main_loop.rs b/orchestrator/orchestrator/src/main_loop.rs index 619436b84..928c213e5 100644 --- a/orchestrator/orchestrator/src/main_loop.rs +++ b/orchestrator/orchestrator/src/main_loop.rs @@ -9,6 +9,7 @@ use crate::{ ethereum_event_watcher::check_for_events, metrics::metrics_main_loop, oracle_resync::get_last_checked_block, }; +use cosmos_gravity::crypto::PrivateKey as CosmosPrivateKey; use cosmos_gravity::send::send_main_loop; use cosmos_gravity::{ build, @@ -19,7 +20,6 @@ use cosmos_gravity::{ }; use deep_space::client::ChainStatus; use deep_space::error::CosmosGrpcError; -use cosmos_gravity::crypto::PrivateKey as CosmosPrivateKey; use deep_space::{Contact, Msg}; use ethereum_gravity::types::EthClient; use ethereum_gravity::utils::get_gravity_id; @@ -171,7 +171,8 @@ pub async fn eth_oracle_main_loop( &contact, cosmos_key, latest_eth_block - block_delay, - ).await; + ) + .await; msg_sender .send(messages) diff --git a/orchestrator/register_delegate_keys/Cargo.toml b/orchestrator/register_delegate_keys/Cargo.toml index b444c27f0..9dab6aeb6 100644 --- a/orchestrator/register_delegate_keys/Cargo.toml +++ b/orchestrator/register_delegate_keys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "register_delegate_keys" -version = "2.0.0" +version = "2.0.5" authors = ["Justin Kilpatrick "] edition = "2018" @@ -17,9 +17,8 @@ gravity_proto = {path = "../gravity_proto/"} deep_space = { git = "https://github.com/iqlusioninc/deep_space/", branch = "master" } ethers = { git = "https://github.com/iqlusioninc/ethers-rs.git", branch = "zaki/error_abi_support", features = ["abigen"] } -contact = "0.4" serde_derive = "1.0" -clarity = "0.4.11" +clarity.workspace = true docopt = "1" serde = "1.0" actix-rt = "2.5" diff --git a/orchestrator/register_delegate_keys/src/main.rs b/orchestrator/register_delegate_keys/src/main.rs index 208711bea..457dc7fbf 100644 --- a/orchestrator/register_delegate_keys/src/main.rs +++ b/orchestrator/register_delegate_keys/src/main.rs @@ -6,15 +6,15 @@ extern crate serde_derive; extern crate lazy_static; use clarity::PrivateKey as EthPrivateKey; +use cosmos_gravity::crypto::PrivateKey as CosmosPrivateKey; use cosmos_gravity::send::update_gravity_delegate_addresses; -use deep_space::{mnemonic::Mnemonic}; +use deep_space::mnemonic::Mnemonic; use docopt::Docopt; use ethers::core::k256::ecdsa::SigningKey; use ethers::prelude::*; use gravity_utils::connection_prep::check_for_fee_denom; use gravity_utils::connection_prep::{create_rpc_connections, wait_for_cosmos_node_ready}; use log::error; -use cosmos_gravity::crypto::PrivateKey as CosmosPrivateKey; use rand::{thread_rng, Rng}; use std::time::Duration; diff --git a/orchestrator/relayer/Cargo.toml b/orchestrator/relayer/Cargo.toml index 89dce3107..4ab1916a8 100644 --- a/orchestrator/relayer/Cargo.toml +++ b/orchestrator/relayer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "relayer" -version = "2.0.0" +version = "2.0.5" authors = ["Justin Kilpatrick "] edition = "2018" @@ -22,12 +22,11 @@ gravity_proto = { path = "../gravity_proto" } deep_space = { git = "https://github.com/iqlusioninc/deep_space/", branch = "master" } ethers = { git = "https://github.com/iqlusioninc/ethers-rs.git", branch = "zaki/error_abi_support", features = ["abigen"] } serde_derive = "1.0" -clarity = "0.4.11" +clarity.workspace = true docopt = "1" serde = "1.0" actix-rt = "2.5" lazy_static = "1" -web30 = "0.15" log = "0.4" env_logger = "0.8" tokio = "1.4" diff --git a/orchestrator/relayer/src/main_loop.rs b/orchestrator/relayer/src/main_loop.rs index 5f02de878..2794d5edf 100644 --- a/orchestrator/relayer/src/main_loop.rs +++ b/orchestrator/relayer/src/main_loop.rs @@ -1,11 +1,11 @@ use crate::{ batch_relaying::relay_batches, find_latest_valset::find_latest_valset, - logic_call_relaying::{relay_logic_calls}, valset_relaying::relay_valsets, + logic_call_relaying::relay_logic_calls, valset_relaying::relay_valsets, }; -use ethereum_gravity::{types::EthClient, utils::get_gravity_id, logic_call::LogicCallSkips}; +use ethereum_gravity::{logic_call::LogicCallSkips, types::EthClient, utils::get_gravity_id}; use ethers::types::Address as EthAddress; use gravity_proto::gravity::query_client::QueryClient as GravityQueryClient; -use std::{time::Duration}; +use std::time::Duration; use tonic::transport::Channel; pub const LOOP_SPEED: Duration = Duration::from_secs(17); diff --git a/orchestrator/test_runner/Cargo.toml b/orchestrator/test_runner/Cargo.toml index abed6c5ec..2e834c00d 100644 --- a/orchestrator/test_runner/Cargo.toml +++ b/orchestrator/test_runner/Cargo.toml @@ -15,12 +15,10 @@ cosmos_gravity = {path = "../cosmos_gravity"} gravity_abi = { path = "../gravity_abi" } gravity_utils = {path = "../gravity_utils"} gravity_proto = {path = "../gravity_proto/"} -orchestrator = {path = "../orchestrator/"} deep_space = { git = "https://github.com/iqlusioninc/deep_space/", branch = "master" } serde_derive = "1.0" -clarity = "0.4.11" -docopt = "1" +clarity.workspace = true ethers = { git = "https://github.com/iqlusioninc/ethers-rs.git", branch = "zaki/error_abi_support", features = ["abigen"] } serde = "1.0" actix = "0.12" @@ -28,7 +26,6 @@ actix-web = {version = "3", features=["openssl"]} actix-rt = "2.5" lazy_static = "1" url = "2" -web30 = "0.15.4" log = "0.4" env_logger = "0.8" tokio = "1.4.0" @@ -38,4 +35,4 @@ futures = "0.3.18" hex = "0.4.3" [features] -ethermint = ["cosmos_gravity/ethermint", "orchestrator/ethermint"] +ethermint = ["cosmos_gravity/ethermint"] diff --git a/orchestrator/test_runner/src/orch_keys_update.rs b/orchestrator/test_runner/src/orch_keys_update.rs index ffb14322e..623957ff3 100644 --- a/orchestrator/test_runner/src/orch_keys_update.rs +++ b/orchestrator/test_runner/src/orch_keys_update.rs @@ -1,9 +1,9 @@ //! This test verifies that live updating of orchestrator keys works correctly use crate::utils::ValidatorKeys; +use cosmos_gravity::crypto::PrivateKey as CosmosPrivateKey; use cosmos_gravity::send::update_gravity_delegate_addresses; use deep_space::address::Address as CosmosAddress; -use cosmos_gravity::crypto::PrivateKey as CosmosPrivateKey; use deep_space::Contact; use ethers::types::Address as EthAddress; use ethers::{core::k256::ecdsa::SigningKey, prelude::*}; diff --git a/orchestrator/test_runner/src/utils.rs b/orchestrator/test_runner/src/utils.rs index a7197f203..d90df7815 100644 --- a/orchestrator/test_runner/src/utils.rs +++ b/orchestrator/test_runner/src/utils.rs @@ -1,7 +1,7 @@ use crate::one_eth; +use cosmos_gravity::crypto::PrivateKey as CosmosPrivateKey; use deep_space::address::Address as CosmosAddress; use deep_space::coin::Coin; -use cosmos_gravity::crypto::PrivateKey as CosmosPrivateKey; use deep_space::Contact; use ethereum_gravity::{erc20_utils::get_erc20_balance, types::EthClient}; use ethers::core::k256::ecdsa::SigningKey;