Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade tfhe 0 10 0 #195

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions fhevm-engine/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion fhevm-engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
48 changes: 24 additions & 24 deletions fhevm-engine/coprocessor/src/tests/random.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,18 +116,18 @@ async fn test_fhe_random_basic() -> Result<(), Box<dyn std::error::Error>> {
let decrypt_request = output_handles.clone();
let resp = decrypt_ciphertexts(&pool, 1, decrypt_request).await?;
let expected: Vec<DecryptionResult> = 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);
Expand Down Expand Up @@ -189,18 +189,18 @@ async fn test_fhe_random_bounded() -> Result<(), Box<dyn std::error::Error>> {
"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() {
Expand Down
2 changes: 1 addition & 1 deletion fhevm-engine/fhevm-keys/cks
Git LFS file not shown
2 changes: 1 addition & 1 deletion fhevm-engine/fhevm-keys/pks
Git LFS file not shown
2 changes: 1 addition & 1 deletion fhevm-engine/fhevm-keys/pp
Git LFS file not shown
2 changes: 1 addition & 1 deletion fhevm-engine/fhevm-keys/sks
Git LFS file not shown
Loading