Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Performed some local testing by running the following commands. Note some contracts in
M2_DeployTesting.s.sol
are mocked for easier operator registration but none of the contracts called inupdateStakesAllOperators
are mocked for more accurate estimations.Setup anvil node
anvil -f https://ethereum-goerli.publicnode.com --accounts 200
Run the testing script
forge script script/testing/M2_DeployTesting.s.sol:Deployer_M2 --rpc-url http://127.0.0.1:8545 --private-key $PRIVATE_KEY --broadcast -vvv
With a setup of 10 total quorums, 10 strategies in quorum0, 1 strategy each in quorums1-9
200 operators registered in quorum0, 50 operators each in quorum1-9. Gas cost for
updateStakesAllOperators
is ~26million gas and results in the error(code: -32000, message: intrinsic gas too high, data: None)
Changing number of registered operators for quorums1-9 from 50 -> 30 changes the
updateStakesAllOperators
costs to ~19.7 million gas instead