Skip to content

Apply access list to tracing executor for 'cast call --trace' #10161

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

Merged

Conversation

svenski123
Copy link
Contributor

Motivation

Specifying an access list via the --access-list command line option did not show any change in gas cost in cast call --trace, whereas with cast call without tracing and cast send the expected gas cost changes were observed.

On closer inspection, it became apparent that the --trace option to cast call actually caused the command to spawn an internal forked EVM to run the transaction, and the access list wasn't configured in the tracing EVM.

Solution

Set the access list in the executor's environment.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@grandizzy grandizzy added T-bug Type: bug C-cast Command: cast labels Apr 15, 2025
@jenpaff jenpaff moved this to Ready For Review in Foundry Apr 15, 2025
Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

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

Thanks!

@DaniPopes DaniPopes enabled auto-merge (squash) April 29, 2025 22:48
@DaniPopes DaniPopes merged commit fa55caa into foundry-rs:master Apr 29, 2025
22 checks passed
@github-project-automation github-project-automation bot moved this from Ready For Review to Done in Foundry Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cast Command: cast T-bug Type: bug
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants