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

EVM: move KZG precompile #2811

Merged
merged 7 commits into from
Jun 22, 2023
Merged

Conversation

jochem-brouwer
Copy link
Member

@jochem-brouwer jochem-brouwer commented Jun 22, 2023

Implements

ethereum/EIPs#7172 (move KZG)

ethereum/EIPs#7214 (move BLS)

This PR also makes it possible to have multiple precompiles at the same address (of course, only one is active at the same time).

It also exports this precompileAvailability.

Note: we could consider removing the precompiles as well (we export it but I don't think it's used anywhere)

@jochem-brouwer
Copy link
Member Author

Ok, note: ethereum/EIPs#7214

We can also remove this multiple-precompiles-at-same-address logic 😅 (if that PR gets merged)

@jochem-brouwer jochem-brouwer added the type: test all hardforks This special label enables VM state and blockchain tests for all hardforks on the respective PR. label Jun 22, 2023
…s/ethereumjs-monorepo into update-4844-precompile-address
@codecov
Copy link

codecov bot commented Jun 22, 2023

Codecov Report

Merging #2811 (8f09420) into master (2e785fa) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 89.29% <ø> (ø)
blockchain 92.65% <ø> (ø)
client 87.10% <ø> (ø)
common 97.09% <ø> (ø)
devp2p 86.58% <ø> (ø)
ethash ∅ <ø> (∅)
evm 66.78% <100.00%> (+0.27%) ⬆️
rlp ?
statemanager 86.35% <ø> (ø)
trie 90.06% <ø> (+0.04%) ⬆️
tx 95.87% <ø> (ø)
util 85.31% <ø> (ø)
vm 77.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


interface Precompiles {
[key: string]: PrecompileFunc
interface PrecompileEntry {
Copy link
Contributor

Choose a reason for hiding this comment

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

this looks amazing

if (precompileFunc !== undefined) {
precompileMap.set(addressString, precompileFunc)
if (
(type === PrecompileAvailabilityCheck.Hardfork && common.gteHardfork(entry.check.param)) ||
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@g11tech g11tech left a comment

Choose a reason for hiding this comment

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

lgtm!

@holgerd77
Copy link
Member

Oh, yeah, that's a really nice PR! 👍

@jochem-brouwer jochem-brouwer merged commit 3c1c835 into master Jun 22, 2023
@holgerd77 holgerd77 deleted the update-4844-precompile-address branch June 23, 2023 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: evm PR state: needs review type: test all hardforks This special label enables VM state and blockchain tests for all hardforks on the respective PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants