Skip to content

feat(taiko-client): introduce payloadQueue for P2P gossip messages #19195

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

Merged
merged 41 commits into from
Apr 13, 2025

Conversation

davidtaikocha
Copy link
Contributor

No description provided.

@davidtaikocha davidtaikocha marked this pull request as ready for review April 2, 2025 07:26
Copy link
Contributor

@Copilot Copilot AI left a comment

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 introduces a payload queue for managing P2P gossip messages and refactors several methods to handle batches of execution payloads.

  • Added a new payload queue to temporarily cache payloads for missing block imports.
  • Updated API and block insertion logic to support batch processing via new methods.
  • Introduced tests to validate scenarios with missing ancients.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/taiko-client/driver/preconf_blocks/server.go Updated payload processing logic to support batch block insertion and caching of missing ancestors.
packages/taiko-client/driver/preconf_blocks/queue.go Added a new payload queue implementation for managing P2P payloads.
packages/taiko-client/driver/preconf_blocks/api.go Modified API to use the new batch insertion method and remove decompression logic.
packages/taiko-client/driver/driver_test.go Added tests covering payloads with missing ancients.
packages/taiko-client/driver/chain_syncer/blob/blocks_inserter/pacaya.go Refactored block insertion to support batch processing and updated error messages.
.github/workflows/taiko-client--docker.yml Updated branch trigger list for CI builds.
Comments suppressed due to low confidence (2)

packages/taiko-client/driver/preconf_blocks/queue.go:52

  • In the 'get' function, the loop exits upon encountering the first nil item. If the underlying slice becomes non-contiguous due to evictions or other operations, this may bypass valid entries later in the slice. Consider iterating over the entire slice instead of stopping at the first nil.
if item == nil { return nil // no more items }

packages/taiko-client/driver/chain_syncer/blob/blocks_inserter/pacaya.go:276

  • [nitpick] The parameter name 'executableData' used in this function is inconsistent with the rest of the code which uses 'executionPayloads'. Renaming it to 'payload' (or 'executionPayload') would improve clarity and consistency.
func (i *BlocksInserterPacaya) insertPreconfBlockFromExecutionPayload(

@davidtaikocha
Copy link
Contributor Author

davidtaikocha commented Apr 3, 2025

Deploying this on helder to test, will approve/merge if works.

FYI also added more checks for P2P messages: 9705881 , not much changes but may need to build again 🙏

@davidtaikocha davidtaikocha merged commit f981f59 into main Apr 13, 2025
7 checks passed
@davidtaikocha davidtaikocha deleted the p2p-payloadQueue branch April 13, 2025 06:04
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.

4 participants