Block composition benchmark

Neptune relies on the zero-knowledge STARK VM called Triton VM. To send transactions and to create new blocks, you have to create STARK proofs of a certain size. This size is measured in the length of the execution trace rounded up to the nearest power of two. To construct a block proposal, a block without a proof-of-work solution, you currently have to do the following work:

  1. prove a coinbase transaction
  2. If no transaction in mempool: construct an empty transaction
  3. merge coinbase with transaction from mempool
  4. verify the transaction proof in the block program

If there are synced transactions in the mempool, step 2 can be skipped.

The execution trace length (AKA padded height) of each proof is:

  1. 2^{21} for coinbase
  2. 2^{21} for empty transaction
  3. 2^{20} for merge
  4. 2^{19} for block program

When softfork epsilon activates, more proving work will be required to construct a block proof. But the sizes of those new proofs will also be 2^{21} and 2^{20}.

Benchmarks

AMD Ryzen Threadripper PRO 7995WX 96-Cores

Padded height Time [s]
2^{19} 3.9
2^{20} 7.3
2^{21} 14.1

AMD Ryzen 9 9900X3D 12-Core Processor

Padded height Time [s]
2^{19} 10.7
2^{20} 22.6
2^{21} 53.3

With a transaction in the mempool, a block composition can thus be made in 14.1s + 7.3s + 3.9s = 25.3s on a Threadripper 7995wx.

Building a proof with padded height 2^{21} the fastest way possible requires 106GB RAM.

1 Like