Skip to content

engineapi: preallocate NewPayload transactions#21109

Merged
yperbasis merged 1 commit into
erigontech:mainfrom
LarryArnault45:engineapi-prealloc-newpayload-txs
May 11, 2026
Merged

engineapi: preallocate NewPayload transactions#21109
yperbasis merged 1 commit into
erigontech:mainfrom
LarryArnault45:engineapi-prealloc-newpayload-txs

Conversation

@LarryArnault45

Copy link
Copy Markdown
Contributor

Summary

  • Preallocate the transaction byte slice in EngineServer.newPayload.
  • Keep the existing copy loop and payload construction semantics unchanged.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR optimizes EngineServer.newPayload by preallocating the txs slice used to build the execution payload’s transaction list, reducing allocations while keeping the existing append loop and payload construction behavior unchanged.

Changes:

  • Preallocate txs with make([][]byte, 0, len(req.Transactions)) in EngineServer.newPayload.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yperbasis yperbasis enabled auto-merge May 11, 2026 14:47
@yperbasis yperbasis added this pull request to the merge queue May 11, 2026
Merged via the queue into erigontech:main with commit 016bf8e May 11, 2026
38 of 39 checks passed
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.

3 participants