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

simulated.NewBackend does not support Shanghai (invalid opcode: PUSH0) #31203

Open
nksazonov opened this issue Feb 18, 2025 · 5 comments
Open

Comments

@nksazonov
Copy link

System information

Geth version: v1.14.13
OS & Version: MacOS 14.1.2 (23B92)

Expected behaviour

A contract compiled with solc >0.8.19 is deployed using the simulated.NewBackend(...).

Actual behaviour

An error invalid opcode: PUSH0 is received.

Steps to reproduce the behaviour

  1. Create bindings for a contract compiled with solc v0.8.20.
  2. Create a simulated backend with default settings.
  3. Use this simulated backend to deploy the contract.

Also, it was confirmed that if the contract is compiled with solc v0.8.19, it IS DEPLOYED successfully.

This may be related to #28144

@MariusVanDerWijden
Copy link
Member

What genesis block are you using for the network?

@nksazonov
Copy link
Author

I use the default one, i.e. this one.

@MariusVanDerWijden
Copy link
Member

Ah you should use the new simulated backend v2: https://github.com/ethereum/go-ethereum/blob/master/ethclient/simulated/backend.go should be a drop-in replacement for the old sim backend

@nksazonov
Copy link
Author

nksazonov commented Feb 18, 2025

If I understand correctly, I am already using it by having go-ethereum@v1.14.13. The file at the link you have shared differs from what I use only by this commit, which does not seem to change the support of different EVM versions.

@s1na
Copy link
Contributor

s1na commented Feb 19, 2025

Do you maybe have a repro code/example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants