FhenixProtocol / fheos

FheOS is a modular layer that allows the blockchain to execute encrypted computations powered by FHE
Other
16 stars 9 forks source link

Add a cache for the NetworkPublicKey in FheOps and force GetNetworkPublicKey to utilize it #102

Closed milan-sedivy closed 2 months ago

milan-sedivy commented 3 months ago

monday: https://fhenix.monday.com/boards/1216577959/pulses/1509272057

Still need to test it, hence only draft pr

milan-sedivy commented 2 months ago

Appears to work now, the way I tested it was to deploy via remix and call the precompile and observe the console. INFO [2024-05-26T09:49:26Z] Got a get_public_key request from Some(127.0.0.1:45924) Appeared only once. Hinting that it reached the rust code only once.

Additionally I tried reloading Remix and calling the function in the contract with the precompile again.

I'm not a Go expert, so please double check me in review :)