1

The 2022 tracking issue for Substrate benchmarks mentions that Polkadot uses this reference hardware of this specification to generate weights:

Reference Hardware

The transaction weights in Polkadot are benchmarked on reference hardware. We ran the benchmark on VM instances of two major cloud providers: Google Cloud Platform (GCP) and Amazon Web Services (AWS). To be specific, we used c2d-highcpu-8 VM instance on GCP and c6id.2xlarge on AWS.

  • CPU
    • x86-64 compatible;
    • Intel Ice Lake, or newer (Xeon or Core series); AMD Zen3, or newer (EPYC or Ryzen);
    • 4 physical cores @ 3.4GHz;
    • Simultaneous multithreading disabled (Hyper-Threading on Intel, SMT on AMD);
  • Storage
    • An NVMe SSD of 1 TB (In general, the latency is more important than the throughput.)
  • Memory
    • 16GB DDR4 ECC.
  • System
    • Linux Kernel 5.16 or newer.

Parachains need to gauge precisely how much time they will consume for their proof of validity with the relay chain for each state transition. This is a hard limit AFAIK for now, that s about 1/6th of the total block time on the relay IIRC.

It is unclear if a parachain must use this same hardware to generate weights. I would think so, based on the hard PoV requirements.

  • Can parachains decide on arbitrary reference hardware to benchmark against?
  • [If so] How can one ensure they are limiting their total weight such that all possible conditions will be within the PoV weight limits?

1 Answer 1

3

Can parachains decide on arbitrary reference hardware to benchmark against?

No, they must use the same hardware as the relay chain, which is the hardware recommendations you pasted above. Technically they could use weaker / slower hardware, but this benefits no one.

Ultimately the bottleneck for parachain execution comes from the validators on Polkadot. If a parachain block is too heavy such that a Polkadot validator cannot process the block in time, it will be rejected. If a Parachain would use a super computer, it could of course fit a huge amount of weight into a small period of time, but then Polkadot validators would not be able to process that same block fast enough. Selection of validator hardware is an important part of decentralization and costs, as selecting more powerful hardware can limit who has access to, or can afford to run that hardware.

How can one ensure they are limiting their total weight such that all possible conditions will be within the PoV weight limits?

They should simply run their benchmarks on the same hardware as recommended. There is nothing else a parachain team can do here, as even execution of the same code multiple times on the same machine may result in slightly different timings.

To sanity check their benchmarks align with what is expected, they can use common pallets / benchmarks and check it against Polkadot. For example the Balances pallet, or the "baseline" benchmarks included with the benchmarking pallet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.