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

fix(evmutil): implement gas validation for EVM calls #123

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

alkindivv
Copy link

@alkindivv alkindivv commented Mar 4, 2025

Description

This PR adds stricter gas validation for EVM calls to prevent potential DoS attacks and ensure consistent gas usage.

Changes Made

  • Add MaxGasLimit constant (30M gas)
  • Replace infinite gas meter with limited gas meter
  • Add validation for gas estimation and usage
  • Add unit tests for gas validation
  • Add new error type for exceeded gas limit

Issues Fixed

  • Prevent potential DoS attacks through excessive gas usage
  • Ensure consistent gas limits across EVM operations
  • Improve network security and stability

Testing

  • Unit tests added to validate gas limits
  • Test cases cover both success and failure scenarios
  • All tests pass successfully

Checklist

  • Added/updated unit tests
  • Local tests passing
  • Follows code standards
  • Documentation updated

This change is Reviewable

…t constant (30M gas) - Replace infinite gas meter with limited gas meter - Add validation for gas estimation and usage - Add unit tests for gas validation - Add new error type for gas limit exceeded
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.

1 participant