ensdomains / evmgateway

This repository implements a generic CCIP-Read gateway for fetching state proofs of data on other EVM chains. The intended use is for contracts on L1 to be able to fetch and verify data from contracts on L2 in a read context.
MIT License
128 stars 28 forks source link

Add Scroll integration #42

Closed makoto closed 3 months ago

makoto commented 3 months ago

List of changes

Gas comparison

Arbitrum

  ArbVerifier
Gas estimate 770439
    ✔ simple proofs for fixed values (2154ms)
Gas estimate 722247
    ✔ simple proofs for dynamic values (1314ms)
Gas estimate 777244
    ✔ nested proofs for dynamic values (1361ms)
Gas estimate 1045721
    ✔ nested proofs for long dynamic values (1437ms)
Gas estimate 887013
    ✔ nested proofs with lookbehind (1206ms)
Gas estimate 940514
    ✔ nested proofs with lookbehind for dynamic values (1631ms)
Gas estimate 726250
    ✔ mappings with variable-length keys (1337ms)
Gas estimate 840324
    ✔ nested proofs of mappings with variable-length keys (1479ms)
Gas estimate 679429
    ✔ treats uninitialized storage elements as zeroes (1040ms)
Gas estimate 683462
    ✔ treats uninitialized dynamic values as empty strings (1426ms)

Scroll

  ScrollVerifier
Gas estimate 1187799
    ✔ simple proofs for fixed values (2016ms)
Gas estimate 1188778
    ✔ simple proofs for dynamic values (1545ms)
Gas estimate 1128781
    ✔ nested proofs for dynamic values (1849ms)
Gas estimate 3391568
    ✔ nested proofs for long dynamic values (1673ms)
Gas estimate 2294214
    ✔ nested proofs with lookbehind (1449ms)
Gas estimate 2231340
    ✔ nested proofs with lookbehind for dynamic values (1838ms)
Gas estimate 1160883
    ✔ mappings with variable-length keys (1364ms)
Gas estimate 2295970
    ✔ nested proofs of mappings with variable-length keys (1510ms)
Gas estimate 1093162
    ✔ treats uninitialized storage elements as zeroes (1357ms)
Gas estimate 1097201
    ✔ treats uninitialized dynamic values as empty strings (1488ms)

Things to improve