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

Add flat encoding and requests as a side car #7557

Merged
merged 598 commits into from
Oct 15, 2024
Merged

Conversation

rjnrohit
Copy link
Contributor

@rjnrohit rjnrohit commented Oct 5, 2024

Closes #7525
Closes #7524
Closes #7522
Resolves #7521

Changes

Implements changes from

Types of changes

  • PR modifies two existing engine APIs : engine_getPayloadV4 and engine_getPayloadV4, It incorporates suggestions from pectra-devnet4 doc, which was to exchange requests as a side car and remove them from the block body
  • It removes two engine APIs: engine_getPayloadBodiesByRangeV2 and engine_getPayloadBodiesByHashV2 and all related objects and handlers, which are now obsolete.
  • It introduces a new processor called IExecutionRequestsProcess and gets rid of all kinds of exiting requests processors.
  • Add support for flat request encoding and therefore, a new way for RequestsHash calculation, more info at: https://eips.ethereum.org/EIPS/eip-7685

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

Few more tests are yet to be written after a few rounds of discussions.

Documentation

Requires documentation update

  • Yes
  • No

Remarks

Please verify the requestsHash calculation, which should be done as follow:

def compute_requests_hash(requests):
    m = sha256()
    for r in requests:
        m.update(sha256(r))
    return m.digest()

block.header.requests_hash = compute_requests_hash(requests)

Copy link
Contributor

@MarekM25 MarekM25 left a comment

Choose a reason for hiding this comment

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

a few comments and here the most important:
have you tried to run devnet-4 fixtures from EF testing team?

@rjnrohit rjnrohit changed the title add flat encoding and requests as a side car Add flat encoding and requests as a side car Oct 9, 2024
@rjnrohit rjnrohit requested a review from MarekM25 October 9, 2024 10:56
@rjnrohit rjnrohit requested a review from LukaszRozmej October 10, 2024 09:11
Copy link
Member

@LukaszRozmej LukaszRozmej left a comment

Choose a reason for hiding this comment

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

Part review for now

@MarekM25 MarekM25 changed the base branch from prague/devnet4 to pectra_devnet_4 October 14, 2024 14:58
@rjnrohit rjnrohit changed the base branch from pectra_devnet_4 to prague/devnet4 October 15, 2024 08:45
@rjnrohit rjnrohit changed the base branch from prague/devnet4 to pectra_devnet_4 October 15, 2024 08:48
@rjnrohit rjnrohit changed the base branch from pectra_devnet_4 to prague/devnet4 October 15, 2024 08:48
@rjnrohit rjnrohit changed the base branch from prague/devnet4 to pectra_devnet_4 October 15, 2024 08:53
@ak88 ak88 merged commit 546c975 into pectra_devnet_4 Oct 15, 2024
59 checks passed
@ak88 ak88 deleted the flat_requests branch October 15, 2024 10:55
@LukaszRozmej
Copy link
Member

why merged?

@rjnrohit
Copy link
Contributor Author

why merged?

It was merged because there was confusion between me and @ak88, we were discussing that there should be one branch for devnet-4 changes, i.e., pectra-devnet-4. So @ak88 merged it!

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