Replies: 4 comments 2 replies
-
When I wrote a scenario that required multiple things to happen at the same time I just span up a bunch of threads in the scenario. Seemed to work. Distributed running of tasks does sound great but it would add some complexity such as monitoring and communication back to a controller (are tasks truly going to be fire and forget?). Does threading in the RPC pod's scenario get us there? |
Beta Was this translation helpful? Give feedback.
-
As Max mentioned, using threads from rpc-0 seems like it would work pretty well for this. If we end up with many threads, I like the idea of experimenting with asyncio. To push some functionality out into the nodes, my gut tells me that allowing some kind of simple bash script functionality like Will's #272 combined with optional sidecars for more complex functionality. |
Beta Was this translation helpful? Give feedback.
-
If threads are not sufficient, of the two options presented, I like the idea of a warnet container in remote / distributed mode with the full python stack and testing helpers. |
Beta Was this translation helpful? Give feedback.
-
Threads seems to be working well: #395 |
Beta Was this translation helpful? Give feedback.
-
Currently, scenarios execute RPC commands in order, blocking, from a central pod. Ideally, some if not all tanks can act somewhat autonomously, in addition to the coordinated central rpc-0 scenarios. Double-ideally, a central scenario can "launch" a series of behaviors in tanks.
Here's some possible strategies:
1. Write a bash script with bitcoin-cli commands, exec into the tank, write the file, and execute it
2. Rebuild the tank image WITH python and the bitcoind/warnet
test_framework
package, send warnet scenarios written in python to tanks3. Add a sidecar container to every tank pod with python, and the
test_framework
package(2) and (3) will also require some fiddling with the warnet test framework /
test_framework_bridge.py
or perhaps just another subclass like our current bridge but specifically only interacts with one single node. In fact, we might be able to ditch the framework altogether and just useTestNode
. Nice thing about any of these strategies is we can use hard-coded rpcuser, rpcpassword and rpcport values because all tanks have the same settings.Related:
#272
#390
Beta Was this translation helpful? Give feedback.
All reactions