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

Changes for EIP7685, 7002 & 6110: Flat Encoding of requests #7670

Merged
merged 671 commits into from
Nov 6, 2024

Conversation

rjnrohit
Copy link
Contributor

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)

ak88 and others added 30 commits September 16, 2024 15:57
This reverts commit 19f3ad5.

(cherry picked from commit d18d4ea)
(cherry picked from commit bf78353)
(cherry picked from commit 6380314)
(cherry picked from commit cf58cd2)
(cherry picked from commit 7974a8b)
(cherry picked from commit 7b28007)
(cherry picked from commit b1020eb)
(cherry picked from commit d30e193)
(cherry picked from commit 68c3736)
(cherry picked from commit fc45531)
(cherry picked from commit d11df9c)
(cherry picked from commit caed2f3)
(cherry picked from commit bb7c803)
@ak88 ak88 mentioned this pull request Nov 4, 2024
@rjnrohit rjnrohit requested review from ak88 and LukaszRozmej November 5, 2024 09:53
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.

Still few minor improvements can be done

Copy link
Contributor

@ak88 ak88 left a comment

Choose a reason for hiding this comment

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

Just some minor stuff missing.

@rjnrohit rjnrohit requested a review from ak88 November 6, 2024 06:08
Copy link
Contributor

@ak88 ak88 left a comment

Choose a reason for hiding this comment

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

LGTM

@rjnrohit rjnrohit merged commit 9acde37 into master Nov 6, 2024
77 checks passed
@rjnrohit rjnrohit deleted the flat_encoding_requests branch November 6, 2024 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants