For the complete documentation index, see llms.txt. This page is also available as Markdown.

VDF

A guide to running a VDF Server

What is VDF?

The VDF (Verifiable Delay Function) controls the speed of mining with new mining "seeds" available at roughly 1 second intervals. To keep up with the network your CPU must be able to maintain this 1 second cadence while calculating the VDF. For that the CPU needs to support hardware SHA2 acceleration. Additional cores will not improve VDF performance as VDF hash calculations are sequential and therefore limited to a single thread on a single core.

The node will report its VDF performance on startup, warning you if it is too low. You can also run ./bin/benchmark-vdf to print your system's VDF performance.

As of May 2024 the fastest VDF calculations observed are on the Apple M2 processor. Packing and mining are not supported on MacOS, but running a node as a VDF server is possible if you build from source. For instructions on building from source see Building from source.

VDF Difficulty

The network VDF difficulty adjusts daily to target an average VDF time of 1 second across all mined blocks. For ease of comparison the VDF performance printed on startup and from the ./bin/benchmark-vdf assumes a fixed difficulty of 600,000. You can expect your actual VDF performance when connected to the network to be lower than the benchmark.

For context the current VDF difficulty is 685,976 (May 2024, block height 1417119). So with a benchmark VDF of 1 second you can expect a network performance of 1.14 seconds (1 second * (685,976 / 600,000)).

VDF Servers

Since VDF is so important to mining performance you may have another machine compute VDF for you. For instance, you may set up a dedicated VDF node broadcasting VDF outputs to all your mining nodes.

Traffic from and to your private VDF node should not be throttled, so you should configure your nodes, and VDF server to whitelist each other by adding them to each others' peers.local list.

On clients that already receive pushes, set vdf.pull = false. Pull is then only used as a fallback for fetching sessions. Otherwise, your client might get rate-limited.

Running a node fetching VDF states from a peer (aka a "VDF client"):

./bin/start --peers.vdf_server IP-ADDRESS ...

Running a node pushing its VDF outputs to other peers (aka a "VDF server") - to list several client peers, put them in a config file:

peers:
  vdf_client:
    - IP-ADDRESS-1
    - IP-ADDRESS-2

Make sure to specify [IP-ADDRESS]:[PORT] if your node is configured to listen on a TCP port other than 1984.

In all cases IP-ADDRESS can also be a resolvable domain name.

When you have multiple clients connecting from the same IP address, raise limiter.get_vdf.leaky_rate_limit. The default rate-limit is set for a single client per IP address.

For an example invocation see Examples.

Make sure every client node is reachable from its VDF servers - they are in the same network or the node has a public IP and the port (the default is 1984) is forwarded if there are firewalls. If the node is launched with the --mining.enabled flag and showing no mining performance reports, it is likely no input comes from the VDF server(s).

The team operates 2 VDF servers that can be used by any miner that wants to:

  • vdf-server-3.arweave.xyz

  • vdf-server-4.arweave.xyz

To configure your miner to use the team VDF servers:

  1. Make sure vdf.pull is set to true (this is the default)

  2. Add the team VDF servers to your peers.vdf_server list:

The number of SHA256 iterations (aka VDF difficulty) required to compute a single VDF step is continually adjusted by the Arweave network in order to target a 1-second step time. You can query the current VDF difficulty by looking at the nonce_limiter_info.vdf_difficuly field of the latest Arweave block (i.e. https://arweave.net/block/current). As of block height 1798684 the vdf_difficulty is 1,107,523 - meaning each VDF step requires 1,107,523 recursive SHA256 hashes.

Last updated

Was this helpful?