From e4bc8f0b94898feb6e4021bfdf8300756a33c790 Mon Sep 17 00:00:00 2001 From: wenyuanhust Date: Tue, 31 Oct 2023 14:18:47 +0800 Subject: [PATCH 1/3] feat: replace axon-tools & upgrade to 0.111 --- Cargo.lock | 1175 ++++++++++++++++++--- crates/relayer-storage/Cargo.toml | 2 +- crates/relayer-storage/src/prelude.rs | 6 +- crates/relayer-storage/src/storage/mmr.rs | 9 +- crates/relayer-types/Cargo.toml | 5 +- crates/relayer/Cargo.toml | 15 +- crates/relayer/src/chain/axon.rs | 2 +- crates/relayer/src/chain/axon/rpc.rs | 2 +- crates/relayer/src/chain/axon/utils.rs | 2 +- crates/relayer/src/light_client/axon.rs | 2 +- tools/forcerelay-test/Cargo.toml | 8 +- tools/ibc-test/Cargo.toml | 10 +- 12 files changed, 1048 insertions(+), 190 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c4044f8e2..5d39197d5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -350,19 +350,58 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[package]] +name = "axon-protocol" +version = "0.1.0" +source = "git+https://github.com/wenyuanhust/axon.git?branch=forcerelay0#f76495be730fb469e734beab813e32e385852aa2" +dependencies = [ + "arc-swap", + "async-trait", + "bincode", + "bytes", + "cita_trie 5.0.1", + "ckb-hash 0.111.0", + "ckb-jsonrpc-types", + "ckb-sdk", + "ckb-traits", + "ckb-types", + "common-crypto", + "common-hasher", + "creep", + "derive_more", + "ethereum", + "ethereum-types", + "ethers-core", + "evm", + "faster-hex 0.8.1", + "hasher", + "lazy_static", + "ophelia", + "overlord", + "rand 0.7.3", + "rlp", + "rlp-derive", + "serde", + "thiserror", + "tokio", + "zeroize", +] + [[package]] name = "axon-tools" version = "0.1.1" -source = "git+https://github.com/axonweb3/axon-tools.git?rev=2e21582#2e21582da884b6399541812f3a0f57d233660cd6" +source = "git+https://github.com/wenyuanhust/axon.git?branch=forcerelay0#f76495be730fb469e734beab813e32e385852aa2" dependencies = [ + "axon-protocol", "bit-vec", "blst", "bytes", - "cita_trie", + "cita_trie 4.1.0", "derive_more", "ethereum-types", "faster-hex 0.8.1", "log", + "overlord", "rlp", "rlp-derive", "serde", @@ -481,6 +520,15 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + [[package]] name = "bindgen" version = "0.63.0" @@ -526,7 +574,7 @@ checksum = "0694ea59225b0c5f3cb405ff3f670e4828358ed26aec49dc352f730f0cb1a8a3" dependencies = [ "bech32 0.9.1", "bitcoin_hashes", - "secp256k1", + "secp256k1 0.24.3", "serde", ] @@ -569,6 +617,12 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95916998c798756098a4eb1b3f2cd510659705a9817bf203d61abd30fbec3e7b" +[[package]] +name = "blake2b-ref" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "294d17c72e0ba59fad763caa112368d0672083779cdebbb97164f4bb4c1e339a" + [[package]] name = "blake2b-rs" version = "0.2.0" @@ -604,15 +658,34 @@ source = "git+https://github.com/synapseweb3/lighthouse?rev=2c246d6#2c246d68011f dependencies = [ "arbitrary", "blst", - "eth2_hashing", - "eth2_serde_utils", - "eth2_ssz", + "eth2_hashing 0.3.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "eth2_serde_utils 0.1.1 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "eth2_ssz 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "ethereum-types", + "hex", + "rand 0.7.3", + "serde", + "serde_derive", + "tree_hash 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "zeroize", +] + +[[package]] +name = "bls" +version = "0.2.0" +source = "git+https://github.com/synapseweb3/lighthouse?rev=be911e6#be911e6bd3f54ae84b01310b411be19e2b274634" +dependencies = [ + "arbitrary", + "blst", + "eth2_hashing 0.3.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "eth2_serde_utils 0.1.1 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "eth2_ssz 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", "ethereum-types", "hex", "rand 0.7.3", "serde", "serde_derive", - "tree_hash", + "tree_hash 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", "zeroize", ] @@ -745,13 +818,27 @@ name = "cached_tree_hash" version = "0.1.0" source = "git+https://github.com/synapseweb3/lighthouse?rev=2c246d6#2c246d68011f14a9ee959b8d75b1dcb5d30b2993" dependencies = [ - "eth2_hashing", - "eth2_ssz", - "eth2_ssz_derive", - "eth2_ssz_types", + "eth2_hashing 0.3.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "eth2_ssz 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "eth2_ssz_derive 0.3.1 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "eth2_ssz_types 0.2.2 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", "ethereum-types", "smallvec 1.11.0", - "tree_hash", + "tree_hash 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", +] + +[[package]] +name = "cached_tree_hash" +version = "0.1.0" +source = "git+https://github.com/synapseweb3/lighthouse?rev=be911e6#be911e6bd3f54ae84b01310b411be19e2b274634" +dependencies = [ + "eth2_hashing 0.3.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "eth2_ssz 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "eth2_ssz_derive 0.3.1 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "eth2_ssz_types 0.2.2 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "ethereum-types", + "smallvec 1.11.0", + "tree_hash 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", ] [[package]] @@ -884,21 +971,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8c3d2abadaa28e0d277f9f6d07a2052544f045d929cd4d6f7bcfb43567c9767" dependencies = [ "hasher", - "parking_lot", + "parking_lot 0.12.1", + "rlp", +] + +[[package]] +name = "cita_trie" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0bc31eabef0259183d03c3846ad6818eaa8e542c31dae751c9d22ea030fb7d" +dependencies = [ + "hasher", + "parking_lot 0.12.1", "rlp", ] [[package]] name = "ckb-chain-spec" -version = "0.108.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78df45446aaa86b06a77b8b145cffa79950e7ede293cebcd114a62e74c29dbf" +checksum = "dbd58081d4ac4f08d068b52c5a07f0b379d93aad0dfa8344c6890429a9b73c2b" dependencies = [ "ckb-constant", "ckb-crypto", "ckb-dao-utils", "ckb-error", - "ckb-hash 0.108.0", + "ckb-hash 0.111.0", "ckb-jsonrpc-types", "ckb-pow", "ckb-rational", @@ -912,38 +1010,38 @@ dependencies = [ [[package]] name = "ckb-channel" -version = "0.108.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "920f26cc48cadcaf6f7bcc3960fde9f9f355633b6361da8ef31e1e1c00fc8858" +checksum = "701e6829c3dcbae46dd2442de63d080046480a6c2bb4951dbf419ad092459402" dependencies = [ "crossbeam-channel 0.5.8", ] [[package]] name = "ckb-constant" -version = "0.108.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302566408e5b296663ac5e8245bf71824ca2c7c2ef19a57fcc15939dd66527e9" +checksum = "9d5c980d4724770f72a37bceffa26ea64dd914891e45e856e2a3792fdb4a5a18" [[package]] name = "ckb-crypto" -version = "0.108.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aac31177b0a8bf3acd563c042775e40494e437b2bbbae96ac2473eec3a4da95d" +checksum = "df80db694e42b64a5774ae551daff3c8310cd99bb528643dbe0dd409abb298e7" dependencies = [ - "ckb-fixed-hash 0.108.0", + "ckb-fixed-hash 0.111.0", "faster-hex 0.6.1", "lazy_static", "rand 0.7.3", - "secp256k1", + "secp256k1 0.24.3", "thiserror", ] [[package]] name = "ckb-dao-utils" -version = "0.108.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1929c9627923fe1d22151361d74f5a5aa0dda77016d020307a54486eae11cb3c" +checksum = "5e158ce5a4e9d1fcd08d9dee87332474572c629c6273cca0aea80ba24892a403" dependencies = [ "byteorder", "ckb-error", @@ -952,9 +1050,9 @@ dependencies = [ [[package]] name = "ckb-error" -version = "0.108.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "446a519d8a847d97f1c8ece739dc1748751a9a2179249c96c45cced0825a7aa5" +checksum = "34cfd733cabcb4262ee679c02733864b13c8fa879e3aabc078fe0ec727cd95d6" dependencies = [ "anyhow", "ckb-occupied-capacity", @@ -964,29 +1062,29 @@ dependencies = [ [[package]] name = "ckb-fixed-hash" -version = "0.108.0" +version = "0.110.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00cbbc455b23748b32e06d16628a03e30d56ffa057f17093fdf5b42d4fb6c879" +checksum = "f5072b9497962b0d0f64d2894081aee85f84a72e0dbda4bb6511a5fc50256e92" dependencies = [ - "ckb-fixed-hash-core 0.108.0", - "ckb-fixed-hash-macros 0.108.0", + "ckb-fixed-hash-core 0.110.1", + "ckb-fixed-hash-macros 0.110.1", ] [[package]] name = "ckb-fixed-hash" -version = "0.110.1" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5072b9497962b0d0f64d2894081aee85f84a72e0dbda4bb6511a5fc50256e92" +checksum = "3b1dfab045fffa31cae9680d73e1f09833ca1abfb807dc4b9544739c94c23fd0" dependencies = [ - "ckb-fixed-hash-core 0.110.1", - "ckb-fixed-hash-macros 0.110.1", + "ckb-fixed-hash-core 0.111.0", + "ckb-fixed-hash-macros 0.111.0", ] [[package]] name = "ckb-fixed-hash-core" -version = "0.108.0" +version = "0.110.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4e644a4e026625b4be5a04cdf6c02043080e79feaf77d9cdbb2f0e6553f751" +checksum = "aa3b9a17c00132cfa9d414d091a8ec7c3fd7b711056140b9771d3429192e1a37" dependencies = [ "faster-hex 0.6.1", "serde", @@ -995,9 +1093,9 @@ dependencies = [ [[package]] name = "ckb-fixed-hash-core" -version = "0.110.1" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa3b9a17c00132cfa9d414d091a8ec7c3fd7b711056140b9771d3429192e1a37" +checksum = "bdd1727a6ecd4d0bcab604cb1ef707fe92e939fa6e9a438f9f25bf05208cb080" dependencies = [ "faster-hex 0.6.1", "serde", @@ -1006,11 +1104,11 @@ dependencies = [ [[package]] name = "ckb-fixed-hash-macros" -version = "0.108.0" +version = "0.110.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cfc980ef88c217825172eb46df269f47890f5e78a38214416f13b3bd17a4b4" +checksum = "0152fab35135f64a05ec83b36320e2d36f168e99b4b7e132e3b46a3b35d2b131" dependencies = [ - "ckb-fixed-hash-core 0.108.0", + "ckb-fixed-hash-core 0.110.1", "proc-macro2", "quote", "syn 1.0.109", @@ -1018,23 +1116,38 @@ dependencies = [ [[package]] name = "ckb-fixed-hash-macros" -version = "0.110.1" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0152fab35135f64a05ec83b36320e2d36f168e99b4b7e132e3b46a3b35d2b131" +checksum = "7b5da34c32585c35715fcde4e3a1dd3b0346d7af43506c5e51c613f01483e4f9" dependencies = [ - "ckb-fixed-hash-core 0.110.1", + "ckb-fixed-hash-core 0.111.0", "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "ckb-gen-types" +version = "0.111.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3bc54ca99b09e1eb5fc6c49bb1156644ce57fce9c6f52b5c13110b9a3143f7e" +dependencies = [ + "cfg-if 1.0.0", + "ckb-error", + "ckb-fixed-hash 0.111.0", + "ckb-hash 0.111.0", + "ckb-occupied-capacity", + "molecule", + "numext-fixed-uint", +] + [[package]] name = "ckb-hash" version = "0.106.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "038ad6840c4a89f4cd76b50621c4e6d82ca5f0d09fba707b1025016218d4a2d8" dependencies = [ - "blake2b-ref", + "blake2b-ref 0.2.1", "blake2b-rs", ] @@ -1044,7 +1157,17 @@ version = "0.108.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d9b683e89ae4ffdd5aaf4172eab00b6bbe7ea24e2abf77d3eb850ba36e8983" dependencies = [ - "blake2b-ref", + "blake2b-ref 0.2.1", + "blake2b-rs", +] + +[[package]] +name = "ckb-hash" +version = "0.111.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c88e5e2d6454be488fa5cf8b49175879353c6af969ff210dd6416f315b53120" +dependencies = [ + "blake2b-ref 0.3.1", "blake2b-rs", ] @@ -1062,9 +1185,9 @@ dependencies = [ [[package]] name = "ckb-jsonrpc-types" -version = "0.108.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac087657eaf964e729f40b3c929d3dac74a2cd8bb38d5e588756e2495711f810" +checksum = "d789a71538da07871c11aecbd28d6c632bb426bdfeed5fc2fa1b455e31152468" dependencies = [ "ckb-types", "faster-hex 0.6.1", @@ -1088,9 +1211,9 @@ dependencies = [ [[package]] name = "ckb-logger" -version = "0.108.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "911c4695ddf82f78da8f514b359092bbe231f58c2669c93b1cfc9a2030b125bb" +checksum = "939fa09ca3534248d3d452552546f016fc7e11346644fbc5b55d2ad38d3e80e7" dependencies = [ "log", ] @@ -1104,11 +1227,32 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "ckb-merkle-mountain-range" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d15193decfa1e0b151ce19e42d118db048459a27720fb3de7d3103c30adccb12" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "ckb-mock-tx-types" +version = "0.111.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcd5b156c36f03ad6053e174e26a874088c8e9098c3a2e80ec93dc9831ecfac3" +dependencies = [ + "ckb-jsonrpc-types", + "ckb-traits", + "ckb-types", + "serde", +] + [[package]] name = "ckb-occupied-capacity" -version = "0.108.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d2a1dd0d4ba5dafba1e30d437c1148b20f42edb76b6794323e05bda626754eb" +checksum = "358ad364465a5a359575642c12952ba8735a148382789d65ddd5231cd21899fc" dependencies = [ "ckb-occupied-capacity-core", "ckb-occupied-capacity-macros", @@ -1116,18 +1260,18 @@ dependencies = [ [[package]] name = "ckb-occupied-capacity-core" -version = "0.108.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ebba3d564098a84c83f4740e1dce48a5e2da759becdb47e3c7965f0808e6e92" +checksum = "de2dc06db98f8a995cb7145bc56dbd17bb0c8ab2e59a07aaa40f2c956c2451dd" dependencies = [ "serde", ] [[package]] name = "ckb-occupied-capacity-macros" -version = "0.108.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6321bba85cdf9724029d8c906851dd4a90906869b42f9100b16645a1261d4c" +checksum = "b1709e0f101026c4ef29b1593692e480b03cdb4e0dace1e348494c6554d50d35" dependencies = [ "ckb-occupied-capacity-core", "quote", @@ -1136,12 +1280,12 @@ dependencies = [ [[package]] name = "ckb-pow" -version = "0.108.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9167b427f42874e68e20e6946d5211709979ff1d86c0061a71c2f6a6aa17659" +checksum = "481e76388993d7e6e0dd797e8532c60398901787e28d0638ca114254257b8813" dependencies = [ "byteorder", - "ckb-hash 0.108.0", + "ckb-hash 0.111.0", "ckb-types", "eaglesong", "log", @@ -1150,9 +1294,9 @@ dependencies = [ [[package]] name = "ckb-rational" -version = "0.108.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2519249f8d47fa758d3fb3cf3049327c69ce0f2acd79d61427482c8661d3dbd" +checksum = "bd3959391a4fb05d6a2578aa8db75732ada1ce381fb34d6eeaf09d395702e63c" dependencies = [ "numext-fixed-uint", "serde", @@ -1160,9 +1304,9 @@ dependencies = [ [[package]] name = "ckb-resource" -version = "0.108.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3abddc968d7f1e70584ab04180c347380a44acbe0b60e26cc96208ec8885279" +checksum = "03222b0613cf3f55cb181471d7a84879b6fba5e920e2e1c7ba2c2315614bd387" dependencies = [ "ckb-system-scripts", "ckb-types", @@ -1186,14 +1330,14 @@ dependencies = [ [[package]] name = "ckb-script" -version = "0.108.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b4754a2f0ccea5ea1934822bd18a3a66c46344d8c3872cb20ffdcf0851fab9" +checksum = "8c9075ad901eae97925f491b6be675d7b19bf7b10eaa94a88f6e8070c0cd00ba" dependencies = [ "byteorder", "ckb-chain-spec", "ckb-error", - "ckb-hash 0.108.0", + "ckb-hash 0.111.0", "ckb-logger", "ckb-traits", "ckb-types", @@ -1204,32 +1348,36 @@ dependencies = [ [[package]] name = "ckb-sdk" -version = "2.5.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b201220ac5762353f9313fbbc3c4cee2a6a924c16c17df51517644991575cc1" +checksum = "9ded3042867b04f20456f17a1f752f2604a24659f3aeec1928917d9ee6b659d4" dependencies = [ "anyhow", "bech32 0.8.1", "bitflags 1.3.2", "bytes", + "ckb-chain-spec", "ckb-crypto", "ckb-dao-utils", - "ckb-hash 0.108.0", + "ckb-hash 0.111.0", "ckb-jsonrpc-types", + "ckb-mock-tx-types", "ckb-resource", "ckb-script", "ckb-traits", "ckb-types", "dashmap", + "derive-getters", + "dyn-clone", "enum-repr-derive", "futures", "jsonrpc-core", "lazy_static", "log", "lru", - "parking_lot", + "parking_lot 0.12.1", "reqwest", - "secp256k1", + "secp256k1 0.24.3", "serde", "serde_derive", "serde_json", @@ -1255,52 +1403,56 @@ dependencies = [ [[package]] name = "ckb-traits" -version = "0.108.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9d5827f20a396dfb785398db484fe50de93d76c02e1e32287832604a9dda91" +checksum = "ca049aba2cb2d1208c6044accb497b17290ad56de629f6a4b95eded67a43fd40" dependencies = [ "ckb-types", ] [[package]] name = "ckb-types" -version = "0.108.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c22b3b1ca8f88a8f48e2f73321c0605281c9c6f1e1c4d651c6138265c22291e" +checksum = "b6ec737e4957418bbd0f4091e8565a89bbd8f6fc37a20360820e44d1f1e44e58" dependencies = [ "bit-vec", "bytes", "ckb-channel", + "ckb-constant", "ckb-error", - "ckb-fixed-hash 0.108.0", - "ckb-hash 0.108.0", - "ckb-merkle-mountain-range", + "ckb-fixed-hash 0.111.0", + "ckb-gen-types", + "ckb-hash 0.111.0", + "ckb-merkle-mountain-range 0.5.2", "ckb-occupied-capacity", "ckb-rational", "derive_more", + "golomb-coded-set", "merkle-cbt", "molecule", "numext-fixed-uint", "once_cell", + "paste", ] [[package]] name = "ckb-util" -version = "0.108.0" +version = "0.111.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d165c6958601dfbfa4cd00c9263ecfb013b4ccb6d9e1d3187bfa62801abc7d" +checksum = "011b907b18aa706fc224a1309f14eadd9cc14c42cf2258ca3010d1324bc20f10" dependencies = [ "linked-hash-map", "once_cell", - "parking_lot", + "parking_lot 0.12.1", "regex", ] [[package]] name = "ckb-vm" -version = "0.22.2" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1223acc8054ce96f91c5d99d4942898d0bdadd618c3b14f1acd3e67212991d8e" +checksum = "0cc004a826b9bc9319ffae0b8415690e1b5f1482266d55fbd43843aa40ddcd63" dependencies = [ "byteorder", "bytes", @@ -1316,9 +1468,12 @@ dependencies = [ [[package]] name = "ckb-vm-definitions" -version = "0.22.2" +version = "0.24.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4af800ae2b6c54b70efa398dab015a09a52eeac2dd1ac3ad32c9bbe224974225" +checksum = "c4ced3ff9d79b53d93c106720f6c1f855694290e33581850e05c859500eee83f" +dependencies = [ + "paste", +] [[package]] name = "clang-sys" @@ -1501,11 +1656,34 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +[[package]] +name = "common-crypto" +version = "0.2.1" +source = "git+https://github.com/wenyuanhust/axon.git?branch=forcerelay0#f76495be730fb469e734beab813e32e385852aa2" +dependencies = [ + "ophelia", + "ophelia-blst", + "ophelia-secp256k1", +] + +[[package]] +name = "common-hasher" +version = "0.1.0" +source = "git+https://github.com/wenyuanhust/axon.git?branch=forcerelay0#f76495be730fb469e734beab813e32e385852aa2" +dependencies = [ + "tiny-keccak", +] + [[package]] name = "compare_fields" version = "0.2.0" source = "git+https://github.com/synapseweb3/lighthouse?rev=2c246d6#2c246d68011f14a9ee959b8d75b1dcb5d30b2993" +[[package]] +name = "compare_fields" +version = "0.2.0" +source = "git+https://github.com/synapseweb3/lighthouse?rev=be911e6#be911e6bd3f54ae84b01310b411be19e2b274634" + [[package]] name = "compare_fields_derive" version = "0.2.0" @@ -1515,6 +1693,15 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "compare_fields_derive" +version = "0.2.0" +source = "git+https://github.com/synapseweb3/lighthouse?rev=be911e6#be911e6bd3f54ae84b01310b411be19e2b274634" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "console" version = "0.15.7" @@ -1603,6 +1790,15 @@ dependencies = [ "cfg-if 1.0.0", ] +[[package]] +name = "creep" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44b3989c311486a207116b17712102cf6f18a6af80308ed13ac6350b9d85e75c" +dependencies = [ + "dyn-clone", +] + [[package]] name = "crossbeam-channel" version = "0.4.4" @@ -1847,7 +2043,7 @@ dependencies = [ "hashbrown 0.14.0", "lock_api", "once_cell", - "parking_lot_core", + "parking_lot_core 0.9.8", ] [[package]] @@ -1902,6 +2098,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive-getters" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0122f262bf9c9a367829da84f808d9fb128c10ef283bbe7b0922a77cf07b2747" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "derive_arbitrary" version = "1.3.0" @@ -2243,6 +2450,12 @@ dependencies = [ "termcolor", ] +[[package]] +name = "environmental" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" + [[package]] name = "equivalent" version = "1.0.1" @@ -2321,13 +2534,39 @@ dependencies = [ "sha2 0.10.7", ] +[[package]] +name = "eth2_hashing" +version = "0.3.0" +source = "git+https://github.com/synapseweb3/lighthouse?rev=be911e6#be911e6bd3f54ae84b01310b411be19e2b274634" +dependencies = [ + "cpufeatures", + "lazy_static", + "ring", + "sha2 0.10.7", +] + [[package]] name = "eth2_interop_keypairs" version = "0.2.0" source = "git+https://github.com/synapseweb3/lighthouse?rev=2c246d6#2c246d68011f14a9ee959b8d75b1dcb5d30b2993" dependencies = [ - "bls", - "eth2_hashing", + "bls 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "eth2_hashing 0.3.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "hex", + "lazy_static", + "num-bigint", + "serde", + "serde_derive", + "serde_yaml 0.8.26", +] + +[[package]] +name = "eth2_interop_keypairs" +version = "0.2.0" +source = "git+https://github.com/synapseweb3/lighthouse?rev=be911e6#be911e6bd3f54ae84b01310b411be19e2b274634" +dependencies = [ + "bls 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "eth2_hashing 0.3.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", "hex", "lazy_static", "num-bigint", @@ -2348,6 +2587,18 @@ dependencies = [ "serde_json", ] +[[package]] +name = "eth2_serde_utils" +version = "0.1.1" +source = "git+https://github.com/synapseweb3/lighthouse?rev=be911e6#be911e6bd3f54ae84b01310b411be19e2b274634" +dependencies = [ + "ethereum-types", + "hex", + "serde", + "serde_derive", + "serde_json", +] + [[package]] name = "eth2_ssz" version = "0.4.1" @@ -2358,6 +2609,16 @@ dependencies = [ "smallvec 1.11.0", ] +[[package]] +name = "eth2_ssz" +version = "0.4.1" +source = "git+https://github.com/synapseweb3/lighthouse?rev=be911e6#be911e6bd3f54ae84b01310b411be19e2b274634" +dependencies = [ + "ethereum-types", + "itertools 0.10.5", + "smallvec 1.11.0", +] + [[package]] name = "eth2_ssz_derive" version = "0.3.1" @@ -2369,6 +2630,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "eth2_ssz_derive" +version = "0.3.1" +source = "git+https://github.com/synapseweb3/lighthouse?rev=be911e6#be911e6bd3f54ae84b01310b411be19e2b274634" +dependencies = [ + "darling 0.13.4", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "eth2_ssz_types" version = "0.2.2" @@ -2376,47 +2648,86 @@ source = "git+https://github.com/synapseweb3/lighthouse?rev=2c246d6#2c246d68011f dependencies = [ "arbitrary", "derivative", - "eth2_serde_utils", - "eth2_ssz", + "eth2_serde_utils 0.1.1 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "eth2_ssz 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "serde", + "serde_derive", + "smallvec 1.11.0", + "tree_hash 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "typenum", +] + +[[package]] +name = "eth2_ssz_types" +version = "0.2.2" +source = "git+https://github.com/synapseweb3/lighthouse?rev=be911e6#be911e6bd3f54ae84b01310b411be19e2b274634" +dependencies = [ + "arbitrary", + "derivative", + "eth2_serde_utils 0.1.1 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "eth2_ssz 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", "serde", "serde_derive", "smallvec 1.11.0", - "tree_hash", + "tree_hash 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", "typenum", ] [[package]] name = "eth_light_client_in_ckb-prover" -version = "0.2.1" -source = "git+https://github.com/synapseweb3/eth-light-client-in-ckb?tag=v0.2.1#5e8549d20f8c91da7362cb1c87823c53fd7cd205" +version = "0.3.0-alpha" +source = "git+https://github.com/synapseweb3/eth-light-client-in-ckb#3812d220a7cf9da8cb3da35ebb19ead2c7fd7657" dependencies = [ - "cita_trie", - "eth_light_client_in_ckb-verification", + "cita_trie 4.1.0", + "eth_light_client_in_ckb-verification 0.3.0-alpha", "ethers-core", "hasher", - "merkle_proof", - "tree_hash", - "types", + "merkle_proof 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "tree_hash 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "types 0.2.1 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", ] [[package]] name = "eth_light_client_in_ckb-verification" version = "0.2.1" -source = "git+https://github.com/synapseweb3/eth-light-client-in-ckb?tag=v0.2.1#5e8549d20f8c91da7362cb1c87823c53fd7cd205" +source = "git+https://github.com/wenyuanhust/eth-light-client-in-ckb.git?branch=v0.2.1#e5a28c7cf59882c7b0942b304677bca031e5a931" dependencies = [ - "ckb-merkle-mountain-range", - "eth2_hashing", - "eth2_ssz", - "eth2_ssz_derive", - "eth2_ssz_types", + "ckb-merkle-mountain-range 0.6.0", + "eth2_hashing 0.3.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "eth2_ssz 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "eth2_ssz_derive 0.3.1 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "eth2_ssz_types 0.2.2 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", "log", - "merkle_proof", + "merkle_proof 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", "molecule", "rlp", "tiny-keccak", - "tree_hash", - "tree_hash_derive", - "types", + "tree_hash 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "tree_hash_derive 0.4.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "types 0.2.1 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", +] + +[[package]] +name = "eth_light_client_in_ckb-verification" +version = "0.3.0-alpha" +source = "git+https://github.com/synapseweb3/eth-light-client-in-ckb#3812d220a7cf9da8cb3da35ebb19ead2c7fd7657" +dependencies = [ + "bls 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "ckb-merkle-mountain-range 0.6.0", + "eth2_hashing 0.3.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "eth2_ssz 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "eth2_ssz_derive 0.3.1 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "eth2_ssz_types 0.2.2 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "ethereum-types", + "faster-hex 0.6.1", + "log", + "merkle_proof 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "molecule", + "rlp", + "tiny-keccak", + "tree_hash 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "tree_hash_derive 0.4.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "types 0.2.1 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", ] [[package]] @@ -2451,6 +2762,24 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "ethereum" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a89fb87a9e103f71b903b80b670200b54cc67a07578f070681f1fffb7396fb7" +dependencies = [ + "bytes", + "ethereum-types", + "hash-db", + "hash256-std-hasher", + "parity-scale-codec", + "rlp", + "scale-info", + "serde", + "sha3", + "triehash", +] + [[package]] name = "ethereum-types" version = "0.14.1" @@ -2715,6 +3044,64 @@ dependencies = [ "yansi", ] +[[package]] +name = "evm" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4448c65b71e8e2b9718232d84d09045eeaaccb2320494e6bd6dbf7e58fec8ff" +dependencies = [ + "auto_impl", + "environmental", + "ethereum", + "evm-core", + "evm-gasometer", + "evm-runtime", + "log", + "parity-scale-codec", + "primitive-types", + "rlp", + "scale-info", + "serde", + "sha3", +] + +[[package]] +name = "evm-core" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64c51bec0eb68a891c2575c758eaaa1d61373fc51f7caaf216b1fb5c3fea3b5d" +dependencies = [ + "parity-scale-codec", + "primitive-types", + "scale-info", + "serde", +] + +[[package]] +name = "evm-gasometer" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8b93c59c54fc26522d842f0e0d3f8e8be331c776df18ff3e540b53c2f64d509" +dependencies = [ + "environmental", + "evm-core", + "evm-runtime", + "primitive-types", +] + +[[package]] +name = "evm-runtime" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c79b9459ce64f1a28688397c4013764ce53cd57bb84efc16b5187fa9b05b13ad" +dependencies = [ + "auto_impl", + "environmental", + "evm-core", + "primitive-types", + "sha3", +] + [[package]] name = "eyre" version = "0.6.8" @@ -2849,12 +3236,12 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "forcerelay-ckb-sdk" version = "0.1.0" -source = "git+https://github.com/synapseweb3/forcerelay-ckb-sdk?rev=cd82be97#cd82be972ad85fbcbd9807dd221d8ee42c1bc718" +source = "git+https://github.com/synapseweb3/forcerelay-ckb-sdk?branch=ckb-0.111#096ed02333c631fec061847e60a759238c961eca" dependencies = [ "anyhow", "async-stream", "bytes", - "ckb-fixed-hash 0.108.0", + "ckb-fixed-hash 0.111.0", "ckb-ics-axon", "ckb-jsonrpc-types", "ckb-sdk", @@ -2877,7 +3264,7 @@ dependencies = [ "ckb-jsonrpc-types", "ckb-sdk", "ckb-types", - "eth_light_client_in_ckb-verification", + "eth_light_client_in_ckb-verification 0.2.1", "hex", "ibc-relayer", ] @@ -2931,6 +3318,12 @@ dependencies = [ "libc", ] +[[package]] +name = "fuchsia-cprng" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" + [[package]] name = "funty" version = "2.0.0" @@ -3159,6 +3552,15 @@ dependencies = [ "scroll", ] +[[package]] +name = "golomb-coded-set" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7076c0cd6257d84b785b0f22c36443dd47a5e86a1256d7ef82c8cb88ea9a7e" +dependencies = [ + "siphasher", +] + [[package]] name = "group" version = "0.12.1" @@ -3249,6 +3651,21 @@ dependencies = [ "thiserror", ] +[[package]] +name = "hash-db" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" + +[[package]] +name = "hash256-std-hasher" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92c171d55b98633f4ed3860808f004099b36c1cc29c42cfc53aa8591b21efcf2" +dependencies = [ + "crunchy", +] + [[package]] name = "hashbrown" version = "0.12.3" @@ -3382,6 +3799,17 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "hostname" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" +dependencies = [ + "libc", + "match_cfg", + "winapi", +] + [[package]] name = "html5ever" version = "0.26.0" @@ -3446,6 +3874,15 @@ dependencies = [ "serde", ] +[[package]] +name = "hummer" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373ca45b03aec340e2090ce8e2f14fb7f0fbfe3500b3daedfe116548bb2776ec" +dependencies = [ + "faster-hex 0.6.1", +] + [[package]] name = "hyper" version = "0.14.27" @@ -3646,7 +4083,7 @@ dependencies = [ "ed25519-dalek-bip32", "env_logger 0.10.0", "eth_light_client_in_ckb-prover", - "eth_light_client_in_ckb-verification", + "eth_light_client_in_ckb-verification 0.2.1", "ethers", "eyre", "flex-error", @@ -3676,7 +4113,7 @@ dependencies = [ "retry", "ripemd", "rlp", - "secp256k1", + "secp256k1 0.24.3", "semver", "serde", "serde_derive", @@ -3702,9 +4139,9 @@ dependencies = [ "tonic", "tracing", "tracing-subscriber", - "tree_hash", - "tree_hash_derive", - "types", + "tree_hash 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "tree_hash_derive 0.4.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "types 0.2.1 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", "uuid 1.4.1", ] @@ -3768,9 +4205,9 @@ name = "ibc-relayer-storage" version = "0.1.0" dependencies = [ "ckb-rocksdb", - "eth_light_client_in_ckb-verification", + "eth_light_client_in_ckb-verification 0.2.1", "thiserror", - "types", + "types 0.2.1 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", ] [[package]] @@ -3778,13 +4215,13 @@ name = "ibc-relayer-types" version = "0.23.0" dependencies = [ "axon-tools", - "bls", + "bls 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", "bytes", "derive_more", "dyn-clone", "env_logger 0.10.0", "erased-serde", - "eth2_ssz_types", + "eth2_ssz_types 0.2.2 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", "ethereum-types", "flex-error", "hex", @@ -3810,8 +4247,8 @@ dependencies = [ "time", "tracing", "tracing-subscriber", - "tree_hash", - "tree_hash_derive", + "tree_hash 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "tree_hash_derive 0.4.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", "uint", ] @@ -3858,7 +4295,7 @@ dependencies = [ "prost 0.12.1", "reqwest", "rlp", - "secp256k1", + "secp256k1 0.24.3", "serde", "serde_json", "tendermint-rpc", @@ -4084,6 +4521,14 @@ dependencies = [ "bytes", ] +[[package]] +name = "int_to_bytes" +version = "0.2.0" +source = "git+https://github.com/synapseweb3/lighthouse?rev=be911e6#be911e6bd3f54ae84b01310b411be19e2b274634" +dependencies = [ + "bytes", +] + [[package]] name = "io-lifetimes" version = "1.0.11" @@ -4319,6 +4764,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "libmath" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81f9daadfd4d8c4946fa32071d428cb70e493ab2c55a57a48da5261447d124cf" +dependencies = [ + "rand 0.3.23", +] + [[package]] name = "libsqlite3-sys" version = "0.25.2" @@ -4411,6 +4865,12 @@ dependencies = [ "tendril", ] +[[package]] +name = "match_cfg" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" + [[package]] name = "matchers" version = "0.1.0" @@ -4521,10 +4981,21 @@ name = "merkle_proof" version = "0.2.0" source = "git+https://github.com/synapseweb3/lighthouse?rev=2c246d6#2c246d68011f14a9ee959b8d75b1dcb5d30b2993" dependencies = [ - "eth2_hashing", + "eth2_hashing 0.3.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "ethereum-types", + "lazy_static", + "safe_arith 0.1.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", +] + +[[package]] +name = "merkle_proof" +version = "0.2.0" +source = "git+https://github.com/synapseweb3/lighthouse?rev=be911e6#be911e6bd3f54ae84b01310b411be19e2b274634" +dependencies = [ + "eth2_hashing 0.3.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", "ethereum-types", "lazy_static", - "safe_arith", + "safe_arith 0.1.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", ] [[package]] @@ -4604,7 +5075,7 @@ dependencies = [ "crossbeam-utils 0.8.16", "num_cpus", "once_cell", - "parking_lot", + "parking_lot 0.12.1", "quanta", "rustc_version", "scheduled-thread-pool", @@ -4618,9 +5089,9 @@ dependencies = [ [[package]] name = "molecule" -version = "0.7.3" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc8276c02a006bddad7d1c28c1a88f30421e1b5f0ba0ca96ceb8077c7d20c01" +checksum = "d4fd9767ab5e5f2ea40f71ff4c8bdb633c50509052e093c2fdd0e390a749dfa3" dependencies = [ "bytes", "cfg-if 1.0.0", @@ -4650,6 +5121,34 @@ dependencies = [ "twoway", ] +[[package]] +name = "muta-apm" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23c741a1e603e0526071c4814b643d99598d9bd620a01531b2a26d72148d5094" +dependencies = [ + "creep", + "crossbeam-channel 0.5.8", + "lazy_static", + "log", + "muta-apm-derive", + "parking_lot 0.11.2", + "rustracing", + "rustracing_jaeger", +] + +[[package]] +name = "muta-apm-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41b012b78ec3f6df1a7f07dda089be3ed832ccce240267fb854413fa5d053746" +dependencies = [ + "proc-macro2", + "quote", + "serde_json", + "syn 1.0.109", +] + [[package]] name = "native-tls" version = "0.2.11" @@ -5046,6 +5545,61 @@ dependencies = [ "thiserror", ] +[[package]] +name = "ophelia" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e67a5c0c612897285526f587557cd9ad3f74b79e6a277bed432e1c57f27625e" +dependencies = [ + "anyhow", + "bytes", + "ophelia-hasher", + "rand 0.7.3", +] + +[[package]] +name = "ophelia-blst" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "072a6c01970d2abfff9e757cf88cd497e27483ae4cd8e892173faafb747d82a3" +dependencies = [ + "blst", + "ophelia", + "ophelia-derive", + "thiserror", +] + +[[package]] +name = "ophelia-derive" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93bf0f35140949b59d621f5d907bde3f2cc286ea8ad609411d3447725869d814" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ophelia-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61d941a336bcf304907e9e69610cfb5b2329af1305134299ec8d616aabe1d88d" +dependencies = [ + "thiserror", +] + +[[package]] +name = "ophelia-secp256k1" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d408db415792bbb65c0f4d908bb8e8f39a024f767dba0dccd3f46ce72282436a" +dependencies = [ + "lazy_static", + "ophelia", + "ophelia-derive", + "secp256k1 0.27.0", +] + [[package]] name = "option-ext" version = "0.2.0" @@ -5074,6 +5628,30 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[package]] +name = "overlord" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33af004ea889750116a57fd7bb2d99ea27ad4de4b62bf92822fb84d5de82243f" +dependencies = [ + "async-trait", + "bit-vec", + "bytes", + "creep", + "derive_more", + "futures", + "hummer", + "log", + "muta-apm", + "parking_lot 0.12.1", + "prime_tools", + "rand_core 0.6.4", + "rand_pcg 0.3.1", + "rlp", + "serde", + "tokio", +] + [[package]] name = "owo-colors" version = "3.5.0" @@ -5106,6 +5684,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "parking_lot" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +dependencies = [ + "instant", + "lock_api", + "parking_lot_core 0.8.6", +] + [[package]] name = "parking_lot" version = "0.12.1" @@ -5113,7 +5702,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core", + "parking_lot_core 0.9.8", +] + +[[package]] +name = "parking_lot_core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" +dependencies = [ + "cfg-if 1.0.0", + "instant", + "libc", + "redox_syscall 0.2.16", + "smallvec 1.11.0", + "winapi", ] [[package]] @@ -5481,6 +6084,16 @@ dependencies = [ "syn 2.0.31", ] +[[package]] +name = "prime_tools" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8373fbf30504d82a72a54968d09bed5929434eb1a4a7b71da385c90cb1d6c43b" +dependencies = [ + "bit-vec", + "libmath", +] + [[package]] name = "primitive-types" version = "0.12.1" @@ -5548,7 +6161,7 @@ dependencies = [ "fnv", "lazy_static", "memchr", - "parking_lot", + "parking_lot 0.12.1", "protobuf", "thiserror", ] @@ -5676,6 +6289,29 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" +[[package]] +name = "rand" +version = "0.3.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" +dependencies = [ + "libc", + "rand 0.4.6", +] + +[[package]] +name = "rand" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" +dependencies = [ + "fuchsia-cprng", + "libc", + "rand_core 0.3.1", + "rdrand", + "winapi", +] + [[package]] name = "rand" version = "0.7.3" @@ -5687,7 +6323,7 @@ dependencies = [ "rand_chacha 0.2.2", "rand_core 0.5.1", "rand_hc", - "rand_pcg", + "rand_pcg 0.2.1", ] [[package]] @@ -5721,6 +6357,21 @@ dependencies = [ "rand_core 0.6.4", ] +[[package]] +name = "rand_core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" +dependencies = [ + "rand_core 0.4.2", +] + +[[package]] +name = "rand_core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" + [[package]] name = "rand_core" version = "0.5.1" @@ -5757,6 +6408,15 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "rand_pcg" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59cad018caf63deb318e5a4586d99a24424a364f40f1e5778c29aca23f4fc73e" +dependencies = [ + "rand_core 0.6.4", +] + [[package]] name = "rand_xorshift" version = "0.3.0" @@ -5797,6 +6457,15 @@ dependencies = [ "num_cpus", ] +[[package]] +name = "rdrand" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +dependencies = [ + "rand_core 0.3.1", +] + [[package]] name = "redox_syscall" version = "0.2.16" @@ -6225,6 +6894,33 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustracing" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a44822b10c095e574869de2b891e40c724fef42cadaea040d1cd3bdbb13d36a5" +dependencies = [ + "backtrace", + "crossbeam-channel 0.5.8", + "rand 0.8.5", + "trackable 0.2.24", +] + +[[package]] +name = "rustracing_jaeger" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6c2fe9411ef5f43ac773f0e84ad735804c55719346a7aad52de2d9162db97c8" +dependencies = [ + "crossbeam-channel 0.5.8", + "hostname", + "percent-encoding", + "rand 0.8.5", + "rustracing", + "thrift_codec", + "trackable 0.2.24", +] + [[package]] name = "rustversion" version = "1.0.14" @@ -6289,6 +6985,11 @@ name = "safe_arith" version = "0.1.0" source = "git+https://github.com/synapseweb3/lighthouse?rev=2c246d6#2c246d68011f14a9ee959b8d75b1dcb5d30b2993" +[[package]] +name = "safe_arith" +version = "0.1.0" +source = "git+https://github.com/synapseweb3/lighthouse?rev=be911e6#be911e6bd3f54ae84b01310b411be19e2b274634" + [[package]] name = "safemem" version = "0.3.3" @@ -6319,6 +7020,7 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35c0a159d0c45c12b20c5a844feb1fe4bea86e28f17b92a5f0c42193634d3782" dependencies = [ + "bitvec", "cfg-if 1.0.0", "derive_more", "parity-scale-codec", @@ -6352,7 +7054,7 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19" dependencies = [ - "parking_lot", + "parking_lot 0.12.1", ] [[package]] @@ -6454,10 +7156,19 @@ checksum = "6b1629c9c557ef9b293568b338dddfc8208c98a18c59d722a9d53f859d9c9b62" dependencies = [ "bitcoin_hashes", "rand 0.8.5", - "secp256k1-sys", + "secp256k1-sys 0.6.1", "serde", ] +[[package]] +name = "secp256k1" +version = "0.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25996b82292a7a57ed3508f052cfff8640d38d32018784acd714758b43da9c8f" +dependencies = [ + "secp256k1-sys 0.8.1", +] + [[package]] name = "secp256k1-sys" version = "0.6.1" @@ -6467,6 +7178,15 @@ dependencies = [ "cc", ] +[[package]] +name = "secp256k1-sys" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70a129b9e9efbfb223753b9163c4ab3b13cff7fd9c7f010fbac25ab4099fa07e" +dependencies = [ + "cc", +] + [[package]] name = "secrecy" version = "0.8.0" @@ -6700,7 +7420,7 @@ dependencies = [ "futures", "lazy_static", "log", - "parking_lot", + "parking_lot 0.12.1", "serial_test_derive", ] @@ -6970,7 +7690,7 @@ checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", "once_cell", - "parking_lot", + "parking_lot 0.12.1", "phf_shared 0.10.0", "precomputed-hash", "serde", @@ -7098,7 +7818,16 @@ name = "swap_or_not_shuffle" version = "0.2.0" source = "git+https://github.com/synapseweb3/lighthouse?rev=2c246d6#2c246d68011f14a9ee959b8d75b1dcb5d30b2993" dependencies = [ - "eth2_hashing", + "eth2_hashing 0.3.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "ethereum-types", +] + +[[package]] +name = "swap_or_not_shuffle" +version = "0.2.0" +source = "git+https://github.com/synapseweb3/lighthouse?rev=be911e6#be911e6bd3f54ae84b01310b411be19e2b274634" +dependencies = [ + "eth2_hashing 0.3.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", "ethereum-types", ] @@ -7386,6 +8115,15 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "test_random_derive" +version = "0.2.0" +source = "git+https://github.com/synapseweb3/lighthouse?rev=be911e6#be911e6bd3f54ae84b01310b411be19e2b274634" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "textwrap" version = "0.16.0" @@ -7431,6 +8169,16 @@ dependencies = [ "num_cpus", ] +[[package]] +name = "thrift_codec" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fb61fb3d0a0af14949f3a6949b2639112e13226647112824f4d081533f9b1a8" +dependencies = [ + "byteorder", + "trackable 0.2.24", +] + [[package]] name = "time" version = "0.3.20" @@ -7517,16 +8265,16 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.32.0" +version = "1.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" +checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" dependencies = [ "backtrace", "bytes", "libc", "mio", "num_cpus", - "parking_lot", + "parking_lot 0.12.1", "pin-project-lite", "signal-hook-registry", "socket2 0.5.3", @@ -7861,12 +8609,51 @@ dependencies = [ "tracing-serde", ] +[[package]] +name = "trackable" +version = "0.2.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98abb9e7300b9ac902cc04920945a874c1973e08c310627cc4458c04b70dd32" +dependencies = [ + "trackable 1.3.0", + "trackable_derive", +] + +[[package]] +name = "trackable" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15bd114abb99ef8cee977e517c8f37aee63f184f2d08e3e6ceca092373369ae" +dependencies = [ + "trackable_derive", +] + +[[package]] +name = "trackable_derive" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebeb235c5847e2f82cfe0f07eb971d1e5f6804b18dac2ae16349cc604380f82f" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "tree_hash" version = "0.4.1" source = "git+https://github.com/synapseweb3/lighthouse?rev=2c246d6#2c246d68011f14a9ee959b8d75b1dcb5d30b2993" dependencies = [ - "eth2_hashing", + "eth2_hashing 0.3.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "ethereum-types", + "smallvec 1.11.0", +] + +[[package]] +name = "tree_hash" +version = "0.4.1" +source = "git+https://github.com/synapseweb3/lighthouse?rev=be911e6#be911e6bd3f54ae84b01310b411be19e2b274634" +dependencies = [ + "eth2_hashing 0.3.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", "ethereum-types", "smallvec 1.11.0", ] @@ -7881,6 +8668,26 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "tree_hash_derive" +version = "0.4.0" +source = "git+https://github.com/synapseweb3/lighthouse?rev=be911e6#be911e6bd3f54ae84b01310b411be19e2b274634" +dependencies = [ + "darling 0.13.4", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "triehash" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1631b201eb031b563d2e85ca18ec8092508e262a3196ce9bd10a67ec87b9f5c" +dependencies = [ + "hash-db", + "rlp", +] + [[package]] name = "triomphe" version = "0.1.9" @@ -7955,33 +8762,81 @@ version = "0.2.1" source = "git+https://github.com/synapseweb3/lighthouse?rev=2c246d6#2c246d68011f14a9ee959b8d75b1dcb5d30b2993" dependencies = [ "arbitrary", - "bls", - "cached_tree_hash", - "compare_fields", - "compare_fields_derive", + "bls 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "cached_tree_hash 0.1.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "compare_fields 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "compare_fields_derive 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "derivative", + "eth2_hashing 0.3.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "eth2_interop_keypairs 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "eth2_serde_utils 0.1.1 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "eth2_ssz 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "eth2_ssz_derive 0.3.1 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "eth2_ssz_types 0.2.2 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "ethereum-types", + "hex", + "int_to_bytes 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "itertools 0.10.5", + "lazy_static", + "log", + "maplit", + "merkle_proof 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "metastruct", + "parking_lot 0.12.1", + "rand 0.8.5", + "rand_xorshift", + "rayon", + "regex", + "rusqlite", + "safe_arith 0.1.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "serde", + "serde_derive", + "serde_json", + "serde_with 1.14.0", + "serde_yaml 0.8.26", + "slog", + "smallvec 1.11.0", + "superstruct", + "swap_or_not_shuffle 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "tempfile", + "test_random_derive 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "tree_hash 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", + "tree_hash_derive 0.4.0 (git+https://github.com/synapseweb3/lighthouse?rev=2c246d6)", +] + +[[package]] +name = "types" +version = "0.2.1" +source = "git+https://github.com/synapseweb3/lighthouse?rev=be911e6#be911e6bd3f54ae84b01310b411be19e2b274634" +dependencies = [ + "arbitrary", + "bls 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "cached_tree_hash 0.1.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "compare_fields 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "compare_fields_derive 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", "derivative", - "eth2_hashing", - "eth2_interop_keypairs", - "eth2_serde_utils", - "eth2_ssz", - "eth2_ssz_derive", - "eth2_ssz_types", + "eth2_hashing 0.3.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "eth2_interop_keypairs 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "eth2_serde_utils 0.1.1 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "eth2_ssz 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "eth2_ssz_derive 0.3.1 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "eth2_ssz_types 0.2.2 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", "ethereum-types", "hex", - "int_to_bytes", + "int_to_bytes 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", "itertools 0.10.5", "lazy_static", "log", "maplit", - "merkle_proof", + "merkle_proof 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", "metastruct", - "parking_lot", + "parking_lot 0.12.1", "rand 0.8.5", "rand_xorshift", "rayon", "regex", "rusqlite", - "safe_arith", + "safe_arith 0.1.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", "serde", "serde_derive", "serde_json", @@ -7990,11 +8845,11 @@ dependencies = [ "slog", "smallvec 1.11.0", "superstruct", - "swap_or_not_shuffle", + "swap_or_not_shuffle 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", "tempfile", - "test_random_derive", - "tree_hash", - "tree_hash_derive", + "test_random_derive 0.2.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "tree_hash 0.4.1 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", + "tree_hash_derive 0.4.0 (git+https://github.com/synapseweb3/lighthouse?rev=be911e6)", ] [[package]] diff --git a/crates/relayer-storage/Cargo.toml b/crates/relayer-storage/Cargo.toml index 0bed16bdb..785b553fd 100644 --- a/crates/relayer-storage/Cargo.toml +++ b/crates/relayer-storage/Cargo.toml @@ -15,4 +15,4 @@ description = "The storage part of SynapseWeb3 IBC Relayer" thiserror = "1.0.37" rocksdb = { package = "ckb-rocksdb", version ="=0.19.0", default-features = false, features = ["snappy"] } eth2_types = { git = "https://github.com/synapseweb3/lighthouse", rev = "2c246d6", package = "types" } -eth_light_client_in_ckb-verification = { version = "0.2.1", git = "https://github.com/synapseweb3/eth-light-client-in-ckb", tag = "v0.2.1" } \ No newline at end of file +eth_light_client_in_ckb-verification = { git = "https://github.com/wenyuanhust/eth-light-client-in-ckb.git", version = "0.2.1", branch = "v0.2.1" } diff --git a/crates/relayer-storage/src/prelude.rs b/crates/relayer-storage/src/prelude.rs index acadfbe77..d61c0e7ed 100644 --- a/crates/relayer-storage/src/prelude.rs +++ b/crates/relayer-storage/src/prelude.rs @@ -27,7 +27,11 @@ pub trait StorageWriter: Send + Sync + Sized { } pub trait StorageAsMMRStore: - mmr::lib::MMRStore + StorageReader + StorageWriter + Clone + mmr::lib::MMRStoreReadOps + + mmr::lib::MMRStoreWriteOps + + StorageReader + + StorageWriter + + Clone { /// Checks if there is any data in the MMR. fn is_initialized(&self) -> Result { diff --git a/crates/relayer-storage/src/storage/mmr.rs b/crates/relayer-storage/src/storage/mmr.rs index 0f927d7ba..3ce6556ab 100644 --- a/crates/relayer-storage/src/storage/mmr.rs +++ b/crates/relayer-storage/src/storage/mmr.rs @@ -1,13 +1,13 @@ use eth2_types::EthSpec; use eth_light_client_in_ckb_verification::{ - mmr::lib::{Error as MMRError, MMRStore, Result as MMRResult}, + mmr::lib::{Error as MMRError, MMRStoreReadOps, MMRStoreWriteOps, Result as MMRResult}, types::packed, }; use super::Storage; use crate::prelude::*; -impl MMRStore for Storage +impl MMRStoreReadOps for Storage where S: EthSpec, { @@ -19,7 +19,12 @@ where )) }) } +} +impl MMRStoreWriteOps for Storage +where + S: EthSpec, +{ fn append(&mut self, pos: u64, elems: Vec) -> MMRResult<()> { for (offset, elem) in elems.iter().enumerate() { let pos: u64 = pos + (offset as u64); diff --git a/crates/relayer-types/Cargo.toml b/crates/relayer-types/Cargo.toml index 5c9ce3447..3f2d1e192 100644 --- a/crates/relayer-types/Cargo.toml +++ b/crates/relayer-types/Cargo.toml @@ -64,10 +64,7 @@ tree_hash_derive = { git = "https://github.com/synapseweb3/lighthouse", rev = "2 thiserror = "1.0" ethereum-types = "0.14.1" hex = "0.4" -axon-tools = { git = "https://github.com/axonweb3/axon-tools.git", rev = "2e21582", version = "0.1.1", features = [ - "impl-serde", - "proof", -] } +axon-tools = { git = "https://github.com/wenyuanhust/axon.git", branch = "forcerelay0", package = "axon-tools", version = "0.1.1", features = ["impl-serde", "proof", "hex-deserialize"] } strum = { version = "0.24.1", features = ["derive"] } [dependencies.tendermint] diff --git a/crates/relayer/Cargo.toml b/crates/relayer/Cargo.toml index 5d85d089c..6b69b027f 100644 --- a/crates/relayer/Cargo.toml +++ b/crates/relayer/Cargo.toml @@ -32,12 +32,9 @@ eth2_types = { git = "https://github.com/synapseweb3/lighthouse", rev = "2c246d6 tree_hash_derive = { git = "https://github.com/synapseweb3/lighthouse", rev = "2c246d6" } tree_hash = { git = "https://github.com/synapseweb3/lighthouse", rev = "2c246d6" } -eth_light_client_in_ckb-verification = { version = "0.2.1", git = "https://github.com/synapseweb3/eth-light-client-in-ckb", tag = "v0.2.1" } -eth_light_client_in_ckb-prover = { version = "0.2.1", git = "https://github.com/synapseweb3/eth-light-client-in-ckb", tag = "v0.2.1" } -axon-tools = { git = "https://github.com/axonweb3/axon-tools.git", rev = "2e21582", version = "0.1.1", features = [ - "impl-serde", - "proof", -] } +eth_light_client_in_ckb-verification = { git = "https://github.com/wenyuanhust/eth-light-client-in-ckb.git", version = "0.2.1", branch = "v0.2.1" } +eth_light_client_in_ckb-prover = { version = "0.3.0-alpha", git = "https://github.com/synapseweb3/eth-light-client-in-ckb" } +axon-tools = { git = "https://github.com/wenyuanhust/axon.git", branch = "forcerelay0", package = "axon-tools", version = "0.1.1", features = ["impl-serde", "proof"] } subtle-encoding = "0.5" humantime-serde = "1.1.1" @@ -95,10 +92,10 @@ reqwest-middleware = "0.1" reqwest-retry = "0.1" eyre = "0.6" ethers = { version = "2.0.2", features = ["rustls", "ws"] } -ckb-sdk = "2.5.0" +ckb-sdk = "3.0.0" ckb-hash = "0.108.0" -ckb-types = "0.108.0" -ckb-jsonrpc-types = "0.108.0" +ckb-types = "0.111.0" +ckb-jsonrpc-types = "0.111.0" jsonrpc-core = "18.0" strum = { version = "0.24.1", features = ["derive"] } lazy_static = "1.4.0" diff --git a/crates/relayer/src/chain/axon.rs b/crates/relayer/src/chain/axon.rs index 2f2f91d3d..aa4d328b6 100644 --- a/crates/relayer/src/chain/axon.rs +++ b/crates/relayer/src/chain/axon.rs @@ -1,6 +1,6 @@ use std::{collections::HashMap, str::FromStr, sync::Arc, thread, time::Duration}; -use axon_tools::types::{AxonBlock, Proof as AxonProof, ValidatorExtend}; +use axon_tools::types::{Block as AxonBlock, Proof as AxonProof, ValidatorExtend}; use eth2_types::Hash256; use k256::ecdsa::SigningKey; use rlp::Encodable; diff --git a/crates/relayer/src/chain/axon/rpc.rs b/crates/relayer/src/chain/axon/rpc.rs index 5efcf1a0c..c6613bab0 100644 --- a/crates/relayer/src/chain/axon/rpc.rs +++ b/crates/relayer/src/chain/axon/rpc.rs @@ -1,7 +1,7 @@ use crate::error::Error; use async_trait::async_trait; -use axon_tools::types::{AxonBlock, CkbRelatedInfo, Metadata, Proof}; +use axon_tools::types::{Block as AxonBlock, CkbRelatedInfo, Metadata, Proof}; use ethers::types::{BlockId, BlockNumber}; use reqwest::Client; use std::sync::atomic::{AtomicU64, Ordering}; diff --git a/crates/relayer/src/chain/axon/utils.rs b/crates/relayer/src/chain/axon/utils.rs index 3549e22a6..d7513be38 100644 --- a/crates/relayer/src/chain/axon/utils.rs +++ b/crates/relayer/src/chain/axon/utils.rs @@ -1,6 +1,6 @@ use std::str::FromStr; -use axon_tools::types::{AxonBlock, Proof as AxonProof, ValidatorExtend}; +use axon_tools::types::{Block as AxonBlock, Proof as AxonProof, ValidatorExtend}; use ckb_ics_axon::proof::{ Log as CkbLog, ObjectProof, TransactionReceipt as CkbTransactionReceipt, }; diff --git a/crates/relayer/src/light_client/axon.rs b/crates/relayer/src/light_client/axon.rs index 4e961a808..6255a06e5 100644 --- a/crates/relayer/src/light_client/axon.rs +++ b/crates/relayer/src/light_client/axon.rs @@ -2,7 +2,7 @@ use std::sync::Arc; -use axon_tools::types::AxonHeader as AxonChainHeader; +use axon_tools::types::Header as AxonChainHeader; use ethers::prelude::k256::ecdsa::SigningKey; use ethers::prelude::*; use futures::TryFutureExt; diff --git a/tools/forcerelay-test/Cargo.toml b/tools/forcerelay-test/Cargo.toml index e1e080b3b..28b9fee83 100644 --- a/tools/forcerelay-test/Cargo.toml +++ b/tools/forcerelay-test/Cargo.toml @@ -4,10 +4,10 @@ version = "0.1.0" edition = "2021" [dev-dependencies] -ckb-sdk = "2.5.0" -ckb-jsonrpc-types = "0.108.0" -ckb-types = "0.108.0" +ckb-sdk = "3.0.0" +ckb-jsonrpc-types = "0.111.0" +ckb-types = "0.111.0" hex = "0.4" -eth_light_client_in_ckb-verification = { version = "0.2.1", git = "https://github.com/synapseweb3/eth-light-client-in-ckb", tag = "v0.2.1" } +eth_light_client_in_ckb-verification = { git = "https://github.com/wenyuanhust/eth-light-client-in-ckb.git", version = "0.2.1", branch = "v0.2.1" } relayer = { version = "*", package = "ibc-relayer", path = "../../crates/relayer" } diff --git a/tools/ibc-test/Cargo.toml b/tools/ibc-test/Cargo.toml index e5278f611..cbc8280a5 100644 --- a/tools/ibc-test/Cargo.toml +++ b/tools/ibc-test/Cargo.toml @@ -4,10 +4,10 @@ version = "0.1.0" edition = "2021" [dev-dependencies] -ckb-sdk = "2.5.0" -ckb-jsonrpc-types = "0.108.0" -ckb-types = "0.108.0" -ckb-chain-spec = "0.108.0" +ckb-sdk = "3.0.0" +ckb-jsonrpc-types = "0.111.0" +ckb-types = "0.111.0" +ckb-chain-spec = "0.111.0" hex = "0.4" eyre = "0.6.8" @@ -45,7 +45,7 @@ toml_edit = "0.19.14" lazy_static = "1.4.0" ethers = { version = "2.0.2", features = ["rustls", "ws"] } -forcerelay-ckb-sdk = { git = "https://github.com/synapseweb3/forcerelay-ckb-sdk", rev = "cd82be97" } +forcerelay-ckb-sdk = { git = "https://github.com/synapseweb3/forcerelay-ckb-sdk", branch = "ckb-0.111" } [dependencies] bytes = "1.5.0" From bb3561fdc261c9094911e66d73fc5a03a9352819 Mon Sep 17 00:00:00 2001 From: wenyuanhust Date: Tue, 31 Oct 2023 20:13:05 +0800 Subject: [PATCH 2/3] feat: sync 0.111 & fix warning --- Cargo.lock | 12 +----------- crates/relayer/Cargo.toml | 2 +- crates/relayer/src/chain/ckb/mock_rpc_client.rs | 1 + tools/forcerelay-test/ckb/dev.toml | 8 +------- tools/forcerelay-test/src/lib.rs | 2 +- tools/ibc-test/src/tests/ibc/sudt_erc20_transfer.rs | 4 ++-- 6 files changed, 7 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5d39197d5..fd6811653 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1151,16 +1151,6 @@ dependencies = [ "blake2b-rs", ] -[[package]] -name = "ckb-hash" -version = "0.108.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d9b683e89ae4ffdd5aaf4172eab00b6bbe7ea24e2abf77d3eb850ba36e8983" -dependencies = [ - "blake2b-ref 0.2.1", - "blake2b-rs", -] - [[package]] name = "ckb-hash" version = "0.111.0" @@ -4069,7 +4059,7 @@ dependencies = [ "bitcoin", "bs58 0.4.0", "bytes", - "ckb-hash 0.108.0", + "ckb-hash 0.111.0", "ckb-ics-axon", "ckb-jsonrpc-types", "ckb-sdk", diff --git a/crates/relayer/Cargo.toml b/crates/relayer/Cargo.toml index 6b69b027f..15f8cc3bd 100644 --- a/crates/relayer/Cargo.toml +++ b/crates/relayer/Cargo.toml @@ -93,7 +93,7 @@ reqwest-retry = "0.1" eyre = "0.6" ethers = { version = "2.0.2", features = ["rustls", "ws"] } ckb-sdk = "3.0.0" -ckb-hash = "0.108.0" +ckb-hash = "0.111.0" ckb-types = "0.111.0" ckb-jsonrpc-types = "0.111.0" jsonrpc-core = "18.0" diff --git a/crates/relayer/src/chain/ckb/mock_rpc_client.rs b/crates/relayer/src/chain/ckb/mock_rpc_client.rs index 03835895c..2f85a8d39 100644 --- a/crates/relayer/src/chain/ckb/mock_rpc_client.rs +++ b/crates/relayer/src/chain/ckb/mock_rpc_client.rs @@ -111,6 +111,7 @@ impl CkbReader for RpcClient { transaction: Some(transaction), tx_status: TxStatus::committed(hash.clone()), cycles: None, + time_added_to_pool: None, }; Box::pin(async { Ok(Some(resp)) }) } diff --git a/tools/forcerelay-test/ckb/dev.toml b/tools/forcerelay-test/ckb/dev.toml index 96ad2af1f..5087566c8 100644 --- a/tools/forcerelay-test/ckb/dev.toml +++ b/tools/forcerelay-test/ckb/dev.toml @@ -103,13 +103,7 @@ genesis_epoch_length = 1000 permanent_difficulty_in_dummy = true [params.hardfork] -rfc_0028 = 0 -rfc_0029 = 0 -rfc_0030 = 0 -rfc_0031 = 0 -rfc_0032 = 0 -rfc_0036 = 0 -rfc_0038 = 0 +ckb2023 = 0 [pow] func = "Dummy" diff --git a/tools/forcerelay-test/src/lib.rs b/tools/forcerelay-test/src/lib.rs index 2e38d5716..2f1332186 100644 --- a/tools/forcerelay-test/src/lib.rs +++ b/tools/forcerelay-test/src/lib.rs @@ -185,7 +185,7 @@ mod tests { sleep(80); - let mut indexer_rpc = IndexerRpcClient::new("http://127.0.0.1:8114"); + let indexer_rpc = IndexerRpcClient::new("http://127.0.0.1:8114"); let type_script = packed::Script::new_builder() .code_hash(TYPE_ID_CODE_HASH.0.pack()) .hash_type(ScriptHashType::Type.into()) diff --git a/tools/ibc-test/src/tests/ibc/sudt_erc20_transfer.rs b/tools/ibc-test/src/tests/ibc/sudt_erc20_transfer.rs index 9d61766f6..2e9b4a371 100644 --- a/tools/ibc-test/src/tests/ibc/sudt_erc20_transfer.rs +++ b/tools/ibc-test/src/tests/ibc/sudt_erc20_transfer.rs @@ -446,7 +446,7 @@ fn complete_tx( // * HeaderDepResolver // * CellCollector // * TransactionDependencyProvider - let mut ckb_client = CkbRpcClient::new(ckb_rpc); + let ckb_client = CkbRpcClient::new(ckb_rpc); let cell_dep_resolver = { let genesis_block = ckb_client.get_block_by_number(0.into())?.unwrap(); DefaultCellDepResolver::from_genesis(&BlockView::from(genesis_block))? @@ -516,7 +516,7 @@ pub struct FungibleTokenPacketData { } fn send_transaction(url: &str, tx: TransactionView) -> eyre::Result<[u8; 32]> { - let mut client = CkbRpcClient::new(url); + let client = CkbRpcClient::new(url); let tx_hash = client.send_transaction( tx.data().into(), Some(ckb_jsonrpc_types::OutputsValidator::Passthrough), From 8dcfdab5418fbf8dc82f669eeb1d2a140aad578d Mon Sep 17 00:00:00 2001 From: wenyuanhust Date: Wed, 1 Nov 2023 17:45:32 +0800 Subject: [PATCH 3/3] chore: update ckb --- .github/workflows/ibc-test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ibc-test.yaml b/.github/workflows/ibc-test.yaml index b777771e9..50195ec04 100644 --- a/.github/workflows/ibc-test.yaml +++ b/.github/workflows/ibc-test.yaml @@ -64,10 +64,10 @@ jobs: - name: Prepare CKB run: | if [ ! -f "/tmp/ckb.tar.gz" ]; then - curl -L https://github.com/nervosnetwork/ckb/releases/download/v0.110.0/ckb_v0.110.0_x86_64-unknown-linux-gnu.tar.gz -o /tmp/ckb.tar.gz + curl -L https://github.com/nervosnetwork/ckb/releases/download/v0.111.0/ckb_v0.111.0_x86_64-unknown-linux-gnu.tar.gz -o /tmp/ckb.tar.gz fi tar -zxf /tmp/ckb.tar.gz -C /tmp - echo "/tmp/ckb_v0.110.0_x86_64-unknown-linux-gnu" >> $GITHUB_PATH + echo "/tmp/ckb_v0.111.0_x86_64-unknown-linux-gnu" >> $GITHUB_PATH - name: Prepare Axon source run: git clone --recursive https://github.com/axonweb3/axon.git $SRC_DIR/axon && cd $SRC_DIR/axon && git checkout $AXON_COMMIT