Weights are generated in a machine with the minimum specs required by a Watr collator: 4 vCPUs @ 3.1GHz | 16 GiB memory
-
Connect via ssh to your benchmarking machine
ssh <user>@<machine_ip>
-
Make sure no one else is using the machine with
htop check
-
If it is the first time you run the benchmarks, you will need to clone the repository
git clone https://github.com/Watr-Protocol/watr.git
-
Checkout to the branch to benchmark (usually
main
)git checkout main
-
Compile
cargo build --release --features runtime-benchmarks
-
From the root directory run
nohup ./scripts/benchmarks.sh &
(it will take quite a few hours) -
To spot some possible issues, the
nohup.out
file can be checked from time to time:tail -f 100 nohup.out
-
In your local machine, checkout to
main
when the benchmark is finished and you got the new weight files. -
scp
the weights from the benchmarking machine to your local machine fordevnet
andmainnet
:/runtime/devnet/src/weights
/runtime/devnet/src/weights
Example:
scp -r <user><machine_ip>:/home/<user>/watr/runtime/devnet/src/weights <absolute_path_to_watr_repo>/runtime/devnet/src scp -r <user><machine_ip>:/home/<user>/watr/runtime/mainnet/src/weights <absolute_path_to_watr_repo>/runtime/mainnet/src
-
Commit the changes in your local and create a PR
-
Review the PR and make sure all the new generated weights make sense (not too high/low compared to previous weights, 15% variance is acceptable)