Performance improvement of ckb hard fork:take ckb-zkp as an example

run sec-bit/ckb-zkp: Zero Knowledge Proofs Toolkit for CKB default benchmarks.

before hardfork

use bls12-381 curve

  • groth16 verify: cycles: 121139970

  • universal_plonk_verifier verify: cycles: 189202372

  • clinkv2 kzg10 verify: cycles: 241539758

  • marlin verify: cycles: 601548430

  • bulletproofs verify: cycles: 996494446

  • spartan nizk verify: cycles: 1034788705

  • hyrax_zk_linear_gkr verify: cycles: 1938103240

  • libra_zk_linear_gkr verify: cycles: 2114541755

  • clinkv2 ipa verify: cycles: 2386015183

  • spartan snark verify: cycles: 2513332581

use bn254 curve

  • groth16 verify: cycles: 85147147

  • universal_plonk_verifier verify: cycles: 109228598

  • clinkv2 kzg10 verify: cycles: 138669704

  • marlin verify: cycles: 328178484

  • bulletproofs verify: cycles: 469171738

  • spartan nizk verify: cycles: 495616674

  • hyrax_zk_linear_gkr verify: cycles: 913890633

  • libra_zk_linear_gkr verify: cycles: 1011346315

  • clinkv2 ipa verify: cycles: 1069799886

  • spartan snark verify: cycles: 1169999978

after hardfork

use bls12-381 curve

  • groth16 verify: cycles: 106577254

  • universal_plonk_verifier verify: cycles: 159745129

  • clinkv2 kzg10 verify: cycles: 207664447

  • marlin verify: cycles: 509743969

  • bulletproofs verify: cycles: 815584726

  • spartan nizk verify: cycles: 852450659

  • libra_zk_linear_gkr verify: cycles: 1741574549

  • hyrax_zk_linear_gkr verify: cycles: 1592546146

  • spartan snark verify: cycles: 2063051258

use bn254 curve

  • groth16 verify: cycles: 77500326

  • universal_plonk_verifier verify: cycles: 95531385

  • clinkv2 kzg10 verify: cycles: 123828593

  • marlin verify: cycles: 289284425

  • bulletproofs verify: cycles: 394492938

  • spartan nizk verify: cycles: 419662019

  • hyrax_zk_linear_gkr verify: cycles: 772793942

  • libra_zk_linear_gkr verify: cycles: 856489545

  • clinkv2 ipa verify: cycles: 899955033

  • spartan snark verify: cycles: 988545640

The hard fork has brought more than 10% performance improvement.

6 Likes