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

EIP7212 / PIP27 #1069

Merged
merged 16 commits into from
Jan 12, 2024
Merged

EIP7212 / PIP27 #1069

merged 16 commits into from
Jan 12, 2024

Conversation

anshalshukla
Copy link
Contributor

Description

Pulls changes from PR#27540, introduces EIP-7212 or PIP-27. This PR currently just cherry-pick the commits from the upstream.

Changes

  • Bugfix (non-breaking change that solves an issue)
  • Hotfix (change that solves an urgent issue, and requires immediate attention)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)
  • Changes only for a subset of nodes

Breaking changes

We will need a HF to enable this feature

Nodes audience

In case this PR includes changes that must be applied only to a subset of nodes, please specify how you handled it (e.g. by adding a flag with a default value...)

Checklist

  • I have added at least 2 reviewer or the whole pos-v1 team
  • I have added sufficient documentation in code
  • I will be resolving comments - if any - by pushing each fix in a separate commit and linking the commit hash in the comment reply
  • Created a task in Jira and informed the team for implementation in Erigon client (if applicable)
  • Includes RPC methods changes, and the Notion documentation has been updated

Cross repository changes

  • This PR requires changes to heimdall
    • In case link the PR here:
  • This PR requires changes to matic-cli
    • In case link the PR here:

Testing

  • I have added unit tests
  • I have added tests to CI
  • I have tested this code manually on local environment
  • I have tested this code manually on remote devnet using express-cli
  • I have tested this code manually on mumbai
  • I have created new e2e tests into express-cli

Manual tests

Please complete this section with the steps you performed if you ran manual tests for this functionality, otherwise delete it

Additional comments

Please post additional comments in this section if you have them, otherwise delete it

(cherry picked from commit fb89b61cdc2ccf6bda9f77f72315e01fa4ffb7d7)
(cherry picked from commit a8c0a2e05c7b6cafa16d296f91da8cb651bf9d46)
(cherry picked from commit c0554c0764a2c021689e8d73b36987b67c954f0c)
(cherry picked from commit 6c7028a9043f65f0a3596be4a429be4e03d0eb89)
(cherry picked from commit d245194e7724c2a7d153945cc86c9aa8d0b522b3)
(cherry picked from commit 066a31f6345c8a04a4ebf84efd8c80d87107e6d5)
(cherry picked from commit ec17e788ade3f43ded67c014f019770634f32a7c)
(cherry picked from commit f5b6d7e9954cae87348e21525210affda09297c1)
(cherry picked from commit 2820903f591365b17a4c3bdb36bd49ee2d84054c)
(cherry picked from commit 1be1875156e2a5a417801deb59546b167e5456c6)
(cherry picked from commit 21f4932c9bbb8664cf7b3e3c3602b6a48c747893)
(cherry picked from commit 98f10b0d5e358075d03b76834cd30c97f4fbdfe1)
(cherry picked from commit cec0b058115282168c5afc5197de3f6b5479dc4a)
@anshalshukla anshalshukla changed the base branch from master to develop November 3, 2023 04:08
@ssandeep ssandeep marked this pull request as draft November 16, 2023 06:38
Copy link

codecov bot commented Nov 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (11969b0) 56.01% compared to head (1e5211c) 56.01%.
Report is 15 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1069   +/-   ##
========================================
  Coverage    56.01%   56.01%           
========================================
  Files          658      658           
  Lines       114446   114479   +33     
========================================
+ Hits         64111    64130   +19     
- Misses       46481    46490    +9     
- Partials      3854     3859    +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@anshalshukla anshalshukla changed the title [WIP] Eip7212 Eip7212 / PIP27 Nov 30, 2023
@anshalshukla anshalshukla changed the title Eip7212 / PIP27 EIP7212 / PIP27 Nov 30, 2023
@anshalshukla anshalshukla requested a review from a team November 30, 2023 11:20
@anshalshukla anshalshukla marked this pull request as ready for review November 30, 2023 11:24
core/vm/contracts.go Outdated Show resolved Hide resolved
@anshalshukla anshalshukla marked this pull request as draft November 30, 2023 12:34
@anshalshukla anshalshukla marked this pull request as ready for review January 12, 2024 15:19
@anshalshukla anshalshukla requested a review from a team January 12, 2024 15:19
@anshalshukla anshalshukla merged commit f57c637 into develop Jan 12, 2024
14 checks passed
common.BytesToAddress([]byte{7}): &bn256ScalarMulIstanbul{},
common.BytesToAddress([]byte{8}): &bn256PairingIstanbul{},
common.BytesToAddress([]byte{9}): &blake2F{},
common.BytesToAddress([]byte{0x0a}): &kzgPointEvaluation{},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kzgPointEvaluation should probably not be here because it's part of EIP-4844 and EIP-4844 was excluded from the Napoli hardfork.

yperbasis added a commit to erigontech/erigon that referenced this pull request Jan 17, 2024
Initial support of the upcoming Napoli hard fork on Polygon – see
[PIP-33](https://forum.polygon.technology/t/pip-33-napoli-upgrade). Per
[PIP-31](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-31.md),
it parallels the
[Cancun](https://github.com/ethereum/execution-specs/blob/master/network-upgrades/mainnet-upgrades/cancun.md)
upgrade of Ethereum, but does not include
[EIP-4788](https://eips.ethereum.org/EIPS/eip-4788),
[EIP-4844](https://eips.ethereum.org/EIPS/eip-4844),
[EIP-7516](https://eips.ethereum.org/EIPS/eip-7516). In other words,
Napoli includes [EIP-1153](https://eips.ethereum.org/EIPS/eip-1153),
[EIP-5656](https://eips.ethereum.org/EIPS/eip-5656),
[EIP-6780](https://eips.ethereum.org/EIPS/eip-6780) from Cancun.

This PR implements
[PIP-31](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-31.md),
[PIP-16: Transaction Dependency
Data](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-16.md)
(by merging `ParallelUniverseBlock` into `NapoliBlock`; the bulk of
PIP-16 was implemented in PR #8037), and [PIP-27: Precompiled for
secp256r1 Curve
Support](https://github.com/maticnetwork/Polygon-Improvement-Proposals/blob/main/PIPs/PIP-27.md)
([EIP-7212](https://eips.ethereum.org/EIPS/eip-7212); see also
maticnetwork/bor#1069 &
ethereum/go-ethereum#27540).

---------

Co-authored-by: Anshal Shukla <shukla.anshal85@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants