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

bug(cast run): cast does not select correct hardfork for given transaction #8446

Open
1 of 2 tasks
JamieShip opened this issue Jul 15, 2024 · 3 comments
Open
1 of 2 tasks
Labels
C-cast Command: cast T-bug Type: bug T-to-discuss Type: requires discussion
Milestone

Comments

@JamieShip
Copy link
Contributor

Component

Cast

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge 0.2.0 (ef62fdb 2024-07-12T00:22:06.894449000Z)

What command(s) is the bug in?

cast run

Operating System

macOS (Apple Silicon)

Describe the bug

curl 'archive rpc url' \
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"debug_traceTransaction","params":["0x6b5ca68eb4c4b38690ec12ba9f85409b618759646e50ab53b28f9d67f74978fc", {"tracer": "callTracer"}], "id":1,"jsonrpc":"2.0"}'

but when I use cast run to repro the tx it revert locally.

cast run 0x6b5ca68eb4c4b38690ec12ba9f85409b618759646e50ab53b28f9d67f74978fc --rpc-url=https://rpc.ankr.com/eth
@JamieShip JamieShip added the T-bug Type: bug label Jul 15, 2024
@zerosnacks
Copy link
Member

Looks like this is related to cast not picking up the correct hard fork number to execute the transaction against

When running cast run 0x6b5ca68eb4c4b38690ec12ba9f85409b618759646e50ab53b28f9d67f74978fc --rpc-url=https://rpc.ankr.com/eth --evm-version spuriousDragon the transaction executes succesfully

@zerosnacks zerosnacks changed the title cast run published tx revert cast does not select correct hardfork for given transaction Jul 15, 2024
@zerosnacks zerosnacks added the C-cast Command: cast label Jul 15, 2024
@JamieShip
Copy link
Contributor Author

JamieShip commented Jul 16, 2024

Looks like this is related to cast not picking up the correct hard fork number to execute the transaction against

When running cast run 0x6b5ca68eb4c4b38690ec12ba9f85409b618759646e50ab53b28f9d67f74978fc --rpc-url=https://rpc.ankr.com/eth --evm-version spuriousDragon the transaction executes succesfully

Thanks! And I wonder:

maybe stupid Q:

curl -X POST https://rpc.ankr.com/eth -d '{"jsonrpc":"2.0","method":"trace_transaction","params":["0x6b5ca68eb4c4b38690ec12ba9f85409b618759646e50ab53b28f9d67f74978fc"],"id":1}'

there’s only 8 traces of the tx missing the trace of calling the 0x4 precompile contract.
Can check the 0x4 precompile contract call using following command:

curl 'archive rpc url' \
-X POST \
-H "Content-Type: application/json" \
--data '{"method":"debug_traceTransaction","params":["0x6b5ca68eb4c4b38690ec12ba9f85409b618759646e50ab53b28f9d67f74978fc", {"tracer": "callTracer"}], "id":1,"jsonrpc":"2.0"}'

@zerosnacks zerosnacks added this to the v1.0.0 milestone Jul 26, 2024
@jenpaff jenpaff added the T-to-discuss Type: requires discussion label Sep 26, 2024
@jenpaff jenpaff removed this from the v1.0.0 milestone Sep 26, 2024
@grandizzy grandizzy added this to the v1.0.0 milestone Oct 25, 2024
@github-project-automation github-project-automation bot moved this to Todo in Foundry Oct 25, 2024
@grandizzy grandizzy changed the title cast does not select correct hardfork for given transaction bug(cast run): cast does not select correct hardfork for given transaction Oct 25, 2024
@grandizzy grandizzy added the T-post-V1 Area: to tackle after V1 label Nov 14, 2024
@grandizzy grandizzy removed this from the v1.0.0 milestone Nov 14, 2024
@grandizzy
Copy link
Collaborator

looking to add a warning if the evm version cannot be inferred automatically

@grandizzy grandizzy removed the T-post-V1 Area: to tackle after V1 label Nov 14, 2024
@grandizzy grandizzy added this to the v1.0.0 milestone Nov 14, 2024
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 T-to-discuss Type: requires discussion
Projects
Archived in project
Development

No branches or pull requests

4 participants