NebulousLabs / Sia-Ant-Farm

A tool for setting up small testnets for Sia.
MIT License
24 stars 16 forks source link

add multi-antfarm support #39

Closed avahowell closed 8 years ago

avahowell commented 8 years ago

this PR adds a HTTP API for sia-antfarm, and adds another optional flag to the config manifest: ExternalAntfarms. This is an array of api addresses representing external antfarms that should be connected to on startup. Currently, this just means /gateway/connect is called on each node in the antfarm to connect them manually to a node on the external antfarm.

Note that in most cases, RPC addresses should be manually supplied in the config to avoid connectivity problems.

DavidVorick commented 8 years ago

Probably not worth doing this PR, but now that we've got an API for the anthills, we can probably make a /stop call instead of using os.Interrupt.

DavidVorick commented 8 years ago

oh I guess that would require some method for interacting with the farm heh

DavidVorick commented 8 years ago

siafc

avahowell commented 8 years ago

yeah, I was thinking perhaps antfarmc. sia-ant still doesn't have an API though, meaning it would still need to receive a signal to stop.

DavidVorick commented 8 years ago

So, my thoughs here are that we should:

  1. Get multifarm working across 3+ machines in different countries, prove it works
  2. Bring ant-farm up to general coding standards, e.g. portable, choose-a-dir, clean shutdown, etc.

I'm pretty happy with how the antfarm is going.

avahowell commented 8 years ago

There also needs to be a lot more documentation. What's left for clean shutdown? farm.Close() handles shutting down the API listener and the ant subprocesses.

DavidVorick commented 8 years ago

Cleanshutdown should be using a threadgroup, right now it's piecemeal.