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

client: Implement withdrawals via engine api #2401

Merged
merged 35 commits into from Nov 18, 2022
Merged

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Nov 3, 2022

Implement :ethereum/execution-apis#195

i.e produce/process/respond withdrawals enabled blocks

Followup of

@g11tech g11tech added PR state: WIP package: client target: master (v7) Work to be done towards master branch labels Nov 3, 2022
@codecov
Copy link

codecov bot commented Nov 3, 2022

Codecov Report

Merging #2401 (81d9187) into master (5274b49) will decrease coverage by 0.14%.
The diff coverage is 92.30%.

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block ?
blockchain ?
client 87.47% <90.78%> (-0.03%) ⬇️
common 98.13% <ø> (ø)
devp2p 91.71% <ø> (+0.13%) ⬆️
ethash ∅ <ø> (∅)
evm 79.72% <ø> (ø)
rlp ∅ <ø> (∅)
statemanager 89.46% <ø> (ø)
trie 90.36% <ø> (ø)
tx 97.80% <ø> (ø)
util 84.59% <95.78%> (+0.66%) ⬆️
vm ?

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

@g11tech g11tech changed the title client: Implement v2 versions for execution api supporting withdrawals client: Implement withdrawals via engine api Nov 6, 2022
@holgerd77
Copy link
Member

holgerd77 commented Nov 7, 2022

Uh, this spawns a lot of libraries. Interesting. 🤔 🙂

@g11tech
Copy link
Contributor Author

g11tech commented Nov 9, 2022

seems like need to add some more coverage, but should be good for some review feedback!

Copy link
Member

@holgerd77 holgerd77 left a comment

Choose a reason for hiding this comment

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

Some change requests and questions, generally this looks totally awesome!!! 😀 🔥 ❤️

packages/block/src/block.ts Show resolved Hide resolved
packages/block/src/block.ts Outdated Show resolved Hide resolved
packages/block/src/block.ts Outdated Show resolved Hide resolved
packages/client/lib/rpc/validation.ts Outdated Show resolved Hide resolved
packages/client/lib/sync/skeleton.ts Outdated Show resolved Hide resolved
packages/common/src/utils.ts Show resolved Hide resolved
packages/util/src/withdrawal.ts Show resolved Hide resolved
packages/vm/src/buildBlock.ts Show resolved Hide resolved
packages/vm/src/runBlock.ts Outdated Show resolved Hide resolved

async getPayloadV2(params: [string]) {
return this.getPayload(params)
}
/**
* Compare transition configuration parameters.
*
Copy link
Member

Choose a reason for hiding this comment

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

Comment for the whole file:

can't completely oversee for now so just to make sure: are these error cases for newPayloadV2 and fcuV2 from here https://github.com/ethereum/execution-apis/pull/195/files#diff-571851156237b81c20006ce9d7a70b3421f19540cead91f45955316c52fe94c0R367 (e.g.) integrated?

So the checks on the withdrawal functionality being activated or not together with the INVALID responses?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

would like to do a followup PR on the same (and merge this first) if thats ok? 🙂

@g11tech g11tech force-pushed the g11tech/withdrawals-api branch 3 times, most recently from 88fe0e5 to 6f8dd71 Compare November 16, 2022 12:28
@holgerd77
Copy link
Member

@g11tech you'll let us know when this will be ready for a final review, right?

@g11tech
Copy link
Contributor Author

g11tech commented Nov 16, 2022

@g11tech you'll let us know when this will be ready for a final review, right?

yes, just need to add the vm test 🙂

@g11tech
Copy link
Contributor Author

g11tech commented Nov 16, 2022

@holgerd77 this should be merge ready

Copy link
Member

@holgerd77 holgerd77 left a comment

Choose a reason for hiding this comment

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

Ok, I am taking a bit of a risk here and not doing an as-in-depth-review-as-might-desired, since I am still so side tracked with all this roadmap (and Hack Exchange) stuff, but Gajinder needs this for Shandong, so it's good if we get this over the finish line.

Had some final look, I guess there are no security sensitive parts (no tx changes e.g., but also nothing apparent in Block) touched here, and the lower-level API changes and additions - in particular in Block and Util and Common - seems solid.

So I will approve here, thanks a lot Gajinder, great great work, really wonderful to see this getting into the main code base. 🥳

@holgerd77 holgerd77 merged commit a00251d into master Nov 18, 2022
@holgerd77 holgerd77 deleted the g11tech/withdrawals-api branch November 18, 2022 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants