guydavis/machinaris

Support fullnode-no-wallet mode

antcasq opened this issue · 3 comments

Describe the request
I would like to start Machinaris without the wallet process and simply use the cold wallet to keep track of the rewards.

Machinaris already supports displaying the cold wallet coin amount and updates it regularly. From my understanding chiadog will detect the farmed/winner block and announce it in the alarms.

So if I could get rid of the wallet process I would be able to save additional computational resources and RAM, that could be used to farm more forks or run machinaris in a less powerful PC :)

Additional comments
It is somehow related to the request #747 of Machinaris being even more flexible.

From my understanding, the first approach implementation consists of simply change the "xpto_launch.sh" files and see what breaks :)

# Start services based on mode selected. Default is 'fullnode'
if [[ ${mode} == 'fullnode' ]]; then
  chia start farmer
elif [[ ${mode} == 'fullnode-no-wallet' ]]; then       <====
  chia start farmer-no-wallet                                 <====
elif [[ ${mode} =~ ^farmer.* ]]; then
  chia start farmer-only
elif [[ ${mode} =~ ^harvester.* ]]; then
  if [[ -z ${farmer_address} || -z ${farmer_port} ]]; then
    echo "A farmer peer address and port are required."
    exit 1
  else
(...)

For my own notes on this request:

image

This is now supported in machinaris:develop images. Visit the Wallets page and click the Settings icon. As before, by default the wallet runs Always. However, it is now possible to set a wallet sync frequency, including Never.

image

When an infrequent time such as "Once a Day" is choosen, Machinaris will spread out the start/pause time for each blockchain's wallet in an attempt to minimize the maximum memory usage of all Machinaris containers on the system. Goal for a small farmer with limited memory is to allow for more blockchains to be farmed concurrently, with their wallets mostly (but not always paused).

NOTE: Each time the Sync Wallet setting is Saved, all running Fullnodes will have that choice set, and it will be immediately honored, as well on next container launch. So it should be possible to slowly increase number of running fullnodes, setting each one to sync infrequently.

Finally, one can now, from the Machinaris WebUI:

  • Restart the entire blockchain (farmer, harvester, wallet (if enabled), and fullnode)... all from the Blockchains page, Status column.
  • Start/Pause just the blockchain wallet on demand... all from Wallets page, Status column.

This feature is still being tested. All feedback is appreciated.

This is now available in v0.8.4. Thanks for the suggestion!