From d3d7aa716e94c7abd6bea615f9db2bf830cb703f Mon Sep 17 00:00:00 2001 From: David Kazlauskas Date: Mon, 16 Dec 2024 15:20:28 +0200 Subject: [PATCH] chore: upgrade tfhe-rs library to 0.10.0 --- fhevm-engine/Cargo.lock | 16 +++---- fhevm-engine/Cargo.toml | 2 +- fhevm-engine/coprocessor/src/tests/random.rs | 48 ++++++++++---------- fhevm-engine/fhevm-keys/cks | 2 +- fhevm-engine/fhevm-keys/pks | 2 +- fhevm-engine/fhevm-keys/pp | 2 +- fhevm-engine/fhevm-keys/sks | 2 +- 7 files changed, 37 insertions(+), 37 deletions(-) diff --git a/fhevm-engine/Cargo.lock b/fhevm-engine/Cargo.lock index d4313f49..2555917c 100644 --- a/fhevm-engine/Cargo.lock +++ b/fhevm-engine/Cargo.lock @@ -5143,9 +5143,9 @@ dependencies = [ [[package]] name = "tfhe" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f65cf3af9571d41b9bc7fbe99a353fae1fc47f0bac4cff225b494ae53acb9b0" +checksum = "7190b3967c9322674bae8f247380c8a90d38448fbd8cd35b17a1958f39190ec2" dependencies = [ "aligned-vec", "bincode", @@ -5234,9 +5234,9 @@ dependencies = [ [[package]] name = "tfhe-versionable" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d09ede610a0eac494ab832533415d4cb4f103b716901a11da84ccfeb287d08bf" +checksum = "32111f6df1b4ced57bea0bc548a35eb8130e5b9f2084378299eeacf4148cb8a5" dependencies = [ "aligned-vec", "num-complex", @@ -5246,9 +5246,9 @@ dependencies = [ [[package]] name = "tfhe-versionable-derive" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d92c0fe0b3e42c45ac7ef98092e60c09db69aeaeb821429a1754aef28ea575c" +checksum = "a463428890873548472daba5bdcecfe34b89c98518b4bd6cbd8595ac48fc0771" dependencies = [ "proc-macro2", "quote", @@ -5257,9 +5257,9 @@ dependencies = [ [[package]] name = "tfhe-zk-pok" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9978204def8b8549b8ed160b983071781726884f2bd9401eeebe951b997cb185" +checksum = "1895354f2c33e7a79b24ac96f08904a396c5ac3ac1bc65587b37cacd7a62e3fa" dependencies = [ "num-bigint", "rand", diff --git a/fhevm-engine/Cargo.toml b/fhevm-engine/Cargo.toml index f7ba56fd..8ed45b17 100644 --- a/fhevm-engine/Cargo.toml +++ b/fhevm-engine/Cargo.toml @@ -17,7 +17,7 @@ prost = "0.13" rayon = "1.10.0" serde = "1.0.210" sha3 = "0.10.8" -tfhe = { version = "0.9.0", features = ["boolean", "shortint", "integer", "zk-pok", "experimental-force_fft_algo_dif4"] } +tfhe = { version = "0.10.0", features = ["boolean", "shortint", "integer", "zk-pok", "experimental-force_fft_algo_dif4"] } tokio = { version = "1.38.0", features = ["full"] } tonic = { version = "0.12", features = ["server"] } tracing = "0.1.40" diff --git a/fhevm-engine/coprocessor/src/tests/random.rs b/fhevm-engine/coprocessor/src/tests/random.rs index 17b67056..cc773b43 100644 --- a/fhevm-engine/coprocessor/src/tests/random.rs +++ b/fhevm-engine/coprocessor/src/tests/random.rs @@ -116,18 +116,18 @@ async fn test_fhe_random_basic() -> Result<(), Box> { let decrypt_request = output_handles.clone(); let resp = decrypt_ciphertexts(&pool, 1, decrypt_request).await?; let expected: Vec = vec![ - DecryptionResult { value: "false".to_string(), output_type: 0 }, - DecryptionResult { value: "4".to_string(), output_type: 1 }, - DecryptionResult { value: "148".to_string(), output_type: 2 }, - DecryptionResult { value: "39060".to_string(), output_type: 3 }, - DecryptionResult { value: "3116406932".to_string(), output_type: 4 }, - DecryptionResult { value: "16744062003802314900".to_string(), output_type: 5 }, - DecryptionResult { value: "44953030667788789807801163478489667732".to_string(), output_type: 6 }, - DecryptionResult { value: "699788072547873193368126953957374377199048628372".to_string(), output_type: 7 }, - DecryptionResult { value: "18290830408818269326783511394560190581841753203314111201154159834111735273620".to_string(), output_type: 8 }, - DecryptionResult { value: "1769040210829320620035371975763208287159504590317173624997132562186133182915910315329508293705545243792383240992549293826572438247391861630912169190135956".to_string(), output_type: 9 }, - DecryptionResult { value: "22989541611278360860317607085321234262476959622429178478308114566779950875293498998603742120438063467358496867879955578556491855528439833101173555335758726877695751949613732825582850312467922902141927670800114686022716185629565391201179999715726886895662862992307149483228306419275997167463869911273658423444".to_string(), output_type: 10 }, - DecryptionResult { value: "11416014595749681729513000062974489717332577819997864686142230359454232238264792773250893798270837445400356607589296759837330430218211296049670295480026281165659278432024204167404453215564579545011238956721728258299506154112994566209651361789234724005154439702784336410251188832231630832913285047561498057692981059809933095267618636935634867995375450484916706150926926865716366559640611873269923085322552883512574825770541008027885062573259361484934666788450768469315411342918093486180912626492755165617295077344605564323989831779802237230520718702699705619375496850673508054983765355058977658387840597943659895232660".to_string(), output_type: 11 } + DecryptionResult { value: "true".to_string(), output_type: 0 }, + DecryptionResult { value: "2".to_string(), output_type: 1 }, + DecryptionResult { value: "178".to_string(), output_type: 2 }, + DecryptionResult { value: "14770".to_string(), output_type: 3 }, + DecryptionResult { value: "3233298866".to_string(), output_type: 4 }, + DecryptionResult { value: "14612480407908137394".to_string(), output_type: 5 }, + DecryptionResult { value: "237341639434117301949087796196011424178".to_string(), output_type: 6 }, + DecryptionResult { value: "963123578337087940297602368436260272041228777906".to_string(), output_type: 7 }, + DecryptionResult { value: "4957159431224693793635339084646955011298500432818337630852092398857805642162".to_string(), output_type: 8 }, + DecryptionResult { value: "4273313508171339583832544762733351218893742780063352150052771784030182678151261952648007688185758228439634451766592375629798049346674851354419119309470130".to_string(), output_type: 9 }, + DecryptionResult { value: "147710808730159615890939873041029966358705523918476796360551473211224263374716311378642610380445720764139714191331771559563342278307452243881320765758551233150238014060664160213992760833678010280572160460895656022873333070898090481975964124185236046652639979678922115388738351590210798742932473914295259249074".to_string(), output_type: 10 }, + DecryptionResult { value: "16296031029837480926749218699301227055776806083009811119047674979647284833689081592903436049320655412031510959925234064816165310905500258211391504853839153749946669070701725946853107869887627621985486701964105738157103898322739684866199567823597098153332582435696344805510671844237519839878108950797382621828675803356788564480413402412760527858644546400119874052868832987355781072938125917127259446283139261251620742940397422094439406595073078630085605956483312381099073522390688035728162740142810788566937684999310535339800060223096345147502113221086953295432501391327216431698138260598828856305250139847746494413234".to_string(), output_type: 11 } ]; println!("results: {:#?}", resp); @@ -189,18 +189,18 @@ async fn test_fhe_random_bounded() -> Result<(), Box> { "8079251517827751825178719172167487990111025667428871008032586356881163784716972723299300352880728365922179490230474504873529889787622730273772038096612070780157719341825249022937549437597413026699014409596016892069198054660654939040459523584619042617645411463009076260721893972885266452151888099780982596380478583347417085605171243696641142373714044008831580514519451414832756548177115078537564648216044279181485900929615464339399587788075411476100924403308321807806781421177705052431289275431732830867419635645164174483761499317088249659553881291597359333885900533858307401161329619651238037048388963402764899057664", ]; let results = [ - "false", - "0", - "84", - "6292", - "968923284", - "2909003948520151188", - "44953030667788789807801163478489667732", - "334412663215147463817205745778303622285065492628", - "18290830408818269326783511394560190581841753203314111201154159834111735273620", - "1769040210829320620035371975763208287159504590317173624997132562186133182915910315329508293705545243792383240992549293826572438247391861630912169190135956", - "22989541611278360860317607085321234262476959622429178478308114566779950875293498998603742120438063467358496867879955578556491855528439833101173555335758726877695751949613732825582850312467922902141927670800114686022716185629565391201179999715726886895662862992307149483228306419275997167463869911273658423444", - "3336763077921929904334280890807001727221552152568993678109644002573068453547820049951593445390109079478177117358822254963800540430588565775898257383414210385501559090198955144466903777967166518312224547125711366230308099452339627169191838204615681387509028239775260149529294859346364380761396947780515461312502476462516009662447393238993725621661406476085125636407475450883610011463496794732358437106508604331088924840925543688485474785183950008833742385142446661508629921740388433749623351061022334749875441699441389840228332462713987570966837411102346285489596316815200653822435735407739621339451634540894996174996", + "true", + "2", + "114", + "14770", + "12073394", + "777422352625973682", + "67200455973648070217400492480127318450", + "232372759671636481195759952078118762213262506418", + "4957159431224693793635339084646955011298500432818337630852092398857805642162", + "921361525685690308939038513181889687023901324915253805621881423099741670632875208447539113644032371517126487219970862916359578643688208867810707057949106", + "12883823615485922811241983731853111337357250497803803405478912342924756520590589029111252388640068748299628781428226541319249951696639777011685192778945639866912093992015046256766096132743439690982348246831901696244720059141243320870529291279615618780127096665482391708777917136351011514305956667077091146162", + "137527994181977276391780354966251075554754748152069102982502265884957264255136146304835343559198680187151979464285055069105531330254797663847428660615012189631230387051227900978008994692801568587457882772071954018707789001429806785280520654359012918041759509678192284066883898466986935574332751235417429067718636661954393270070915019478243111216458382456713023829930157690267976583895760052130149851050702888648941081166493415640231018922255677883757149866668765485510680035277930865584189279345126832098413708982186372277061588919845828394350637892234627660700323610601629375479021296352782208472213042216696297906", ]; for (idx, the_type) in supported_types().iter().enumerate() { diff --git a/fhevm-engine/fhevm-keys/cks b/fhevm-engine/fhevm-keys/cks index ac71652e..33bf1b61 100644 --- a/fhevm-engine/fhevm-keys/cks +++ b/fhevm-engine/fhevm-keys/cks @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:96641d863f09e255a20cc0063bfc7387bcc889fec86b2795746d70198d31de7c +oid sha256:37c1ac50d4fa70d649ea63d0448011d7415d3960cecfec3338a3e6e5b6ba2f24 size 40505 diff --git a/fhevm-engine/fhevm-keys/pks b/fhevm-engine/fhevm-keys/pks index 765ab5e5..03c07efd 100644 --- a/fhevm-engine/fhevm-keys/pks +++ b/fhevm-engine/fhevm-keys/pks @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8d2925ab56e1ccdcd4eae1f2d5f7c4ffd9c52fa26975fd6f10503a84ff445b64 +oid sha256:f89ddc3aae6a4d405d2b21d412e7087b82f5512ae8b5a3d0e7289f91f8a415a0 size 16626 diff --git a/fhevm-engine/fhevm-keys/pp b/fhevm-engine/fhevm-keys/pp index e9bd04db..d091e47f 100644 --- a/fhevm-engine/fhevm-keys/pp +++ b/fhevm-engine/fhevm-keys/pp @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3dc0fe0b20395120089601d0bca6d29350bb9d47e126a9a734b027f4d4a306c9 +oid sha256:be191391db01f4695caaedf67405244980c6a6251cb5fa2fa504b99ceb235437 size 49547396 diff --git a/fhevm-engine/fhevm-keys/sks b/fhevm-engine/fhevm-keys/sks index f9af702a..af2930b6 100644 --- a/fhevm-engine/fhevm-keys/sks +++ b/fhevm-engine/fhevm-keys/sks @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9b2eb0053055ca48a0baa7fb1b4e104a362ae2a872bec39863b1b4e095c5ce0c +oid sha256:41f66a4f8d49dd7e55fc31d986bbec27ed1097e6ab34b39785befcb4a438fea6 size 318304627