zkFold / zkfold-cardano

zkFold: Cardano integration library
https://zkfold.io
MIT License
5 stars 0 forks source link

Speed up symbolic verifier #30

Closed zlonast closed 1 month ago

zlonast commented 1 month ago

The vast majority of the budget from this symbolicVerifier is consumed by the conversion of the script context from and to data encoding.

Some history: Asked a question in the plutus repository. Is it possible to add a cheaper way to get hash from Plutus data?#6524 Got a great answer from @colll78

Bench before fix:

    n     Script size             CPU usage               Memory usage
  ----------------------------------------------------------------------
    -   13447  (82.1%)      3908086477  (39.1%)         1194974   (8.5%) 

Bench after fix:

    n     Script size             CPU usage               Memory usage
  ----------------------------------------------------------------------
    -    4027  (24.6%)      3812086558  (38.1%)          782862   (5.6%)