Closed axic closed 5 years ago
Here are some values for the gnosis safe: https://docs.google.com/spreadsheets/d/158o_8LliRmvph_PcejecP6z0HxevjzzvexHrqOXoF5Q/edit#gid=0
The previous values might be wrong. I have new ones about the zeppelin tests: https://docs.google.com/spreadsheets/d/1rTq8T2pbhHinmE1pLDEzIGzzUPdn4wmAgGv_hgPgEZI/edit?usp=sharing
In the median, V2 needs only 47 gas more, and the median of the relative change is 0.08%. I will try to split into creation costs and execution costs, though the split can only be done based on gas costs.
Some of the numbers in the zepplin test set seem to not belong together, but I guess the overall value of 47 gas can still be justified.
The second link is not shared.
Updated.
Gnosis has changed their tests to include the deployment costs: https://travis-ci.org/gnosis/safe-contracts/builds/498614120?utm_source=github_status&utm_medium=notification We should re-run our benchmarks, also including the knowledge about how to set truffle to the correct compiler version.
Finished second analysis of gnosis-safe (same link). It looks like regular transactions are sometimes cheaper, but most of the time .5% more expensive. Deployments are not cheaper (in the 2-4% range), except for the master contract, which is 5% cheaper. These values can of course all change with the tuning parameter which was set at 200.
I think the gnosis-safe is an example where deployment costs are less relevant compared to runtime costs.
That considered I think the 2-4% increase for a safer ABI decoder is worth it. Same goes for the 0.5% runtime increase.
Should compare the deploy time and the runtime costs.
Take the following settings:
Perhaps pompare a calldata struct in ABIEncoderV2 with a list of parameters in V1.
Run these on a set of "real-world" contracts, such as: