diff --git a/Cargo.lock b/Cargo.lock index e1ec57311..5feb83ee5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -133,7 +133,7 @@ dependencies = [ "secp256k1", "serde", "serde_with", - "thiserror 2.0.14", + "thiserror 2.0.15", ] [[package]] @@ -169,7 +169,7 @@ dependencies = [ "futures", "futures-util", "serde_json", - "thiserror 2.0.14", + "thiserror 2.0.15", ] [[package]] @@ -212,7 +212,7 @@ dependencies = [ "alloy-rlp", "crc", "serde", - "thiserror 2.0.14", + "thiserror 2.0.15", ] [[package]] @@ -235,7 +235,7 @@ dependencies = [ "alloy-primitives", "alloy-rlp", "serde", - "thiserror 2.0.14", + "thiserror 2.0.15", ] [[package]] @@ -295,7 +295,7 @@ dependencies = [ "http 1.3.1", "serde", "serde_json", - "thiserror 2.0.14", + "thiserror 2.0.15", "tracing", ] @@ -322,7 +322,7 @@ dependencies = [ "futures-utils-wasm", "serde", "serde_json", - "thiserror 2.0.14", + "thiserror 2.0.15", ] [[package]] @@ -397,7 +397,7 @@ dependencies = [ "reqwest 0.12.23", "serde", "serde_json", - "thiserror 2.0.14", + "thiserror 2.0.15", "tokio", "tracing", "url", @@ -423,7 +423,7 @@ checksum = "64b728d511962dda67c1bc7ea7c03736ec275ed2cf4c35d9585298ac9ccf3b73" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -490,7 +490,7 @@ dependencies = [ "serde", "serde_json", "serde_with", - "thiserror 2.0.14", + "thiserror 2.0.15", ] [[package]] @@ -518,7 +518,7 @@ dependencies = [ "either", "elliptic-curve", "k256", - "thiserror 2.0.14", + "thiserror 2.0.15", ] [[package]] @@ -535,7 +535,7 @@ dependencies = [ "aws-sdk-kms", "k256", "spki", - "thiserror 2.0.14", + "thiserror 2.0.15", "tracing", ] @@ -553,7 +553,7 @@ dependencies = [ "gcloud-sdk", "k256", "spki", - "thiserror 2.0.14", + "thiserror 2.0.15", "tracing", ] @@ -573,7 +573,7 @@ dependencies = [ "coins-ledger", "futures-util", "semver 1.0.26", - "thiserror 2.0.14", + "thiserror 2.0.15", "tracing", ] @@ -592,7 +592,7 @@ dependencies = [ "coins-bip39", "k256", "rand 0.8.5", - "thiserror 2.0.14", + "thiserror 2.0.15", ] [[package]] @@ -606,7 +606,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -623,7 +623,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", "syn-solidity", "tiny-keccak", ] @@ -642,7 +642,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.105", + "syn 2.0.106", "syn-solidity", ] @@ -684,7 +684,7 @@ dependencies = [ "parking_lot", "serde", "serde_json", - "thiserror 2.0.14", + "thiserror 2.0.15", "tokio", "tower 0.5.2", "tracing", @@ -733,7 +733,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -1041,7 +1041,7 @@ dependencies = [ "proc-macro2", "quote", "strum 0.26.3", - "syn 2.0.105", + "syn 2.0.106", "thiserror 1.0.69", ] @@ -1088,7 +1088,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -1099,7 +1099,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -1134,7 +1134,7 @@ checksum = "ffdcb70bdbc4d478427380519163274ac86e52916e10f0a8889adf0f96d3fee7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -1173,7 +1173,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -1631,9 +1631,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967" +checksum = "6a65b545ab31d687cff52899d4890855fec459eb6afe0da6417b8a18da87aa29" dependencies = [ "serde", ] @@ -1702,7 +1702,7 @@ dependencies = [ "serde_json", "serde_repr", "serde_urlencoded", - "thiserror 2.0.14", + "thiserror 2.0.15", "tokio", "tokio-util", "tower-service", @@ -1751,7 +1751,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -1766,7 +1766,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -1789,7 +1789,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -1861,7 +1861,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.105", + "syn 2.0.106", "zstd", ] @@ -2002,14 +2002,14 @@ dependencies = [ "semver 1.0.26", "serde", "serde_json", - "thiserror 2.0.14", + "thiserror 2.0.15", ] [[package]] name = "cc" -version = "1.2.32" +version = "1.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2352e5597e9c544d5e6d9c95190d5d27738ade584fa8db0a16e130e5c2b5296e" +checksum = "3ee0f8803222ba5a7e2777dd72ca451868909b1ac410621b676adf07280e9b5f" dependencies = [ "jobserver", "libc", @@ -2086,7 +2086,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -2438,7 +2438,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -2452,7 +2452,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -2463,7 +2463,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core 0.20.11", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -2474,7 +2474,7 @@ checksum = "ce154b9bea7fb0c8e8326e62d00354000c36e79770ff21b8c84e3aa267d9d531" dependencies = [ "darling_core 0.21.2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -2514,7 +2514,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d162beedaa69905488a8da94f5ac3edb4dd4788b732fadb7bd120b2625c1976" dependencies = [ "data-encoding", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -2593,7 +2593,7 @@ checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", "unicode-xid", ] @@ -2652,7 +2652,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -2726,7 +2726,7 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -2791,7 +2791,7 @@ checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -2836,7 +2836,7 @@ checksum = "44f23cf4b44bfce11a86ace86f8a73ffdec849c9fd00a386a53d278bd9e81fb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -3154,7 +3154,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -3309,7 +3309,7 @@ dependencies = [ "reqwest 0.11.27", "serde", "serde_json", - "thiserror 2.0.14", + "thiserror 2.0.15", "tokio", ] @@ -4007,7 +4007,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -4079,7 +4079,7 @@ dependencies = [ "test-assets", "testcontainers-modules", "thegraph-core", - "thiserror 2.0.14", + "thiserror 2.0.15", "tokio", "tonic 0.14.1", "tonic-build", @@ -4110,7 +4110,7 @@ dependencies = [ "test-log", "test-with", "thegraph-core", - "thiserror 2.0.14", + "thiserror 2.0.15", "tokio", "tracing", "wiremock", @@ -4186,7 +4186,7 @@ dependencies = [ "test-log", "thegraph-core", "thegraph-graphql-http", - "thiserror 2.0.14", + "thiserror 2.0.15", "tokio", "tokio-test", "tokio-util", @@ -4245,7 +4245,7 @@ dependencies = [ "test-assets", "test-log", "thegraph-core", - "thiserror 2.0.14", + "thiserror 2.0.15", "tokio", "tonic 0.14.1", "tracing", @@ -4348,7 +4348,7 @@ version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d93587f37623a1a17d94ef2bc9ada592f5465fe7732084ab7beefabe5c77c0c4" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", "cfg-if", "libc", ] @@ -4569,7 +4569,7 @@ dependencies = [ "rustc-hash", "serde", "serde_json", - "thiserror 2.0.14", + "thiserror 2.0.15", "tokio", "tower 0.5.2", "tracing", @@ -4610,7 +4610,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -4632,7 +4632,7 @@ dependencies = [ "serde", "serde_json", "soketto", - "thiserror 2.0.14", + "thiserror 2.0.15", "tokio", "tokio-stream", "tokio-util", @@ -4661,7 +4661,7 @@ dependencies = [ "http 1.3.1", "serde", "serde_json", - "thiserror 2.0.14", + "thiserror 2.0.15", ] [[package]] @@ -4753,7 +4753,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", "libc", "redox_syscall 0.5.17", ] @@ -4809,7 +4809,7 @@ checksum = "04d55ca5d5a14363da83bf3c33874b8feaa34653e760d5216d7ef9829c88001a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -4866,7 +4866,7 @@ checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -4951,7 +4951,7 @@ checksum = "38b4faf00617defe497754acde3024865bc143d44a86799b24e191ecff91354f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -5310,7 +5310,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -5333,7 +5333,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1c10c2894a6fed806ade6027bcd50662746363a9589d3ec9d9bef30a4e4bc166" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", ] [[package]] @@ -5373,7 +5373,7 @@ version = "0.10.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", "cfg-if", "foreign-types", "libc", @@ -5390,7 +5390,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -5522,7 +5522,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -5576,7 +5576,7 @@ dependencies = [ "regex", "regex-syntax 0.8.5", "structmeta", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -5615,7 +5615,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -5650,7 +5650,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323" dependencies = [ "memchr", - "thiserror 2.0.14", + "thiserror 2.0.15", "ucd-trie", ] @@ -5701,7 +5701,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -5825,7 +5825,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff24dfcda44452b9816fff4cd4227e1bb73ff5a2f1bc1105aa92fb8565ce44d2" dependencies = [ "proc-macro2", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -5901,14 +5901,14 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] name = "proc-macro2" -version = "1.0.97" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61789d7719defeb74ea5fe81f2fdfdbd28a803847077cecce2ff14e1472f6f1" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" dependencies = [ "unicode-ident", ] @@ -5921,7 +5921,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", "version_check", "yansi", ] @@ -5933,7 +5933,7 @@ dependencies = [ "chrono", "pprof", "tempfile", - "thiserror 2.0.14", + "thiserror 2.0.15", "timer", "tracing", ] @@ -5965,7 +5965,7 @@ dependencies = [ "memchr", "parking_lot", "protobuf 3.7.2", - "thiserror 2.0.14", + "thiserror 2.0.15", ] [[package]] @@ -5988,7 +5988,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -5999,7 +5999,7 @@ checksum = "6fcdab19deb5195a31cf7726a210015ff1496ba1464fd42cb4f537b8b01b471f" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.9.1", + "bitflags 2.9.2", "lazy_static", "num-traits", "rand 0.9.2", @@ -6049,7 +6049,7 @@ dependencies = [ "pulldown-cmark", "pulldown-cmark-to-cmark", "regex", - "syn 2.0.105", + "syn 2.0.106", "tempfile", ] @@ -6063,7 +6063,7 @@ dependencies = [ "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -6076,7 +6076,7 @@ dependencies = [ "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -6168,7 +6168,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e8bbe1a966bd2f362681a44f6edce3c2310ac21e4d5067a6e7ec396297a6ea0" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", "memchr", "unicase", ] @@ -6356,7 +6356,7 @@ version = "11.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6df7ab838ed27997ba19a4664507e6f82b41fe6e20be42929332156e5e85146" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", ] [[package]] @@ -6426,7 +6426,7 @@ version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", ] [[package]] @@ -6457,7 +6457,7 @@ checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -6751,7 +6751,7 @@ dependencies = [ "regex", "relative-path", "rustc_version 0.4.1", - "syn 2.0.105", + "syn 2.0.106", "unicode-ident", ] @@ -6856,7 +6856,7 @@ version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11181fbabf243db407ef8df94a6ce0b2f9a733bd8be4ad02b4eda9602296cac8" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", "errno", "libc", "linux-raw-sys", @@ -7123,7 +7123,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77253fb2d4451418d07025826028bcb96ee42d3e58859689a70ce62908009db6" dependencies = [ "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -7181,7 +7181,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", "core-foundation 0.9.4", "core-foundation-sys", "libc", @@ -7194,7 +7194,7 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80fb1d92c5028aa318b4b8bd7302a5bfcf48be96a37fc6fc790f806b0004ee0c" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", "core-foundation 0.10.1", "core-foundation-sys", "libc", @@ -7276,7 +7276,7 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -7318,7 +7318,7 @@ checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -7380,7 +7380,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -7428,7 +7428,7 @@ checksum = "5d69265a08751de7844521fd15003ae0a888e035773ba05695c5c759a6f89eef" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -7559,7 +7559,7 @@ checksum = "297f631f50729c8c99b84667867963997ec0b50f32b2a7dbcab828ef0541e8bb" dependencies = [ "num-bigint 0.4.6", "num-traits", - "thiserror 2.0.14", + "thiserror 2.0.15", "time", ] @@ -7638,7 +7638,7 @@ checksum = "c87e960f4dca2788eeb86bbdde8dd246be8948790b7618d656e68f9b720a86e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -7721,7 +7721,7 @@ dependencies = [ "serde_json", "sha2", "smallvec", - "thiserror 2.0.14", + "thiserror 2.0.15", "tokio", "tokio-stream", "tracing", @@ -7739,7 +7739,7 @@ dependencies = [ "quote", "sqlx-core", "sqlx-macros-core", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -7762,7 +7762,7 @@ dependencies = [ "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", - "syn 2.0.105", + "syn 2.0.106", "tokio", "url", ] @@ -7776,7 +7776,7 @@ dependencies = [ "atoi", "base64 0.22.1", "bigdecimal", - "bitflags 2.9.1", + "bitflags 2.9.2", "byteorder", "bytes", "chrono", @@ -7807,7 +7807,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror 2.0.14", + "thiserror 2.0.15", "tracing", "uuid", "whoami", @@ -7822,7 +7822,7 @@ dependencies = [ "atoi", "base64 0.22.1", "bigdecimal", - "bitflags 2.9.1", + "bitflags 2.9.2", "byteorder", "chrono", "crc", @@ -7849,7 +7849,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror 2.0.14", + "thiserror 2.0.15", "tracing", "uuid", "whoami", @@ -7875,7 +7875,7 @@ dependencies = [ "serde", "serde_urlencoded", "sqlx-core", - "thiserror 2.0.14", + "thiserror 2.0.15", "tracing", "url", "uuid", @@ -7937,7 +7937,7 @@ dependencies = [ "proc-macro2", "quote", "structmeta-derive", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -7948,7 +7948,7 @@ checksum = "152a0b65a590ff6c3da95cabe2353ee04e6167c896b28e3b14478c2636c922fc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -7979,7 +7979,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -7991,7 +7991,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -8035,9 +8035,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.105" +version = "2.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bc3fcb250e53458e712715cf74285c1f889686520d79294a9ef3bd7aa1fc619" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" dependencies = [ "proc-macro2", "quote", @@ -8053,7 +8053,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -8091,7 +8091,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -8125,7 +8125,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", "core-foundation 0.9.4", "system-configuration-sys 0.6.0", ] @@ -8158,9 +8158,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tap_aggregator" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6f3c4d06f8d12d03cefc6db063c62e16f0d1567a7dc94a3d8f3109ecc05739" +checksum = "b8a883f8752e0054595101a9a1d069cf3238b101002bc66fce763dc5d121a179" dependencies = [ "anyhow", "axum", @@ -8191,9 +8191,9 @@ dependencies = [ [[package]] name = "tap_core" -version = "4.1.4" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3f0ea044210aa27b40d5a19069b10f3ece4929488d4f2a872ff0f02075d0d7" +checksum = "c282c3989f6062ccc09b1bfb6032f742fc6243507b68b82b64e1d72aea330531" dependencies = [ "anyhow", "async-trait", @@ -8202,7 +8202,7 @@ dependencies = [ "tap_graph", "tap_receipt", "thegraph-core", - "thiserror 2.0.14", + "thiserror 2.0.15", "tokio", ] @@ -8214,7 +8214,7 @@ checksum = "e648d9aafebc6835d1bb50398452a82a237539a60d8cb02f3541c1e2d291fc39" dependencies = [ "serde", "thegraph-core", - "thiserror 2.0.14", + "thiserror 2.0.15", ] [[package]] @@ -8242,7 +8242,7 @@ dependencies = [ "serde", "tap_eip712_message", "thegraph-core", - "thiserror 2.0.14", + "thiserror 2.0.15", ] [[package]] @@ -8294,7 +8294,7 @@ checksum = "451b374529930d7601b1eef8d32bc79ae870b6079b069401709c2a8bf9e75f36" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -8312,7 +8312,7 @@ dependencies = [ "quote", "regex", "reqwest 0.12.23", - "syn 2.0.105", + "syn 2.0.106", "sysinfo", "uzers", "which", @@ -8339,7 +8339,7 @@ dependencies = [ "serde", "serde_json", "serde_with", - "thiserror 2.0.14", + "thiserror 2.0.15", "tokio", "tokio-stream", "tokio-tar", @@ -8366,7 +8366,7 @@ dependencies = [ "bs58", "serde", "serde_with", - "thiserror 2.0.14", + "thiserror 2.0.15", ] [[package]] @@ -8393,11 +8393,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.14" +version = "2.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b0949c3a6c842cbde3f1686d6eea5a010516deb7085f79db747562d4102f41e" +checksum = "80d76d3f064b981389ecb4b6b7f45a0bf9fdac1d5b9204c7bd6714fecc302850" dependencies = [ - "thiserror-impl 2.0.14", + "thiserror-impl 2.0.15", ] [[package]] @@ -8408,18 +8408,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] name = "thiserror-impl" -version = "2.0.14" +version = "2.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc5b44b4ab9c2fdd0e0512e6bece8388e214c0749f5862b114cc5b7a25daf227" +checksum = "44d29feb33e986b6ea906bd9c3559a856983f92371b3eaa5e83782a351623de0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -8543,7 +8543,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -8663,7 +8663,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37e04c1865c281139e5ccf633cb9f76ffdaabeebfe53b703984cf82878e2aabb" dependencies = [ "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -8789,7 +8789,7 @@ dependencies = [ "prettyplease", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -8814,7 +8814,7 @@ dependencies = [ "prost-build", "prost-types 0.14.1", "quote", - "syn 2.0.105", + "syn 2.0.106", "tempfile", "tonic-build", ] @@ -8860,7 +8860,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" dependencies = [ "base64 0.22.1", - "bitflags 2.9.1", + "bitflags 2.9.2", "bytes", "futures-util", "http 1.3.1", @@ -8923,7 +8923,7 @@ dependencies = [ "governor", "http 1.3.1", "pin-project 1.1.10", - "thiserror 2.0.14", + "thiserror 2.0.15", "tower 0.5.2", "tracing", ] @@ -8948,7 +8948,7 @@ checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -9021,7 +9021,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04659ddb06c87d233c566112c1c9c5b9e98256d9af50ec3bc9c8327f873a7568" dependencies = [ "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -9043,7 +9043,7 @@ dependencies = [ "log", "rand 0.9.2", "sha1", - "thiserror 2.0.14", + "thiserror 2.0.15", "utf-8", ] @@ -9319,7 +9319,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", "wasm-bindgen-shared", ] @@ -9354,7 +9354,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -9545,7 +9545,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -9556,7 +9556,7 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -9972,7 +9972,7 @@ version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "bitflags 2.9.1", + "bitflags 2.9.2", ] [[package]] @@ -10026,7 +10026,7 @@ checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", "synstructure 0.13.2", ] @@ -10047,7 +10047,7 @@ checksum = "9ecf5b4cc5364572d7f4c329661bcc82724222973f2cab6f050a4e5c22f75181" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -10067,7 +10067,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", "synstructure 0.13.2", ] @@ -10088,7 +10088,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] @@ -10121,7 +10121,7 @@ checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.105", + "syn 2.0.106", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 0ae43857a..3e00d61b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -84,10 +84,10 @@ sqlx = { version = "0.8.2", features = [ "uuid", ], default-features = false } stdext = "0.3.3" -tap_aggregator = { version = "0.5.8", default-features = false, features = [ +tap_aggregator = { version = "0.5.9", default-features = false, features = [ "v2", ] } -tap_core = { version = "4.1.4", default-features = false } +tap_core = { version = "5.0.0", default-features = false } tap_graph = { version = "0.3.4", features = ["v2"] } tempfile = "3.8.0" test-log = { version = "0.2.12", default-features = false } diff --git a/crates/service/src/service.rs b/crates/service/src/service.rs index ad6662b7a..cb14b5639 100644 --- a/crates/service/src/service.rs +++ b/crates/service/src/service.rs @@ -21,7 +21,7 @@ use indexer_dips::{ use indexer_monitor::{escrow_accounts_v1, escrow_accounts_v2, DeploymentDetails, SubgraphClient}; use release::IndexerServiceRelease; use reqwest::Url; -use tap_core::tap_eip712_domain; +use tap_core::{tap_eip712_domain, TapVersion}; use tokio::{net::TcpListener, signal}; use tower_http::normalize_path::NormalizePath; use tracing::info; @@ -90,12 +90,6 @@ pub async fn run() -> anyhow::Result<()> { let database = database::connect(config.database.clone().get_formated_postgres_url().as_ref()).await; - let domain_separator = tap_eip712_domain( - config.blockchain.chain_id as u64, - config.blockchain.receipts_verifier_address, - ); - let chain_id = config.blockchain.chain_id as u64; - let host_and_port = config.service.host_and_port; let indexer_address = config.indexer.indexer_address; let ipfs_url = config.service.ipfs_url.clone(); @@ -108,7 +102,7 @@ pub async fn run() -> anyhow::Result<()> { // Determine if we should check for Horizon contracts and potentially enable hybrid mode: // - If horizon.enabled = false: Pure legacy mode, no Horizon detection // - If horizon.enabled = true: Check if Horizon contracts are active in the network - let is_horizon_active = if config.horizon.enabled { + let horizon_is_active = if config.horizon.enabled { tracing::info!("Horizon migration support enabled - checking if Horizon contracts are active in the network"); match indexer_monitor::is_horizon_active(network_subgraph).await { Ok(active) => { @@ -135,8 +129,20 @@ pub async fn run() -> anyhow::Result<()> { false }; + let chain_id = config.blockchain.chain_id as u64; + + let domain_separator = tap_eip712_domain( + chain_id, + config.blockchain.receipts_verifier_address, + if horizon_is_active { + TapVersion::V2 + } else { + TapVersion::V1 + }, + ); + // Configure router with escrow watchers based on automatic Horizon detection - let router = if is_horizon_active { + let router = if horizon_is_active { tracing::info!("Horizon contracts detected - using Horizon migration mode: V2 receipts only, but processing existing V1 receipts"); // Create V1 escrow watcher for processing existing receipts diff --git a/crates/service/src/tap/checks/receipt_max_val_check.rs b/crates/service/src/tap/checks/receipt_max_val_check.rs index 3418c28ba..5105e7c4b 100644 --- a/crates/service/src/tap/checks/receipt_max_val_check.rs +++ b/crates/service/src/tap/checks/receipt_max_val_check.rs @@ -66,7 +66,7 @@ mod tests { .unwrap(); let eip712_domain_separator: Eip712Domain = - tap_eip712_domain(1, Address::from([0x11u8; 20])); + tap_eip712_domain(1, Address::from([0x11u8; 20]), tap_core::TapVersion::V1); let timestamp = SystemTime::now() .duration_since(SystemTime::UNIX_EPOCH) diff --git a/crates/service/src/tap/checks/timestamp_check.rs b/crates/service/src/tap/checks/timestamp_check.rs index edfc0c3c4..68b917613 100644 --- a/crates/service/src/tap/checks/timestamp_check.rs +++ b/crates/service/src/tap/checks/timestamp_check.rs @@ -75,7 +75,7 @@ mod tests { .build() .unwrap(); let eip712_domain_separator: Eip712Domain = - tap_eip712_domain(1, Address::from([0x11u8; 20])); + tap_eip712_domain(1, Address::from([0x11u8; 20]), tap_core::TapVersion::V1); let value: u128 = 1234; let nonce: u64 = 10; let receipt = Eip712SignedMessage::new( diff --git a/crates/tap-agent/src/agent.rs b/crates/tap-agent/src/agent.rs index 9386aa809..711efc244 100644 --- a/crates/tap-agent/src/agent.rs +++ b/crates/tap-agent/src/agent.rs @@ -49,7 +49,7 @@ use sender_accounts_manager::SenderAccountsManager; use crate::{ agent::sender_accounts_manager::{SenderAccountsManagerArgs, SenderAccountsManagerMessage}, - database, CONFIG, EIP_712_DOMAIN, + database, CONFIG, }; /// Actor, Arguments, State, Messages and implementation for [crate::agent::sender_account::SenderAccount] @@ -169,7 +169,7 @@ pub async fn start_agent() -> (ActorRef, JoinHandl // Determine if we should check for Horizon contracts and potentially enable hybrid mode: // - If horizon.enabled = false: Pure legacy mode, no Horizon detection // - If horizon.enabled = true: Check if Horizon contracts are active in the network - let is_horizon_enabled = if CONFIG.horizon.enabled { + let horizon_is_enabled = if CONFIG.horizon.enabled { tracing::info!("Horizon migration support enabled - checking if Horizon contracts are active in the network"); match indexer_monitor::is_horizon_active(network_subgraph).await { Ok(active) => { @@ -198,7 +198,7 @@ pub async fn start_agent() -> (ActorRef, JoinHandl // Create V2 escrow accounts watcher only if Horizon is active // V2 escrow accounts are in the network subgraph, not a separate TAP v2 subgraph - let escrow_accounts_v2 = if is_horizon_enabled { + let escrow_accounts_v2 = if horizon_is_enabled { escrow_accounts_v2( network_subgraph, *indexer_address, @@ -213,7 +213,7 @@ pub async fn start_agent() -> (ActorRef, JoinHandl }; // In both modes we need both watchers for the hybrid processing - let (escrow_accounts_v1_final, escrow_accounts_v2_final) = if is_horizon_enabled { + let (escrow_accounts_v1_final, escrow_accounts_v2_final) = if horizon_is_enabled { tracing::info!("TAP Agent: Horizon migration mode - processing existing V1 receipts and new V2 receipts"); (escrow_accounts_v1, escrow_accounts_v2) } else { @@ -223,13 +223,23 @@ pub async fn start_agent() -> (ActorRef, JoinHandl let config = Box::leak(Box::new({ let mut config = SenderAccountConfig::from_config(&CONFIG); - config.horizon_enabled = is_horizon_enabled; + config.horizon_enabled = horizon_is_enabled; config })); + let domain_separator = tap_core::tap_eip712_domain( + CONFIG.blockchain.chain_id as u64, + CONFIG.blockchain.receipts_verifier_address, + if horizon_is_enabled { + tap_core::TapVersion::V2 + } else { + tap_core::TapVersion::V1 + }, + ); + let args = SenderAccountsManagerArgs { config, - domain_separator: EIP_712_DOMAIN.clone(), + domain_separator, pgpool, indexer_allocations, escrow_accounts_v1: escrow_accounts_v1_final, diff --git a/crates/tap-agent/src/lib.rs b/crates/tap-agent/src/lib.rs index 86501e82d..0c064a6dd 100644 --- a/crates/tap-agent/src/lib.rs +++ b/crates/tap-agent/src/lib.rs @@ -14,19 +14,10 @@ use std::sync::LazyLock; use indexer_config::Config; -use tap_core::tap_eip712_domain; -use thegraph_core::alloy::sol_types::Eip712Domain; /// Static configuration pub static CONFIG: LazyLock = LazyLock::new(|| cli::get_config().expect("Failed to load configuration")); -/// Static EIP_712_DOMAIN used with config values -pub static EIP_712_DOMAIN: LazyLock = LazyLock::new(|| { - tap_eip712_domain( - CONFIG.blockchain.chain_id as u64, - CONFIG.blockchain.receipts_verifier_address, - ) -}); pub mod adaptative_concurrency; pub mod agent; diff --git a/crates/tap-agent/src/test.rs b/crates/tap-agent/src/test.rs index 41b6adc4d..442f4b687 100644 --- a/crates/tap-agent/src/test.rs +++ b/crates/tap-agent/src/test.rs @@ -19,7 +19,7 @@ use rand::{distr::Alphanumeric, rng, Rng}; use reqwest::Url; use sqlx::{types::BigDecimal, PgPool}; use tap_aggregator::server::run_server; -use tap_core::{signed_message::Eip712SignedMessage, tap_eip712_domain}; +use tap_core::{signed_message::Eip712SignedMessage, tap_eip712_domain, TapVersion}; use tap_graph::{Receipt, ReceiptAggregateVoucher, SignedRav, SignedReceipt}; use test_assets::{flush_messages, TAP_SENDER as SENDER, TAP_SIGNER as SIGNER}; use thegraph_core::alloy::{ @@ -56,7 +56,7 @@ use crate::{ pub static SENDER_2: LazyLock<(PrivateKeySigner, Address)> = LazyLock::new(|| wallet(1)); pub static INDEXER: LazyLock<(PrivateKeySigner, Address)> = LazyLock::new(|| wallet(3)); pub static TAP_EIP712_DOMAIN_SEPARATOR: LazyLock = - LazyLock::new(|| tap_eip712_domain(1, Address::from([0x11u8; 20]))); + LazyLock::new(|| tap_eip712_domain(1, Address::from([0x11u8; 20]), TapVersion::V1)); pub const TRIGGER_VALUE: u128 = 500; pub const RECEIPT_LIMIT: u64 = 10000; diff --git a/crates/test-assets/src/lib.rs b/crates/test-assets/src/lib.rs index bdbb1a8de..9abd731a3 100644 --- a/crates/test-assets/src/lib.rs +++ b/crates/test-assets/src/lib.rs @@ -372,7 +372,7 @@ pub static TAP_SIGNER: LazyLock<(PrivateKeySigner, Address)> = LazyLock::new(|| }); pub static TAP_EIP712_DOMAIN: LazyLock = - LazyLock::new(|| tap_eip712_domain(1, VERIFIER_ADDRESS)); + LazyLock::new(|| tap_eip712_domain(1, VERIFIER_ADDRESS, tap_core::TapVersion::V1)); #[derive(bon::Builder)] pub struct SignedReceiptRequest { diff --git a/integration-tests/src/constants.rs b/integration-tests/src/constants.rs index ff4f048b5..df3c95fda 100644 --- a/integration-tests/src/constants.rs +++ b/integration-tests/src/constants.rs @@ -5,7 +5,8 @@ //! Constants used in the integration tests for the TAP RAV generation //! their value is taken from local-network .env variable -pub const INDEXER_URL: &str = "http://localhost:7601"; +// Keep for backwards compatibility if needed +// pub const INDEXER_URL: &str = "http://localhost:7601"; pub const GATEWAY_API_KEY: &str = "deadbeefdeadbeefdeadbeefdeadbeef"; pub const GATEWAY_URL: &str = "http://localhost:7700"; @@ -24,7 +25,11 @@ pub const ACCOUNT0_SECRET: &str = "ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"; pub const CHAIN_ID: u64 = 1337; -pub const SUBGRAPH_ID: &str = "Qmc2CbqucMvaS4GFvt2QUZWvRwSZ3K5ipeGvbC6UUBf616"; +// Use the test subgraph ID for TAP receipt generation testing +pub const SUBGRAPH_ID: &str = "QmRcucmbxAXLaAZkkCR8Bdj1X7QGPLjfRmQ5H6tFhGqiHX"; + +// Network subgraph ID - used by gateway for network information +pub const NETWORK_SUBGRAPH_ID: &str = "Qmc2CbqucMvaS4GFvt2QUZWvRwSZ3K5ipeGvbC6UUBf616"; pub const GRAPH_URL: &str = "http://localhost:8000/subgraphs/name/graph-network"; diff --git a/integration-tests/src/load_test.rs b/integration-tests/src/load_test.rs index cd017e76f..4521f3804 100644 --- a/integration-tests/src/load_test.rs +++ b/integration-tests/src/load_test.rs @@ -11,11 +11,11 @@ use tokio::{sync::Semaphore, task, time::Instant}; use crate::{ constants::{ - ACCOUNT0_SECRET, CHAIN_ID, GRAPH_URL, INDEXER_URL, MAX_RECEIPT_VALUE, SUBGRAPH_ID, - TAP_VERIFIER_CONTRACT, + ACCOUNT0_SECRET, CHAIN_ID, GATEWAY_API_KEY, GATEWAY_URL, GRAPH_URL, MAX_RECEIPT_VALUE, + SUBGRAPH_ID, TAP_VERIFIER_CONTRACT, }, utils::{ - create_request, create_tap_receipt, create_tap_receipt_v2, encode_v2_receipt, + create_request_with_api_key, create_tap_receipt, create_tap_receipt_v2, encode_v2_receipt, find_allocation, }, }; @@ -109,13 +109,14 @@ async fn create_and_send_receipts( )?; let receipt_json = serde_json::to_string(&receipt).unwrap(); - let response = create_request( + let response = create_request_with_api_key( &http_client, - format!("{INDEXER_URL}/subgraphs/id/{SUBGRAPH_ID}").as_str(), + format!("{GATEWAY_URL}/api/subgraphs/id/{SUBGRAPH_ID}").as_str(), &receipt_json, &json!({ "query": "{ _meta { block { number } } }" }), + GATEWAY_API_KEY, ) .send() .await?; @@ -225,13 +226,14 @@ async fn create_and_send_receipts_v2( )?; let receipt_encoded = encode_v2_receipt(&receipt)?; - let response = create_request( + let response = create_request_with_api_key( &http_client, - format!("{INDEXER_URL}/subgraphs/id/{SUBGRAPH_ID}").as_str(), + format!("{GATEWAY_URL}/api/subgraphs/id/{SUBGRAPH_ID}").as_str(), &receipt_encoded, &json!({ "query": "{ _meta { block { number } } }" }), + GATEWAY_API_KEY, ) .send() .await?; diff --git a/integration-tests/src/main.rs b/integration-tests/src/main.rs index 2fc491c27..3526ea862 100644 --- a/integration-tests/src/main.rs +++ b/integration-tests/src/main.rs @@ -43,6 +43,9 @@ enum Commands { #[clap(name = "debug")] Debug, + + #[clap(name = "verify")] + VerifyGateway, } #[tokio::main] @@ -73,6 +76,10 @@ async fn main() -> Result<()> { Commands::Debug => { signature_test::test_v2_signature_recovery().await?; } + // cargo run -- verify + Commands::VerifyGateway => { + utils::verify_gateway_routing().await?; + } } Ok(()) diff --git a/integration-tests/src/rav_tests.rs b/integration-tests/src/rav_tests.rs index cbdfd5f33..267768d2b 100644 --- a/integration-tests/src/rav_tests.rs +++ b/integration-tests/src/rav_tests.rs @@ -10,14 +10,10 @@ use thegraph_core::alloy::{primitives::Address, signers::local::PrivateKeySigner use crate::{ constants::{ - ACCOUNT0_SECRET, CHAIN_ID, GATEWAY_API_KEY, GATEWAY_URL, GRAPH_TALLY_COLLECTOR_CONTRACT, - GRAPH_URL, INDEXER_URL, MAX_RECEIPT_VALUE, SUBGRAPH_ID, TAP_AGENT_METRICS_URL, - TAP_VERIFIER_CONTRACT, - }, - utils::{ - create_request, create_tap_receipt, create_tap_receipt_v2, encode_v2_receipt, - find_allocation, + ACCOUNT0_SECRET, CHAIN_ID, GATEWAY_API_KEY, GATEWAY_URL, GRAPH_URL, MAX_RECEIPT_VALUE, + SUBGRAPH_ID, TAP_AGENT_METRICS_URL, TAP_VERIFIER_CONTRACT, }, + utils::{create_request_with_api_key, create_tap_receipt, find_allocation}, MetricsChecker, }; @@ -68,7 +64,7 @@ pub async fn test_tap_rav_v1() -> Result<()> { for i in 0..NUM_RECEIPTS { let response = http_client - .post(format!("{GATEWAY_URL}/api/subgraphs/id/{SUBGRAPH_ID}")) + .post(format!("{GATEWAY_URL}/api/deployments/id/{SUBGRAPH_ID}")) .header("Content-Type", "application/json") .header("Authorization", format!("Bearer {GATEWAY_API_KEY}")) .json(&json!({ @@ -115,7 +111,7 @@ pub async fn test_tap_rav_v1() -> Result<()> { println!("Sending trigger query {}/{}...", i + 1, MAX_TRIGGERS); let response = http_client - .post(format!("{GATEWAY_URL}/api/subgraphs/id/{SUBGRAPH_ID}")) + .post(format!("{GATEWAY_URL}/api/deployments/id/{SUBGRAPH_ID}")) .header("Content-Type", "application/json") .header("Authorization", format!("Bearer {GATEWAY_API_KEY}")) .json(&json!({ @@ -194,13 +190,14 @@ pub async fn test_invalid_chain_id() -> Result<()> { )?; let receipt_json = serde_json::to_string(&receipt).unwrap(); - let response = create_request( + let response = create_request_with_api_key( &http_client, - format!("{INDEXER_URL}/subgraphs/id/{SUBGRAPH_ID}").as_str(), + format!("{GATEWAY_URL}/api/deployments/id/{SUBGRAPH_ID}").as_str(), &receipt_json, &json!({ "query": "{ _meta { block { number } } }" }), + GATEWAY_API_KEY, ) .send() .await?; @@ -217,16 +214,11 @@ pub async fn test_invalid_chain_id() -> Result<()> { pub async fn test_tap_rav_v2() -> Result<()> { // Setup HTTP client let http_client = Arc::new(Client::new()); - let wallet: PrivateKeySigner = ACCOUNT0_SECRET.parse().unwrap(); // Query the network subgraph to find active allocations let allocation_id = find_allocation(http_client.clone(), GRAPH_URL).await?; let allocation_id = Address::from_str(&allocation_id)?; - // For V2, we need payer and service provider addresses - let payer = wallet.address(); - let service_provider = allocation_id; // Using allocation_id as service provider for simplicity - // Create a metrics checker let metrics_checker = MetricsChecker::new(http_client.clone(), TAP_AGENT_METRICS_URL.to_string()); @@ -261,24 +253,11 @@ pub async fn test_tap_rav_v2() -> Result<()> { println!("Sending V2 batch {batch} of {BATCHES} with {NUM_RECEIPTS} receipts each...",); for i in 0..NUM_RECEIPTS { - // Create V2 receipt - let receipt = create_tap_receipt_v2( - MAX_RECEIPT_VALUE, - &allocation_id, - GRAPH_TALLY_COLLECTOR_CONTRACT, - CHAIN_ID, - &wallet, - &payer, - &service_provider, - )?; - - let receipt_encoded = encode_v2_receipt(&receipt)?; - + // Send plain GraphQL query to gateway - let gateway generate V2 receipt let response = http_client - .post(format!("{GATEWAY_URL}/api/subgraphs/id/{SUBGRAPH_ID}")) + .post(format!("{GATEWAY_URL}/api/deployments/id/{SUBGRAPH_ID}")) .header("Content-Type", "application/json") .header("Authorization", format!("Bearer {GATEWAY_API_KEY}")) - .header("Tap-Receipt", receipt_encoded) .json(&json!({ "query": "{ _meta { block { number } } }" })) @@ -333,24 +312,11 @@ pub async fn test_tap_rav_v2() -> Result<()> { for i in 0..MAX_TRIGGERS { println!("Sending V2 trigger query {}/{}...", i + 1, MAX_TRIGGERS); - // Create V2 receipt - let receipt = create_tap_receipt_v2( - MAX_RECEIPT_VALUE / 10, // Smaller value for trigger receipts - &allocation_id, - GRAPH_TALLY_COLLECTOR_CONTRACT, - CHAIN_ID, - &wallet, - &payer, - &service_provider, - )?; - - let receipt_encoded = encode_v2_receipt(&receipt)?; - + // Send plain GraphQL query to gateway - let gateway generate V2 receipt let response = http_client - .post(format!("{GATEWAY_URL}/api/subgraphs/id/{SUBGRAPH_ID}")) + .post(format!("{GATEWAY_URL}/api/deployments/id/{SUBGRAPH_ID}")) .header("Content-Type", "application/json") .header("Authorization", format!("Bearer {GATEWAY_API_KEY}")) - .header("Tap-Receipt", receipt_encoded) .json(&json!({ "query": "{ _meta { block { number } } }" })) diff --git a/integration-tests/src/signature_test.rs b/integration-tests/src/signature_test.rs index 4564b2a79..65b0c07dc 100644 --- a/integration-tests/src/signature_test.rs +++ b/integration-tests/src/signature_test.rs @@ -5,7 +5,7 @@ use anyhow::Result; use std::str::FromStr; -use tap_core::{signed_message::Eip712SignedMessage, tap_eip712_domain}; +use tap_core::{signed_message::Eip712SignedMessage, tap_eip712_domain, TapVersion}; use tap_graph::v2::Receipt as V2Receipt; use thegraph_core::{ alloy::{primitives::Address, signers::local::PrivateKeySigner}, @@ -24,7 +24,11 @@ pub async fn test_v2_signature_recovery() -> Result<()> { println!("Wallet address: {wallet_address:?}"); // Create EIP-712 domain - V2 uses GraphTallyCollector - let domain = tap_eip712_domain(CHAIN_ID, Address::from_str(GRAPH_TALLY_COLLECTOR_CONTRACT)?); + let domain = tap_eip712_domain( + CHAIN_ID, + Address::from_str(GRAPH_TALLY_COLLECTOR_CONTRACT)?, + TapVersion::V2, + ); println!("Using domain: chain_id={CHAIN_ID}, verifier={GRAPH_TALLY_COLLECTOR_CONTRACT}"); // Create a V2 receipt diff --git a/integration-tests/src/utils.rs b/integration-tests/src/utils.rs index ae30b5ab0..b7ca79e9a 100644 --- a/integration-tests/src/utils.rs +++ b/integration-tests/src/utils.rs @@ -14,12 +14,14 @@ use rand::{rng, Rng}; use reqwest::Client; use serde_json::json; use tap_aggregator::grpc; -use tap_core::{signed_message::Eip712SignedMessage, tap_eip712_domain}; +use tap_core::{signed_message::Eip712SignedMessage, tap_eip712_domain, TapVersion}; use tap_graph::Receipt; use thegraph_core::alloy::{primitives::Address, signers::local::PrivateKeySigner}; use thegraph_core::CollectionId; -use crate::constants::{GRAPH_TALLY_COLLECTOR_CONTRACT, TEST_DATA_SERVICE}; +use crate::constants::{ + GATEWAY_API_KEY, GATEWAY_URL, GRAPH_TALLY_COLLECTOR_CONTRACT, SUBGRAPH_ID, TEST_DATA_SERVICE, +}; pub fn create_tap_receipt( value: u128, @@ -37,8 +39,11 @@ pub fn create_tap_receipt( let timestamp_ns = timestamp as u64; // Create domain separator - let eip712_domain_separator = - tap_eip712_domain(chain_id, Address::from_str(verifier_contract)?); + let eip712_domain_separator = tap_eip712_domain( + chain_id, + Address::from_str(verifier_contract)?, + TapVersion::V1, + ); // Create and sign receipt println!("Creating and signing receipt..."); @@ -78,8 +83,11 @@ pub fn create_tap_receipt_v2( let collection_id = CollectionId::from(*allocation_id); // Create domain separator - V2 uses GraphTallyCollector - let eip712_domain_separator = - tap_eip712_domain(chain_id, Address::from_str(GRAPH_TALLY_COLLECTOR_CONTRACT)?); + let eip712_domain_separator = tap_eip712_domain( + chain_id, + Address::from_str(GRAPH_TALLY_COLLECTOR_CONTRACT)?, + TapVersion::V2, + ); let wallet_address = wallet.address(); // Create and sign V2 receipt @@ -116,7 +124,8 @@ pub fn encode_v2_receipt(receipt: &Eip712SignedMessage) Ok(base64_encoded) } -// Function to create a configured request +// Function to create a configured request (currently unused - kept for compatibility) +#[allow(dead_code)] pub fn create_request( client: &reqwest::Client, url: &str, @@ -126,7 +135,24 @@ pub fn create_request( client .post(url) .header("Content-Type", "application/json") - .header("Tap-Receipt", receipt_json) + .header("tap-receipt", receipt_json) + .json(query) + .timeout(Duration::from_secs(10)) +} + +// Function to create a configured request with gateway API key +pub fn create_request_with_api_key( + client: &reqwest::Client, + url: &str, + receipt_json: &str, + query: &serde_json::Value, + api_key: &str, +) -> reqwest::RequestBuilder { + client + .post(url) + .header("Content-Type", "application/json") + .header("tap-receipt", receipt_json) + .header("Authorization", format!("Bearer {api_key}")) .json(query) .timeout(Duration::from_secs(10)) } @@ -162,3 +188,69 @@ pub async fn find_allocation(http_client: Arc, url: &str) -> Result Result<()> { + println!("🔍 Verifying gateway routing configuration..."); + + let client = Arc::new(Client::new()); + + // Test 1: Verify gateway is responding + println!("📡 Testing gateway availability..."); + let gateway_response = client + .get(format!("{GATEWAY_URL}/health")) + .timeout(Duration::from_secs(5)) + .send() + .await; + + match gateway_response { + Ok(resp) => { + if resp.status().is_success() { + println!("✅ Gateway is responding at {GATEWAY_URL}"); + } else { + println!("⚠️ Gateway responded with status: {}", resp.status()); + } + } + Err(e) => { + println!("❌ Gateway not reachable: {e}"); + return Err(anyhow::anyhow!("Gateway not reachable: {}", e)); + } + } + + // Test 2: Try a simple GraphQL query through the gateway + println!("📊 Testing subgraph query routing through gateway..."); + let query_response = client + .post(format!("{GATEWAY_URL}/api/subgraphs/id/{SUBGRAPH_ID}")) + .header("Content-Type", "application/json") + .header("Authorization", format!("Bearer {GATEWAY_API_KEY}")) + .json(&json!({ + "query": "{ _meta { block { number } } }" + })) + .timeout(Duration::from_secs(10)) + .send() + .await?; + + let status = query_response.status(); + let response_text = query_response.text().await?; + + println!("📋 Gateway response status: {status}"); + println!("📋 Gateway response body: {response_text}"); + + if status.is_success() { + println!("✅ Gateway successfully routed query to subgraph {SUBGRAPH_ID}"); + } else if status == 404 && response_text.contains("subgraph not found") { + println!( + "❌ Gateway routing issue: Subgraph {SUBGRAPH_ID} not found in gateway's routing table" + ); + println!( + "💡 This confirms the root cause - gateway cannot route to the specified subgraph ID" + ); + return Err(anyhow::anyhow!( + "Gateway routing verification failed: subgraph not found" + )); + } else { + println!("⚠️ Unexpected gateway response: {status} - {response_text}"); + } + + println!("🎯 Gateway routing verification complete!"); + Ok(()) +}