Skip to content

Tunings for VDF verify

voidxno edited this page May 7, 2024 · 2 revisions

Nodes needs to verify VDF streams from fastest timelord. If warnings of VDF verification took longer than recommended. As it says, node is taking too long to perform calculations. Here are some recommendations that could help.

TLDR;

  • Warnings of VDF verification took longer than recommended
  • Recommended to be less than ~5sec, half of block time
  • Verify with GPU/iGPU if possible, WebGUI setting
  • Turn off verify of timelord rewards, WebGUI setting
  • Enable verify_vdf_cpuopencl, config file setting

Case

Warnings of VDF verification took longer than recommended on node. System, as configured, is not able to handle current VDF speed of network. Too low-powered, not optimally configured, tunings might help. Go through steps below, see if improves situation.

Step 0 - Basics & status of mmx-node

Usually 3x VDF streams are created by fastest timelord in network.

They need to be verified by nodes in network within ~5sec, half of block time. Block time can vary, if network speed changes (fastest timelord). Network will however normalize back to 10sec block time.

Verify calculations can be done by GPU/iGPU (OpenCL) or CPU. Recommended to be GPU/iGPU, usually more powerful and power efficient. CPU is possible, but needs to be newer models with SHA extensions (Intel 11th-gen, AMD Zen, or later, a few exceptions).

Status to read from mmx-node:

  • Network Speed: Value shown in WebGUI / NODE section, as VDF Speed.
  • WebGUI / NODE / LOG / TERMINAL:
    • Verified VDF for height x, delta = x.x sec, took x.x sec (with reward)
    • Verify VDF Time: Value 'took x.x sec' in line above.
    • With Reward: If '(with reward)', 3x VDF streams verified, else 2x.
  • Log files (startup entries):
    • Linux: ./mmx-node/testnetX/logs/
    • Windows: c:\Users\<username>\.mmx\testnetX\logs\
  • Look at latest startup entries:
    • SHA extensions support (CPU):
    • 20yy-mm-dd hh:mm:ss [mmx_node] INFO: SHA-NI support: yes
    • GPU/iGPU found, and used for VDF verify:
    • 20yy-mm-dd hh:mm:ss [mmx_node] INFO: Using OpenCL GPU device [x] x (total of x found)

Step 1 - Is GPU/iGPU enabled and used

GPU/iGPU is usually more powerful to verify VDF than CPU.

Check that mmx-node finds and use GPU/iGPU:

  • WebGUI / SETTINGS:
    • Ensure that intended device is selected in 'OpenCL Device'.
  • Confirm device usage by looking at log file entries (Step 0).

See if verify time is solved. If not, go to next section.

NOTE: Always restart mmx-node for configuration changes to take effect.

Step 2 - Turn off verify of TimeLord rewards

Fastest timelord usually creates 3x VDF streams. Default settings of node will verify 3x VDF streams. Can be adjusted to only verify 2x VDF streams, ignoring 3rd VDF stream (timelord rewards).

For explanation of 3x/2x VDF streams, read this section (other article).

Will not hurt your node, still fully functional. No issue if less powerful nodes choose to not verify 3rd VDF stream. Still, beneficial if nodes powerful enough, leave on default (3x VDF verify).

Turn off verify of TimeLord rewards (3rd VDF stream):

  • WebGUI / SETTINGS:
    • [ ] Verify TimeLord Rewards (disable to speed up VDF verify)

See if verify time is solved. If not, go to next section.

NOTE: Always restart mmx-node for configuration changes to take effect.

Step 3 - Verify with both CPU and GPU/iGPU

Last tuning trick. Can be a solution for certain low-power systems.

  • Required: GPU/iGPU is performing VDF verify (Step 1)
  • Recommended: Turned off verify of timelord rewards (Step 2)
  • Recommended: Have a CPU with SHA extensions (Step 0)

Enable following config file option (VDF verify, CPU and OpenCL):

  • "verify_vdf_cpuopencl": true,
    • Linux: ./mmx-node/config/local/Node.json
    • Windows: c:\Users\<username>\.mmx\config\local\Node.json

Turns on following behavior:

  • 3x VDF streams: 1x on CPU, 2x on GPU/iGPU
  • 2x VDF streams: 1x on CPU, 1x on GPU/iGPU

Not perfect load balancing. Whole VDF streams are verified on either CPU or GPU/iGPU. Depending on power ratio between them, total time taken will vary. Could be better, could be worse.

See if verify time is solved. If not, your system is probably not powerful enough to run an mmx-node. If you think it should be, check that hardware, OS, drivers are set up correctly.

NOTE: Always restart mmx-node for configuration changes to take effect.

Result

Hopefully, at this point, your node is not getting warnings (less than ~5sec).

Be aware though. Current fastest timelord, may not be fastest possible. Often periods in testnet where current fastest timelord is not at maximum potential. Two items that can help. Simple VDF Verify Calculator to estimate max timelord speed an mmx-node can handle. Article with fastest timelord predictions.

Feedback

Other ideas or findings. Share on #mmx-farming channel on Discord.