ethereumjs-monorepo icon indicating copy to clipboard operation
ethereumjs-monorepo copied to clipboard

pectra devnet4: implement pectra devnet4 spec

Open g11tech opened this issue 1 year ago • 15 comments

refrence:

https://notes.ethereum.org/@ethpandaops/pectra-devnet-4

image

g11tech avatar Sep 27 '24 09:09 g11tech

Can we use this PR as devnet-4 branch and not merge this until devnet-4 is specced out completely?

Ref for further additions: https://github.com/ethereum/execution-spec-tests/pull/832

Devnet-4 spec https://notes.ethereum.org/@ethpandaops/pectra-devnet-4

jochem-brouwer avatar Sep 27 '24 09:09 jochem-brouwer

yes apparently the address specified in the 7002 eip and in the genesis generator changes don't match cc @parithosh

in EIP: image

in genesis generator PR: image

g11tech avatar Sep 27 '24 10:09 g11tech

ah there's probably an update missing. lemme me clear that up and get back to you!

parithosh avatar Sep 27 '24 10:09 parithosh

are you sure @g11tech ?

EIP update was merged in: https://github.com/ethereum/EIPs/pull/8890/files#diff-70472fac1debb567783ce13873323261713f3ce488a26a5c3769a9193f4a7e27R521

which is the address we used in the genesis generator: https://github.com/ethpandaops/ethereum-genesis-generator/pull/143/files#diff-e563a01282cd9e2db47dceb99a9337f1f37466f6bfe5d10b376435d51f179f34R114

parithosh avatar Sep 27 '24 10:09 parithosh

are you sure @g11tech ?

EIP update was merged in: https://github.com/ethereum/EIPs/pull/8890/files#diff-70472fac1debb567783ce13873323261713f3ce488a26a5c3769a9193f4a7e27R521

which is the address we used in the genesis generator: https://github.com/ethpandaops/ethereum-genesis-generator/pull/143/files#diff-e563a01282cd9e2db47dceb99a9337f1f37466f6bfe5d10b376435d51f179f34R114

yes i am sure as of the current published EIP :)

image

as well as latest github file

image

g11tech avatar Sep 27 '24 10:09 g11tech

I just manually checked the EIP-7002 data, I get this:

sender: 0xac6afb9d8491e8b397f65331ce41e338cbfe1048 contract address: '0x0511ce19514e1298fba96de582652a016e2caaaa'

jochem-brouwer avatar Sep 28 '24 01:09 jochem-brouwer

@parithosh I just saw that the address got updated again in this commit: https://github.com/ethereum/EIPs/commit/a23be81719b713f5e59b5e040e03ad88c0fb2e3d

In this PR: https://github.com/ethereum/EIPs/pull/8855

This changed code, so it also changed the address. (I assume this is included in devnet-4?)

jochem-brouwer avatar Sep 28 '24 01:09 jochem-brouwer

Fixed merge conflicts, if I messed up please rollback to 7cd91a261df372536eb6b19a70be8151fa998140

jochem-brouwer avatar Oct 10 '24 01:10 jochem-brouwer

Have updated the PR (have not fixed tests) to reflect these EIP PRs:

https://github.com/ethereum/EIPs/pull/8924 https://github.com/ethereum/EIPs/pull/8934

I have also added support for the devnet-4 t8ntool interface, can be used to fill https://github.com/ethereum/execution-spec-tests/pull/832 (I got a few filled tests, so the interface works, until I ran in a bug at EEST side).

jochem-brouwer avatar Oct 10 '24 04:10 jochem-brouwer

We can actually get rid of the whole DepositRequest, WithdrawalRequest, etc, since now the requests only have a type and whatever the internal bytes are have (for us) no structure other than "just" being bytes. Also see https://github.com/ethereum/execution-apis/pull/591

jochem-brouwer avatar Oct 10 '24 10:10 jochem-brouwer

We can actually get rid of the whole DepositRequest, WithdrawalRequest, etc, since now the requests only have a type and whatever the internal bytes are have (for us) no structure other than "just" being bytes. Also see ethereum/execution-apis#591

Oh, that's a major one we should absolutely do before the releases, can you please (don't need to be long) open a dedicated issue on this so that we do not forget?

holgerd77 avatar Oct 10 '24 10:10 holgerd77

The idea was actually to directly do that here :)

EDIT: this is also the result of the EIP revamps for the requests, I think this will naturally follow once we integrate it.

jochem-brouwer avatar Oct 10 '24 10:10 jochem-brouwer

Never mind, removing them actually does not sounds like a good idea. The classes are now handy to also directly decode the raw bytes, which is handy for the end-user.

jochem-brouwer avatar Oct 10 '24 11:10 jochem-brouwer

As of 965eb866c6fa9ca9ad0354433ef130fea04032ea we pass devnet-4 tests for https://github.com/ethereum/execution-spec-tests/pull/832 devnet-4-updates branch @ a6a280cad272dcebdb713812bab9e3ac3387f17f

I have not yet looked at the CI tests, they likely fail.

Only suggestions= for this PR:

I think we can now get rid of the CLRequest types, instead I think only a helper which is just concatBytes(clRequestType, bytes) and an enum for whatever that type is, would be sufficient

jochem-brouwer avatar Oct 11 '24 22:10 jochem-brouwer

Codecov Report

Attention: Patch coverage is 31.50183% with 187 lines in your changes missing coverage. Please review.

Project coverage is 34.77%. Comparing base (987a855) to head (152ae16). Report is 3 commits behind head on master.

:exclamation: There is a different number of reports uploaded between BASE (987a855) and HEAD (152ae16). Click for more details.

HEAD has 4 uploads less than BASE
Flag BASE (987a855) HEAD (152ae16)
util 1 0
genesis 1 0
blockchain 1 0
common 1 0
Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 73.74% <52.00%> (+6.17%) :arrow_up:
blockchain ?
client 0.00% <0.00%> (ø)
common ?
devp2p 71.95% <ø> (ø)
evm 64.89% <ø> (ø)
genesis ?
mpt 52.12% <ø> (+0.07%) :arrow_up:
statemanager 68.84% <ø> (?)
tx 76.70% <ø> (ø)
util ?
vm 57.47% <92.40%> (-0.18%) :arrow_down:
wallet 79.67% <ø> (ø)

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

codecov[bot] avatar Oct 12 '24 07:10 codecov[bot]

Just merged, thanks a lot all! :smile: :+1:

jochem-brouwer avatar Oct 31 '24 21:10 jochem-brouwer

🎉

holgerd77 avatar Nov 02 '24 14:11 holgerd77