diff --git a/Cargo.lock b/Cargo.lock index be8afc6a..1b31ef31 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,18 +14,18 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" dependencies = [ "gimli", ] [[package]] -name = "adler" -version = "1.0.2" +name = "adler2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "ahash" @@ -93,9 +93,9 @@ dependencies = [ [[package]] name = "alloy-chains" -version = "0.1.27" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b515e82c8468ddb6ff8db21c78a5997442f113fd8471fd5b2261b2602dd0c67" +checksum = "abf770dad29577cd3580f3dd09005799224a912b8cdfdd6dc04d030d42b3df4e" dependencies = [ "num_enum", "strum 0.26.3", @@ -336,7 +336,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26154390b1d205a4a7ac7352aa2eb4f81f391399d4e2f546fb81a2f8bb383f62" dependencies = [ "alloy-rlp-derive", - "arrayvec", + "arrayvec 0.7.6", "bytes", ] @@ -348,7 +348,7 @@ checksum = "4d0f2d905ebd295e7effec65e5f6868d153936130ae718352771de3e7d03c75c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -481,7 +481,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -494,11 +494,11 @@ dependencies = [ "alloy-sol-macro-input", "const-hex", "heck 0.5.0", - "indexmap 2.3.0", + "indexmap 2.5.0", "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", "syn-solidity", "tiny-keccak", ] @@ -516,7 +516,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.74", + "syn 2.0.77", "syn-solidity", ] @@ -680,9 +680,15 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" + +[[package]] +name = "anymap3" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "9316150bf847270bd54e404c3fb1c5d3c6af118b3f0c3b42097da5ceafbe7c27" [[package]] name = "ark-ff" @@ -695,7 +701,7 @@ dependencies = [ "ark-serialize 0.3.0", "ark-std 0.3.0", "derivative", - "num-bigint", + "num-bigint 0.4.6", "num-traits", "paste", "rustc_version 0.3.3", @@ -715,10 +721,10 @@ dependencies = [ "derivative", "digest 0.10.7", "itertools 0.10.5", - "num-bigint", + "num-bigint 0.4.6", "num-traits", "paste", - "rustc_version 0.4.0", + "rustc_version 0.4.1", "zeroize", ] @@ -748,7 +754,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" dependencies = [ - "num-bigint", + "num-bigint 0.4.6", "num-traits", "quote", "syn 1.0.109", @@ -760,7 +766,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "num-bigint", + "num-bigint 0.4.6", "num-traits", "proc-macro2", "quote", @@ -785,7 +791,7 @@ checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ "ark-std 0.4.0", "digest 0.10.7", - "num-bigint", + "num-bigint 0.4.6", ] [[package]] @@ -810,9 +816,15 @@ dependencies = [ [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "ascii" @@ -843,9 +855,9 @@ dependencies = [ [[package]] name = "async-graphql" -version = "7.0.7" +version = "7.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b76aba2f176af685c2229633881a3adeae51f87ae1811781e73910b7001c93e" +checksum = "9d37c3e9ba322eb00e9e5e997d58f08e8b6de037325b9367ac59bca8e3cd46af" dependencies = [ "async-graphql-derive", "async-graphql-parser", @@ -855,9 +867,10 @@ dependencies = [ "base64 0.22.1", "bytes", "fnv", + "futures-timer", "futures-util", "http 1.1.0", - "indexmap 2.3.0", + "indexmap 2.5.0", "mime", "multer", "num-traits", @@ -873,9 +886,9 @@ dependencies = [ [[package]] name = "async-graphql-axum" -version = "7.0.7" +version = "7.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "686e48ce7820a1cf404b5c8e9b90ae24d03c867a408d8d651183945c7a554982" +checksum = "329afc4fc7359f112b7593bc930b788544cedbc97c4fbdf1db21e58704b4b5d0" dependencies = [ "async-graphql", "async-trait", @@ -891,26 +904,26 @@ dependencies = [ [[package]] name = "async-graphql-derive" -version = "7.0.7" +version = "7.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e2e26a6b44bc61df3ca8546402cf9204c28e30c06084cc8e75cd5e34d4f150" +checksum = "f1141703c11c6ad4fa9b3b0e1e476dea01dbd18a44db00f949b804afaab2f344" dependencies = [ "Inflector", "async-graphql-parser", "darling", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "strum 0.26.3", - "syn 2.0.74", + "syn 2.0.77", "thiserror", ] [[package]] name = "async-graphql-parser" -version = "7.0.7" +version = "7.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f801451484b4977d6fe67b29030f81353cabdcbb754e5a064f39493582dac0cf" +checksum = "2f66edcce4c38c18f7eb181fdf561c3d3aa2d644ce7358fc7a928c00a4ffef17" dependencies = [ "async-graphql-value", "pest", @@ -920,12 +933,12 @@ dependencies = [ [[package]] name = "async-graphql-value" -version = "7.0.7" +version = "7.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69117c43c01d81a69890a9f5dd6235f2f027ca8d1ec62d6d3c5e01ca0edb4f2b" +checksum = "3b0206011cad065420c27988f17dd7fe201a0e056b20c262209b7bffcd6fa176" dependencies = [ "bytes", - "indexmap 2.3.0", + "indexmap 2.5.0", "serde", "serde_json", ] @@ -949,18 +962,18 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] name = "async-trait" -version = "0.1.81" +version = "0.1.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" +checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -971,7 +984,7 @@ checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" dependencies = [ "futures", "pharos", - "rustc_version 0.4.0", + "rustc_version 0.4.1", ] [[package]] @@ -1006,7 +1019,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -1045,7 +1058,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -1179,17 +1192,17 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -1243,7 +1256,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6773ddc0eafc0e509fb60e48dff7f450f8e674a0686ae8605e8d9901bd5eefa" dependencies = [ - "num-bigint", + "num-bigint 0.4.6", "num-integer", "num-traits", ] @@ -1256,7 +1269,7 @@ checksum = "51d712318a27c7150326677b321a5fa91b55f6d9034ffd67f20319e147d40cee" dependencies = [ "autocfg", "libm", - "num-bigint", + "num-bigint 0.4.6", "num-integer", "num-traits", "serde", @@ -1383,10 +1396,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" dependencies = [ "once_cell", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", "syn_derive", ] @@ -1435,7 +1448,7 @@ dependencies = [ "chrono", "glob", "pretty_assertions", - "rustc_version 0.4.0", + "rustc_version 0.4.1", "serde_json", "zstd", ] @@ -1463,13 +1476,13 @@ dependencies = [ "bincode", "build-info-common", "chrono", - "num-bigint", + "num-bigint 0.4.6", "num-traits", "proc-macro-error", "proc-macro2", "quote", "serde_json", - "syn 2.0.74", + "syn 2.0.77", "zstd", ] @@ -1515,9 +1528,9 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.16.3" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "102087e286b4677862ea56cf8fc58bb2cdfa8725c40ffb80fe3a008eb7f2fc83" +checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" [[package]] name = "byteorder" @@ -1527,32 +1540,33 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" dependencies = [ "serde", ] [[package]] name = "c-kzg" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf100c4cea8f207e883ff91ca886d621d8a166cb04971dfaa9bb8fd99ed95df" +checksum = "f0307f72feab3300336fb803a57134159f6e20139af1357f36c54cb90d8e8928" dependencies = [ "blst", "cc", "glob", "hex", "libc", + "once_cell", "serde", ] [[package]] name = "camino" -version = "1.1.7" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] @@ -1582,12 +1596,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.10" +version = "1.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e8aabfac534be767c909e0690571677d49f41bd8465ae876fe043d52ba5292" +checksum = "07b1695e2c7e8fc85310cde85aeaab7e3097f593c91d209d3f9df76c928100f0" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -1629,9 +1644,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.15" +version = "4.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d8838454fda655dafd3accb2b6e2bea645b9e4078abe84a22ceb947235c5cc" +checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" dependencies = [ "clap_builder", "clap_derive", @@ -1639,9 +1654,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.15" +version = "4.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" +checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" dependencies = [ "anstream", "anstyle", @@ -1658,7 +1673,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -1797,11 +1812,27 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "cost-model" +version = "0.1.0" +source = "git+https://github.com/graphprotocol/agora?rev=3ed34ca#3ed34cae6dadded9c8c6ca34356309c98f0f0578" +dependencies = [ + "firestorm", + "fraction", + "graphql 0.2.0", + "itertools 0.12.1", + "lazy_static", + "nom 5.1.3", + "num-bigint 0.2.6", + "num-traits", + "serde_json", +] + [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" dependencies = [ "libc", ] @@ -1894,7 +1925,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -1905,7 +1936,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -1999,8 +2030,8 @@ dependencies = [ "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", - "syn 2.0.74", + "rustc_version 0.4.1", + "syn 2.0.77", ] [[package]] @@ -2020,7 +2051,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", "unicode-xid", ] @@ -2201,9 +2232,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "fastrlp" @@ -2211,7 +2242,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" dependencies = [ - "arrayvec", + "arrayvec 0.7.6", "auto_impl", "bytes", ] @@ -2309,6 +2340,16 @@ dependencies = [ "thiserror", ] +[[package]] +name = "fraction" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a27f0e7512f6915c9bc38594725e33d7673da9308fea0abf4cc258c281cdbb2a" +dependencies = [ + "lazy_static", + "num", +] + [[package]] name = "fs_extra" version = "1.3.0" @@ -2403,7 +2444,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -2485,9 +2526,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" [[package]] name = "glob" @@ -2497,9 +2538,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "globset" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" dependencies = [ "aho-corasick", "bstr", @@ -2528,6 +2569,16 @@ dependencies = [ "spinning_top", ] +[[package]] +name = "graphql" +version = "0.2.0" +source = "git+https://github.com/edgeandnode/toolshed?tag=graphql-v0.2.0#2df5ee975656027d4a7fbf591baf6a29dfbe0ee6" +dependencies = [ + "firestorm", + "graphql-parser", + "serde", +] + [[package]] name = "graphql" version = "0.3.0" @@ -2571,7 +2622,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.3.0", + "indexmap 2.5.0", "slab", "tokio", "tokio-util", @@ -2580,9 +2631,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ "atomic-waker", "bytes", @@ -2590,7 +2641,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.3.0", + "indexmap 2.5.0", "slab", "tokio", "tokio-util", @@ -2843,7 +2894,7 @@ dependencies = [ "bytes", "futures-channel", "futures-util", - "h2 0.4.5", + "h2 0.4.6", "http 1.1.0", "http-body 1.0.1", "httparse", @@ -2857,9 +2908,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.2" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http 1.1.0", @@ -2891,9 +2942,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde7055719c54e36e95e8719f95883f22072a48ede39db7fc17a4e1d5281e9b9" +checksum = "da62f120a8a37763efb0cf8fdf264b884c7b8b9ac8660b900c8661030c00e6ba" dependencies = [ "bytes", "futures-channel", @@ -2911,9 +2962,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -2980,6 +3031,7 @@ dependencies = [ "axum-extra", "bigdecimal 0.4.5", "build-info", + "cost-model", "env_logger", "eventuals", "lazy_static", @@ -2989,7 +3041,7 @@ dependencies = [ "serde", "serde_json", "sqlx", - "tap_core 1.0.0 (git+https://github.com/semiotic-ai/timeline-aggregation-protocol?rev=ff856d9)", + "tap_core 1.0.0 (git+https://github.com/semiotic-ai/timeline-aggregation-protocol?rev=3fe6bc2)", "test-log", "thegraph-core", "thegraph-graphql-http", @@ -2999,6 +3051,7 @@ dependencies = [ "tower-http", "tower_governor", "tracing", + "ttl_cache", "wiremock 0.5.22", ] @@ -3039,7 +3092,7 @@ dependencies = [ "futures-util", "indexer-common", "indexer-config", - "jsonrpsee 0.24.2", + "jsonrpsee 0.24.4", "lazy_static", "prometheus", "ractor", @@ -3049,14 +3102,14 @@ dependencies = [ "serde_json", "sqlx", "tap_aggregator", - "tap_core 1.0.0 (git+https://github.com/semiotic-ai/timeline-aggregation-protocol?rev=ff856d9)", + "tap_core 1.0.0 (git+https://github.com/semiotic-ai/timeline-aggregation-protocol?rev=3fe6bc2)", "tempfile", "thegraph-core", "thiserror", "tokio", "tracing", "tracing-subscriber", - "wiremock 0.6.1", + "wiremock 0.6.2", ] [[package]] @@ -3072,9 +3125,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.3.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -3125,9 +3178,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" [[package]] name = "is_terminal_polyfill" @@ -3144,6 +3197,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itertools" version = "0.13.0" @@ -3190,9 +3252,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -3212,13 +3274,13 @@ dependencies = [ [[package]] name = "jsonrpsee" -version = "0.24.2" +version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a1d83ae9ed70d8e3440db663e343a82f93913104744cd543bbcdd1dbc0e35d3" +checksum = "8fd1ead9fb95614e8dc5556d12a8681c2f6d352d0c1d3efc8708c7ccbba47bc6" dependencies = [ - "jsonrpsee-core 0.24.2", + "jsonrpsee-core 0.24.4", "jsonrpsee-http-client", - "jsonrpsee-types 0.24.2", + "jsonrpsee-types 0.24.4", "tracing", ] @@ -3248,9 +3310,9 @@ dependencies = [ [[package]] name = "jsonrpsee-core" -version = "0.24.2" +version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b772fb8aa2b511eeed75f7e19d8e5fa57be7e8202249470bf26210727399c7" +checksum = "ff79651479f69ada7bda604ef2acf3f1aa50755d97cc36d25ff04c2664f9d96f" dependencies = [ "async-trait", "bytes", @@ -3258,7 +3320,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.1", "http-body-util", - "jsonrpsee-types 0.24.2", + "jsonrpsee-types 0.24.4", "serde", "serde_json", "thiserror", @@ -3268,9 +3330,9 @@ dependencies = [ [[package]] name = "jsonrpsee-http-client" -version = "0.24.2" +version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d5f8f6ddb09312a9592ec9e21a3ccd6f61e51730d9d56321351eff971b0fe55" +checksum = "68ed8b301b19f4dad8ddc66ed956a70fc227def5c19b3898e0a29ce8f0edee06" dependencies = [ "async-trait", "base64 0.22.1", @@ -3278,8 +3340,8 @@ dependencies = [ "hyper 1.4.1", "hyper-rustls", "hyper-util", - "jsonrpsee-core 0.24.2", - "jsonrpsee-types 0.24.2", + "jsonrpsee-core 0.24.4", + "jsonrpsee-types 0.24.4", "rustls", "rustls-platform-verifier", "serde", @@ -3340,9 +3402,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.24.2" +version = "0.24.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98deeee954567f75632fa40666ac93a66d4f9f4ed4ca15bd6b7ed0720b53e761" +checksum = "531e386460425e49679587871a056f2895a47dade21457324ad1262cd78ef6d9" dependencies = [ "http 1.1.0", "serde", @@ -3390,9 +3452,9 @@ dependencies = [ [[package]] name = "keccak-asm" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "422fbc7ff2f2f5bdffeb07718e5a5324dca72b0c9293d50df4026652385e3314" +checksum = "505d1856a39b200489082f90d897c3f07c455563880bc5952e38eabf731c83b6" dependencies = [ "digest 0.10.7", "sha3-asm", @@ -3407,11 +3469,24 @@ dependencies = [ "spin", ] +[[package]] +name = "lexical-core" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" +dependencies = [ + "arrayvec 0.5.2", + "bitflags 1.3.2", + "cfg-if", + "ryu", + "static_assertions", +] + [[package]] name = "libc" -version = "0.2.155" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libm" @@ -3430,6 +3505,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + [[package]] name = "linkme" version = "0.3.28" @@ -3447,7 +3528,7 @@ checksum = "cb26336e6dc7cc76e7927d2c9e7e3bb376d7af65a6f56a0b16c47d18a9b1abc5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -3554,7 +3635,7 @@ checksum = "38b4faf00617defe497754acde3024865bc143d44a86799b24e191ecff91354f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -3586,11 +3667,11 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" dependencies = [ - "adler", + "adler2", ] [[package]] @@ -3651,6 +3732,17 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b93853da6d84c2e3c7d730d6473e8817692dd89be387eb01b94d7f108ecb5b8c" +[[package]] +name = "nom" +version = "5.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08959a387a676302eebf4ddbcbc611da04285579f76f88ee0506c63b1a61dd4b" +dependencies = [ + "lexical-core", + "memchr", + "version_check", +] + [[package]] name = "nom" version = "7.1.3" @@ -3683,6 +3775,31 @@ dependencies = [ "winapi", ] +[[package]] +name = "num" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" +dependencies = [ + "num-bigint 0.2.6", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-bigint" version = "0.4.6" @@ -3710,6 +3827,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "num-complex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg", + "num-traits", +] + [[package]] name = "num-conv" version = "0.1.0" @@ -3736,6 +3863,18 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg", + "num-bigint 0.2.6", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -3773,14 +3912,14 @@ checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] name = "object" -version = "0.36.3" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] @@ -3820,7 +3959,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -3849,7 +3988,7 @@ checksum = "1e32339a5dc40459130b3bd269e9892439f55b33e772d2a9d402a789baaf4e8a" dependencies = [ "futures-core", "futures-sink", - "indexmap 2.3.0", + "indexmap 2.5.0", "js-sys", "once_cell", "pin-project-lite", @@ -3908,7 +4047,7 @@ version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ - "arrayvec", + "arrayvec 0.7.6", "bitvec", "byte-slice-cast", "impl-trait-for-tuples", @@ -3922,7 +4061,7 @@ version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d830939c76d294956402033aee57a6da7b438f2294eb94864c37b0569053a42c" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 1.0.109", @@ -3930,9 +4069,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" @@ -3952,7 +4091,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.3", + "redox_syscall", "smallvec", "windows-targets 0.52.6", ] @@ -3981,7 +4120,7 @@ checksum = "bdeeaa00ce488657faba8ebf44ab9361f9365a97bd39ffb8a60663f57ff4b467" dependencies = [ "inlinable_string", "pear_codegen", - "yansi 1.0.1", + "yansi", ] [[package]] @@ -3993,7 +4132,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -4023,9 +4162,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.11" +version = "2.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" +checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9" dependencies = [ "memchr", "thiserror", @@ -4039,7 +4178,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" dependencies = [ "futures", - "rustc_version 0.4.0", + "rustc_version 0.4.1", ] [[package]] @@ -4059,7 +4198,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -4124,12 +4263,12 @@ dependencies = [ [[package]] name = "pretty_assertions" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" dependencies = [ "diff", - "yansi 0.5.1", + "yansi", ] [[package]] @@ -4155,11 +4294,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit 0.22.21", ] [[package]] @@ -4203,9 +4342,9 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", "version_check", - "yansi 1.0.1", + "yansi", ] [[package]] @@ -4243,7 +4382,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -4331,9 +4470,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -4465,18 +4604,9 @@ checksum = "d3edd4d5d42c92f0a659926464d4cce56b562761267ecf0f469d85b7de384175" [[package]] name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853" dependencies = [ "bitflags 2.6.0", ] @@ -4536,16 +4666,16 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.5" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" +checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" dependencies = [ "base64 0.22.1", "bytes", "encoding_rs", "futures-core", "futures-util", - "h2 0.4.5", + "h2 0.4.6", "http 1.1.0", "http-body 1.0.1", "http-body-util", @@ -4574,7 +4704,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winreg", + "windows-registry", ] [[package]] @@ -4619,9 +4749,9 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.44" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" +checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" dependencies = [ "bitvec", "bytecheck", @@ -4637,9 +4767,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.44" +version = "0.7.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" +checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" dependencies = [ "proc-macro2", "quote", @@ -4685,7 +4815,7 @@ dependencies = [ "futures", "futures-timer", "rstest_macros", - "rustc_version 0.4.0", + "rustc_version 0.4.1", ] [[package]] @@ -4697,7 +4827,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "rustc_version 0.4.0", + "rustc_version 0.4.1", "syn 1.0.109", "unicode-ident", ] @@ -4713,7 +4843,7 @@ dependencies = [ "ark-ff 0.4.2", "bytes", "fastrlp", - "num-bigint", + "num-bigint 0.4.6", "num-traits", "parity-scale-codec", "primitive-types", @@ -4734,11 +4864,11 @@ checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" [[package]] name = "rust_decimal" -version = "1.35.0" +version = "1.36.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1790d1c4c0ca81211399e0e0af16333276f375209e71a37b67698a373db5b47a" +checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555" dependencies = [ - "arrayvec", + "arrayvec 0.7.6", "borsh", "bytes", "num-traits", @@ -4777,18 +4907,18 @@ dependencies = [ [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver 1.0.23", ] [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ "bitflags 2.6.0", "errno", @@ -4799,9 +4929,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.12" +version = "0.23.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" dependencies = [ "log", "once_cell", @@ -4814,9 +4944,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba" +checksum = "e5bfb394eeed242e909609f56089eecfe5fda225042e8b171791b9c95f5931e5" dependencies = [ "openssl-probe", "rustls-pemfile", @@ -4843,9 +4973,9 @@ checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" [[package]] name = "rustls-platform-verifier" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93bda3f493b9abe5b93b3e7e3ecde0df292f2bd28c0296b90586ee0055ff5123" +checksum = "afbb878bdfdf63a336a5e63561b1835e7a8c91524f51621db870169eac84b490" dependencies = [ "core-foundation", "core-foundation-sys", @@ -4870,9 +5000,9 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" -version = "0.102.6" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", @@ -4926,11 +5056,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -4964,7 +5094,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77253fb2d4451418d07025826028bcb96ee42d3e58859689a70ce62908009db6" dependencies = [ "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -4991,7 +5121,7 @@ dependencies = [ "core-foundation", "core-foundation-sys", "libc", - "num-bigint", + "num-bigint 0.4.6", "security-framework-sys", ] @@ -5040,22 +5170,22 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.206" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b3e4cd94123dd520a128bcd11e34d9e9e423e7e3e50425cb1b4b1e3549d0284" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.206" +version = "1.0.210" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabfb6138d2383ea8208cf98ccf69cdfb1aff4088460681d84189aa259762f97" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -5069,9 +5199,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.124" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66ad62847a56b3dba58cc891acd13884b9c61138d330c0d7b6181713d4fce38d" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", "memchr", @@ -5108,7 +5238,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -5151,7 +5281,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.3.0", + "indexmap 2.5.0", "serde", "serde_derive", "serde_json", @@ -5168,7 +5298,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -5182,7 +5312,7 @@ dependencies = [ "build-info", "build-info-build", "clap", - "graphql", + "graphql 0.3.0", "hex-literal", "indexer-common", "indexer-config", @@ -5246,9 +5376,9 @@ dependencies = [ [[package]] name = "sha3-asm" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d79b758b7cb2085612b11a235055e485605a5103faccdd633f35bd7aee69dd" +checksum = "c28efc5e327c837aa837c59eae585fc250715ef939ac32881bcc11677cd02d46" dependencies = [ "cc", "cfg-if", @@ -5263,6 +5393,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -5294,7 +5430,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" dependencies = [ - "num-bigint", + "num-bigint 0.4.6", "num-traits", "thiserror", "time", @@ -5355,7 +5491,7 @@ checksum = "c87e960f4dca2788eeb86bbdde8dd246be8948790b7618d656e68f9b720a86e8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -5388,11 +5524,11 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f895e3734318cc55f1fe66258926c9b910c124d47520339efecbb6c59cec7c1f" +checksum = "7bba3a93db0cc4f7bdece8bb09e77e2e785c20bfebf79eb8340ed80708048790" dependencies = [ - "nom", + "nom 7.1.3", "unicode_categories", ] @@ -5432,7 +5568,7 @@ dependencies = [ "futures-util", "hashlink", "hex", - "indexmap 2.3.0", + "indexmap 2.5.0", "log", "memchr", "once_cell", @@ -5562,7 +5698,7 @@ dependencies = [ "log", "md-5", "memchr", - "num-bigint", + "num-bigint 0.4.6", "once_cell", "rand 0.8.5", "rust_decimal", @@ -5671,7 +5807,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -5693,9 +5829,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.74" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -5711,7 +5847,7 @@ dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -5723,7 +5859,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -5737,23 +5873,26 @@ name = "sync_wrapper" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" +dependencies = [ + "futures-core", +] [[package]] name = "system-configuration" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "system-configuration-sys", ] [[package]] name = "system-configuration-sys" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" dependencies = [ "core-foundation-sys", "libc", @@ -5791,17 +5930,14 @@ dependencies = [ [[package]] name = "tap_core" version = "1.0.0" -source = "git+https://github.com/semiotic-ai/timeline-aggregation-protocol?rev=eb8447e#eb8447ed4566ced6846c03b510b25b915f985186" +source = "git+https://github.com/semiotic-ai/timeline-aggregation-protocol?rev=3fe6bc2#3fe6bc27c10161e5a1c011c088281d3da227df53" dependencies = [ "alloy", "anyhow", + "anymap3", "async-trait", "rand 0.8.5", - "rand_core 0.6.4", - "rstest", "serde", - "strum 0.24.1", - "strum_macros 0.24.3", "thiserror", "tokio", ] @@ -5809,13 +5945,17 @@ dependencies = [ [[package]] name = "tap_core" version = "1.0.0" -source = "git+https://github.com/semiotic-ai/timeline-aggregation-protocol?rev=ff856d9#ff856d966112af4c4d554a81154797fae4b335d9" +source = "git+https://github.com/semiotic-ai/timeline-aggregation-protocol?rev=eb8447e#eb8447ed4566ced6846c03b510b25b915f985186" dependencies = [ "alloy", "anyhow", "async-trait", "rand 0.8.5", + "rand_core 0.6.4", + "rstest", "serde", + "strum 0.24.1", + "strum_macros 0.24.3", "thiserror", "tokio", ] @@ -5827,7 +5967,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", - "fastrand 2.1.0", + "fastrand 2.1.1", "once_cell", "rustix", "windows-sys 0.59.0", @@ -5850,7 +5990,7 @@ checksum = "5999e24eaa32083191ba4e425deb75cdf25efefabe5aaccb7446dd0d4122a3f5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -5875,9 +6015,9 @@ dependencies = [ [[package]] name = "thegraph-graphql-http" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db48c0cb52c4d960017b8354340c509ef61bfa843cb1a4ff2fed34daa5e6f7a3" +checksum = "ae3b675ae2fd6e213fa1b428ba44009b309338b6e9b7e6205a674ccecd5d67d4" dependencies = [ "async-trait", "reqwest", @@ -5903,7 +6043,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -5982,9 +6122,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.2" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", @@ -6006,7 +6146,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -6032,9 +6172,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", @@ -6072,9 +6212,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ "bytes", "futures-core", @@ -6093,7 +6233,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.20", + "toml_edit 0.22.21", ] [[package]] @@ -6111,29 +6251,18 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.3.0", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap 2.3.0", + "indexmap 2.5.0", "toml_datetime", "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "3b072cee73c449a636ffd6f32bd8de3a9f7119139aff882f44943ce2986dc5cf" dependencies = [ - "indexmap 2.3.0", + "indexmap 2.5.0", "serde", "serde_spanned", "toml_datetime", @@ -6175,15 +6304,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tower_governor" @@ -6221,7 +6350,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -6294,7 +6423,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04659ddb06c87d233c566112c1c9c5b9e98256d9af50ec3bc9c8327f873a7568" dependencies = [ "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -6303,6 +6432,15 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "ttl_cache" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4189890526f0168710b6ee65ceaedf1460c48a14318ceec933cb26baa492096a" +dependencies = [ + "linked-hash-map", +] + [[package]] name = "tungstenite" version = "0.21.0" @@ -6389,9 +6527,9 @@ checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" [[package]] name = "unicode-normalization" @@ -6404,21 +6542,21 @@ dependencies = [ [[package]] name = "unicode-properties" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291" +checksum = "52ea75f83c0137a9b98608359a5f1af8144876eb67bcb1ce837368e906a9f524" [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unicode_categories" @@ -6555,34 +6693,35 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -6592,9 +6731,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6602,28 +6741,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -6631,20 +6770,20 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.26.3" +version = "0.26.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" +checksum = "841c67bff177718f1d4dfefde8d8f0e78f9b6589319ba88312f567fc5841a958" dependencies = [ "rustls-pki-types", ] [[package]] name = "whoami" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" +checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" dependencies = [ - "redox_syscall 0.4.1", + "redox_syscall", "wasite", ] @@ -6694,6 +6833,36 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -6860,16 +7029,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "wiremock" version = "0.5.22" @@ -6894,13 +7053,13 @@ dependencies = [ [[package]] name = "wiremock" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a59f8ae78a4737fb724f20106fb35ccb7cfe61ff335665d3042b3aa98e34717" +checksum = "7fff469918e7ca034884c7fd8f93fe27bacb7fcb599fd879df6c7b429a29b646" dependencies = [ "assert-json-diff", "async-trait", - "base64 0.21.7", + "base64 0.22.1", "deadpool 0.10.0", "futures", "http 1.1.0", @@ -6927,7 +7086,7 @@ dependencies = [ "js-sys", "log", "pharos", - "rustc_version 0.4.0", + "rustc_version 0.4.1", "send_wrapper", "thiserror", "wasm-bindgen", @@ -6944,12 +7103,6 @@ dependencies = [ "tap", ] -[[package]] -name = "yansi" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" - [[package]] name = "yansi" version = "1.0.1" @@ -6974,7 +7127,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] @@ -6994,7 +7147,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.77", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 35d7eb3c..55828001 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ sqlx = { version = "0.7.2", features = [ tracing = { version = "0.1.40", default-features = false } bigdecimal = "0.4.3" build-info = "0.0.38" -tap_core = { git = "https://github.com/semiotic-ai/timeline-aggregation-protocol", rev = "ff856d9", default-features = false } +tap_core = { git = "https://github.com/semiotic-ai/timeline-aggregation-protocol", rev = "3fe6bc2", default-features = false } tracing-subscriber = { version = "0.3", features = [ "json", "env-filter", diff --git a/common/Cargo.toml b/common/Cargo.toml index 0899bf41..6ab7003c 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -24,10 +24,12 @@ build-info.workspace = true serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } tokio = { workspace = true, features = ["fs", "tokio-macros"] } +cost-model = { git = "https://github.com/graphprotocol/agora", rev = "3ed34ca" } regex = "1.7.1" axum-extra = { version = "0.9.3", features = [ "typed-header", ], default-features = false } +ttl_cache = "0.5.1" autometrics = { version = "1.0.1", features = ["prometheus-exporter"] } tower_governor = "0.3.2" tower-http = { version = "0.5.2", features = [ diff --git a/common/src/indexer_service/http/indexer_service.rs b/common/src/indexer_service/http/indexer_service.rs index 09f3e03a..ce283b55 100644 --- a/common/src/indexer_service/http/indexer_service.rs +++ b/common/src/indexer_service/http/indexer_service.rs @@ -33,6 +33,7 @@ use tower_governor::{governor::GovernorConfigBuilder, GovernorLayer}; use tower_http::{cors, cors::CorsLayer, normalize_path::NormalizePath, trace::TraceLayer}; use tracing::{info, info_span}; +use crate::tap::{ValueCheckReceiver, ValueCheckSender}; use crate::{ address::public_key, indexer_service::http::{ @@ -168,6 +169,8 @@ where pub url_namespace: &'static str, pub metrics_prefix: &'static str, pub extra_routes: Router>>, + pub value_check_receiver: ValueCheckReceiver, + pub value_check_sender: ValueCheckSender, } pub struct IndexerServiceState @@ -179,6 +182,7 @@ where pub tap_manager: Manager, pub service_impl: Arc, pub metrics: IndexerServiceMetrics, + pub value_check_sender: ValueCheckSender, } pub struct IndexerService {} @@ -303,6 +307,7 @@ impl IndexerService { domain_separator.clone(), timestamp_error_tolerance, receipt_max_value, + options.value_check_receiver, ) .await; @@ -314,6 +319,7 @@ impl IndexerService { tap_manager, service_impl: Arc::new(options.service_impl), metrics, + value_check_sender: options.value_check_sender, }); // Rate limits by allowing bursts of 10 requests and requiring 100ms of diff --git a/common/src/indexer_service/http/request_handler.rs b/common/src/indexer_service/http/request_handler.rs index f3ec6a98..ae7c28bc 100644 --- a/common/src/indexer_service/http/request_handler.rs +++ b/common/src/indexer_service/http/request_handler.rs @@ -11,10 +11,13 @@ use axum::{ }; use axum_extra::TypedHeader; use reqwest::StatusCode; +use tap_core::receipt::Context; use thegraph_core::DeploymentId; use tracing::trace; -use crate::indexer_service::http::IndexerServiceResponse; +use serde_json::value::RawValue; + +use crate::{indexer_service::http::IndexerServiceResponse, tap::AgoraQuery}; use super::{ indexer_service::{AttestationOutput, IndexerServiceError, IndexerServiceState}, @@ -41,17 +44,36 @@ where .with_label_values(&[&manifest_id.to_string()]) .inc(); + #[derive(Debug, serde::Deserialize)] + pub struct QueryBody { + pub query: String, + pub variables: Option>, + } + let request = serde_json::from_slice(&body).map_err(|e| IndexerServiceError::InvalidRequest(e.into()))?; let attestation_signer = if let Some(receipt) = receipt.into_signed_receipt() { let allocation_id = receipt.message.allocation_id; + let request: QueryBody = serde_json::from_slice(&body) + .map_err(|e| IndexerServiceError::InvalidRequest(e.into()))?; + let variables = request + .variables + .as_ref() + .map(ToString::to_string) + .unwrap_or_default(); + let mut ctx = Context::new(); + ctx.insert(AgoraQuery { + deployment_id: manifest_id, + query: request.query.clone(), + variables, + }); + // Verify the receipt and store it in the database - // TODO update checks state .tap_manager - .verify_and_store_receipt(receipt) + .verify_and_store_receipt(&ctx, receipt) .await .map_err(IndexerServiceError::ReceiptError)?; diff --git a/common/src/tap.rs b/common/src/tap.rs index 4749558f..a43722ab 100644 --- a/common/src/tap.rs +++ b/common/src/tap.rs @@ -6,6 +6,7 @@ use crate::tap::checks::deny_list_check::DenyListCheck; use crate::tap::checks::receipt_max_val_check::ReceiptMaxValueCheck; use crate::tap::checks::sender_balance_check::SenderBalanceCheck; use crate::tap::checks::timestamp_check::TimestampCheck; +use crate::tap::checks::value_check::MinimumValue; use crate::{escrow_accounts::EscrowAccounts, prelude::Allocation}; use alloy::dyn_abi::Eip712Domain; use eventuals::Eventual; @@ -23,6 +24,11 @@ use tracing::error; mod checks; mod receipt_store; +pub use checks::value_check::{ + create_value_check, AgoraQuery, CostModelSource, ValueCheckReceiver, ValueCheckSender, +}; + +#[derive(Clone)] pub struct IndexerTapContext { domain_separator: Arc, @@ -44,6 +50,7 @@ impl IndexerTapContext { domain_separator: Eip712Domain, timestamp_error_tolerance: Duration, receipt_max_value: u128, + value_check_receiver: ValueCheckReceiver, ) -> Vec { vec![ Arc::new(AllocationEligible::new(indexer_allocations)), @@ -54,6 +61,7 @@ impl IndexerTapContext { Arc::new(TimestampCheck::new(timestamp_error_tolerance)), Arc::new(DenyListCheck::new(pgpool, escrow_accounts, domain_separator).await), Arc::new(ReceiptMaxValueCheck::new(receipt_max_value)), + Arc::new(MinimumValue::new(value_check_receiver)), ] } diff --git a/common/src/tap/checks.rs b/common/src/tap/checks.rs index 4da34f59..d4e23e9b 100644 --- a/common/src/tap/checks.rs +++ b/common/src/tap/checks.rs @@ -6,3 +6,4 @@ pub mod deny_list_check; pub mod receipt_max_val_check; pub mod sender_balance_check; pub mod timestamp_check; +pub mod value_check; diff --git a/common/src/tap/checks/allocation_eligible.rs b/common/src/tap/checks/allocation_eligible.rs index fca26e62..51a849e5 100644 --- a/common/src/tap/checks/allocation_eligible.rs +++ b/common/src/tap/checks/allocation_eligible.rs @@ -27,7 +27,11 @@ impl AllocationEligible { } #[async_trait::async_trait] impl Check for AllocationEligible { - async fn check(&self, receipt: &ReceiptWithState) -> CheckResult { + async fn check( + &self, + _: &tap_core::receipt::Context, + receipt: &ReceiptWithState, + ) -> CheckResult { let allocation_id = receipt.signed_receipt().message.allocation_id; if !self .indexer_allocations diff --git a/common/src/tap/checks/deny_list_check.rs b/common/src/tap/checks/deny_list_check.rs index 7048f861..73703349 100644 --- a/common/src/tap/checks/deny_list_check.rs +++ b/common/src/tap/checks/deny_list_check.rs @@ -150,7 +150,11 @@ impl DenyListCheck { #[async_trait::async_trait] impl Check for DenyListCheck { - async fn check(&self, receipt: &ReceiptWithState) -> CheckResult { + async fn check( + &self, + _: &tap_core::receipt::Context, + receipt: &ReceiptWithState, + ) -> CheckResult { let receipt_signer = receipt .signed_receipt() .recover_signer(&self.domain_separator) @@ -195,7 +199,7 @@ mod tests { use std::str::FromStr; use alloy::hex::ToHexExt; - use tap_core::receipt::ReceiptWithState; + use tap_core::receipt::{Context, ReceiptWithState}; use crate::test_vectors::{self, create_signed_receipt, TAP_SENDER}; @@ -241,7 +245,10 @@ mod tests { let checking_receipt = ReceiptWithState::new(signed_receipt); // Check that the receipt is rejected - assert!(deny_list_check.check(&checking_receipt).await.is_err()); + assert!(deny_list_check + .check(&Context::new(), &checking_receipt) + .await + .is_err()); } #[sqlx::test(migrations = "../migrations")] @@ -255,7 +262,10 @@ mod tests { // Check that the receipt is valid let checking_receipt = ReceiptWithState::new(signed_receipt); - deny_list_check.check(&checking_receipt).await.unwrap(); + deny_list_check + .check(&Context::new(), &checking_receipt) + .await + .unwrap(); // Add the sender to the denylist sqlx::query!( @@ -271,7 +281,10 @@ mod tests { // Check that the receipt is rejected tokio::time::sleep(std::time::Duration::from_millis(100)).await; - assert!(deny_list_check.check(&checking_receipt).await.is_err()); + assert!(deny_list_check + .check(&Context::new(), &checking_receipt) + .await + .is_err()); // Remove the sender from the denylist sqlx::query!( @@ -287,6 +300,9 @@ mod tests { // Check that the receipt is valid again tokio::time::sleep(std::time::Duration::from_millis(100)).await; - deny_list_check.check(&checking_receipt).await.unwrap(); + deny_list_check + .check(&Context::new(), &checking_receipt) + .await + .unwrap(); } } diff --git a/common/src/tap/checks/receipt_max_val_check.rs b/common/src/tap/checks/receipt_max_val_check.rs index 608d6870..6e3a1627 100644 --- a/common/src/tap/checks/receipt_max_val_check.rs +++ b/common/src/tap/checks/receipt_max_val_check.rs @@ -20,7 +20,11 @@ impl ReceiptMaxValueCheck { #[async_trait::async_trait] impl Check for ReceiptMaxValueCheck { - async fn check(&self, receipt: &ReceiptWithState) -> CheckResult { + async fn check( + &self, + _: &tap_core::receipt::Context, + receipt: &ReceiptWithState, + ) -> CheckResult { let receipt_value = receipt.signed_receipt().message.value; if receipt_value < self.receipt_max_value { @@ -45,6 +49,7 @@ mod tests { use alloy::signers::local::MnemonicBuilder; use alloy::signers::local::PrivateKeySigner; use alloy::sol_types::eip712_domain; + use tap_core::receipt::Context; use super::*; use tap_core::{ @@ -96,20 +101,29 @@ mod tests { async fn test_receipt_lower_than_limit() { let signed_receipt = create_signed_receipt_with_custom_value(RECEIPT_LIMIT - 1); let timestamp_check = ReceiptMaxValueCheck::new(RECEIPT_LIMIT); - assert!(timestamp_check.check(&signed_receipt).await.is_ok()); + assert!(timestamp_check + .check(&Context::new(), &signed_receipt) + .await + .is_ok()); } #[tokio::test] async fn test_receipt_higher_than_limit() { let signed_receipt = create_signed_receipt_with_custom_value(RECEIPT_LIMIT + 1); let timestamp_check = ReceiptMaxValueCheck::new(RECEIPT_LIMIT); - assert!(timestamp_check.check(&signed_receipt).await.is_err()); + assert!(timestamp_check + .check(&Context::new(), &signed_receipt) + .await + .is_err()); } #[tokio::test] async fn test_receipt_same_as_limit() { let signed_receipt = create_signed_receipt_with_custom_value(RECEIPT_LIMIT); let timestamp_check = ReceiptMaxValueCheck::new(RECEIPT_LIMIT); - assert!(timestamp_check.check(&signed_receipt).await.is_err()); + assert!(timestamp_check + .check(&Context::new(), &signed_receipt) + .await + .is_err()); } } diff --git a/common/src/tap/checks/sender_balance_check.rs b/common/src/tap/checks/sender_balance_check.rs index b0269e71..08a82275 100644 --- a/common/src/tap/checks/sender_balance_check.rs +++ b/common/src/tap/checks/sender_balance_check.rs @@ -30,7 +30,11 @@ impl SenderBalanceCheck { #[async_trait::async_trait] impl Check for SenderBalanceCheck { - async fn check(&self, receipt: &ReceiptWithState) -> CheckResult { + async fn check( + &self, + _: &tap_core::receipt::Context, + receipt: &ReceiptWithState, + ) -> CheckResult { let escrow_accounts_snapshot = self.escrow_accounts.value_immediate().unwrap_or_default(); let receipt_signer = receipt diff --git a/common/src/tap/checks/timestamp_check.rs b/common/src/tap/checks/timestamp_check.rs index 0de563a5..669bf74d 100644 --- a/common/src/tap/checks/timestamp_check.rs +++ b/common/src/tap/checks/timestamp_check.rs @@ -23,7 +23,11 @@ impl TimestampCheck { #[async_trait::async_trait] impl Check for TimestampCheck { - async fn check(&self, receipt: &ReceiptWithState) -> CheckResult { + async fn check( + &self, + _: &tap_core::receipt::Context, + receipt: &ReceiptWithState, + ) -> CheckResult { let timestamp_now = SystemTime::now() .duration_since(SystemTime::UNIX_EPOCH) .map_err(|e| CheckError::Failed(e.into()))?; @@ -55,7 +59,7 @@ mod tests { use super::*; use tap_core::{ - receipt::{checks::Check, state::Checking, Receipt, ReceiptWithState}, + receipt::{checks::Check, state::Checking, Context, Receipt, ReceiptWithState}, signed_message::EIP712SignedMessage, }; @@ -102,7 +106,10 @@ mod tests { let timestamp_ns = timestamp as u64; let signed_receipt = create_signed_receipt_with_custom_timestamp(timestamp_ns); let timestamp_check = TimestampCheck::new(Duration::from_secs(30)); - assert!(timestamp_check.check(&signed_receipt).await.is_ok()); + assert!(timestamp_check + .check(&Context::new(), &signed_receipt) + .await + .is_ok()); } #[tokio::test] @@ -115,7 +122,10 @@ mod tests { let timestamp_ns = timestamp as u64; let signed_receipt = create_signed_receipt_with_custom_timestamp(timestamp_ns); let timestamp_check = TimestampCheck::new(Duration::from_secs(30)); - assert!(timestamp_check.check(&signed_receipt).await.is_err()); + assert!(timestamp_check + .check(&Context::new(), &signed_receipt) + .await + .is_err()); } #[tokio::test] @@ -128,6 +138,9 @@ mod tests { let timestamp_ns = timestamp as u64; let signed_receipt = create_signed_receipt_with_custom_timestamp(timestamp_ns); let timestamp_check = TimestampCheck::new(Duration::from_secs(30)); - assert!(timestamp_check.check(&signed_receipt).await.is_err()); + assert!(timestamp_check + .check(&Context::new(), &signed_receipt) + .await + .is_err()); } } diff --git a/common/src/tap/checks/value_check.rs b/common/src/tap/checks/value_check.rs new file mode 100644 index 00000000..7c71739b --- /dev/null +++ b/common/src/tap/checks/value_check.rs @@ -0,0 +1,289 @@ +// Copyright 2023-, GraphOps and Semiotic Labs. +// SPDX-License-Identifier: Apache-2.0 + +use anyhow::anyhow; +use bigdecimal::ToPrimitive; +use cost_model::CostModel; +use sqlx::{postgres::PgListener, PgPool}; +use tracing::error; +use std::{ + cmp::min, + collections::HashMap, + sync::{Arc, Mutex}, + time::Duration, +}; +use thegraph_core::DeploymentId; +use tokio::{ + sync::mpsc::{Receiver, Sender}, + task::JoinHandle, +}; +use ttl_cache::TtlCache; + +use tap_core::receipt::{ + checks::{Check, CheckError, CheckResult}, + state::Checking, + Context, ReceiptWithState, +}; + +pub struct MinimumValue { + cost_model_cache: Arc>>, + model_handle: JoinHandle<()>, +} + +#[derive(Clone)] +pub struct ValueCheckSender { + pub tx_cost_model: Sender, +} + +pub struct ValueCheckReceiver { + rx_cost_model: Receiver, +} + +pub fn create_value_check(size: usize) -> (ValueCheckSender, ValueCheckReceiver) { + let (tx_cost_model, rx_cost_model) = tokio::sync::mpsc::channel(size); + + ( + ValueCheckSender { tx_cost_model }, + ValueCheckReceiver { rx_cost_model }, + ) +} + +impl MinimumValue { + pub fn new(ValueCheckReceiver { mut rx_cost_model }: ValueCheckReceiver) -> Self { + let cost_model_cache = Arc::new(Mutex::new(HashMap::::new())); + let cache = cost_model_cache.clone(); + let model_handle = tokio::spawn(async move { + loop { + let model = rx_cost_model.recv().await; + match model { + Some(value) => { + let deployment_id = value.deployment_id; + + if let Some(query) = cache.lock().unwrap().get_mut(&deployment_id) { + let _ = query.insert_model(value).inspect_err(|err| { + tracing::error!( + "Error while compiling cost model for deployment id {}. Error: {}", + deployment_id, err + ) + }); + } else { + match CostModelCache::new(value) { + Ok(value) => { + cache.lock().unwrap().insert(deployment_id, value); + } + Err(err) => { + tracing::error!( + "Error while compiling cost model for deployment id {}. Error: {}", + deployment_id, err + ) + } + } + } + } + None => break, + } + } + }); + + Self { + cost_model_cache, + model_handle, + } + } + + async fn cost_models_watcher( + pgpool: PgPool, + mut pglistener: PgListener, + denylist: Arc>>, + cancel_token: tokio_util::sync::CancellationToken, + ) { + #[derive(serde::Deserialize)] + struct DenylistNotification { + tg_op: String, + deployment: DeploymentId, + } + + loop { + tokio::select! { + _ = cancel_token.cancelled() => { + break; + } + + pg_notification = pglistener.recv() => { + let pg_notification = pg_notification.expect( + "should be able to receive Postgres Notify events on the channel \ + 'scalar_tap_deny_notification'", + ); + + let denylist_notification: DenylistNotification = + serde_json::from_str(pg_notification.payload()).expect( + "should be able to deserialize the Postgres Notify event payload as a \ + DenylistNotification", + ); + + match denylist_notification.tg_op.as_str() { + "INSERT" => { + denylist + .write() + .unwrap() + .insert(denylist_notification.sender_address); + } + "DELETE" => { + denylist + .write() + .unwrap() + .remove(&denylist_notification.sender_address); + } + // UPDATE and TRUNCATE are not expected to happen. Reload the entire denylist. + _ => { + error!( + "Received an unexpected denylist table notification: {}. Reloading entire \ + denylist.", + denylist_notification.tg_op + ); + + Self::sender_denylist_reload(pgpool.clone(), denylist.clone()) + .await + .expect("should be able to reload the sender denylist") + } + } + } + } + } + } +} + +impl Drop for MinimumValue { + fn drop(&mut self) { + self.model_handle.abort(); + } +} + +impl MinimumValue { + fn get_expected_value(&self, agora_query: &AgoraQuery) -> anyhow::Result { + // get agora model for the allocation_id + let mut cache = self.cost_model_cache.lock().unwrap(); + // on average, we'll have zero or one model + let models = cache.get_mut(&agora_query.deployment_id); + + let expected_value = models + .map(|cache| cache.cost(agora_query)) + .unwrap_or_default(); + + Ok(expected_value) + } +} + +#[async_trait::async_trait] +impl Check for MinimumValue { + async fn check(&self, ctx: &Context, receipt: &ReceiptWithState) -> CheckResult { + let agora_query = ctx + .get() + .ok_or(CheckError::Failed(anyhow!("Could not find agora query")))?; + + let expected_value = self + .get_expected_value(agora_query) + .map_err(CheckError::Failed)?; + + // get value + let value = receipt.signed_receipt().message.value; + + let should_accept = value >= expected_value; + + tracing::trace!( + value, + expected_value, + should_accept, + "Evaluating mininum query fee." + ); + + if should_accept { + Ok(()) + } else { + return Err(CheckError::Failed(anyhow!( + "Query receipt does not have the minimum value. Expected value: {}. Minimum value: {}.", + expected_value, value, + ))); + } + } +} + +fn compile_cost_model(src: CostModelSource) -> anyhow::Result { + if src.model.len() > (1 << 16) { + return Err(anyhow!("CostModelTooLarge")); + } + let model = CostModel::compile(&src.model, &src.variables)?; + Ok(model) +} + +pub struct AgoraQuery { + pub deployment_id: DeploymentId, + pub query: String, + pub variables: String, +} + +#[derive(Clone, Eq, Hash, PartialEq)] +pub struct CostModelSource { + pub deployment_id: DeploymentId, + pub model: String, + pub variables: String, +} + +pub struct CostModelCache { + models: TtlCache, + latest_model: CostModel, + latest_source: CostModelSource, +} + +impl CostModelCache { + pub fn new(source: CostModelSource) -> anyhow::Result { + let model = compile_cost_model(source.clone())?; + Ok(Self { + latest_model: model, + latest_source: source, + // arbitrary number of models copy + models: TtlCache::new(10), + }) + } + + fn insert_model(&mut self, source: CostModelSource) -> anyhow::Result<()> { + if source != self.latest_source { + let model = compile_cost_model(source.clone())?; + // update latest and insert into ttl the old model + let old_model = std::mem::replace(&mut self.latest_model, model); + self.latest_source = source.clone(); + + self.models + // arbitrary cache duration + .insert(source, old_model, Duration::from_secs(60)); + } + Ok(()) + } + + fn get_models(&mut self) -> Vec<&CostModel> { + let mut values: Vec<&CostModel> = self.models.iter().map(|(_, v)| v).collect(); + values.push(&self.latest_model); + values + } + + fn cost(&mut self, query: &AgoraQuery) -> u128 { + let models = self.get_models(); + + models + .into_iter() + .fold(None, |acc, model| { + let value = model + .cost(&query.query, &query.variables) + .ok() + .map(|fee| fee.to_u128().unwrap_or_default()) + .unwrap_or_default(); + if let Some(acc) = acc { + // return the minimum value of the cache list + Some(min(acc, value)) + } else { + Some(value) + } + }) + .unwrap_or_default() + } +} diff --git a/service/src/routes/cost.rs b/service/src/routes/cost.rs index b16f9dce..fedca69b 100644 --- a/service/src/routes/cost.rs +++ b/service/src/routes/cost.rs @@ -7,6 +7,7 @@ use std::sync::Arc; use async_graphql::{Context, EmptyMutation, EmptySubscription, Object, Schema, SimpleObject}; use async_graphql_axum::{GraphQLRequest, GraphQLResponse}; use axum::extract::State; +use indexer_common::tap::CostModelSource; use serde::{Deserialize, Serialize}; use serde_json::Value; use thegraph_core::DeploymentId; @@ -21,6 +22,16 @@ pub struct GraphQlCostModel { pub variables: Option, } +impl From for CostModelSource { + fn from(value: CostModel) -> Self { + Self { + deployment_id: value.deployment, + model: value.model.unwrap_or_default(), + variables: value.variables.unwrap_or_default().to_string(), + } + } +} + impl From for GraphQlCostModel { fn from(model: CostModel) -> Self { Self { @@ -45,8 +56,20 @@ impl Query { .into_iter() .map(|s| DeploymentId::from_str(&s)) .collect::, _>>()?; - let pool = &ctx.data_unchecked::>().database; + let state = &ctx.data_unchecked::>(); + + let cost_model_sender = &state.value_check_sender; + + let pool = &state.database; let cost_models = database::cost_models(pool, &deployment_ids).await?; + + for model in &cost_models { + let _ = cost_model_sender + .tx_cost_model + .send(CostModelSource::from(model.clone())) + .await; + } + Ok(cost_models.into_iter().map(|m| m.into()).collect()) } @@ -56,10 +79,20 @@ impl Query { deployment: String, ) -> Result, anyhow::Error> { let deployment_id = DeploymentId::from_str(&deployment)?; + + let state = &ctx.data_unchecked::>(); + let cost_model_sender = &state.value_check_sender; let pool = &ctx.data_unchecked::>().database; - database::cost_model(pool, &deployment_id) - .await - .map(|model_opt| model_opt.map(GraphQlCostModel::from)) + let model = database::cost_model(pool, &deployment_id).await?; + + if let Some(model) = &model { + let _ = cost_model_sender + .tx_cost_model + .send(CostModelSource::from(model.clone())) + .await; + } + + Ok(model.map(GraphQlCostModel::from)) } } diff --git a/service/src/routes/status.rs b/service/src/routes/status.rs index 68acd9c7..da005445 100644 --- a/service/src/routes/status.rs +++ b/service/src/routes/status.rs @@ -44,7 +44,7 @@ impl IntoRequestParameters for WrappedGraphQLRequest { value.clone().into_json().unwrap(), ) })), - extensions: Map::from_iter(self.0.extensions.into_iter().map(|(name, value)| { + extensions: Map::from_iter(self.0.extensions.iter().map(|(name, value)| { ( name.as_str().to_string(), value.clone().into_json().unwrap(), diff --git a/service/src/service.rs b/service/src/service.rs index f75da115..58de3c0c 100644 --- a/service/src/service.rs +++ b/service/src/service.rs @@ -7,8 +7,9 @@ use std::time::Duration; use super::{config::Config, error::SubgraphServiceError, routes}; use anyhow::anyhow; use axum::{async_trait, routing::post, Json, Router}; -use indexer_common::indexer_service::http::{ - AttestationOutput, IndexerServiceImpl, IndexerServiceResponse, +use indexer_common::{ + indexer_service::http::{AttestationOutput, IndexerServiceImpl, IndexerServiceResponse}, + tap::{create_value_check, ValueCheckSender}, }; use indexer_config::Config as MainConfig; use reqwest::Url; @@ -67,6 +68,7 @@ pub struct SubgraphServiceState { pub graph_node_client: reqwest::Client, pub graph_node_status_url: String, pub graph_node_query_base_url: String, + pub value_check_sender: ValueCheckSender, } struct SubgraphService { @@ -145,6 +147,9 @@ pub async fn run() -> anyhow::Result<()> { build_info::build_info!(fn build_info); let release = IndexerServiceRelease::from(build_info()); + // arbitrary value + let (value_check_sender, value_check_receiver) = create_value_check(10); + // Some of the subgraph service configuration goes into the so-called // "state", which will be passed to any request handler, middleware etc. // that is involved in serving requests @@ -171,6 +176,7 @@ pub async fn run() -> anyhow::Result<()> { .expect("config must have `common.graph_node.query_url` set") .query_base_url .clone(), + value_check_sender: value_check_sender.clone(), }); IndexerService::run(IndexerServiceOptions { @@ -183,6 +189,8 @@ pub async fn run() -> anyhow::Result<()> { .route("/cost", post(routes::cost::cost)) .route("/status", post(routes::status)) .with_state(state), + value_check_receiver, + value_check_sender, }) .await } diff --git a/tap-agent/src/agent/sender_allocation.rs b/tap-agent/src/agent/sender_allocation.rs index d588d02c..800c371e 100644 --- a/tap-agent/src/agent/sender_allocation.rs +++ b/tap-agent/src/agent/sender_allocation.rs @@ -22,7 +22,7 @@ use tap_core::{ receipt::{ checks::{Check, CheckList}, state::Failed, - ReceiptWithState, + Context, ReceiptWithState, }, signed_message::EIP712SignedMessage, }; @@ -490,6 +490,7 @@ impl SenderAllocationState { } = self .tap_manager .create_rav_request( + &Context::new(), self.config.tap.rav_request_timestamp_buffer_ms * 1_000_000, Some(self.config.tap.rav_request_receipt_limit), ) @@ -817,7 +818,7 @@ pub mod tests { use tap_core::receipt::{ checks::{Check, CheckError, CheckList, CheckResult}, state::Checking, - ReceiptWithState, + Context, ReceiptWithState, }; use wiremock::{ matchers::{body_string_contains, method}, @@ -1391,7 +1392,11 @@ pub mod tests { #[async_trait::async_trait] impl Check for FailingCheck { - async fn check(&self, _receipt: &ReceiptWithState) -> CheckResult { + async fn check( + &self, + _: &tap_core::receipt::Context, + _receipt: &ReceiptWithState, + ) -> CheckResult { Err(CheckError::Failed(anyhow::anyhow!("Failing check"))) } } @@ -1413,7 +1418,7 @@ pub mod tests { .into_iter() .map(|receipt| async { receipt - .finalize_receipt_checks(&checks) + .finalize_receipt_checks(&Context::new(), &checks) .await .unwrap() .unwrap_err() diff --git a/tap-agent/src/tap/context/checks/allocation_id.rs b/tap-agent/src/tap/context/checks/allocation_id.rs index bc041b35..5f3e918a 100644 --- a/tap-agent/src/tap/context/checks/allocation_id.rs +++ b/tap-agent/src/tap/context/checks/allocation_id.rs @@ -46,7 +46,11 @@ impl AllocationId { #[async_trait::async_trait] impl Check for AllocationId { - async fn check(&self, receipt: &ReceiptWithState) -> CheckResult { + async fn check( + &self, + _: &tap_core::receipt::Context, + receipt: &ReceiptWithState, + ) -> CheckResult { let allocation_id = receipt.signed_receipt().message.allocation_id; // TODO: Remove the if block below? Each TAP Monitor is specific to an allocation // ID. So the receipts that are received here should already have been filtered by diff --git a/tap-agent/src/tap/context/checks/signature.rs b/tap-agent/src/tap/context/checks/signature.rs index e4727ef6..4b1bbe81 100644 --- a/tap-agent/src/tap/context/checks/signature.rs +++ b/tap-agent/src/tap/context/checks/signature.rs @@ -29,7 +29,11 @@ impl Signature { #[async_trait::async_trait] impl Check for Signature { - async fn check(&self, receipt: &ReceiptWithState) -> CheckResult { + async fn check( + &self, + _: &tap_core::receipt::Context, + receipt: &ReceiptWithState, + ) -> CheckResult { let signer = receipt .signed_receipt() .recover_signer(&self.domain_separator) diff --git a/tap-agent/src/tap/context/checks/value.rs b/tap-agent/src/tap/context/checks/value.rs index 5265a370..414095d1 100644 --- a/tap-agent/src/tap/context/checks/value.rs +++ b/tap-agent/src/tap/context/checks/value.rs @@ -24,7 +24,11 @@ pub struct Value { #[async_trait::async_trait] impl Check for Value { - async fn check(&self, receipt: &ReceiptWithState) -> CheckResult { + async fn check( + &self, + _: &tap_core::receipt::Context, + receipt: &ReceiptWithState, + ) -> CheckResult { let value = receipt.signed_receipt().message.value; let query_id = receipt.signed_receipt().unique_hash();