nucypher / nucypher-porter

Gateway to TACo nodes of the threshold network
GNU Affero General Public License v3.0
2 stars 8 forks source link

Error on `retrieve_cfrags` for multiple `retrieval_kits` #23

Closed ghardin1314 closed 1 year ago

ghardin1314 commented 1 year ago

When making a call to the community testnet porter at https://porter-tapir.nucypher.community/retrieve_cfrags with more than ~2-3 retrieval_kits I get a lot of the following errors:

RuntimeError: Ursula ((Ursula)⇀LightBlue Charlie LavenderBlush Mike↽ (0xcbE2F626d84c556AbA674FABBbBDdbED6B39d87b)) seems to be down while trying to complete ReencryptionRequest: <nucypher_core.ReencryptionRequest object at 0x7fc6cc11ac10>

Is this a limitation of the testnet porter?

Also it seems to work much better if I make parallel requests with a single retrieval_kit but not sure if that is intended behavior

derekpierre commented 1 year ago

@ghardin1314 is this consistently happening across multiple days, or was it just a temporary blip in connectivity?

ghardin1314 commented 1 year ago

@derekpierre still happening consistently when attempting to use 3 or more retrieval_kits

derekpierre commented 1 year ago

@derekpierre still happening consistently when attempting to use 3 or more retrieval_kits

Ok. @ghardin1314 Can you dm me (Discord), or send me a private gist of your JSON requests being used; the ones with multiple retrieval_kits?

derekpierre commented 1 year ago

I think I've narrowed this down to being a timeout issue. There is a timeout of 2s (probably too small for multiple retrieval kits) for completion of re-encryption requests (call to /reencrypt endpoint) via middleware. Let me think a little about remedies. In the meantime, you can work around it byt sending 1-2 retrieval kits at one time.

derekpierre commented 1 year ago

cc @KPrasch . A change like this is one of reasons for possibly keeping branches for lynx, tapir, oryx - mentioned here, https://github.com/nucypher/nucypher/pull/3069#issuecomment-1454798019.