safe-global / safe-modules

A collection of modules that can be used with the Safe contract
GNU Lesser General Public License v3.0
147 stars 73 forks source link

Optimize Compiler Settings #448

Closed nlordell closed 3 months ago

nlordell commented 4 months ago

I noticed that the IR optimizer is better for all contracts except the FCL library. This PR optimizes the compiler configuration to take advantage of the IR optimizer, while adding an exception for the FCL P-256 verifier contract so that it does not suffer any regressions.

=== BEFORE ===
  Gas Benchmarking [@bench]
    SafeWebAuthnSignerProxy
      ⛽ deployment: 94366
      ✔ Benchmark signer deployment cost (476ms)
      ⛽ verification (FreshCryptoLib): 216907
      ✔ Benchmark signer verification cost with FreshCryptoLib verifier (116ms)
      ⛽ verification (Daimo): 346809
      ✔ Benchmark signer verification cost with Daimo verifier (103ms)
      ⛽ verification (Dummy): 14309
      ✔ Benchmark signer verification cost with Dummy verifier (100ms)
      ⛽ verification (Precompile): 15098
      ✔ Benchmark signer verification cost with Precompile verifier (104ms)

=== AFTER  ===
  Gas Benchmarking [@bench]
    SafeWebAuthnSignerProxy
      ⛽ deployment: 91042
      ✔ Benchmark signer deployment cost (457ms)
      ⛽ verification (FreshCryptoLib): 213919
      ✔ Benchmark signer verification cost with FreshCryptoLib verifier (121ms)
      ⛽ verification (Daimo): 342642
      ✔ Benchmark signer verification cost with Daimo verifier (110ms)
      ⛽ verification (Dummy): 12564
      ✔ Benchmark signer verification cost with Dummy verifier (104ms)
      ⛽ verification (Precompile): 13379
      ✔ Benchmark signer verification cost with Precompile verifier (98ms)

Furthermore, we bump the compiler version to v0.8.26 as it is the lastest stable release and brings some small gas improvements.

coveralls commented 4 months ago

Pull Request Test Coverage Report for Build 9615641386

Details


Totals Coverage Status
Change from base Build 9578863041: 0.0%
Covered Lines: 90
Relevant Lines: 90

💛 - Coveralls
coveralls commented 4 months ago

Pull Request Test Coverage Report for Build 9617116293

Details


Totals Coverage Status
Change from base Build 9578863041: 0.0%
Covered Lines: 90
Relevant Lines: 90

💛 - Coveralls