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

Be able to use shanghai compiled contracts on a PoA testnet that is not from --dev #28032

Closed
antazoey opened this issue Aug 30, 2023 · 9 comments

Comments

@antazoey
Copy link

Rationale

Why should this feature exist?

Because we have features that rely on it.

What are the use-cases?

Having a test provider with excellent transaction tracing support such debug_traceTransaction that is built from the same package as actual nodes. We have been providing this as an option and the best thing it has helped us over the years is testing all tooling related to traces.

As PUSH0 / shanghai came about, things aren't working on our PoA testnets without using older versions of EVM to compile, which can be a pain.

Implementation

Do you have ideas regarding the implementation of this feature?
I just need it to "work" more than I need it to be chain-accurate, I really have no idea.

Are you willing to implement this feature?
I don't know how capable I would be otherwise yes, though I am also not sure how much time I will be able to find. If it really came down to it, then yes I would try, unless it really is impossible.

@antazoey
Copy link
Author

the related ticket is here: #27365
that added support for --dev.

however, I am not able to use --dev because it does not let me configure genesis enough.

@jwasinger
Copy link
Contributor

If you are trying to use Shanghai features on a private testnet, enable the Shanghai fork in your genesis configuration.

@antazoey
Copy link
Author

If you are trying to use Shanghai features on a private testnet, enable the Shanghai fork in your genesis configuration.

I added "shanghai": 0, with all the other forks, however I still get (-32000) invalid opcode: PUSH0

@jwasinger
Copy link
Contributor

The field you want is shanghaiTime

@antazoey
Copy link
Author

Thank you! I apologize for my noob-id-ity.

@anhnh131
Copy link

@antazoey Hi, I also have same the issue. Did you upgrade to Shanghai`? I had a private network with POA consensus (use Clique). I want to upgrade Shanghai for my network, but after investigating, it doesn't support it. I received the error when run network.

 | Block: 240 (0xfb791f868ed2485d5de64d8bdb5b20812639e58d179b9e79d1e9736cd4fdef53)
 | Error: clique does not support shanghai fork
 | Platform: geth (devel) go1.21.7 arm64 linux

My genesis config

"config": {
    "chainId": 1337,
    "homesteadBlock": 0,
    "eip150Block": 0,
    "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "eip155Block": 0,
    "eip158Block": 0,
    "byzantiumBlock": 0,
    "constantinopleBlock": 0,
    "petersburgBlock": 0,
    "istanbulBlock": 0,
    "muirGlacierBlock": 0,
    "berlinBlock": 0,
    "londonBlock": 0,
    "shanghaiTime": 1710985500,
    "clique": {
      "period": 2,
      "epoch": 5
    }
  }

@antazoey
Copy link
Author

antazoey commented Mar 22, 2024

@antazoey Hi, I also have same the issue. Did you upgrade to Shanghai`?

this is what we are doing:

https://github.com/ApeWorX/ape/blob/main/src/ape_geth/provider.py#L99-L122

this is the version of geth we are using:

https://github.com/ApeWorX/ape/blob/main/.github/workflows/test.yaml#L89

@anhnh131
Copy link

@antazoey How many nodes have you run for your private network? Have all of them been upgraded to Shanghai?

@anhnh131
Copy link

The field you want is shanghaiTime

Hi, when I enabled Shanghai in the POA private network, I received the error #29319. The Shanghai doesn't work in POA, right?

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