-
Notifications
You must be signed in to change notification settings - Fork 192
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
Gas optimizations for deposit process #82
Comments
I've set up an experiment and measure gas-consuming by different deposit transactions. Initially, I've added 16 Staking Providers (SP) and then measure how much gas consumes the call of
I've attached a row output of the profiling for that three transactions. 16sp_33eth_deposit.txt |
Issue: lidofinance#88 Related issue: lidofinance#82 Add official deposit contract Update tests with deposit
Currently, the submit function, compiled with 200 optimizer iterations, consumes around 577000 gas plus 107000 gas for each registered validator, so the default limit is set by deploy scripts to 16 validators to make the submit transaction occupy no more than 20% of a block. See this file for the related calculations; you can run them with yarn estimate-deposit-loop-gas.
That is on average 130k+ gas per validation key in a batch of 16, about twice as much as a simple deposit. We might find a way to make this number lower.
Note: Switching to the official Deposit contract #88 will impact the numbers mentioned above
The text was updated successfully, but these errors were encountered: