Open rodolfomiranda opened 1 month ago
We may encounter the infinite loop also in:
Receiptor
WitnessReceiptor
WitnessInquisitor
WitnessPublisher
TCPMessanger
TCPStreamMessanger
HTTPMessager
One option may be to pass a timeout value to those clases to kill loops after a while.
Version
all
Environment
Witness Deployment
Expected behavior
When
Receiptor
sends events to the list of witnesses, it should try to communicate with all witnesses even if one of them is unresponsive.Actual behavior
Current logic in
Receiptor
https://github.com/WebOfTrust/keripy/blob/6b6970be92d851f94e58b7a9f4225a81582d2235/src/keri/app/agenting.py#L90-L110 keeps in an infinite loop in line 96 if one witness is unresponsive, preventing the loop over witnesses (line 90) to iterate to the rest. Ideally the client should timeout, instead it tries forever, at least using demo witnesses. One option is to add a timeout in line 96.Steps to reproduce
Create a single sig AID with
toad=1
and two witnesses , with one of them disconnected.Using
kli incept
with the--receipt-endpoint
flag forces to use theReceiptor
. It can reproduced with the following steps1- start demo witness
kli witness demo
2- init and resolve to witness oobis, one from the demo wits and one on the cloud3- test incepting with toad=1 and both witnesses up
4- stop demo witnesses (ctrl-c) 5- incept a new aid
Note that no receipts were received even though one witness is up and toad=1 6- incept a new aid with the witnesses in different order
Note that now 1 receipt is received because the witness that is up is first in the loop.