diff --git a/Cargo.lock b/Cargo.lock index 4ee3ff4..211d595 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -178,15 +178,16 @@ checksum = "0952808a6c2afd1aa8947271f3a60f1a6763c7b912d210184c5149b5cf147247" [[package]] name = "aquamarine" -version = "0.1.12" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a941c39708478e8eea39243b5983f1c42d2717b3620ee91f4a52115fd02ac43f" +checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" dependencies = [ - "itertools 0.9.0", + "include_dir", + "itertools 0.10.5", "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.53", ] [[package]] @@ -2281,21 +2282,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "form_urlencoded" version = "1.2.1" @@ -2510,8 +2496,7 @@ dependencies = [ [[package]] name = "graphcast-sdk" version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f281d965e3ad871e7e56371380a92225cd28e61689ba56e7a7352aae9b1c66" +source = "git+https://github.com/graphops/graphcast-sdk#329fa90660ab666cce29c9578eeb093674b3c731" dependencies = [ "anyhow", "async-graphql", @@ -2880,19 +2865,6 @@ dependencies = [ "tokio-rustls 0.24.1", ] -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", -] - [[package]] name = "iana-time-zone" version = "0.1.60" @@ -2970,6 +2942,25 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "include_dir" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" +dependencies = [ + "proc-macro2", + "quote", +] + [[package]] name = "indenter" version = "0.3.3" @@ -3022,15 +3013,6 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" -[[package]] -name = "itertools" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" -dependencies = [ - "either", -] - [[package]] name = "itertools" version = "0.10.5" @@ -3480,30 +3462,6 @@ dependencies = [ "synstructure", ] -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "never" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c96aba5aa877601bb3f6dd6a63a969e1f82e60646e81e71b14496995e9853c91" - [[package]] name = "new_debug_unreachable" version = "1.0.6" @@ -3689,50 +3647,12 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "openssl" -version = "0.10.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" -dependencies = [ - "bitflags 2.5.0", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.53", -] - [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "openssl-sys" -version = "0.9.101" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "opentelemetry" version = "0.18.0" @@ -4554,13 +4474,11 @@ dependencies = [ "http-body", "hyper", "hyper-rustls", - "hyper-tls", "ipnet", "js-sys", "log", "mime", "mime_guess", - "native-tls", "once_cell", "percent-encoding", "pin-project-lite", @@ -4572,7 +4490,6 @@ dependencies = [ "sync_wrapper", "system-configuration", "tokio", - "tokio-native-tls", "tokio-rustls 0.24.1", "tokio-util", "tower-service", @@ -5914,20 +5831,20 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "teloxide" version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63345cf32a8850ebddcdd769dc2d5193d5e231262d5dada264b79da01a664da" +source = "git+https://github.com/petkodes/teloxide#e8b814511565f8bfcdd4e61e466472050a109bdb" dependencies = [ + "ahash 0.8.11", "aquamarine", "bytes", "derive_more", "dptree", + "either", "futures", "log", "mime", "pin-project", "serde", "serde_json", - "serde_with_macros 1.5.2", "teloxide-core", "thiserror", "tokio", @@ -5939,8 +5856,7 @@ dependencies = [ [[package]] name = "teloxide-core" version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "303db260110c238e3af77bb9dff18bf7a5b5196f783059b0852aab75f91d5a16" +source = "git+https://github.com/petkodes/teloxide#e8b814511565f8bfcdd4e61e466472050a109bdb" dependencies = [ "bitflags 1.3.2", "bytes", @@ -5950,7 +5866,6 @@ dependencies = [ "futures", "log", "mime", - "never", "once_cell", "pin-project", "rc-box", @@ -6207,16 +6122,6 @@ dependencies = [ "syn 2.0.53", ] -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.24.1" diff --git a/Cargo.toml b/Cargo.toml index 6921056..086a11e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ panic = 'unwind' opt-level = 3 [workspace.dependencies] -graphcast-sdk = "0.7.1" +graphcast-sdk = { git= "https://github.com/graphops/graphcast-sdk" } clap = { version = "4.4", features = [ "cargo", "unstable-doc", diff --git a/Dockerfile b/Dockerfile index fb3fb24..bbd567f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,6 @@ RUN apt-get update \ curl \ libpq-dev \ pkg-config \ - libssl-dev \ clang \ build-essential \ libc6-dev \ diff --git a/subgraph-radio/Cargo.toml b/subgraph-radio/Cargo.toml index a65b9e0..8b7f013 100644 --- a/subgraph-radio/Cargo.toml +++ b/subgraph-radio/Cargo.toml @@ -24,7 +24,7 @@ tokio = { version = "1.28.1", features = ["full", "rt"] } anyhow = "1.0" graphql_client = "0.12.0" serde_derive = "1.0" -reqwest = { version = "0.11.17", features = ["json"] } +reqwest = { version = "0.11.24", default-features = false, features = ["json", "rustls-tls"] } thiserror = "1.0.40" ethers = "2.0.4" ethers-contract = "2.0.4" diff --git a/subgraph-radio/src/operator/attestation.rs b/subgraph-radio/src/operator/attestation.rs index ec6b50d..3987ef5 100644 --- a/subgraph-radio/src/operator/attestation.rs +++ b/subgraph-radio/src/operator/attestation.rs @@ -484,7 +484,7 @@ pub fn compare_attestations( ipfs_hash: &str, allocated_subgraphs: HashSet, ) -> ComparisonResult { - let allocated = allocated_subgraphs.contains(&ipfs_hash.to_string()); + let allocated = allocated_subgraphs.contains(ipfs_hash); // Attempt to retrieve remote attestations for the given IPFS hash and block number let remote_attestations = remote diff --git a/test-runner/src/invalid_block_hash.rs b/test-runner/src/invalid_block_hash.rs index f9bc6b6..c4bfc02 100644 --- a/test-runner/src/invalid_block_hash.rs +++ b/test-runner/src/invalid_block_hash.rs @@ -21,7 +21,7 @@ pub async fn invalid_block_hash_test() { let mut config = test_config(); config.radio_setup.sqlite_file_path = Some(db_path.clone()); - config.radio_setup.topics = radio_topics.clone(); + config.radio_setup.topics.clone_from(&radio_topics); let mut test_sender_config = TestSenderConfig { topics: test_sender_topics, diff --git a/test-runner/src/invalid_nonce.rs b/test-runner/src/invalid_nonce.rs index ef69071..c357ce6 100644 --- a/test-runner/src/invalid_nonce.rs +++ b/test-runner/src/invalid_nonce.rs @@ -20,7 +20,7 @@ pub async fn invalid_nonce_test() { let mut config = test_config(); config.radio_setup.sqlite_file_path = Some(db_path.clone()); - config.radio_setup.topics = radio_topics.clone(); + config.radio_setup.topics.clone_from(&radio_topics); let mut test_sender_config = TestSenderConfig { topics: test_sender_topics, diff --git a/test-runner/src/invalid_sender.rs b/test-runner/src/invalid_sender.rs index 882ef36..cab023e 100644 --- a/test-runner/src/invalid_sender.rs +++ b/test-runner/src/invalid_sender.rs @@ -22,7 +22,7 @@ pub async fn invalid_sender_test() { let mut config = test_config(); config.radio_setup.sqlite_file_path = Some(db_path.clone()); - config.radio_setup.topics = radio_topics.clone(); + config.radio_setup.topics.clone_from(&radio_topics); config.radio_setup.id_validation = IdentityValidation::RegisteredIndexer; let mut test_sender_config = TestSenderConfig { diff --git a/test-runner/src/message_handling.rs b/test-runner/src/message_handling.rs index 893dd58..321b0f2 100644 --- a/test-runner/src/message_handling.rs +++ b/test-runner/src/message_handling.rs @@ -40,7 +40,7 @@ pub async fn send_and_receive_test() { let mut config = test_config(); config.radio_setup.sqlite_file_path = Some(db_path.clone()); - config.radio_setup.topics = radio_topics.clone(); + config.radio_setup.topics.clone_from(&radio_topics); config.radio_setup.topic_update_interval = 90; let mut test_sender_config = TestSenderConfig { diff --git a/test-runner/src/poi_divergent.rs b/test-runner/src/poi_divergent.rs index 22457f9..a36bdca 100644 --- a/test-runner/src/poi_divergent.rs +++ b/test-runner/src/poi_divergent.rs @@ -24,7 +24,7 @@ pub async fn poi_divergent_test() { let mut config = test_config(); config.radio_setup.sqlite_file_path = Some(db_path.clone()); - config.radio_setup.topics = radio_topics.clone(); + config.radio_setup.topics.clone_from(&radio_topics); let mut test_sender_config = TestSenderConfig { topics: test_sender_topics, diff --git a/test-runner/src/poi_match.rs b/test-runner/src/poi_match.rs index 15b5d38..9838c92 100644 --- a/test-runner/src/poi_match.rs +++ b/test-runner/src/poi_match.rs @@ -24,7 +24,7 @@ pub async fn poi_match_test() { let mut config = test_config(); config.radio_setup.sqlite_file_path = Some(db_path.clone()); - config.radio_setup.topics = radio_topics.clone(); + config.radio_setup.topics.clone_from(&radio_topics); let mut test_sender_config = TestSenderConfig { topics: test_sender_topics, diff --git a/test-runner/src/sender_validation.rs b/test-runner/src/sender_validation.rs index 29516f2..8541f25 100644 --- a/test-runner/src/sender_validation.rs +++ b/test-runner/src/sender_validation.rs @@ -23,7 +23,7 @@ pub async fn id_validation_test_stricter_radio_level() { let mut config = test_config(); config.radio_setup.sqlite_file_path = Some(db_path.clone()); - config.radio_setup.topics = radio_topics.clone(); + config.radio_setup.topics.clone_from(&radio_topics); config.radio_setup.topic_update_interval = 90; config.radio_setup.id_validation = IdentityValidation::Indexer; @@ -75,7 +75,7 @@ pub async fn id_validation_test_looser_radio_level() { let mut config = test_config(); config.radio_setup.sqlite_file_path = Some(db_path.clone()); - config.radio_setup.topics = radio_topics.clone(); + config.radio_setup.topics.clone_from(&radio_topics); config.radio_setup.topic_update_interval = 90; config.radio_setup.id_validation = IdentityValidation::ValidAddress; @@ -127,7 +127,7 @@ pub async fn id_validation_test_matching_radio_level() { let mut config = test_config(); config.radio_setup.sqlite_file_path = Some(db_path.clone()); - config.radio_setup.topics = radio_topics.clone(); + config.radio_setup.topics.clone_from(&radio_topics); config.radio_setup.topic_update_interval = 90; config.radio_setup.id_validation = IdentityValidation::GraphNetworkAccount; @@ -179,7 +179,7 @@ pub async fn id_validation_test_invalid_address_loose() { let mut config = test_config(); config.radio_setup.sqlite_file_path = Some(db_path.clone()); - config.radio_setup.topics = radio_topics.clone(); + config.radio_setup.topics.clone_from(&radio_topics); config.radio_setup.topic_update_interval = 90; config.radio_setup.id_validation = IdentityValidation::NoCheck; diff --git a/test-runner/src/topics.rs b/test-runner/src/topics.rs index 52b243a..9c55145 100644 --- a/test-runner/src/topics.rs +++ b/test-runner/src/topics.rs @@ -29,7 +29,7 @@ pub async fn topics_test() { let mut config = test_config(); config.radio_setup.sqlite_file_path = Some(db_path.clone()); - config.radio_setup.topics = radio_topics.clone(); + config.radio_setup.topics.clone_from(&radio_topics); config.radio_setup.topic_update_interval = 90; let mut test_sender_config = TestSenderConfig { diff --git a/test-utils/src/lib.rs b/test-utils/src/lib.rs index 76afab8..0133352 100644 --- a/test-utils/src/lib.rs +++ b/test-utils/src/lib.rs @@ -138,7 +138,7 @@ pub async fn setup( ) -> ProcessManager { let id = uuid::Uuid::new_v4().to_string(); let radio_name = format!("{}-{}", test_file_name, id); - test_sender_config.radio_name = radio_name.clone(); + test_sender_config.radio_name.clone_from(&radio_name); let basic_sender = Arc::new(Mutex::new( Command::new("cargo")