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

Gas Analysis: StakeRegistry.updateStakes() setup as a cronjob #37

Closed
wants to merge 6 commits into from

Conversation

8sunyuan
Copy link
Collaborator

Description:
We want to get some gas cost estimates for performing a weekly running cronjob that performs stake updates for
operators. Assuming ~200 operators, and varying quorums, this action would probably have to be batched into multiple update calls.

@8sunyuan 8sunyuan marked this pull request as draft October 27, 2023 20:28
Comment on lines +968 to +972
for (uint j = 0; j < stakesForQuorum.length; j++) {
stakeRegistry.setOperatorWeight(uint8(quorumNumbers[j]), defaultOperator, stakesForQuorum[j] + 1);
}

updateOperators[i] = operators[i];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks like it's repeatedly setting the weight just for the defaultOperator?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, but defaultOperator = operators[i]; above. never mind, just confusing naming

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, carried over some of the logic from existing tests so not the cleanest at the moment.

@8sunyuan 8sunyuan closed this Nov 9, 2023
@stevennevins stevennevins deleted the test/update-stakes-gas-cost branch November 25, 2024 17:40
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

Successfully merging this pull request may close these issues.

2 participants