Skip to content

Conversation

forkfury
Copy link
Contributor

Summary

Replaces hardcoded max_transactions: 1_000 with dynamic calculation based on block gas limit.

Changes

  • Add calculate_max_transactions_from_gas_limit() function
  • Auto-update max_transactions when gas limit changes
  • Set reasonable cap at 10,000 transactions
  • Add tests

Technical Details

  • Formula: gas_limit / 21_000 (min transaction gas)
  • Default (30M gas): 1,428 transactions
  • Capped at 10,000 for performance

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

this isnt super useful, can we instead remove the todo?

User and others added 2 commits September 17, 2025 00:20
@forkfury forkfury requested a review from mattsse September 16, 2025 22:21
@forkfury
Copy link
Contributor Author

Alright, you definitely know better.

Reverted my impementation and only deleted TODO

@mattsse mattsse enabled auto-merge (squash) September 16, 2025 23:02
@mattsse mattsse merged commit 5dbd958 into foundry-rs:master Sep 16, 2025
25 checks passed
@github-project-automation github-project-automation bot moved this to Done in Foundry Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants