nethermind icon indicating copy to clipboard operation
nethermind copied to clipboard

Staging branch for devnet 4

Open ak88 opened this issue 1 year ago • 0 comments

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)
  • [x] Breaking change (a change that causes existing functionality not to work as expected)
  • [x] Optimization
  • [x] Refactoring
  • [ ] Documentation update
  • [ ] Build-related changes

Testing

Requires testing

  • [x] Yes
  • [ ] No

If yes, did you write tests?

  • [x] Yes
  • [ ] No

Notes on testing

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

Documentation

Requires documentation update

  • [ ] Yes
  • [x] 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 avatar Oct 15 '24 10:10 ak88