Script for running multiple versions of Post service.exe
Intended to be used alongside running go-spacemesh in a 1:N configuration.
Allows for multiple post directories to be used from one 'service.exe'
The script starts by calculating the next Cycle Gap, (by default using standard 12hr POET)
It will then sleep until that time.
The script will then start 'service.exe' with the user configured arguments, adjusted for each set of POST data.
It will then use 'grpcurl.exe' (source newest version yourself) to monitor the status of the proving, and upon confirmation of the node accepting the proof;
The script will then end that instance of 'service.exe';
Then move onto the next set of Post Data and arguments for 'service.exe';
Running untill all instances have finished;
It will then calculate the time to the next default POET 12HR Cycle Gap start time;
And sleep until the next Cycle Gap, when it will start the process again.
The script should display all information in the users local time zone.
I originally came up with the idea for making this script when I saw that the 26 SU plot on my miniPC finished in just a couple hours,
so in theory I could handle proving a lot more data in the 12 hour cycle gap.
So I wanted to maximize what my miniPC could prove, but I couldnt expand its internal NvMe drive any more than it currently is, nor can I increase it's 16gb of ram.
So with these limiting factors in mind, I decided that going with a 1:N setup with multiple sets of POST Data was my best option...
BUT having only 16 gb of RAM, my miniPC would not be able to handle running multiple versions of service.exe at a time.
So my solution was creating this, Badbake's Multi-Post-Tato-Masher!
So if you are like me and are trying to do a LOT with a little! This script might be for you!
Please Take Note: I built this for my personal use. I tried to make it a user-friendly type script that I could share with others that might need it. As such I just want to state I am not responsible for your usage of this script if you choose to use it yourself.
Download/Git both the Masher_Config.ps1 and the most recent version of the Multi-Post-Tato-Masher.
Place both files in Node directory. (could vary based on your setup, more advanced users will need to tweak some stuff.)
Suggest getting and editing using Notepad++ but can be edited with whatever text editor you use.
- Open 'Masher_Config.ps1' in a text editor.
- Set which POET Cycle you want used. 0 for Default12HR is set by default
- Change all Post Data settings to match your particular use case. Add/Remove Post Services as needed. For example, my 1:N setup.
- (OPTIONAL) You can also set the log level displayed both on the console and also in the output log file. You can also choose to save the service.exe log files if you choose. Also you can adjust the interval at which the script checks the node/proving.
- Ensure you have enabled script execution permisions for remote scripts. Unblock/Unlock both .ps1 files. Node must be running (there is no logic yet for checking this, it is built assuming node is running)
- In 'Masher_Config' Make sure location of grpcurl.exe and the PostService executable (service.exe/PostService.exe) is correctly set for your file structure setup.
- Run 'BadBakes_Multi_Post-tato_Masher__V*_MainNet.ps1'
- If properly configured it should check to see if any of the post data sets you configured in Step 2 return "PROVING" from the node, if they do (new data set or script started during CG) it will run those instances of that POST data set.
- Otherwise if none are found requiring a proof, it will calculate the time to the next Cycle Gap and display the time and date and remaining time until.
- Once the Cycle Gap is reached, the script will start and run each set of Post data set in Masher_Config, 1 at a time, allowing each to complete proving and it being accepted by the node.
- During Proving, It will display if the proof is in k2pow stage or Post Data Read %, if multiple passes are required it will display that as well.
- Once it confirms the node has accepted the proof, it will close that instance of service.exe and move onto the next set of Post Data. Until all have completed.
- Once all have been ran, the next cycle gap is calculated and the cycle repeats.