-
Notifications
You must be signed in to change notification settings - Fork 71
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
Build into Indy VDR the "best practices" around getting, caching and updating a pool #240
Comments
@andrewwhitehead @cvarjao @jleach @WadeBarnes -- did I get that right? |
One thing to add. The pool transactions can also define a change to other node settings such as a node's IP address(es) and port information without affecting the node's role on the network. Therefore it is important the resulting cached summary of the pool reflect the current state of all of the nodes on the network. |
If we are looking for Indy VDR to still be a library without storage, we could modify the interface to provide better caching of results. If Indy VDR has an automated refresh, perhaps we expose the results by being able to ask for the updated results before the agent shuts down. It would simplify the workflow for the agent. Provide the cache on startup, before shutdown, fetch the updated list and store in cache. This would simplify the interface to indy vdr. So the workflow would look like.
Alternatively, IndyVDR would have a callback to notify the agent of an updated cache.
Indy VDR has a problem on startup if it can't connect with enough nodes. I think it by default tries to connect to at least half of the nodes? If enough nodes aren't available at startup, it can lead to failure, even if other nodes in the network are available. With an outdated genesis file, this could be problematic. Keeping the genesis file up to date can avoid this, but perhaps a small change to the algorithm may be helpful. If a node is unavailable, Indy VDR should probably try to contact other nodes instead of failing, when some nodes are unavailable. I've seen this with aca-py with a smaller genesis file ( 4 nodes, with 1 or 2 no longer available ). The right behavior from a network perspective is to correct the genesis file, but an adaptation to Indy VDR would be to contact additional nodes instead of crashing. An alternative algorithm on startup would be to connect to more nodes than requested, and when the required number of nodes are connected, disconnect the remaining nodes. This would encourage the mobile agent to use the fastest responding nodes. |
The (opt-in) genesis transactions cache is addressed in #243. Subsequent work could look at automatically triggering a refresh when a change in the pool state root hash is detected. |
I think opt-out would be better. What do you think? I think it makes sense it just happens. |
The tricky part there is just automatically finding a writable cache directory. It's fairly easy on say, a Windows machine, but there are circumstances where that might be more difficult (on mobile devices, or on Github actions for example). I'm not sure if it's appropriate at this level or not. |
OK — sounds good. |
After meeting to discuss #239 (more outputs from that meeting to be produced), we agreed that some updates to Indy VDR should be made to relieve the wrapper or caller (e.g., ACA-Py, AFJ, etc.) from having to implement the management.
The following items should be added to Indy VDR to simplify pool management:
The knowledge of the caller and wrapper about the pool cache should be "minimized". We'll update this description to define what "minimum" means.
The text was updated successfully, but these errors were encountered: