regolith-labs / ore-cli

Command line interface for ORE miners.
1.46k stars 658 forks source link

Adding setup.sh script #54

Closed Algorhythmic1 closed 1 month ago

Algorhythmic1 commented 5 months ago

Setup script walks users through setting up an appropriate number of miner accounts, backing up keys, and funding them for fees. Probably need advice on optimal parameters. I've chose as default one miner per cpu core - 2 to leave room for other processes . The script generates that number of solana accounts, numbered 1 through n, stores their keys in the default location, tars them up and copies them to ~. It then asks the user to fund the first account, calculates how much SOL they'll need to fund it with in order disburse to the remaining accounts. It then sends it to all the rest, with up to 5 retries. At the end it prints a report of which pubkeys associated with which private keys have which balances.

Algorhythmic1 commented 5 months ago

Ok, I've cleaned up a lot of the code and organized it into discrete functions, implemented more flexibility in how many miner accounts the user wants to create and improved the clarity of the instructions to the user.

Algorhythmic1 commented 5 months ago

Just added an ore_miner_controller.sh script and an ore_miner_controller.config file to store settings for the script. It contains 10 functions: 1) Check settings 2) Start miners 3) Stop miners 4) Set RPC provider 5) Set number of threads 6) Set priority fee 7) Check balances 8) Collect all ore 9) Display miner status 0) Exit All functions are working, but it needs further testing.