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

backends.NewSimulatedBackend does not support PUSH0 #28144

Closed
ARR552 opened this issue Sep 18, 2023 · 3 comments · Fixed by #28202
Closed

backends.NewSimulatedBackend does not support PUSH0 #28144

ARR552 opened this issue Sep 18, 2023 · 3 comments · Fixed by #28202
Labels

Comments

@ARR552
Copy link

ARR552 commented Sep 18, 2023

System information

Geth version: v1.13.1
OS & Version: Linux

Expected behaviour

Using this code

Import (
"github.com/0xPolygonHermez/zkevm-node/etherman/smartcontracts/mockverifier"
"github.com/ethereum/go-ethereum/accounts/abi/bind/backends"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core"
)
genesisAlloc := map[common.Address]core.GenesisAccount{
		address: {
			Balance: balance,
		},
	}
	blockGasLimit := uint64(999999999999999999)
client := backends.NewSimulatedBackend(genesisAlloc, blockGasLimit)
rollupVerifierAddr, _, _, err := mockverifier.DeployMockverifier(auth, client)
if err != nil {
		log.Fatal(err)
}

This code should work but seems the backends doesn't support the opcode PUSH0

Actual behaviour

The current behaviour is an error that says:

 invalid opcode: PUSH0
@MariusVanDerWijden
Copy link
Member

Yes, the simulated backend is kinda stuck pre-merge. We thought about refactoring the simulated backend at some point to use the post-merge architecture

@arnaubennassar
Copy link

This is still a problem on v1.14.5

@MariusVanDerWijden
Copy link
Member

Hmm thats weird, simulatedbackend should be post-merge now

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

Successfully merging a pull request may close this issue.

3 participants