diff --git a/Cargo.lock b/Cargo.lock index 874b729ed..646906639 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -30,9 +30,9 @@ dependencies = [ [[package]] name = "aes" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfe0133578c0986e1fe3dfcd4af1cc5b2dd6c3dbf534d69916ce16a2701d40ba" +checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" dependencies = [ "cfg-if", "cipher", @@ -55,9 +55,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.19" +version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" dependencies = [ "memchr", ] @@ -79,9 +79,9 @@ checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" [[package]] name = "array-init" -version = "2.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb6d71005dc22a708c7496eee5c8dc0300ee47355de6256c3b35b12b5fef596" +checksum = "3d62b7694a562cdf5a74227903507c56ab2cc8bdd1f781ed5cb4cf9c9f810bfc" [[package]] name = "assert-json-diff" @@ -150,9 +150,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.0" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "744864363a200a5e724a7e61bc8c11b6628cf2e3ec519c8a1a48e609a8156b40" +checksum = "678c5130a507ae3a7c797f9a17393c14849300b8440eac47cdb90a5bdcb3a543" dependencies = [ "async-trait", "axum-core", @@ -179,9 +179,9 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79b8558f5a0581152dc94dcd289132a1d377494bdeafcd41869b3258e3e2ad92" +checksum = "1cae3e661676ffbacb30f1a824089a8c9150e71017f7e1e38f2aa32009188d34" dependencies = [ "async-trait", "bytes", @@ -276,9 +276,9 @@ checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" [[package]] name = "bytemuck" -version = "1.12.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f5715e491b5a1598fc2bef5a606847b5dc1d48ea625bd3c02c00de8285591da" +checksum = "c041d3eab048880cb0b86b256447da3f18859a163c3b8d8893f4e6368abe6393" [[package]] name = "byteorder" @@ -294,9 +294,9 @@ checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" [[package]] name = "cc" -version = "1.0.73" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" dependencies = [ "jobserver", ] @@ -342,7 +342,7 @@ dependencies = [ "num-integer", "num-traits", "serde", - "time 0.1.44", + "time 0.1.45", "wasm-bindgen", "winapi", ] @@ -360,9 +360,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.0.27" +version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0acbd8d28a0a60d7108d7ae850af6ba34cf2d1257fc646980e5f97ce14275966" +checksum = "d8d93d855ce6a0aa87b8473ef9169482f40abaa2e9e0993024c35c902cbd5920" dependencies = [ "bitflags", "clap_derive", @@ -375,9 +375,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.0.21" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0177313f9f02afc995627906bbd8967e2be069f5261954222dac78290c2b9014" +checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8" dependencies = [ "heck", "proc-macro-error", @@ -388,9 +388,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8" +checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade" dependencies = [ "os_str_bytes", ] @@ -403,7 +403,17 @@ checksum = "606383658416244b8dc4b36f864ec1f86cb922b95c41a908fd07aeb01cad06fa" dependencies = [ "cipher", "dbl", - "digest 0.10.3", + "digest 0.10.6", +] + +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", ] [[package]] @@ -472,9 +482,9 @@ dependencies = [ [[package]] name = "const-oid" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722e23542a15cea1f65d4a1419c4cfd7a26706c70871a13a04238ca3f40f1661" +checksum = "cec318a675afcb6a1ea1d4340e2d377e56e47c266f28043ceccbf4412ddfdd3b" [[package]] name = "content_inspector" @@ -542,26 +552,24 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.10" +version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "045ebe27666471bb549370b4b0b3e51b07f56325befa4284db65fc89c02511b1" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", "memoffset", - "once_cell", "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.11" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ "cfg-if", - "once_cell", ] [[package]] @@ -577,7 +585,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ "generic-array", - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle", "zeroize", ] @@ -589,15 +597,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ "generic-array", - "rand_core 0.6.3", + "rand_core 0.6.4", "typenum", ] [[package]] name = "ctr" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d14f329cfbaf5d0e06b5e87fff7e265d2673c5ea7d2c27691a2c107db1442a0" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ "cipher", ] @@ -615,6 +623,50 @@ dependencies = [ "zeroize", ] +[[package]] +name = "cxx" +version = "1.0.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b61a7545f753a88bcbe0a70de1fcc0221e10bfc752f576754fa91e663db1622e" +dependencies = [ + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", +] + +[[package]] +name = "cxx-build" +version = "1.0.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f464457d494b5ed6905c63b0c4704842aba319084a0a3561cdc1359536b53200" +dependencies = [ + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2", + "quote", + "scratch", + "syn", +] + +[[package]] +name = "cxxbridge-flags" +version = "1.0.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43c7119ce3a3701ed81aca8410b9acf6fc399d2629d057b87e2efa4e63a3aaea" + +[[package]] +name = "cxxbridge-macro" +version = "1.0.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65e07508b90551e610910fa648a1878991d367064997a596135b86df30daf07e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "darling" version = "0.13.4" @@ -708,9 +760,9 @@ dependencies = [ [[package]] name = "der" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dd2ae565c0a381dde7fade45fce95984c568bdcb4700a4fdbe3175e0380b2f" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" dependencies = [ "const-oid", ] @@ -737,9 +789,9 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ "block-buffer", "crypto-common", @@ -769,9 +821,9 @@ dependencies = [ [[package]] name = "dunce" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453440c271cf5577fd2a40e4942540cb7d0d2f85e27c8d07dd0023c925a67541" +checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c" [[package]] name = "either" @@ -788,12 +840,12 @@ dependencies = [ "base16ct", "crypto-bigint", "der", - "digest 0.10.3", + "digest 0.10.6", "ff", "generic-array", "group", "hkdf", - "rand_core 0.6.3", + "rand_core 0.6.4", "sec1", "subtle", "zeroize", @@ -846,31 +898,31 @@ dependencies = [ [[package]] name = "ff" -version = "0.12.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df689201f395c6b90dfe87127685f8dbfc083a5e779e613575d8bd7314300c3e" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" dependencies = [ - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle", ] [[package]] name = "filetime" -version = "0.2.17" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94a7bbaa59354bc20dd75b67f23e2797b4490e9d6928203fb105c79e448c86c" +checksum = "4e884668cd0c7480504233e951174ddc3b382f7c2666e3b7310b5c4e7b0c37f9" dependencies = [ "cfg-if", "libc", "redox_syscall", - "windows-sys 0.36.1", + "windows-sys", ] [[package]] name = "fixed" -version = "1.19.0" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0371cd413fb63f8ec1b9eb4dff47fa2c88b21abc681771234c84808b9920991" +checksum = "f1965703169d4c3581f1d853e6a0bacf2ad9ba5d161f58ac331de95b37584a50" dependencies = [ "az", "bytemuck", @@ -878,6 +930,41 @@ dependencies = [ "typenum", ] +[[package]] +name = "fixed-macro" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0c48af8cb14e02868f449f8a2187bd78af7a08da201fdc78d518ecb1675bc" +dependencies = [ + "fixed", + "fixed-macro-impl", + "fixed-macro-types", +] + +[[package]] +name = "fixed-macro-impl" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c93086f471c0a1b9c5e300ea92f5cd990ac6d3f8edf27616ef624b8fa6402d4b" +dependencies = [ + "fixed", + "paste", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "fixed-macro-types" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "044a61b034a2264a7f65aa0c3cd112a01b4d4ee58baace51fead3f21b993c7e4" +dependencies = [ + "fixed", + "fixed-macro-impl", +] + [[package]] name = "fixedbitset" version = "0.4.2" @@ -886,9 +973,9 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.24" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" +checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" dependencies = [ "crc32fast", "miniz_oxide", @@ -1025,9 +1112,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if", "js-sys", @@ -1048,9 +1135,9 @@ dependencies = [ [[package]] name = "glob" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "group" @@ -1059,15 +1146,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" dependencies = [ "ff", - "rand_core 0.6.3", + "rand_core 0.6.4", "subtle", ] [[package]] name = "h2" -version = "0.3.14" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca32592cf21ac7ccab1825cd87f6c9b3d9022c44d086172ed0966bec8af30be" +checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" dependencies = [ "bytes", "fnv", @@ -1084,9 +1171,9 @@ dependencies = [ [[package]] name = "half" -version = "2.1.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad6a9459c9c30b177b925162351f97e7d967c7ea8bab3b8352805327daf45554" +checksum = "02b4af3693f1b705df946e9fe5631932443781d0aabb423b62fcd4d73f6d2fd0" dependencies = [ "crunchy", ] @@ -1099,9 +1186,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hdrhistogram" -version = "7.5.1" +version = "7.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea9fe3952d32674a14e0975009a3547af9ea364995b5ec1add2e23c2ae523ab" +checksum = "7f19b9f54f7c7f55e31401bb647626ce0cf0f67b0004982ce815b3ee72a02aa8" dependencies = [ "base64 0.13.1", "byteorder", @@ -1183,7 +1270,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", ] [[package]] @@ -1196,12 +1283,12 @@ dependencies = [ "aes-gcm", "byteorder", "chacha20poly1305", - "digest 0.10.3", + "digest 0.10.6", "generic-array", "hkdf", "hmac", "p256", - "rand_core 0.6.3", + "rand_core 0.6.4", "sha2", "subtle", "x25519-dalek", @@ -1334,9 +1421,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.23.0" +version = "0.23.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d87c48c02e0dc5e3b849a2041db3029fd066650f8f717c07bf8ed78ccb895cac" +checksum = "1788965e61b367cd03a62950836d5cd41560c3577d90e40e0819373194d1661c" dependencies = [ "http", "hyper", @@ -1361,18 +1448,28 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.47" +version = "0.1.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c495f162af0bf17656d0014a0eded5f3cd2f365fdd204548c2869db89359dc7" +checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" dependencies = [ "android_system_properties", "core-foundation-sys", + "iana-time-zone-haiku", "js-sys", - "once_cell", "wasm-bindgen", "winapi", ] +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +dependencies = [ + "cxx", + "cxx-build", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -1391,9 +1488,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.1" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", "hashbrown", @@ -1425,30 +1522,30 @@ checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" [[package]] name = "io-lifetimes" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46112a93252b123d31a119a8d1a1ac19deac4fac6e0e8b0df58f0d4e5870e63c" +checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e" dependencies = [ "libc", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] name = "ipnet" -version = "2.5.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" +checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" [[package]] name = "is-terminal" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae5bc6e2eb41c9def29a3e0f1306382807764b9b53112030eff57435667352d" +checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189" dependencies = [ "hermit-abi 0.2.6", "io-lifetimes", "rustix", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -1462,9 +1559,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754" +checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" [[package]] name = "janus_aggregator" @@ -1483,6 +1580,7 @@ dependencies = [ "deadpool", "deadpool-postgres", "derivative", + "fixed", "futures", "hex", "http", @@ -1573,6 +1671,8 @@ dependencies = [ "chrono", "clap", "derivative", + "fixed", + "fixed-macro", "http-api-problem", "janus_collector", "janus_core", @@ -1665,6 +1765,8 @@ dependencies = [ "backoff", "base64 0.21.0", "clap", + "fixed", + "fixed-macro", "futures", "hex", "janus_aggregator", @@ -1716,18 +1818,18 @@ dependencies = [ [[package]] name = "jobserver" -version = "0.1.24" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" +checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.59" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] @@ -1796,7 +1898,7 @@ dependencies = [ "pem", "pin-project", "rustls", - "rustls-pemfile 1.0.1", + "rustls-pemfile 1.0.2", "secrecy", "serde", "serde_json", @@ -1833,9 +1935,18 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.137" +version = "0.2.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" +checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" + +[[package]] +name = "link-cplusplus" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" +dependencies = [ + "cc", +] [[package]] name = "linked-hash-map" @@ -1854,15 +1965,15 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f9f08d8963a6c613f4b1a78f4f4a4dbfadf8e6545b2d72861731e4858b8b47f" +checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "lock_api" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f80bf5aacaf25cbfc8210d1cfb718f2bf3b11c4c54e5afe36c236853a8ec390" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" dependencies = [ "autocfg", "scopeguard", @@ -1888,17 +1999,17 @@ dependencies = [ [[package]] name = "matchit" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dfc802da7b1cf80aefffa0c7b2f77247c8b32206cc83c270b61264f5b360a80" +checksum = "b87248edafb776e59e6ee64a79086f65890d3510f2c656c000bf2a7e8a0aea40" [[package]] name = "md-5" -version = "0.10.4" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66b48670c893079d3c2ed79114e3644b7004df1c361a4e0ad52e2e6940d07c3d" +checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca" dependencies = [ - "digest 0.10.3", + "digest 0.10.6", ] [[package]] @@ -1909,9 +2020,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" -version = "0.6.5" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" dependencies = [ "autocfg", ] @@ -1940,23 +2051,23 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.5.4" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" dependencies = [ "adler", ] [[package]] name = "mio" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.36.1", + "windows-sys", ] [[package]] @@ -2003,9 +2114,9 @@ dependencies = [ [[package]] name = "nom" -version = "7.1.1" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", "minimal-lexical", @@ -2057,11 +2168,11 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.13.1" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ - "hermit-abi 0.1.19", + "hermit-abi 0.2.6", "libc", ] @@ -2088,9 +2199,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.14.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f7254b99e31cad77da24b08ebf628882739a608578bb1bcdfc1f9c21260d7c0" +checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" [[package]] name = "opaque-debug" @@ -2100,9 +2211,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.41" +version = "0.10.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "618febf65336490dfcf20b73f885f5651a0c89c64c2d4a8c3662585a70bf5bd0" +checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1" dependencies = [ "bitflags", "cfg-if", @@ -2132,9 +2243,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.75" +version = "0.9.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5f9bd0c2710541a3cda73d6f9ac4f1b240de4ae261065d309dbe73d9dceb42f" +checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7" dependencies = [ "autocfg", "cc", @@ -2280,19 +2391,19 @@ dependencies = [ [[package]] name = "os_pipe" -version = "1.0.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c92f2b54f081d635c77e7120862d48db8e91f7f21cef23ab1b4fe9971c59f55" +checksum = "c6a252f1f8c11e84b3ab59d7a488e48e4478a93937e027076638c49536204639" dependencies = [ "libc", - "winapi", + "windows-sys", ] [[package]] name = "os_str_bytes" -version = "6.3.0" +version = "6.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" +checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" [[package]] name = "overload" @@ -2321,22 +2432,28 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.3" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" +checksum = "ba1ef8814b5c993410bb3adfad7a5ed269563e4a2f90c41f5d85be7fb47133bf" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-sys 0.36.1", + "windows-sys", ] +[[package]] +name = "paste" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" + [[package]] name = "pem" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c64931a1a212348ec4f3b4362585eca7159d0d09cbdf4a7f74f02173596fd4" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" dependencies = [ "base64 0.13.1", ] @@ -2409,9 +2526,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" [[package]] name = "poly1305" @@ -2447,9 +2564,9 @@ dependencies = [ [[package]] name = "postgres-derive" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c2c18e40b92144b05e6f3ae9d1ee931f0d1afa9410ac8b97486c6eaaf91201" +checksum = "9e76c801e97c9cf696097369e517785b98056e98b21149384c812febfc5912f2" dependencies = [ "proc-macro2", "quote", @@ -2493,15 +2610,15 @@ dependencies = [ [[package]] name = "ppv-lite86" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prettyplease" -version = "0.1.19" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a49e86d2c26a24059894a3afa13fd17d063419b05dfb83f06d9c3566060c3f5a" +checksum = "e97e3215779627f01ee256d2fad52f3d95e8e1c11e9fc6fd08f7cd455d5d5c78" dependencies = [ "proc-macro2", "syn", @@ -2563,9 +2680,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.47" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" dependencies = [ "unicode-ident", ] @@ -2587,9 +2704,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.11.0" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "399c3c31cdec40583bb68f0b18403400d01ec4289c383aa047560439952c4dd7" +checksum = "21dc42e00223fc37204bd4aa177e69420c604ca4a183209a8f9de30c6d934698" dependencies = [ "bytes", "prost-derive", @@ -2597,9 +2714,9 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.11.1" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f835c582e6bd972ba8347313300219fed5bfa52caf175298d860b61ff6069bb" +checksum = "a3f8ad728fb08fe212df3c05169e940fbb6d9d16a877ddde14644a983ba2012e" dependencies = [ "bytes", "heck", @@ -2608,18 +2725,20 @@ dependencies = [ "log", "multimap", "petgraph", + "prettyplease", "prost", "prost-types", "regex", + "syn", "tempfile", "which", ] [[package]] name = "prost-derive" -version = "0.11.0" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7345d5f0e08c0536d7ac7229952590239e77abf0a0100a1b1d890add6ea96364" +checksum = "8bda8c0881ea9f722eb9629376db3d0b903b462477c1aafcb0566610ac28ac5d" dependencies = [ "anyhow", "itertools", @@ -2630,9 +2749,9 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.11.1" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dfaa718ad76a44b3415e6c4d53b17c8f99160dcb3a99b10470fce8ad43f6e3e" +checksum = "a5e0526209433e96d83d750dd81a99118edbc55739e7e61a46764fd2ad537788" dependencies = [ "bytes", "prost", @@ -2640,9 +2759,9 @@ dependencies = [ [[package]] name = "protobuf" -version = "2.27.1" +version = "2.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf7e6d18738ecd0902d30d1ad232c9125985a3422929b16c65517b38adc14f96" +checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" [[package]] name = "quick-error" @@ -2652,9 +2771,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.21" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" dependencies = [ "proc-macro2", ] @@ -2667,7 +2786,7 @@ checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -2677,7 +2796,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.3", + "rand_core 0.6.4", ] [[package]] @@ -2688,30 +2807,28 @@ checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" [[package]] name = "rand_core" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ "getrandom", ] [[package]] name = "rayon" -version = "1.5.3" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" dependencies = [ - "autocfg", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.9.3" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f" +checksum = "356a0625f1954f730c0201cdab48611198dc6ce21f4acff55089b5a78e6e835b" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -2761,9 +2878,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.27" +version = "0.6.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" [[package]] name = "remove_dir_all" @@ -2798,7 +2915,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "rustls", - "rustls-pemfile 1.0.1", + "rustls-pemfile 1.0.2", "serde", "serde_json", "serde_urlencoded", @@ -2847,23 +2964,23 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.3" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b1fbb4dfc4eb1d390c02df47760bb19a84bb80b301ecc947ab5406394d8223e" +checksum = "d4fdebc4b395b7fbb9ab11e462e20ed9051e7b16e42d24042c776eca0ac81b03" dependencies = [ "bitflags", "errno", "io-lifetimes", "libc", "linux-raw-sys", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] name = "rustls" -version = "0.20.6" +version = "0.20.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aab8ee6c7097ed6057f43c187a62418d0c05a4bd5f18b3571db50ee0f9ce033" +checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" dependencies = [ "log", "ring", @@ -2878,7 +2995,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" dependencies = [ "openssl-probe", - "rustls-pemfile 1.0.1", + "rustls-pemfile 1.0.2", "schannel", "security-framework", ] @@ -2894,24 +3011,24 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0864aeff53f8c05aa08d86e5ef839d3dfcf07aeba2db32f12db0ef716e87bd55" +checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" dependencies = [ - "base64 0.13.1", + "base64 0.21.0", ] [[package]] name = "rustversion" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97477e48b4cf8603ad5f7aaf897467cf42ab4218a38ef76fb14c2d6773a6d6a8" +checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" [[package]] name = "ryu" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" +checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" [[package]] name = "safemem" @@ -2930,19 +3047,18 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" +checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" dependencies = [ - "lazy_static", - "windows-sys 0.36.1", + "windows-sys", ] [[package]] name = "scoped-tls" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" [[package]] name = "scopeguard" @@ -2950,6 +3066,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "scratch" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" + [[package]] name = "sct" version = "0.7.0" @@ -2985,9 +3107,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" +checksum = "645926f31b250a2dca3c232496c2d898d91036e45ca0e97e0e2390c54e11be36" dependencies = [ "bitflags", "core-foundation", @@ -2998,9 +3120,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.6.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" dependencies = [ "core-foundation-sys", "libc", @@ -3118,35 +3240,35 @@ dependencies = [ [[package]] name = "sha-1" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" +checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "sha1" -version = "0.10.4" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006769ba83e921b3085caa8334186b00cf92b4cb1a6cf4632fbccc8eff5c7549" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.3", + "digest 0.10.6", ] [[package]] name = "sha2" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9db03534dff993187064c4e0c05a5708d2a9728ace9a8959b77bedf415dac5" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.3", + "digest 0.10.6", ] [[package]] @@ -3197,9 +3319,9 @@ dependencies = [ [[package]] name = "similar" -version = "2.2.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ac7f900db32bf3fd12e0117dd3dc4da74bc52ebaac97f39668446d89694803" +checksum = "420acb44afdae038210c99e69aae24109f32f15500aa708e81d46c9f29d55fcf" [[package]] name = "siphasher" @@ -3218,9 +3340,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "snapbox" @@ -3240,15 +3362,15 @@ dependencies = [ "tempfile", "wait-timeout", "walkdir", - "windows-sys 0.42.0", + "windows-sys", "yansi", ] [[package]] name = "snapbox-macros" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a253e6f894cfa440cba00600a249fa90869d8e0ec45ab274a456e043a0ce8f2" +checksum = "485e65c1203eb37244465e857d15a26d3a85a5410648ccb53b18bd44cb3a7336" [[package]] name = "socket2" @@ -3296,9 +3418,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.104" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae548ec36cf198c0ef7710d3c230987c2d6d7bd98ad6edc0274462724c585ce" +checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" dependencies = [ "proc-macro2", "quote", @@ -3339,9 +3461,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" dependencies = [ "winapi-util", ] @@ -3416,9 +3538,9 @@ dependencies = [ [[package]] name = "time" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" dependencies = [ "libc", "wasi 0.10.0+wasi-snapshot-preview1", @@ -3485,7 +3607,7 @@ dependencies = [ "socket2", "tokio-macros", "tracing", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -3500,9 +3622,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "1.8.0" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9724f9a975fb987ef7a3cd9be0350edcbe130698af5b8f7a631e23d42d052484" +checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" dependencies = [ "proc-macro2", "quote", @@ -3558,9 +3680,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.9" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df54d54117d6fdc4e4fea40fe1e4e566b3505700e148a6827e59b34b0d2600d9" +checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce" dependencies = [ "futures-core", "pin-project-lite", @@ -3581,9 +3703,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc463cd8deddc3770d20f9852143d50bf6094e640b485cb2e189a2099085ff45" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" dependencies = [ "bytes", "futures-core", @@ -3595,18 +3717,18 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ "serde", ] [[package]] name = "toml_datetime" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808b51e57d0ef8f71115d8f3a01e7d3750d01c79cac4b3eda910f4389fdf92fd" +checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" dependencies = [ "serde", ] @@ -3646,7 +3768,7 @@ dependencies = [ "pin-project", "prost", "prost-derive", - "rustls-pemfile 1.0.1", + "rustls-pemfile 1.0.2", "tokio", "tokio-rustls", "tokio-stream", @@ -3661,9 +3783,9 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.8.0" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fbcd2800e34e743b9ae795867d5f77b535d3a3be69fd731e39145719752df8c" +checksum = "5bf5e9b9c0f7e0a7c027dcfaba7b2c60816c7049171f679d99ee2ff65d0de8c4" dependencies = [ "prettyplease", "proc-macro2", @@ -3694,9 +3816,9 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c530c8675c1dbf98facee631536fa116b5fb6382d7dd6dc1b118d970eafe3ba" +checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" dependencies = [ "base64 0.13.1", "bitflags", @@ -3842,9 +3964,9 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "trycmd" @@ -3892,9 +4014,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "unicase" @@ -3907,30 +4029,36 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" [[package]] name = "unicode-ident" -version = "1.0.3" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf" +checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" [[package]] name = "unicode-normalization" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854cbdc4f7bc6ae19c820d44abdc3277ac3e1b2b93db20a636825d9322fb60e6" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-width" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" + [[package]] name = "unicode-xid" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "universal-hash" @@ -3944,9 +4072,9 @@ dependencies = [ [[package]] name = "unsafe-libyaml" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e5fa573d8ac5f1a856f8d7be41d390ee973daf97c806b2c1a465e4e1406e68" +checksum = "bc7ed8ba44ca06be78ea1ad2c3682a43349126c8818054231ee6f4748012aed2" [[package]] name = "untrusted" @@ -4100,9 +4228,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.32" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa76fb221a1f8acddf5b54ace85912606980ad661ac7a503b4570ffd3a624dad" +checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" dependencies = [ "cfg-if", "js-sys", @@ -4141,9 +4269,9 @@ checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "web-sys" -version = "0.3.59" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" dependencies = [ "js-sys", "wasm-bindgen", @@ -4161,18 +4289,18 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.22.4" +version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1c760f0d366a6c24a02ed7816e23e691f5d92291f94d15e836006fd11b04daf" +checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ "webpki", ] [[package]] name = "which" -version = "4.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" +checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" dependencies = [ "either", "libc", @@ -4210,19 +4338,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-sys" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" -dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", -] - [[package]] name = "windows-sys" version = "0.42.0" @@ -4230,85 +4345,55 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.0", - "windows_i686_gnu 0.42.0", - "windows_i686_msvc 0.42.0", - "windows_x86_64_gnu 0.42.0", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.0", + "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" [[package]] name = "windows_aarch64_msvc" -version = "0.36.1" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" - -[[package]] -name = "windows_i686_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" [[package]] name = "windows_i686_gnu" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" - -[[package]] -name = "windows_i686_msvc" -version = "0.36.1" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" [[package]] name = "windows_i686_msvc" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" [[package]] name = "windows_x86_64_gnu" -version = "0.36.1" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" [[package]] name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" [[package]] name = "winreg" @@ -4326,7 +4411,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5da623d8af10a62342bcbbb230e33e58a63255a58012f8653c578e54bab48df" dependencies = [ "curve25519-dalek", - "rand_core 0.6.3", + "rand_core 0.6.4", "zeroize", ] @@ -4356,9 +4441,9 @@ dependencies = [ [[package]] name = "zeroize_derive" -version = "1.3.2" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17" +checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" dependencies = [ "proc-macro2", "quote", @@ -4387,10 +4472,11 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.1+zstd.1.5.2" +version = "2.0.5+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b" +checksum = "edc50ffce891ad571e9f9afe5039c4837bede781ac4bb13052ed7ae695518596" dependencies = [ "cc", "libc", + "pkg-config", ] diff --git a/Dockerfile.interop b/Dockerfile.interop index d88382eec..eb81c78f8 100644 --- a/Dockerfile.interop +++ b/Dockerfile.interop @@ -17,7 +17,7 @@ COPY db /src/db COPY integration_tests /src/integration_tests COPY interop_binaries /src/interop_binaries COPY messages /src/messages -RUN --mount=type=cache,target=/usr/local/cargo/registry --mount=type=cache,target=/src/target cargo build --profile $PROFILE -p janus_interop_binaries --bin $BINARY && cp /src/target/$PROFILE/$BINARY /$BINARY +RUN --mount=type=cache,target=/usr/local/cargo/registry --mount=type=cache,target=/src/target cargo build --features fpvec_bounded_l2 --profile $PROFILE -p janus_interop_binaries --bin $BINARY && cp /src/target/$PROFILE/$BINARY /$BINARY FROM alpine:3.17.1 ARG BINARY diff --git a/Dockerfile.interop_aggregator b/Dockerfile.interop_aggregator index cf2c640e0..4bf6e2493 100644 --- a/Dockerfile.interop_aggregator +++ b/Dockerfile.interop_aggregator @@ -17,12 +17,12 @@ COPY interop_binaries /src/interop_binaries COPY messages /src/messages RUN --mount=type=cache,target=/usr/local/cargo/registry \ --mount=type=cache,target=/src/target \ - cargo build --profile $PROFILE -p janus_interop_binaries \ + cargo build --features fpvec_bounded_l2 --profile $PROFILE -p janus_interop_binaries \ --bin janus_interop_aggregator && \ cp /src/target/$PROFILE/janus_interop_aggregator /janus_interop_aggregator RUN --mount=type=cache,target=/usr/local/cargo/registry \ --mount=type=cache,target=/src/target \ - cargo build --profile $PROFILE -p janus_aggregator \ + cargo build --features fpvec_bounded_l2 --profile $PROFILE -p janus_aggregator \ --bin aggregation_job_creator \ --bin aggregation_job_driver \ --bin collect_job_driver \ diff --git a/aggregator/Cargo.toml b/aggregator/Cargo.toml index 9918591b0..56032f923 100644 --- a/aggregator/Cargo.toml +++ b/aggregator/Cargo.toml @@ -14,6 +14,7 @@ rustdoc-args = ["--cfg", "docsrs"] [features] default = ["kube-rustls"] +fpvec_bounded_l2 = ["dep:fixed", "janus_core/fpvec_bounded_l2"] tokio-console = ["dep:console-subscriber"] jaeger = ["dep:tracing-opentelemetry", "dep:opentelemetry-jaeger"] otlp = [ @@ -46,6 +47,7 @@ deadpool = { version = "0.9.5", features = ["rt_tokio_1"] } deadpool-postgres = "0.10.4" derivative = "2.2.0" futures = "0.3.25" +fixed = { version = "1.19", optional = true } http = "0.2.8" http-api-problem = "0.56.0" hyper = "0.14.23" @@ -95,7 +97,7 @@ hyper = "0.14.23" # lack of support for connecting to servers by IP addresses, which affects many # Kubernetes clusters. Enable the `test-util` feature for various utilities # used in unit tests. -janus_aggregator = { workspace = true, features = ["kube-openssl", "test-util"] } +janus_aggregator = { workspace = true, features = ["fpvec_bounded_l2", "kube-openssl", "test-util"] } mockito = "0.31.1" serde_test = "1.0.152" tempfile = "3.3.0" diff --git a/aggregator/src/aggregator.rs b/aggregator/src/aggregator.rs index 3c1745092..0b7288728 100644 --- a/aggregator/src/aggregator.rs +++ b/aggregator/src/aggregator.rs @@ -26,6 +26,10 @@ use crate::{ }; use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine}; use bytes::Bytes; +#[cfg(feature = "fpvec_bounded_l2")] +use fixed::types::extra::{U15, U31, U63}; +#[cfg(feature = "fpvec_bounded_l2")] +use fixed::{FixedI16, FixedI32, FixedI64}; use http::{ header::{CACHE_CONTROL, CONTENT_TYPE, LOCATION}, HeaderMap, StatusCode, @@ -50,6 +54,8 @@ use opentelemetry::{ metrics::{Counter, Histogram, Meter, Unit}, Context, KeyValue, }; +#[cfg(feature = "fpvec_bounded_l2")] +use prio::vdaf::prio3::Prio3Aes128FixedPointBoundedL2VecSum; use prio::{ codec::{Decode, Encode, ParameterizedDecode}, vdaf::{ @@ -638,6 +644,30 @@ impl TaskAggregator { VdafOps::Prio3Aes128Histogram(Arc::new(vdaf), verify_key) } + #[cfg(feature = "fpvec_bounded_l2")] + VdafInstance::Prio3Aes128FixedPoint16BitBoundedL2VecSum { length } => { + let vdaf: Prio3Aes128FixedPointBoundedL2VecSum> = + Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, *length)?; + let verify_key = task.primary_vdaf_verify_key()?; + VdafOps::Prio3Aes128FixedPoint16BitBoundedL2VecSum(Arc::new(vdaf), verify_key) + } + + #[cfg(feature = "fpvec_bounded_l2")] + VdafInstance::Prio3Aes128FixedPoint32BitBoundedL2VecSum { length } => { + let vdaf: Prio3Aes128FixedPointBoundedL2VecSum> = + Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, *length)?; + let verify_key = task.primary_vdaf_verify_key()?; + VdafOps::Prio3Aes128FixedPoint32BitBoundedL2VecSum(Arc::new(vdaf), verify_key) + } + + #[cfg(feature = "fpvec_bounded_l2")] + VdafInstance::Prio3Aes128FixedPoint64BitBoundedL2VecSum { length } => { + let vdaf: Prio3Aes128FixedPointBoundedL2VecSum> = + Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, *length)?; + let verify_key = task.primary_vdaf_verify_key()?; + VdafOps::Prio3Aes128FixedPoint64BitBoundedL2VecSum(Arc::new(vdaf), verify_key) + } + #[cfg(feature = "test-util")] VdafInstance::Fake => VdafOps::Fake(Arc::new(dummy_vdaf::Vdaf::new())), @@ -805,6 +835,21 @@ enum VdafOps { Arc, VerifyKey, ), + #[cfg(feature = "fpvec_bounded_l2")] + Prio3Aes128FixedPoint16BitBoundedL2VecSum( + Arc>>, + VerifyKey, + ), + #[cfg(feature = "fpvec_bounded_l2")] + Prio3Aes128FixedPoint32BitBoundedL2VecSum( + Arc>>, + VerifyKey, + ), + #[cfg(feature = "fpvec_bounded_l2")] + Prio3Aes128FixedPoint64BitBoundedL2VecSum( + Arc>>, + VerifyKey, + ), #[cfg(feature = "test-util")] Fake(Arc), @@ -875,6 +920,57 @@ impl VdafOps { report, ) .await, + #[cfg(feature = "fpvec_bounded_l2")] + VdafOps::Prio3Aes128FixedPoint16BitBoundedL2VecSum(vdaf, _) => { + Self::handle_upload_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >( + datastore, + vdaf, + clock, + upload_decrypt_failure_counter, + upload_decode_failure_counter, + task, + report, + ) + .await + } + #[cfg(feature = "fpvec_bounded_l2")] + VdafOps::Prio3Aes128FixedPoint32BitBoundedL2VecSum(vdaf, _) => { + Self::handle_upload_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >( + datastore, + vdaf, + clock, + upload_decrypt_failure_counter, + upload_decode_failure_counter, + task, + report, + ) + .await + } + #[cfg(feature = "fpvec_bounded_l2")] + VdafOps::Prio3Aes128FixedPoint64BitBoundedL2VecSum(vdaf, _) => { + Self::handle_upload_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >( + datastore, + vdaf, + clock, + upload_decrypt_failure_counter, + upload_decode_failure_counter, + task, + report, + ) + .await + } #[cfg(feature = "test-util")] VdafOps::Fake(vdaf) => { @@ -969,6 +1065,66 @@ impl VdafOps { ) .await } + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::TimeInterval, + VdafOps::Prio3Aes128FixedPoint16BitBoundedL2VecSum(vdaf, verify_key), + ) => { + Self::handle_aggregate_init_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + TimeInterval, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >( + datastore, + vdaf, + aggregate_step_failure_counter, + task, + verify_key, + req_bytes, + ) + .await + } + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::TimeInterval, + VdafOps::Prio3Aes128FixedPoint32BitBoundedL2VecSum(vdaf, verify_key), + ) => { + Self::handle_aggregate_init_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + TimeInterval, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >( + datastore, + vdaf, + aggregate_step_failure_counter, + task, + verify_key, + req_bytes, + ) + .await + } + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::TimeInterval, + VdafOps::Prio3Aes128FixedPoint64BitBoundedL2VecSum(vdaf, verify_key), + ) => { + Self::handle_aggregate_init_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + TimeInterval, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >( + datastore, + vdaf, + aggregate_step_failure_counter, + task, + verify_key, + req_bytes, + ) + .await + } #[cfg(feature = "test-util")] (task::QueryType::TimeInterval, VdafOps::Fake(vdaf)) => { @@ -1054,6 +1210,69 @@ impl VdafOps { .await } + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::FixedSize { .. }, + VdafOps::Prio3Aes128FixedPoint16BitBoundedL2VecSum(vdaf, verify_key), + ) => { + Self::handle_aggregate_init_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + FixedSize, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >( + datastore, + vdaf, + aggregate_step_failure_counter, + task, + verify_key, + req_bytes, + ) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::FixedSize { .. }, + VdafOps::Prio3Aes128FixedPoint32BitBoundedL2VecSum(vdaf, verify_key), + ) => { + Self::handle_aggregate_init_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + FixedSize, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >( + datastore, + vdaf, + aggregate_step_failure_counter, + task, + verify_key, + req_bytes, + ) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::FixedSize { .. }, + VdafOps::Prio3Aes128FixedPoint64BitBoundedL2VecSum(vdaf, verify_key), + ) => { + Self::handle_aggregate_init_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + FixedSize, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >( + datastore, + vdaf, + aggregate_step_failure_counter, + task, + verify_key, + req_bytes, + ) + .await + } + #[cfg(feature = "test-util")] (task::QueryType::FixedSize { .. }, VdafOps::Fake(vdaf)) => { Self::handle_aggregate_init_generic::<0, FixedSize, dummy_vdaf::Vdaf, _>( @@ -1141,6 +1360,66 @@ impl VdafOps { .await } + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::TimeInterval, + VdafOps::Prio3Aes128FixedPoint16BitBoundedL2VecSum(vdaf, _), + ) => { + Self::handle_aggregate_continue_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + TimeInterval, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >( + datastore, + Arc::clone(vdaf), + aggregate_step_failure_counter, + task, + req, + ) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::TimeInterval, + VdafOps::Prio3Aes128FixedPoint32BitBoundedL2VecSum(vdaf, _), + ) => { + Self::handle_aggregate_continue_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + TimeInterval, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >( + datastore, + Arc::clone(vdaf), + aggregate_step_failure_counter, + task, + req, + ) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::TimeInterval, + VdafOps::Prio3Aes128FixedPoint64BitBoundedL2VecSum(vdaf, _), + ) => { + Self::handle_aggregate_continue_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + TimeInterval, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >( + datastore, + Arc::clone(vdaf), + aggregate_step_failure_counter, + task, + req, + ) + .await + } + #[cfg(feature = "test-util")] (task::QueryType::TimeInterval, VdafOps::Fake(vdaf)) => { Self::handle_aggregate_continue_generic::<0, TimeInterval, dummy_vdaf::Vdaf, _>( @@ -1217,6 +1496,66 @@ impl VdafOps { .await } + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::FixedSize { .. }, + VdafOps::Prio3Aes128FixedPoint16BitBoundedL2VecSum(vdaf, _), + ) => { + Self::handle_aggregate_continue_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + FixedSize, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >( + datastore, + Arc::clone(vdaf), + aggregate_step_failure_counter, + task, + req, + ) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::FixedSize { .. }, + VdafOps::Prio3Aes128FixedPoint32BitBoundedL2VecSum(vdaf, _), + ) => { + Self::handle_aggregate_continue_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + FixedSize, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >( + datastore, + Arc::clone(vdaf), + aggregate_step_failure_counter, + task, + req, + ) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::FixedSize { .. }, + VdafOps::Prio3Aes128FixedPoint64BitBoundedL2VecSum(vdaf, _), + ) => { + Self::handle_aggregate_continue_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + FixedSize, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >( + datastore, + Arc::clone(vdaf), + aggregate_step_failure_counter, + task, + req, + ) + .await + } + #[cfg(feature = "test-util")] (task::QueryType::FixedSize { .. }, VdafOps::Fake(vdaf)) => { Self::handle_aggregate_continue_generic::<0, FixedSize, dummy_vdaf::Vdaf, _>( @@ -1943,6 +2282,48 @@ impl VdafOps { .await } + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::TimeInterval, + VdafOps::Prio3Aes128FixedPoint16BitBoundedL2VecSum(_, _), + ) => { + Self::handle_collect_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + TimeInterval, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, collect_req_bytes) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::TimeInterval, + VdafOps::Prio3Aes128FixedPoint32BitBoundedL2VecSum(_, _), + ) => { + Self::handle_collect_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + TimeInterval, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, collect_req_bytes) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::TimeInterval, + VdafOps::Prio3Aes128FixedPoint64BitBoundedL2VecSum(_, _), + ) => { + Self::handle_collect_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + TimeInterval, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, collect_req_bytes) + .await + } + #[cfg(feature = "test-util")] (task::QueryType::TimeInterval, VdafOps::Fake(_)) => { Self::handle_collect_generic::<0, TimeInterval, dummy_vdaf::Vdaf, _>( @@ -1993,6 +2374,48 @@ impl VdafOps { .await } + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::FixedSize { .. }, + VdafOps::Prio3Aes128FixedPoint16BitBoundedL2VecSum(_, _), + ) => { + Self::handle_collect_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + FixedSize, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, collect_req_bytes) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::FixedSize { .. }, + VdafOps::Prio3Aes128FixedPoint32BitBoundedL2VecSum(_, _), + ) => { + Self::handle_collect_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + FixedSize, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, collect_req_bytes) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::FixedSize { .. }, + VdafOps::Prio3Aes128FixedPoint64BitBoundedL2VecSum(_, _), + ) => { + Self::handle_collect_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + FixedSize, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, collect_req_bytes) + .await + } + #[cfg(feature = "test-util")] (task::QueryType::FixedSize { .. }, VdafOps::Fake(_)) => { Self::handle_collect_generic::<0, FixedSize, dummy_vdaf::Vdaf, _>( @@ -2150,6 +2573,48 @@ impl VdafOps { .await } + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::TimeInterval, + VdafOps::Prio3Aes128FixedPoint16BitBoundedL2VecSum(_, _), + ) => { + Self::handle_get_collect_job_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + TimeInterval, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, collect_job_id) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::TimeInterval, + VdafOps::Prio3Aes128FixedPoint32BitBoundedL2VecSum(_, _), + ) => { + Self::handle_get_collect_job_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + TimeInterval, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, collect_job_id) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::TimeInterval, + VdafOps::Prio3Aes128FixedPoint64BitBoundedL2VecSum(_, _), + ) => { + Self::handle_get_collect_job_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + TimeInterval, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, collect_job_id) + .await + } + #[cfg(feature = "test-util")] (task::QueryType::TimeInterval, VdafOps::Fake(_)) => { Self::handle_get_collect_job_generic::<0, TimeInterval, dummy_vdaf::Vdaf, _>( @@ -2200,6 +2665,48 @@ impl VdafOps { .await } + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::FixedSize { .. }, + VdafOps::Prio3Aes128FixedPoint16BitBoundedL2VecSum(_, _), + ) => { + Self::handle_get_collect_job_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + FixedSize, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, collect_job_id) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::FixedSize { .. }, + VdafOps::Prio3Aes128FixedPoint32BitBoundedL2VecSum(_, _), + ) => { + Self::handle_get_collect_job_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + FixedSize, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, collect_job_id) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::FixedSize { .. }, + VdafOps::Prio3Aes128FixedPoint64BitBoundedL2VecSum(_, _), + ) => { + Self::handle_get_collect_job_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + FixedSize, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, collect_job_id) + .await + } + #[cfg(feature = "test-util")] (task::QueryType::FixedSize { .. }, VdafOps::Fake(_)) => { Self::handle_get_collect_job_generic::<0, FixedSize, dummy_vdaf::Vdaf, _>( @@ -2365,6 +2872,48 @@ impl VdafOps { .await } + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::TimeInterval, + VdafOps::Prio3Aes128FixedPoint16BitBoundedL2VecSum(_, _), + ) => { + Self::handle_delete_collect_job_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + TimeInterval, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, collect_job_id) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::TimeInterval, + VdafOps::Prio3Aes128FixedPoint32BitBoundedL2VecSum(_, _), + ) => { + Self::handle_delete_collect_job_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + TimeInterval, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, collect_job_id) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::TimeInterval, + VdafOps::Prio3Aes128FixedPoint64BitBoundedL2VecSum(_, _), + ) => { + Self::handle_delete_collect_job_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + TimeInterval, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, collect_job_id) + .await + } + #[cfg(feature = "test-util")] (task::QueryType::TimeInterval, VdafOps::Fake(_)) => { Self::handle_delete_collect_job_generic::<0, TimeInterval, dummy_vdaf::Vdaf, _>( @@ -2415,6 +2964,48 @@ impl VdafOps { .await } + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::FixedSize { .. }, + VdafOps::Prio3Aes128FixedPoint16BitBoundedL2VecSum(_, _), + ) => { + Self::handle_delete_collect_job_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + FixedSize, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, collect_job_id) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::FixedSize { .. }, + VdafOps::Prio3Aes128FixedPoint32BitBoundedL2VecSum(_, _), + ) => { + Self::handle_delete_collect_job_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + FixedSize, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, collect_job_id) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::FixedSize { .. }, + VdafOps::Prio3Aes128FixedPoint64BitBoundedL2VecSum(_, _), + ) => { + Self::handle_delete_collect_job_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + FixedSize, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, collect_job_id) + .await + } + #[cfg(feature = "test-util")] (task::QueryType::FixedSize { .. }, VdafOps::Fake(_)) => { Self::handle_delete_collect_job_generic::<0, FixedSize, dummy_vdaf::Vdaf, _>( @@ -2518,6 +3109,48 @@ impl VdafOps { .await } + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::TimeInterval, + VdafOps::Prio3Aes128FixedPoint16BitBoundedL2VecSum(_, _), + ) => { + Self::handle_aggregate_share_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + TimeInterval, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, req_bytes) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::TimeInterval, + VdafOps::Prio3Aes128FixedPoint32BitBoundedL2VecSum(_, _), + ) => { + Self::handle_aggregate_share_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + TimeInterval, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, req_bytes) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::TimeInterval, + VdafOps::Prio3Aes128FixedPoint64BitBoundedL2VecSum(_, _), + ) => { + Self::handle_aggregate_share_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + TimeInterval, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, req_bytes) + .await + } + #[cfg(feature = "test-util")] (task::QueryType::TimeInterval, VdafOps::Fake(_)) => { Self::handle_aggregate_share_generic::<0, TimeInterval, dummy_vdaf::Vdaf, _>( @@ -2566,6 +3199,48 @@ impl VdafOps { .await } + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::FixedSize { .. }, + VdafOps::Prio3Aes128FixedPoint16BitBoundedL2VecSum(_, _), + ) => { + Self::handle_aggregate_share_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + FixedSize, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, req_bytes) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::FixedSize { .. }, + VdafOps::Prio3Aes128FixedPoint32BitBoundedL2VecSum(_, _), + ) => { + Self::handle_aggregate_share_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + FixedSize, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, req_bytes) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::FixedSize { .. }, + VdafOps::Prio3Aes128FixedPoint64BitBoundedL2VecSum(_, _), + ) => { + Self::handle_aggregate_share_generic::< + PRIO3_AES128_VERIFY_KEY_LENGTH, + FixedSize, + Prio3Aes128FixedPointBoundedL2VecSum>, + _, + >(datastore, task, req_bytes) + .await + } + #[cfg(feature = "test-util")] (task::QueryType::FixedSize { .. }, VdafOps::Fake(_)) => { Self::handle_aggregate_share_generic::<0, FixedSize, dummy_vdaf::Vdaf, _>( diff --git a/aggregator/src/aggregator/aggregation_job_creator.rs b/aggregator/src/aggregator/aggregation_job_creator.rs index a82ed18c5..b205253cd 100644 --- a/aggregator/src/aggregator/aggregation_job_creator.rs +++ b/aggregator/src/aggregator/aggregation_job_creator.rs @@ -7,6 +7,10 @@ use crate::{ try_join, }; use anyhow::Result; +#[cfg(feature = "fpvec_bounded_l2")] +use fixed::types::extra::{U15, U31, U63}; +#[cfg(feature = "fpvec_bounded_l2")] +use fixed::{FixedI16, FixedI32, FixedI64}; use futures::{future::join_all, FutureExt}; use itertools::Itertools; use janus_core::{ @@ -21,12 +25,16 @@ use opentelemetry::{ metrics::{Histogram, Unit}, Context, KeyValue, }; +#[cfg(feature = "fpvec_bounded_l2")] +use prio::vdaf::prio3::Prio3Aes128FixedPointBoundedL2VecSum; use prio::{ codec::Encode, - vdaf::prio3::Prio3Aes128CountVecMultithreaded, vdaf::{ self, - prio3::{Prio3Aes128Count, Prio3Aes128Histogram, Prio3Aes128Sum}, + prio3::{ + Prio3Aes128Count, Prio3Aes128CountVecMultithreaded, Prio3Aes128Histogram, + Prio3Aes128Sum, + }, }, }; use rand::{random, thread_rng, Rng}; @@ -252,6 +260,24 @@ impl AggregationJobCreator { .await } + #[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::TimeInterval, VdafInstance::Prio3Aes128FixedPoint16BitBoundedL2VecSum { .. }) => { + self.create_aggregation_jobs_for_time_interval_task_no_param::>>(task) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::TimeInterval, VdafInstance::Prio3Aes128FixedPoint32BitBoundedL2VecSum { .. }) => { + self.create_aggregation_jobs_for_time_interval_task_no_param::>>(task) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::TimeInterval, VdafInstance::Prio3Aes128FixedPoint64BitBoundedL2VecSum { .. }) => { + self.create_aggregation_jobs_for_time_interval_task_no_param::>>(task) + .await + } + (task::QueryType::FixedSize{max_batch_size}, VdafInstance::Prio3Aes128Count) => { let max_batch_size = *max_batch_size; self.create_aggregation_jobs_for_fixed_size_task_no_param::(task, max_batch_size) @@ -278,6 +304,26 @@ impl AggregationJobCreator { .await } + #[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::FixedSize{max_batch_size}, VdafInstance::Prio3Aes128FixedPoint16BitBoundedL2VecSum { .. }) => { + let max_batch_size = *max_batch_size; + self.create_aggregation_jobs_for_fixed_size_task_no_param::>>(task, max_batch_size) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::FixedSize{max_batch_size}, VdafInstance::Prio3Aes128FixedPoint32BitBoundedL2VecSum { .. }) => { + let max_batch_size = *max_batch_size; + self.create_aggregation_jobs_for_fixed_size_task_no_param::>>(task, max_batch_size) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::FixedSize{max_batch_size}, VdafInstance::Prio3Aes128FixedPoint64BitBoundedL2VecSum { .. }) => { + let max_batch_size = *max_batch_size; + self.create_aggregation_jobs_for_fixed_size_task_no_param::>>(task, max_batch_size) + .await + } _ => { error!(vdaf = ?task.vdaf(), "VDAF is not yet supported"); diff --git a/aggregator/src/aggregator/aggregation_job_driver.rs b/aggregator/src/aggregator/aggregation_job_driver.rs index baac06b31..b26376805 100644 --- a/aggregator/src/aggregator/aggregation_job_driver.rs +++ b/aggregator/src/aggregator/aggregation_job_driver.rs @@ -14,6 +14,10 @@ use crate::{ }; use anyhow::{anyhow, Context as _, Result}; use derivative::Derivative; +#[cfg(feature = "fpvec_bounded_l2")] +use fixed::types::extra::{U15, U31, U63}; +#[cfg(feature = "fpvec_bounded_l2")] +use fixed::{FixedI16, FixedI32, FixedI64}; use futures::future::{join_all, BoxFuture, FutureExt}; use janus_core::{task::VdafInstance, time::Clock}; use janus_messages::{ @@ -26,6 +30,8 @@ use opentelemetry::{ metrics::{Counter, Histogram, Meter, Unit}, Context, KeyValue, }; +#[cfg(feature = "fpvec_bounded_l2")] +use prio::vdaf::prio3::Prio3Aes128FixedPointBoundedL2VecSum; use prio::{ codec::{Decode, Encode, ParameterizedDecode}, vdaf::{ @@ -108,6 +114,36 @@ impl AggregationJobDriver { .await } + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::TimeInterval, + VdafInstance::Prio3Aes128FixedPoint16BitBoundedL2VecSum { length }, + ) => { + let vdaf = Arc::new(Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, *length)?); + self.step_aggregation_job_generic::>>(datastore, vdaf, lease) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::TimeInterval, + VdafInstance::Prio3Aes128FixedPoint32BitBoundedL2VecSum { length }, + ) => { + let vdaf = Arc::new(Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, *length)?); + self.step_aggregation_job_generic::>>(datastore, vdaf, lease) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::TimeInterval, + VdafInstance::Prio3Aes128FixedPoint64BitBoundedL2VecSum { length }, + ) => { + let vdaf = Arc::new(Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, *length)?); + self.step_aggregation_job_generic::>>(datastore, vdaf, lease) + .await + } + (task::QueryType::FixedSize { .. }, VdafInstance::Prio3Aes128Count) => { let vdaf = Arc::new(Prio3::new_aes128_count(2)?); self.step_aggregation_job_generic::(datastore, vdaf, lease) @@ -132,6 +168,36 @@ impl AggregationJobDriver { .await } + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::FixedSize { .. }, + VdafInstance::Prio3Aes128FixedPoint16BitBoundedL2VecSum { length }, + ) => { + let vdaf = Arc::new(Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, *length)?); + self.step_aggregation_job_generic::>>(datastore, vdaf, lease) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::FixedSize { .. }, + VdafInstance::Prio3Aes128FixedPoint32BitBoundedL2VecSum { length }, + ) => { + let vdaf = Arc::new(Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, *length)?); + self.step_aggregation_job_generic::>>(datastore, vdaf, lease) + .await + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + task::QueryType::FixedSize { .. }, + VdafInstance::Prio3Aes128FixedPoint64BitBoundedL2VecSum { length }, + ) => { + let vdaf = Arc::new(Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, *length)?); + self.step_aggregation_job_generic::>>(datastore, vdaf, lease) + .await + } + _ => panic!( "Query type/VDAF {:?}/{:?} is not yet supported", lease.leased().query_type(), @@ -740,6 +806,24 @@ impl AggregationJobDriver { .await } +#[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::TimeInterval, VdafInstance::Prio3Aes128FixedPoint16BitBoundedL2VecSum { .. }) => { + self.cancel_aggregation_job_generic::>>(datastore, lease) + .await + } + +#[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::TimeInterval, VdafInstance::Prio3Aes128FixedPoint32BitBoundedL2VecSum { .. }) => { + self.cancel_aggregation_job_generic::>>(datastore, lease) + .await + } + +#[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::TimeInterval, VdafInstance::Prio3Aes128FixedPoint64BitBoundedL2VecSum { .. }) => { + self.cancel_aggregation_job_generic::>>(datastore, lease) + .await + } + (task::QueryType::FixedSize{..}, VdafInstance::Prio3Aes128Count) => { self.cancel_aggregation_job_generic::(datastore, lease) .await @@ -760,6 +844,24 @@ impl AggregationJobDriver { .await } +#[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::FixedSize { .. }, VdafInstance::Prio3Aes128FixedPoint16BitBoundedL2VecSum { .. }) => { + self.cancel_aggregation_job_generic::>>(datastore, lease) + .await + } + +#[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::FixedSize { .. }, VdafInstance::Prio3Aes128FixedPoint32BitBoundedL2VecSum { .. }) => { + self.cancel_aggregation_job_generic::>>(datastore, lease) + .await + } + +#[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::FixedSize { .. }, VdafInstance::Prio3Aes128FixedPoint64BitBoundedL2VecSum { .. }) => { + self.cancel_aggregation_job_generic::>>(datastore, lease) + .await + } + _ => panic!("Query type/VDAF {:?}/{:?} is not yet supported", lease.leased().query_type(), lease.leased().vdaf()), } } diff --git a/aggregator/src/aggregator/collect_job_driver.rs b/aggregator/src/aggregator/collect_job_driver.rs index 38a55bccc..57479a685 100644 --- a/aggregator/src/aggregator/collect_job_driver.rs +++ b/aggregator/src/aggregator/collect_job_driver.rs @@ -13,6 +13,10 @@ use crate::{ try_join, }; use derivative::Derivative; +#[cfg(feature = "fpvec_bounded_l2")] +use fixed::types::extra::{U15, U31, U63}; +#[cfg(feature = "fpvec_bounded_l2")] +use fixed::{FixedI16, FixedI32, FixedI64}; use futures::future::BoxFuture; #[cfg(feature = "test-util")] use janus_core::test_util::dummy_vdaf; @@ -25,6 +29,8 @@ use opentelemetry::{ metrics::{Counter, Histogram, Meter, Unit}, Context, KeyValue, Value, }; +#[cfg(feature = "fpvec_bounded_l2")] +use prio::vdaf::prio3::Prio3Aes128FixedPointBoundedL2VecSum; use prio::{ codec::{Decode, Encode}, vdaf::{ @@ -106,6 +112,33 @@ impl CollectJobDriver { .await } +#[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::TimeInterval, VdafInstance::Prio3Aes128FixedPoint16BitBoundedL2VecSum { .. }) => { + self.step_collect_job_generic::>>( + datastore, + lease, + ) + .await + } + +#[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::TimeInterval, VdafInstance::Prio3Aes128FixedPoint32BitBoundedL2VecSum { .. }) => { + self.step_collect_job_generic::>>( + datastore, + lease, + ) + .await + } + +#[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::TimeInterval, VdafInstance::Prio3Aes128FixedPoint64BitBoundedL2VecSum { .. }) => { + self.step_collect_job_generic::>>( + datastore, + lease, + ) + .await + } + #[cfg(feature = "test-util")] (task::QueryType::TimeInterval, VdafInstance::Fake) => { self.step_collect_job_generic::<0, C, TimeInterval, dummy_vdaf::Vdaf>( @@ -147,6 +180,33 @@ impl CollectJobDriver { .await } +#[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::FixedSize{..}, VdafInstance::Prio3Aes128FixedPoint16BitBoundedL2VecSum { .. }) => { + self.step_collect_job_generic::>>( + datastore, + lease, + ) + .await + } + +#[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::FixedSize{..}, VdafInstance::Prio3Aes128FixedPoint32BitBoundedL2VecSum { .. }) => { + self.step_collect_job_generic::>>( + datastore, + lease, + ) + .await + } + +#[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::FixedSize{..}, VdafInstance::Prio3Aes128FixedPoint64BitBoundedL2VecSum { .. }) => { + self.step_collect_job_generic::>>( + datastore, + lease, + ) + .await + } + #[cfg(feature = "test-util")] (task::QueryType::FixedSize{..}, VdafInstance::Fake) => { self.step_collect_job_generic::<0, C, FixedSize, dummy_vdaf::Vdaf>( @@ -356,6 +416,33 @@ impl CollectJobDriver { .await } +#[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::TimeInterval, VdafInstance::Prio3Aes128FixedPoint16BitBoundedL2VecSum{..}) => { + self.abandon_collect_job_generic::>>( + datastore, + lease, + ) + .await + } + +#[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::TimeInterval, VdafInstance::Prio3Aes128FixedPoint32BitBoundedL2VecSum{..}) => { + self.abandon_collect_job_generic::>>( + datastore, + lease, + ) + .await + } + +#[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::TimeInterval, VdafInstance::Prio3Aes128FixedPoint64BitBoundedL2VecSum{..}) => { + self.abandon_collect_job_generic::>>( + datastore, + lease, + ) + .await + } + #[cfg(feature = "test-util")] (task::QueryType::TimeInterval, VdafInstance::Fake) => { self.abandon_collect_job_generic::<0, C, TimeInterval, dummy_vdaf::Vdaf>( @@ -397,6 +484,33 @@ impl CollectJobDriver { .await } +#[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::FixedSize{..}, VdafInstance::Prio3Aes128FixedPoint16BitBoundedL2VecSum{..}) => { + self.abandon_collect_job_generic::>>( + datastore, + lease, + ) + .await + } + +#[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::FixedSize{..}, VdafInstance::Prio3Aes128FixedPoint32BitBoundedL2VecSum{..}) => { + self.abandon_collect_job_generic::>>( + datastore, + lease, + ) + .await + } + +#[cfg(feature = "fpvec_bounded_l2")] + (task::QueryType::FixedSize{..}, VdafInstance::Prio3Aes128FixedPoint64BitBoundedL2VecSum{..}) => { + self.abandon_collect_job_generic::>>( + datastore, + lease, + ) + .await + } + #[cfg(feature = "test-util")] (task::QueryType::FixedSize{..}, VdafInstance::Fake) => { self.abandon_collect_job_generic::<0, C, FixedSize, dummy_vdaf::Vdaf>( diff --git a/aggregator/tests/cmd/aggregation_job_creator.trycmd b/aggregator/tests/cmd/aggregation_job_creator.trycmd index ef2607101..3c71cc82a 100644 --- a/aggregator/tests/cmd/aggregation_job_creator.trycmd +++ b/aggregator/tests/cmd/aggregation_job_creator.trycmd @@ -16,8 +16,8 @@ Options: --otlp-metrics-metadata additional OTLP/gRPC metadata key/value pairs for the metrics exporter [env: OTLP_METRICS_METADATA=] -h, --help - Print help information + Print help -V, --version - Print version information + Print version ``` diff --git a/aggregator/tests/cmd/aggregation_job_driver.trycmd b/aggregator/tests/cmd/aggregation_job_driver.trycmd index 237f59234..4de2d9aad 100644 --- a/aggregator/tests/cmd/aggregation_job_driver.trycmd +++ b/aggregator/tests/cmd/aggregation_job_driver.trycmd @@ -16,8 +16,8 @@ Options: --otlp-metrics-metadata additional OTLP/gRPC metadata key/value pairs for the metrics exporter [env: OTLP_METRICS_METADATA=] -h, --help - Print help information + Print help -V, --version - Print version information + Print version ``` diff --git a/aggregator/tests/cmd/aggregator.trycmd b/aggregator/tests/cmd/aggregator.trycmd index 1b0924919..2755db170 100644 --- a/aggregator/tests/cmd/aggregator.trycmd +++ b/aggregator/tests/cmd/aggregator.trycmd @@ -16,8 +16,8 @@ Options: --otlp-metrics-metadata additional OTLP/gRPC metadata key/value pairs for the metrics exporter [env: OTLP_METRICS_METADATA=] -h, --help - Print help information + Print help -V, --version - Print version information + Print version ``` diff --git a/collector/Cargo.toml b/collector/Cargo.toml index cdea2871f..229b67f26 100644 --- a/collector/Cargo.toml +++ b/collector/Cargo.toml @@ -14,6 +14,7 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] [features] +fpvec_bounded_l2 = ["dep:fixed", "dep:fixed-macro", "janus_core/fpvec_bounded_l2"] test-util = [] [dependencies] @@ -22,6 +23,8 @@ derivative = "2.2.0" http-api-problem = "0.56.0" janus_core.workspace = true janus_messages.workspace = true +fixed = { version = "1.19", optional = true } +fixed-macro = { version = "1.1.1", optional = true } prio = "0.10.0" reqwest = { version = "0.11.14", default-features = false, features = ["rustls-tls", "json"] } retry-after = "0.3.1" @@ -36,8 +39,8 @@ assert_matches = "1" base64 = "0.21.0" chrono = "0.4" clap = { version = "4.0.27", features = ["derive", "env"] } -janus_collector = { workspace = true, features = ["test-util"] } -janus_core = { workspace = true, features = ["test-util"] } +janus_collector = { workspace = true, features = ["fpvec_bounded_l2", "test-util"] } +janus_core = { workspace = true, features = ["fpvec_bounded_l2", "test-util"] } mockito = "0.31.1" rand = "0.8" tracing-log = "0.1.3" diff --git a/collector/examples/collect.rs b/collector/examples/collect.rs index fe75b5790..cb26574ed 100644 --- a/collector/examples/collect.rs +++ b/collector/examples/collect.rs @@ -5,6 +5,10 @@ use clap::{ ArgAction, CommandFactory, FromArgMatches, Parser, ValueEnum, }; use derivative::Derivative; +#[cfg(feature = "fpvec_bounded_l2")] +use fixed::types::extra::{U15, U31, U63}; +#[cfg(feature = "fpvec_bounded_l2")] +use fixed::{FixedI16, FixedI32, FixedI64}; use janus_collector::{default_http_client, Collector, CollectorParameters}; use janus_core::{hpke::HpkePrivateKey, task::AuthenticationToken}; use janus_messages::{ @@ -12,6 +16,8 @@ use janus_messages::{ BatchId, Duration, FixedSizeQuery, HpkeConfig, Interval, PartialBatchSelector, Query, TaskId, Time, }; +#[cfg(feature = "fpvec_bounded_l2")] +use prio::vdaf::prio3::Prio3Aes128FixedPointBoundedL2VecSum; use prio::{ codec::Decode, vdaf::{self, prio3::Prio3}, @@ -55,6 +61,15 @@ enum VdafType { Sum, /// Prio3Aes128Histogram Histogram, + #[cfg(feature = "fpvec_bounded_l2")] + /// Prio3FixedPoint16BitBoundedL2VecSum + FixedPoint16BitBoundedL2VecSum, + #[cfg(feature = "fpvec_bounded_l2")] + /// Prio3FixedPoint32BitBoundedL2VecSum + FixedPoint32BitBoundedL2VecSum, + #[cfg(feature = "fpvec_bounded_l2")] + /// Prio3FixedPoint64BitBoundedL2VecSum + FixedPoint64BitBoundedL2VecSum, } #[derive(Clone)] @@ -423,6 +438,33 @@ where .await .map_err(|err| Error::Anyhow(err.into())) } + #[cfg(feature = "fpvec_bounded_l2")] + (VdafType::FixedPoint16BitBoundedL2VecSum, Some(length), None, None) => { + let vdaf: Prio3Aes128FixedPointBoundedL2VecSum> = + Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, length) + .map_err(|err| Error::Anyhow(err.into()))?; + run_collection_generic(parameters, vdaf, http_client, query, &()) + .await + .map_err(|err| Error::Anyhow(err.into())) + } + #[cfg(feature = "fpvec_bounded_l2")] + (VdafType::FixedPoint32BitBoundedL2VecSum, Some(length), None, None) => { + let vdaf: Prio3Aes128FixedPointBoundedL2VecSum> = + Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, length) + .map_err(|err| Error::Anyhow(err.into()))?; + run_collection_generic(parameters, vdaf, http_client, query, &()) + .await + .map_err(|err| Error::Anyhow(err.into())) + } + #[cfg(feature = "fpvec_bounded_l2")] + (VdafType::FixedPoint64BitBoundedL2VecSum, Some(length), None, None) => { + let vdaf: Prio3Aes128FixedPointBoundedL2VecSum> = + Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, length) + .map_err(|err| Error::Anyhow(err.into()))?; + run_collection_generic(parameters, vdaf, http_client, query, &()) + .await + .map_err(|err| Error::Anyhow(err.into())) + } _ => Err(clap::Error::raw( ErrorKind::ArgumentConflict, format!( @@ -663,6 +705,39 @@ mod tests { Error::Clap(err) => assert_eq!(err.kind(), ErrorKind::ArgumentConflict) ); + let mut bad_arguments = base_arguments.clone(); + bad_arguments.extend([ + "--vdaf=fixedpoint16bitboundedl2vecsum".to_string(), + "--bits=3".to_string(), + ]); + let bad_options = Options::try_parse_from(bad_arguments).unwrap(); + assert_matches!( + run(bad_options).await.unwrap_err(), + Error::Clap(err) => assert_eq!(err.kind(), ErrorKind::ArgumentConflict) + ); + + let mut bad_arguments = base_arguments.clone(); + bad_arguments.extend([ + "--vdaf=fixedpoint32bitboundedl2vecsum".to_string(), + "--bits=3".to_string(), + ]); + let bad_options = Options::try_parse_from(bad_arguments).unwrap(); + assert_matches!( + run(bad_options).await.unwrap_err(), + Error::Clap(err) => assert_eq!(err.kind(), ErrorKind::ArgumentConflict) + ); + + let mut bad_arguments = base_arguments.clone(); + bad_arguments.extend([ + "--vdaf=fixedpoint64bitboundedl2vecsum".to_string(), + "--bits=3".to_string(), + ]); + let bad_options = Options::try_parse_from(bad_arguments).unwrap(); + assert_matches!( + run(bad_options).await.unwrap_err(), + Error::Clap(err) => assert_eq!(err.kind(), ErrorKind::ArgumentConflict) + ); + let mut bad_arguments = base_arguments.clone(); bad_arguments.extend([ "--vdaf=histogram".to_string(), @@ -704,6 +779,27 @@ mod tests { ]); Options::try_parse_from(good_arguments).unwrap(); + let mut good_arguments = base_arguments.clone(); + good_arguments.extend([ + "--vdaf=fixedpoint16bitboundedl2vecsum".to_string(), + "--length=10".to_string(), + ]); + Options::try_parse_from(good_arguments).unwrap(); + + let mut good_arguments = base_arguments.clone(); + good_arguments.extend([ + "--vdaf=fixedpoint32bitboundedl2vecsum".to_string(), + "--length=10".to_string(), + ]); + Options::try_parse_from(good_arguments).unwrap(); + + let mut good_arguments = base_arguments.clone(); + good_arguments.extend([ + "--vdaf=fixedpoint64bitboundedl2vecsum".to_string(), + "--length=10".to_string(), + ]); + Options::try_parse_from(good_arguments).unwrap(); + // Check parsing arguments for a current batch query. let expected = Options { task_id, diff --git a/collector/src/lib.rs b/collector/src/lib.rs index ef91ad8aa..24d69cfa6 100644 --- a/collector/src/lib.rs +++ b/collector/src/lib.rs @@ -652,6 +652,8 @@ mod tests { }; use assert_matches::assert_matches; use chrono::{TimeZone, Utc}; + #[cfg(feature = "fpvec_bounded_l2")] + use fixed_macro::fixed; use janus_core::{ hpke::{ self, test_util::generate_test_hpke_config_and_private_key, HpkeApplicationInfo, Label, @@ -998,6 +1000,72 @@ mod tests { mocked_collect_complete.assert(); } + #[tokio::test] + async fn successful_collect_prio3_fixedpoint_boundedl2_vec_sum() { + install_test_trace_subscriber(); + + let vdaf = Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, 3).unwrap(); + let fp32_4_inv = fixed!(0.25: I1F31); + let fp32_8_inv = fixed!(0.125: I1F31); + let fp32_16_inv = fixed!(0.0625: I1F31); + let transcript = run_vdaf( + &vdaf, + &random_verify_key(), + &(), + &random(), + &vec![fp32_16_inv, fp32_8_inv, fp32_4_inv], + ); + let collector = setup_collector(vdaf); + + let batch_interval = Interval::new( + Time::from_seconds_since_epoch(1_000_000), + Duration::from_seconds(3600), + ) + .unwrap(); + let collect_resp = + build_collect_response_time(&transcript, &collector.parameters, batch_interval); + + let collect_job_url = format!("{}/collect_job/1", mockito::server_url()); + let mocked_collect_start_success = mock("POST", "/collect") + .match_header( + CONTENT_TYPE.as_str(), + CollectReq::::MEDIA_TYPE, + ) + .with_status(303) + .with_header(LOCATION.as_str(), &collect_job_url) + .expect(1) + .create(); + let mocked_collect_complete = mock("GET", "/collect_job/1") + .with_status(200) + .with_header( + CONTENT_TYPE.as_str(), + CollectResp::::MEDIA_TYPE, + ) + .with_body(collect_resp.get_encoded()) + .expect(1) + .create(); + + let job = collector + .start_collection(Query::new_time_interval(batch_interval), &()) + .await + .unwrap(); + assert_eq!(job.collect_job_url.as_str(), collect_job_url); + assert_eq!(job.query.batch_interval(), &batch_interval); + + let agg_result = collector.poll_until_complete(&job).await.unwrap(); + assert_eq!( + agg_result, + Collection::new( + PartialBatchSelector::new_time_interval(), + 1, + Vec::from([0.0625, 0.125, 0.25]) + ) + ); + + mocked_collect_start_success.assert(); + mocked_collect_complete.assert(); + } + #[tokio::test] async fn successful_collect_fixed_size() { install_test_trace_subscriber(); diff --git a/core/Cargo.toml b/core/Cargo.toml index 11b0eb009..c28cc967a 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -14,6 +14,7 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] [features] +fpvec_bounded_l2 = [] test-util = [ "dep:assert_matches", "dep:lazy_static", @@ -60,7 +61,7 @@ tracing-subscriber = { version = "0.3", features = ["std", "env-filter", "fmt"], [dev-dependencies] hex = { version = "0.4", features = ["serde"] } # ensure this remains compatible with the non-dev dependency -janus_core = { workspace = true, features = ["test-util"] } +janus_core = { workspace = true, features = ["fpvec_bounded_l2", "test-util"] } # Enable `kube`'s `openssl-tls` feature (which takes precedence over the # `rustls-tls` feature when creating a default client) to work around rustls's # lack of support for connecting to servers by IP addresses, which affects many diff --git a/core/src/task.rs b/core/src/task.rs index 86a474617..aa28111c3 100644 --- a/core/src/task.rs +++ b/core/src/task.rs @@ -25,6 +25,18 @@ pub enum VdafInstance { Prio3Aes128Sum { bits: u32 }, /// A `prio3` histogram using the AES 128 pseudorandom generator. Prio3Aes128Histogram { buckets: Vec }, + /// A `prio3` 16-bit fixedpoint vector sum with bounded L2 norm using the AES + /// 128 pseudorandom generator. + #[cfg(feature = "fpvec_bounded_l2")] + Prio3Aes128FixedPoint16BitBoundedL2VecSum { length: usize }, + /// A `prio3` 32-bit fixedpoint vector sum with bounded L2 norm using the AES + /// 128 pseudorandom generator. + #[cfg(feature = "fpvec_bounded_l2")] + Prio3Aes128FixedPoint32BitBoundedL2VecSum { length: usize }, + /// A `prio3` 64-bit fixedpoint vector sum with bounded L2 norm using the AES + /// 128 pseudorandom generator. + #[cfg(feature = "fpvec_bounded_l2")] + Prio3Aes128FixedPoint64BitBoundedL2VecSum { length: usize }, /// The `poplar1` VDAF. Support for this VDAF is experimental. Poplar1 { bits: usize }, diff --git a/interop_binaries/Cargo.toml b/interop_binaries/Cargo.toml index 733ed5e91..d3960525b 100644 --- a/interop_binaries/Cargo.toml +++ b/interop_binaries/Cargo.toml @@ -9,6 +9,7 @@ rust-version.workspace = true version.workspace = true [features] +fpvec_bounded_l2 = ["dep:fixed", "dep:fixed-macro", "janus_core/fpvec_bounded_l2", "janus_aggregator/fpvec_bounded_l2"] test-util = [ "dep:hex", "dep:futures", @@ -27,6 +28,8 @@ backoff = { version = "0.4", features = ["tokio"] } base64 = "0.21.0" clap = "4.0.27" futures = { version = "0.3.25", optional = true } +fixed = { version = "1.19", optional = true } +fixed-macro = { version = "1.1.1", optional = true } hex = { version = "0.4", optional = true } lazy_static = { version = "1", optional = true } janus_aggregator.workspace = true @@ -52,8 +55,8 @@ warp = "0.3" zstd = { version = "0.12", optional = true } [dev-dependencies] -janus_interop_binaries = { workspace = true, features = ["testcontainer", "test-util"] } -janus_core = { workspace = true, features = ["test-util"] } +janus_interop_binaries = { workspace = true, features = ["fpvec_bounded_l2", "testcontainer", "test-util"] } +janus_core = { workspace = true, features = ["test-util", "fpvec_bounded_l2"] } reqwest = { version = "0.11.14", default-features = false, features = ["json"] } [build-dependencies] diff --git a/interop_binaries/src/bin/janus_interop_client.rs b/interop_binaries/src/bin/janus_interop_client.rs index 40acdaed0..ce1320ad8 100644 --- a/interop_binaries/src/bin/janus_interop_client.rs +++ b/interop_binaries/src/bin/janus_interop_client.rs @@ -1,6 +1,10 @@ use anyhow::{anyhow, Context}; use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine}; use clap::{value_parser, Arg, Command}; +#[cfg(feature = "fpvec_bounded_l2")] +use fixed::types::extra::{U15, U31, U63}; +#[cfg(feature = "fpvec_bounded_l2")] +use fixed::{FixedI16, FixedI32, FixedI64}; use janus_client::ClientParameters; use janus_core::{ task::VdafInstance, @@ -12,6 +16,8 @@ use janus_interop_binaries::{ NumberAsString, VdafObject, }; use janus_messages::{Duration, Role, TaskId, Time}; +#[cfg(feature = "fpvec_bounded_l2")] +use prio::vdaf::prio3::Prio3Aes128FixedPointBoundedL2VecSum; use prio::{ codec::Decode, vdaf::{prio3::Prio3, Vdaf}, @@ -21,11 +27,29 @@ use std::net::{Ipv4Addr, SocketAddr}; use url::Url; use warp::{hyper::StatusCode, reply::Response, Filter, Reply}; +/// Helper enum for tagging a mesurement vector with the fixed point type for deserialization. +#[derive(Debug, Deserialize)] +#[serde(tag = "type")] +#[cfg(feature = "fpvec_bounded_l2")] +enum TaggedFixedVec { + Fixed16 { + vec: Vec>>, + }, + Fixed32 { + vec: Vec>>, + }, + Fixed64 { + vec: Vec>>, + }, +} + #[derive(Debug, Deserialize)] #[serde(untagged)] enum Measurement { Number(NumberAsString), NumberVec(Vec>), + #[cfg(feature = "fpvec_bounded_l2")] + FixedVec(TaggedFixedVec), } impl Measurement { @@ -51,6 +75,42 @@ impl Measurement { )), } } + + #[cfg(feature = "fpvec_bounded_l2")] + fn as_fixed16_vec(&self) -> anyhow::Result>> { + match self { + Measurement::FixedVec(TaggedFixedVec::Fixed16 { vec }) => { + Ok(vec.iter().map(|item| item.0).collect()) + } + m => Err(anyhow!( + "cannot represent measurement {m:?} as a vector of 16 bit fixed point numbers" + )), + } + } + + #[cfg(feature = "fpvec_bounded_l2")] + fn as_fixed32_vec(&self) -> anyhow::Result>> { + match self { + Measurement::FixedVec(TaggedFixedVec::Fixed32 { vec }) => { + Ok(vec.iter().map(|item| item.0).collect()) + } + m => Err(anyhow!( + "cannot represent measurement {m:?} as a vector of 32 bit fixed point numbers" + )), + } + } + + #[cfg(feature = "fpvec_bounded_l2")] + fn as_fixed64_vec(&self) -> anyhow::Result>> { + match self { + Measurement::FixedVec(TaggedFixedVec::Fixed64 { vec }) => { + Ok(vec.iter().map(|item| item.0).collect()) + } + m => Err(anyhow!( + "cannot represent measurement {m:?} as a vector of 64 bit fixed point numbers" + )), + } + } } #[derive(Debug, Deserialize)] @@ -176,6 +236,35 @@ async fn handle_upload( handle_upload_generic(http_client, vdaf_client, request, measurement).await?; } + #[cfg(feature = "fpvec_bounded_l2")] + VdafInstance::Prio3Aes128FixedPoint16BitBoundedL2VecSum { length } => { + let measurement = request.measurement.as_fixed16_vec()?; + let vdaf_client: Prio3Aes128FixedPointBoundedL2VecSum> = + Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, length).context( + "failed to construct Prio3Aes128FixedPoint16BitBoundedL2VecSum VDAF", + )?; + handle_upload_generic(http_client, vdaf_client, request, measurement).await?; + } + + #[cfg(feature = "fpvec_bounded_l2")] + VdafInstance::Prio3Aes128FixedPoint32BitBoundedL2VecSum { length } => { + let measurement = request.measurement.as_fixed32_vec()?; + let vdaf_client: Prio3Aes128FixedPointBoundedL2VecSum> = + Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, length).context( + "failed to construct Prio3Aes128FixedPoint32BitBoundedL2VecSum VDAF", + )?; + handle_upload_generic(http_client, vdaf_client, request, measurement).await?; + } + + #[cfg(feature = "fpvec_bounded_l2")] + VdafInstance::Prio3Aes128FixedPoint64BitBoundedL2VecSum { length } => { + let measurement = request.measurement.as_fixed64_vec()?; + let vdaf_client: Prio3Aes128FixedPointBoundedL2VecSum> = + Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, length).context( + "failed to construct Prio3Aes128FixedPoint64BitBoundedL2VecSum VDAF", + )?; + handle_upload_generic(http_client, vdaf_client, request, measurement).await?; + } _ => panic!("Unsupported VDAF: {:?}", vdaf_instance), } Ok(()) diff --git a/interop_binaries/src/bin/janus_interop_collector.rs b/interop_binaries/src/bin/janus_interop_collector.rs index 3d5ff2278..361d1c991 100644 --- a/interop_binaries/src/bin/janus_interop_collector.rs +++ b/interop_binaries/src/bin/janus_interop_collector.rs @@ -2,6 +2,10 @@ use anyhow::{anyhow, Context}; use backoff::ExponentialBackoffBuilder; use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine}; use clap::{value_parser, Arg, Command}; +#[cfg(feature = "fpvec_bounded_l2")] +use fixed::types::extra::{U15, U31, U63}; +#[cfg(feature = "fpvec_bounded_l2")] +use fixed::{FixedI16, FixedI32, FixedI64}; use janus_collector::{Collector, CollectorParameters}; use janus_core::{ hpke::HpkeKeypair, @@ -16,6 +20,8 @@ use janus_messages::{ query_type::QueryType, BatchId, Duration, FixedSizeQuery, HpkeConfig, Interval, PartialBatchSelector, Query, TaskId, Time, }; +#[cfg(feature = "fpvec_bounded_l2")] +use prio::vdaf::prio3::Prio3Aes128FixedPointBoundedL2VecSum; use prio::{ codec::{Decode, Encode}, vdaf::{self, prio3::Prio3}, @@ -31,7 +37,6 @@ use std::{ }; use tokio::{spawn, sync::Mutex, task::JoinHandle}; use warp::{hyper::StatusCode, reply::Response, Filter, Reply}; - #[derive(Debug, Deserialize)] struct AddTaskRequest { task_id: String, @@ -93,6 +98,8 @@ struct CollectResult { enum AggregationResult { Number(NumberAsString), NumberVec(Vec>), + #[cfg(feature = "fpvec_bounded_l2")] + FloatVec(Vec>), } #[derive(Debug, Serialize)] @@ -347,6 +354,78 @@ async fn handle_collect_start( .await? } + #[cfg(feature = "fpvec_bounded_l2")] + ( + ParsedQuery::TimeInterval(batch_interval), + janus_core::task::VdafInstance::Prio3Aes128FixedPoint16BitBoundedL2VecSum { length }, + ) => { + let vdaf: Prio3Aes128FixedPointBoundedL2VecSum> = + Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, length).context( + "failed to construct Prio3Aes128FixedPoint16BitBoundedL2VecSum VDAF", + )?; + handle_collect_generic( + http_client, + collector_params, + Query::new_time_interval(batch_interval), + vdaf, + &agg_param, + |_| None, + |result| { + let converted = result.iter().cloned().map(NumberAsString).collect(); + AggregationResult::FloatVec(converted) + }, + ) + .await? + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + ParsedQuery::TimeInterval(batch_interval), + janus_core::task::VdafInstance::Prio3Aes128FixedPoint32BitBoundedL2VecSum { length }, + ) => { + let vdaf: Prio3Aes128FixedPointBoundedL2VecSum> = + Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, length).context( + "failed to construct Prio3Aes128FixedPoint32BitBoundedL2VecSum VDAF", + )?; + handle_collect_generic( + http_client, + collector_params, + Query::new_time_interval(batch_interval), + vdaf, + &agg_param, + |_| None, + |result| { + let converted = result.iter().cloned().map(NumberAsString).collect(); + AggregationResult::FloatVec(converted) + }, + ) + .await? + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + ParsedQuery::TimeInterval(batch_interval), + janus_core::task::VdafInstance::Prio3Aes128FixedPoint64BitBoundedL2VecSum { length }, + ) => { + let vdaf: Prio3Aes128FixedPointBoundedL2VecSum> = + Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, length).context( + "failed to construct Prio3Aes128FixedPoint64BitBoundedL2VecSum VDAF", + )?; + handle_collect_generic( + http_client, + collector_params, + Query::new_time_interval(batch_interval), + vdaf, + &agg_param, + |_| None, + |result| { + let converted = result.iter().cloned().map(NumberAsString).collect(); + AggregationResult::FloatVec(converted) + }, + ) + .await? + } + (ParsedQuery::FixedSize(fixed_size_query), VdafInstance::Prio3Aes128Count {}) => { let vdaf = Prio3::new_aes128_count(2).context("failed to construct Prio3Aes128Count VDAF")?; @@ -383,6 +462,78 @@ async fn handle_collect_start( .await? } + #[cfg(feature = "fpvec_bounded_l2")] + ( + ParsedQuery::FixedSize(fixed_size_query), + janus_core::task::VdafInstance::Prio3Aes128FixedPoint16BitBoundedL2VecSum { length }, + ) => { + let vdaf: Prio3Aes128FixedPointBoundedL2VecSum> = + Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, length).context( + "failed to construct Prio3Aes128FixedPoint16BitBoundedL2VecSum VDAF", + )?; + handle_collect_generic( + http_client, + collector_params, + Query::new_fixed_size(fixed_size_query), + vdaf, + &agg_param, + |selector| Some(*selector.batch_id()), + |result| { + let converted = result.iter().cloned().map(NumberAsString).collect(); + AggregationResult::FloatVec(converted) + }, + ) + .await? + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + ParsedQuery::FixedSize(fixed_size_query), + janus_core::task::VdafInstance::Prio3Aes128FixedPoint32BitBoundedL2VecSum { length }, + ) => { + let vdaf: Prio3Aes128FixedPointBoundedL2VecSum> = + Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, length).context( + "failed to construct Prio3Aes128FixedPoint32BitBoundedL2VecSum VDAF", + )?; + handle_collect_generic( + http_client, + collector_params, + Query::new_fixed_size(fixed_size_query), + vdaf, + &agg_param, + |selector| Some(*selector.batch_id()), + |result| { + let converted = result.iter().cloned().map(NumberAsString).collect(); + AggregationResult::FloatVec(converted) + }, + ) + .await? + } + + #[cfg(feature = "fpvec_bounded_l2")] + ( + ParsedQuery::FixedSize(fixed_size_query), + janus_core::task::VdafInstance::Prio3Aes128FixedPoint64BitBoundedL2VecSum { length }, + ) => { + let vdaf: Prio3Aes128FixedPointBoundedL2VecSum> = + Prio3::new_aes128_fixedpoint_boundedl2_vec_sum(2, length).context( + "failed to construct Prio3Aes128FixedPoint64BitBoundedL2VecSum VDAF", + )?; + handle_collect_generic( + http_client, + collector_params, + Query::new_fixed_size(fixed_size_query), + vdaf, + &agg_param, + |selector| Some(*selector.batch_id()), + |result| { + let converted = result.iter().cloned().map(NumberAsString).collect(); + AggregationResult::FloatVec(converted) + }, + ) + .await? + } + (ParsedQuery::FixedSize(fixed_size_query), VdafInstance::Prio3Aes128Sum { bits }) => { let vdaf = Prio3::new_aes128_sum(2, bits) .context("failed to construct Prio3Aes128Sum VDAF")?; @@ -419,7 +570,9 @@ async fn handle_collect_start( .await? } - (_, vdaf_instance) => panic!("Unsupported VDAF: {:?}", vdaf_instance), + (_, vdaf_instance) => { + panic!("Unsupported VDAF: {:?}", vdaf_instance) + } }; let mut collect_jobs_guard = collect_jobs.lock().await; diff --git a/interop_binaries/src/lib.rs b/interop_binaries/src/lib.rs index 0f3510c5a..629b4feb2 100644 --- a/interop_binaries/src/lib.rs +++ b/interop_binaries/src/lib.rs @@ -102,9 +102,27 @@ where #[serde(tag = "type")] pub enum VdafObject { Prio3Aes128Count, - Prio3Aes128CountVec { length: NumberAsString }, - Prio3Aes128Sum { bits: NumberAsString }, - Prio3Aes128Histogram { buckets: Vec> }, + Prio3Aes128CountVec { + length: NumberAsString, + }, + Prio3Aes128Sum { + bits: NumberAsString, + }, + Prio3Aes128Histogram { + buckets: Vec>, + }, + #[cfg(feature = "fpvec_bounded_l2")] + Prio3Aes128FixedPoint16BitBoundedL2VecSum { + length: NumberAsString, + }, + #[cfg(feature = "fpvec_bounded_l2")] + Prio3Aes128FixedPoint32BitBoundedL2VecSum { + length: NumberAsString, + }, + #[cfg(feature = "fpvec_bounded_l2")] + Prio3Aes128FixedPoint64BitBoundedL2VecSum { + length: NumberAsString, + }, } impl From for VdafObject { @@ -124,6 +142,26 @@ impl From for VdafObject { buckets: buckets.iter().copied().map(NumberAsString).collect(), }, + #[cfg(feature = "fpvec_bounded_l2")] + VdafInstance::Prio3Aes128FixedPoint16BitBoundedL2VecSum { length } => { + VdafObject::Prio3Aes128FixedPoint16BitBoundedL2VecSum { + length: NumberAsString(length), + } + } + + #[cfg(feature = "fpvec_bounded_l2")] + VdafInstance::Prio3Aes128FixedPoint32BitBoundedL2VecSum { length } => { + VdafObject::Prio3Aes128FixedPoint32BitBoundedL2VecSum { + length: NumberAsString(length), + } + } + + #[cfg(feature = "fpvec_bounded_l2")] + VdafInstance::Prio3Aes128FixedPoint64BitBoundedL2VecSum { length } => { + VdafObject::Prio3Aes128FixedPoint64BitBoundedL2VecSum { + length: NumberAsString(length), + } + } _ => panic!("Unsupported VDAF: {:?}", vdaf), } } @@ -143,6 +181,21 @@ impl From for VdafInstance { VdafObject::Prio3Aes128Histogram { buckets } => VdafInstance::Prio3Aes128Histogram { buckets: buckets.iter().map(|value| value.0).collect(), }, + + #[cfg(feature = "fpvec_bounded_l2")] + VdafObject::Prio3Aes128FixedPoint16BitBoundedL2VecSum { length } => { + VdafInstance::Prio3Aes128FixedPoint16BitBoundedL2VecSum { length: length.0 } + } + + #[cfg(feature = "fpvec_bounded_l2")] + VdafObject::Prio3Aes128FixedPoint32BitBoundedL2VecSum { length } => { + VdafInstance::Prio3Aes128FixedPoint32BitBoundedL2VecSum { length: length.0 } + } + + #[cfg(feature = "fpvec_bounded_l2")] + VdafObject::Prio3Aes128FixedPoint64BitBoundedL2VecSum { length } => { + VdafInstance::Prio3Aes128FixedPoint64BitBoundedL2VecSum { length: length.0 } + } } } } diff --git a/interop_binaries/tests/end_to_end.rs b/interop_binaries/tests/end_to_end.rs index a1c8fcb8e..d9b94614a 100644 --- a/interop_binaries/tests/end_to_end.rs +++ b/interop_binaries/tests/end_to_end.rs @@ -22,6 +22,9 @@ use serde_json::{json, Value}; use std::time::Duration as StdDuration; use testcontainers::RunnableImage; +#[cfg(feature = "fpvec_bounded_l2")] +use fixed_macro::fixed; + const JSON_MEDIA_TYPE: &str = "application/json"; const TIME_PRECISION: u64 = 3600; @@ -651,6 +654,222 @@ async fn e2e_prio3_count_vec() { } } +#[tokio::test] +async fn e2e_prio3_fixed16vec() { + let fp16_4_inv = fixed!(0.25: I1F15); + let fp16_8_inv = fixed!(0.125: I1F15); + let fp16_16_inv = fixed!(0.0625: I1F15); + let result = run( + QueryKind::TimeInterval, + json!({"type": "Prio3Aes128FixedPoint16BitBoundedL2VecSum", "length": "3"}), + &[ + json!({"type": "Fixed16", "vec": [ + fp16_4_inv.to_string(), + fp16_8_inv.to_string(), + fp16_8_inv.to_string() + ]}), + json!({"type" : "Fixed16", "vec":[ + fp16_16_inv.to_string(), + fp16_8_inv.to_string(), + fp16_16_inv.to_string() + ]}), + json!({"type" : "Fixed16", "vec":[ + fp16_8_inv.to_string(), + fp16_8_inv.to_string(), + fp16_4_inv.to_string() + ]}), + json!({"type" : "Fixed16", "vec":[ + fp16_16_inv.to_string(), + fp16_8_inv.to_string(), + fp16_4_inv.to_string() + ]}), + ], + b"", + ) + .await; + assert_eq!(result, json!(["0.5", "0.5", "0.6875"])); +} + +#[tokio::test] +async fn e2e_prio3_fixed32vec() { + let fp32_4_inv = fixed!(0.25: I1F31); + let fp32_8_inv = fixed!(0.125: I1F31); + let fp32_16_inv = fixed!(0.0625: I1F31); + let result = run( + QueryKind::TimeInterval, + json!({"type": "Prio3Aes128FixedPoint32BitBoundedL2VecSum", "length": "3"}), + &[ + json!({"type": "Fixed32", "vec": [ + fp32_4_inv.to_string(), + fp32_8_inv.to_string(), + fp32_8_inv.to_string() + ]}), + json!({"type" : "Fixed32", "vec":[ + fp32_16_inv.to_string(), + fp32_8_inv.to_string(), + fp32_16_inv.to_string() + ]}), + json!({"type" : "Fixed32", "vec":[ + fp32_8_inv.to_string(), + fp32_8_inv.to_string(), + fp32_4_inv.to_string() + ]}), + json!({"type" : "Fixed32", "vec":[ + fp32_16_inv.to_string(), + fp32_8_inv.to_string(), + fp32_4_inv.to_string() + ]}), + ], + b"", + ) + .await; + assert_eq!(result, json!(["0.5", "0.5", "0.6875"])); +} + +#[tokio::test] +async fn e2e_prio3_fixed64vec() { + let fp64_4_inv = fixed!(0.25: I1F63); + let fp64_8_inv = fixed!(0.125: I1F63); + let fp64_16_inv = fixed!(0.0625: I1F63); + let result = run( + QueryKind::TimeInterval, + json!({"type": "Prio3Aes128FixedPoint64BitBoundedL2VecSum", "length": "3"}), + &[ + json!({"type": "Fixed64", "vec": [ + fp64_4_inv.to_string(), + fp64_8_inv.to_string(), + fp64_8_inv.to_string() + ]}), + json!({"type" : "Fixed64", "vec":[ + fp64_16_inv.to_string(), + fp64_8_inv.to_string(), + fp64_16_inv.to_string() + ]}), + json!({"type" : "Fixed64", "vec":[ + fp64_8_inv.to_string(), + fp64_8_inv.to_string(), + fp64_4_inv.to_string() + ]}), + json!({"type" : "Fixed64", "vec":[ + fp64_16_inv.to_string(), + fp64_8_inv.to_string(), + fp64_4_inv.to_string() + ]}), + ], + b"", + ) + .await; + assert_eq!(result, json!(["0.5", "0.5", "0.6875"])); +} + +#[tokio::test] +async fn e2e_prio3_fixed16vec_fixed_size() { + let fp16_4_inv = fixed!(0.25: I1F15); + let fp16_8_inv = fixed!(0.125: I1F15); + let fp16_16_inv = fixed!(0.0625: I1F15); + let result = run( + QueryKind::FixedSize, + json!({"type": "Prio3Aes128FixedPoint16BitBoundedL2VecSum", "length": "3"}), + &[ + json!({"type": "Fixed16", "vec": [ + fp16_4_inv.to_string(), + fp16_8_inv.to_string(), + fp16_8_inv.to_string() + ]}), + json!({"type" : "Fixed16", "vec":[ + fp16_16_inv.to_string(), + fp16_8_inv.to_string(), + fp16_16_inv.to_string() + ]}), + json!({"type" : "Fixed16", "vec":[ + fp16_8_inv.to_string(), + fp16_8_inv.to_string(), + fp16_4_inv.to_string() + ]}), + json!({"type" : "Fixed16", "vec":[ + fp16_16_inv.to_string(), + fp16_8_inv.to_string(), + fp16_4_inv.to_string() + ]}), + ], + b"", + ) + .await; + assert_eq!(result, json!(["0.5", "0.5", "0.6875"])); +} + +#[tokio::test] +async fn e2e_prio3_fixed32vec_fixed_size() { + let fp32_4_inv = fixed!(0.25: I1F31); + let fp32_8_inv = fixed!(0.125: I1F31); + let fp32_16_inv = fixed!(0.0625: I1F31); + let result = run( + QueryKind::FixedSize, + json!({"type": "Prio3Aes128FixedPoint32BitBoundedL2VecSum", "length": "3"}), + &[ + json!({"type": "Fixed32", "vec": [ + fp32_4_inv.to_string(), + fp32_8_inv.to_string(), + fp32_8_inv.to_string() + ]}), + json!({"type" : "Fixed32", "vec":[ + fp32_16_inv.to_string(), + fp32_8_inv.to_string(), + fp32_16_inv.to_string() + ]}), + json!({"type" : "Fixed32", "vec":[ + fp32_8_inv.to_string(), + fp32_8_inv.to_string(), + fp32_4_inv.to_string() + ]}), + json!({"type" : "Fixed32", "vec":[ + fp32_16_inv.to_string(), + fp32_8_inv.to_string(), + fp32_4_inv.to_string() + ]}), + ], + b"", + ) + .await; + assert_eq!(result, json!(["0.5", "0.5", "0.6875"])); +} + +#[tokio::test] +async fn e2e_prio3_fixed64vec_fixed_size() { + let fp64_4_inv = fixed!(0.25: I1F63); + let fp64_8_inv = fixed!(0.125: I1F63); + let fp64_16_inv = fixed!(0.0625: I1F63); + let result = run( + QueryKind::FixedSize, + json!({"type": "Prio3Aes128FixedPoint64BitBoundedL2VecSum", "length": "3"}), + &[ + json!({"type": "Fixed64", "vec": [ + fp64_4_inv.to_string(), + fp64_8_inv.to_string(), + fp64_8_inv.to_string() + ]}), + json!({"type" : "Fixed64", "vec":[ + fp64_16_inv.to_string(), + fp64_8_inv.to_string(), + fp64_16_inv.to_string() + ]}), + json!({"type" : "Fixed64", "vec":[ + fp64_8_inv.to_string(), + fp64_8_inv.to_string(), + fp64_4_inv.to_string() + ]}), + json!({"type" : "Fixed64", "vec":[ + fp64_16_inv.to_string(), + fp64_8_inv.to_string(), + fp64_4_inv.to_string() + ]}), + ], + b"", + ) + .await; + assert_eq!(result, json!(["0.5", "0.5", "0.6875"])); +} + #[tokio::test] async fn e2e_prio3_count_fixed_size() { let result = run( diff --git a/messages/tests/cmd/dap_decode.trycmd b/messages/tests/cmd/dap_decode.trycmd index f18943fc2..48b26d273 100644 --- a/messages/tests/cmd/dap_decode.trycmd +++ b/messages/tests/cmd/dap_decode.trycmd @@ -9,7 +9,7 @@ Arguments: Options: -t, --media-type Media type of the message to decode [possible values: hpke-config, report, aggregate-initialize-req, aggregate-initialize-resp, aggregate-continue-req, aggregate-continue-resp, aggregate-share-req, aggregate-share-resp, collect-req, collect-resp] - -h, --help Print help information - -V, --version Print version information + -h, --help Print help + -V, --version Print version ```