Skip to content

Repository files navigation

DVRF_Verify Hardhat Project

Setup

First, install the project dependencies:

npm install

This project contains DVRF verification contracts plus scripts to deploy and benchmark them.

Common Commands

npx hardhat help
npx hardhat compile
npx hardhat test
npx hardhat run scripts/deploy_dvrf.js

RUNS=1000 npx hardhat run scripts/gas_benchmark_dvrf.js

npx hardhat run scripts/compare_icy_glow.js

npx hardhat run scripts/deploy_dvrf_sepolia.js --network sepolia

npx hardhat run --network sepolia scripts/compare_icy_glow.js
RUNS=1 npx hardhat run --network sepolia scripts/gas_benchmark_dvrf_sepolia.js

Notes:

  • RUNS must be a positive integer for both benchmark scripts.
  • On this Hardhat version, npx hardhat run ... -- <runs> is not supported, so pass runs via RUNS=<value>.
  • For Sepolia deployment, set SEPOLIA_RPC_URL and PRIVATE_KEY in your environment or .env.
  • scripts/compare_icy_glow.js uses debug_traceTransaction, so Sepolia trace comparisons require an RPC that exposes debug tracing.
  • scripts/gas_benchmark_dvrf_sepolia.js writes run artifacts to benchmarks/ (.log + .csv).

Contracts

  • contracts/DVRF_Verify.sol: verification logic for DVRF-related proofs and pairing checks, including benchmark wrapper functions.

Scripts

  • scripts/deploy_dvrf.js: local deployment helper for DVRF_Verify.
  • scripts/deploy_dvrf_sepolia.js: deploys DVRF_Verify to Sepolia.
  • scripts/gas_benchmark_dvrf.js: measures gas usage for benchmark wrapper functions and prints distribution stats (avg, quartiles, range).
  • scripts/gas_benchmark_dvrf_sepolia.js: benchmarks verifyIcy/verifyGLOW on Sepolia and writes .log and .csv outputs to benchmarks/.
  • scripts/compare_icy_glow.js: compares verifyIcy and verifyGLOW gas usage, including per-call trace summaries and calldata costs.

DVRF_Verify Sepolia adress: "0x48e4923bed992e13874f902cd17ec6daa36ffaf1"

About

DVRF_Verify Soldity contract to benchmark Verify functions of Icy-DVRF and GLOW-DVRF protocols

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages