-
Notifications
You must be signed in to change notification settings - Fork 2
Running a Timelord
To run a timelord, you will need Mac OS or Linux. You will also need to install STAI from source.
In the virtual environment (entered after running . ./activate
), run the following command:
sh install-timelord.sh
You can see how fast yours is per thread with:
./vdf_bench square_asm 40000
You may want to change the number of processes the timelord will utilize. The setting for it is under timelord_launcher
> process_count
. For example, if you have an 8 core/16 thread CPU and want to utilize the whole thing, set process_count
to 8
, and all 16 hardware threads will be used.
To start the timelord, run:
stai start timelord
To stop the timelord without stopping the full node, run:
stai stop timelord-only
stai stop timelord-launcher-only
A bluebox timelord compacts random proofs so that they take up less space, therefore reducing the space taken up by the blockchain database on many peers' nodes. To run a bluebox instead, make the following changes to config.yaml
:
- Under
timelord
, setbluebox_mode
toTrue
. - Under
full_node
, setsend_uncompact_interval
to a value greater than 0. This is the interval in seconds the full node will send uncompacted proofs to the bluebox timelord. A value of300
is recommended.
Once, that's done, starting the timelord will cause it to run as a bluebox.
To see if your bluebox is working, set log_level
to INFO
. The bluebox will log VDF Client: Sent proof
for every compacted proof it sends out. You can count the number of logged proof compactions by running grep "Sent proof" ~/.stai/mainnet/log/debug.log | wc -l
.
Chia and forks like STAI don't officially support running both timelords on the same system, but it should be possible in theory. This method requires a separate mainnet directory. We'll use ~/.stai/bluebox
for our example. It is assumed the full node, regular timelord and other services like the farmer, harvester and wallet are started in the usual manner.
- You will need a separate terminal session for the bluebox timelord. This could be another terminal window/tab or a
tmux
session. - Run
export STAI_ROOT=$HOME/.stai/bluebox
. This will only apply to the current terminal session. - In the same terminal session, enter the virtual environment.
- Run
stai init
to generate the bluebox's mainnet folder. - In the newly generated
config.yaml
, in addition to the usual changes required for a bluebox, make the following port changes:-
daemon_port
to something unused. -
timelord
>port
to something unused.
-
- Start the bluebox with:
stai start timelord-launcher-only
stai start timelord-only
- To stop the bluebox, run the following commands in the same terminal session:
stai stop timelord-only
stai stop timelord-launcher-only
The next time you want to start the bluebox, simply repeat steps 1, 2, 3, 6 and 7.