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

Optimize Gas Usage for Mass Delegation in test/governance/utils/Votes.test.js #5216

Open
Tracked by #5249
techvoyagerX opened this issue Sep 20, 2024 · 0 comments
Open
Tracked by #5249

Comments

@techvoyagerX
Copy link
Contributor

🧐 Motivation

Currently, the Votes.test.js file handles various voting modes, but it does not cover edge cases involving gas cost optimizations for voting delegation when many accounts are involved. In high-load scenarios, especially when a large number of votes or delegation transactions occur in a single block, the gas usage could be significant.

📝 Details

The test suite should include cases that simulate a high volume of accounts delegating votes in a short period of time. These cases would help assess the contract’s performance under stress and provide data on gas efficiency.

Suggested enhancements:

  1. Add tests with 100+ accounts performing delegation operations.
  2. Measure gas consumption for these scenarios, comparing standard delegation vs. cross-delegation.
  3. Include tests for scenarios where accounts attempt to delegate multiple times within the same block.

By incorporating these changes, we can better understand the contract’s behavior in more realistic, high-traffic situations and potentially identify gas optimization opportunities.

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