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

Shanghai support for QBFT/IBFT #5446

Closed
jframe opened this issue May 11, 2023 · 8 comments · Fixed by #6353
Closed

Shanghai support for QBFT/IBFT #5446

jframe opened this issue May 11, 2023 · 8 comments · Fixed by #6353
Assignees
Labels
non mainnet (private networks) not related to mainnet features - covers privacy, permissioning, IBFT2, QBFT TeamGroot GH issues worked on by Groot Team

Comments

@jframe
Copy link
Contributor

jframe commented May 11, 2023

QBFT chains are not able to produce blocks when configured to use Shanghai. Even though Shanghai is mostly about supporting Withdrawals it does add new EVM opcodes e.g. PUSH0 that could be of use in private networks.

To reproduce configure a genesis file with:

{
  "config": {
    "chainid": 1337,
    "shanghaiTime": 0,
    "zeroBaseFee":true,
    "qbft": {
      "epochlength": 30000,
      "blockperiodseconds": 5,
      "requesttimeoutseconds": 10
    }

This is the error we get:

2023-05-11 10:49:44.474+10:00 | BftProcessorExecutor-QBFT-0 | WARN  | WithdrawalsValidator$AllowedWithdrawals | withdrawals must not be null when Withdrawals are activated
2023-05-11 10:49:44.474+10:00 | BftProcessorExecutor-QBFT-0 | INFO  | MainnetBlockValidator | Invalid block 1 (0x2dc8d5f94285d22afab11929b5cb872e1b158825459ef01cb7230520a36f9dfc)
2023-05-11 10:49:44.475+10:00 | BftProcessorExecutor-QBFT-0 | INFO  | ProposalPayloadValidator | Invalid Proposal Payload: block did not pass validation. Reason Optional[failed to validate output of imported block]
@jframe jframe added the TeamGroot GH issues worked on by Groot Team label May 11, 2023
@jframe
Copy link
Contributor Author

jframe commented May 11, 2023

Shanghai works with QBFT in 23.1.0 but not with 23.4.0

@jframe
Copy link
Contributor Author

jframe commented May 11, 2023

Suggestion from @siladu:
Maybe just need to wire in ProhibitedWithdrawals in the "qbftSpecificModifications"

@jframe
Copy link
Contributor Author

jframe commented May 15, 2023

Confirmed that this wasn't working with 231.0, the shanghaiTime was being ignored for this config and we are defaulting to using frontier. So this isn't a regression.

@NickSneo
Copy link
Contributor

Did you check if it works with CLIQUE or ethash? I am getting the same error when trying to configure shanghaiTime with CLIQUE and ethash - #5468
If it works for you then let me know the genesis file you used

@jframe
Copy link
Contributor Author

jframe commented May 18, 2023

Didn't test with Clique or ethhash yet. I suspect the same issue also applies to them, as the changes for shanghaiTime were made to work with POS. Will have a look at #5468 and respond there if it's the same issue or not.

@NickSneo
Copy link
Contributor

Is someone working on this bug? Or maybe we can pick this to look into it?

@jframe jframe added the non mainnet (private networks) not related to mainnet features - covers privacy, permissioning, IBFT2, QBFT label May 23, 2023
@jframe
Copy link
Contributor Author

jframe commented May 23, 2023

Not sure it would technically be a bug since we haven't added support for QBFT beyond London at the moment. But no one is working on this at the moment. You are welcome to pick it up.

@matthew1001
Copy link
Contributor

matthew1001 commented Dec 15, 2023

This is something we're seeing more and more requests for as the PUSH0 op-code is used by the latest releases of open zeppelin that enterprise users are moving to. So even without wanting the specific optimisation that the new op-code provides, it's preventing use of current web3 libraries.

I'm planning to spend some investigation time understand how much work is required to add support for it with QBFT, any insight others have would be really useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
non mainnet (private networks) not related to mainnet features - covers privacy, permissioning, IBFT2, QBFT TeamGroot GH issues worked on by Groot Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants