Closed steshaw closed 1 year ago
That's pretty cool, thanks for looking into this — the run time is something that we always wanted to improve but didn't find enough time to look carefully into!
Let's see if cardano-api
gets this improved soon, and if it doesn't we might use your branch, at least for the more extensive audits.
No worries, I had some time and this was fun 😁
I should add that it was @etiennejf who pointed out that the bottleneck was toLedgerPParams
.
We're now using this patch on the branch ch/hedge-v2
, which is our main development branch for the Plutus V2 update.
WARNING: You may not want to merge this PR! However, I wanted to make you aware of the potential performance benefit.
This PR simply points the
cabal.project
to my fork ofcardano-node
. This fork is 1 commit ahead of1.35.3
. It contains a patch which memoises toBabbagePParams in order to improve performance. The performance issue withcardano-api
is being tracked as https://github.com/input-output-hk/cardano-node/issues/4622. It's quite probable that there is a less brutal way to fixcardano-api
. My patch is a bit of a hack.With this PR:
Could make a big difference on full audit suites.
This patch doesn't help against
main
because the performance problem was introduced in the Babbage era. So, I found the active branch —ch/inlines-datums
— which had upgraded to1.35.3
.Note, I saw that 3 tests are failing in the cooked-validators test suite on this branch, but I figured that you are aware of that and it doesn't impact the performance improvement.