Skip to content

feat: optimize storage operations for gas efficiency#234

Merged
Akshola00 merged 4 commits intoWeb3Novalabs:mainfrom
tusharshah21:fix-210-gas-opt
Sep 24, 2025
Merged

feat: optimize storage operations for gas efficiency#234
Akshola00 merged 4 commits intoWeb3Novalabs:mainfrom
tusharshah21:fix-210-gas-opt

Conversation

@tusharshah21
Copy link
Contributor

  • Optimize vote function: cache frequently used values, eliminate redundant reads, batch writes
  • Optimize stake function: consolidate storage operations, cache token dispatcher
  • Optimize create_pool function: cache pool_count to avoid redundant reads
  • Fix calculate_odds/calculate_shares function signatures to prevent mutable reference conflicts
  • Add comprehensive gas benchmarking tests for optimized functions
  • Reduce gas costs by minimizing storage access patterns and external calls

Closes #210

@vercel
Copy link

vercel bot commented Sep 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
nova-one-7r2r Ready Ready Preview Comment Sep 24, 2025 6:57am

@tusharshah21
Copy link
Contributor Author

checking the test error, let me know if the code looks good in the meantime @Akshola00

@Akshola00
Copy link
Contributor

@tusharshah21 great work so far

@Akshola00
Copy link
Contributor

@tusharshah21 any updates

@tusharshah21
Copy link
Contributor Author

snfoge testing taking a long long time for looking into each fix, else good

@Akshola00
Copy link
Contributor

lgtm, thanks for your contribution

@Akshola00 Akshola00 merged commit ac3f9c9 into Web3Novalabs:main Sep 24, 2025
6 checks passed
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.

Gas Optimization - Inefficient Storage Access Patterns

2 participants