Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile DAO deploy gas usage #98

Closed
skozin opened this issue Oct 28, 2020 · 1 comment
Closed

Profile DAO deploy gas usage #98

skozin opened this issue Oct 28, 2020 · 1 comment
Assignees
Milestone

Comments

@skozin
Copy link
Member

skozin commented Oct 28, 2020

Need to figure out why deploying the DAO from the template uses more than 12m gas.

@skozin skozin added this to the RC2 milestone Oct 28, 2020
@skozin skozin self-assigned this Oct 28, 2020
@skozin
Copy link
Member Author

skozin commented Nov 4, 2020

Function Total gas, incl. sub-calls
_setupPermissions (custom) 1,982,690
_createToken 1,705,770
_createDAO 1,638,942
_setupPermissions (Aragon standard) 1,301,101
_mintTokens 566,508
_setupApps 176,762
_registerID 101,468
sps.setPool 59,036
oracle.setPool 59,031
_createPermissionForTemplate 42,886
_removePermissionFromTemplate 38,856
_transferRootPermissionsFromTemplateAndFinalizeDAO 25,243
_reset 17,789
Total Gas
accounted 7,716,082
tx 11,424,950
unaccounted 3,708,868

Here is the full profiling report. Keep in mind that, due to the optimizer, some gas assignments might look weird. I was unable to profile without the optimizer since the template code exceeds the limit in this case. Also, since many Aragon contracts are predeployed (e.g. ACL, ENS, MiniMeTokenFactory), it's unpractical to profile them line-by-line in our current setup — we'll need to deploy them manually to do the profiling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant