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

cast does not select correct hardfork for given transaction #8446

Open
1 of 2 tasks
JamieShip opened this issue Jul 15, 2024 · 2 comments
Open
1 of 2 tasks

cast does not select correct hardfork for given transaction #8446

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

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"}'

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
None yet
Development

No branches or pull requests

3 participants