-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat(taiko-client): introduce ImportPendingBlocksFromCache
in PreconfBlockAPIServer
#19339
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
Conversation
…onfBlockAPIServer`
There was a problem hiding this 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 new method, ImportPendingBlocksFromCache, in the PreconfBlockAPIServer to recover pending preconfirmation blocks from the cache and integrates it with the L2ChainSyncer.
- Implements ImportPendingBlocksFromCache in server.go
- Propagates the latest payload from queue.go
- Updates driver.go and chain_syncer.go to wire the new functionality
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
packages/taiko-client/driver/preconf_blocks/server.go | Adds the ImportPendingBlocksFromCache method to retrieve pending blocks |
packages/taiko-client/driver/preconf_blocks/queue.go | Updates the payloadQueue structure to store the latest payload |
packages/taiko-client/driver/driver.go | Sets the preconfirmation block server in the driver configuration |
packages/taiko-client/driver/chain_syncer/chain_syncer.go | Triggers population of pending preconfirmation blocks during chain synchronization |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this 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 functionality to import pending preconfirmation blocks from the cache into the preconfirmation block server and properly wires it into the chain synchronization process.
- Introduces the ImportPendingBlocksFromCache method in PreconfBlockAPIServer.
- Adds a helper method getLatestPayload in the payloadQueue.
- Connects the preconfirmation block server within the driver and chain syncer for proper integration.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
packages/taiko-client/driver/preconf_blocks/server.go | Adds ImportPendingBlocksFromCache, with a minor spelling issue in variable naming. |
packages/taiko-client/driver/preconf_blocks/queue.go | Introduces the getLatestPayload helper to retrieve the latest payload from the queue. |
packages/taiko-client/driver/driver.go | Sets the preconfirmation block server in the driver. |
packages/taiko-client/driver/chain_syncer/chain_syncer.go | Integrates the preconfirmation block server for block recovery on chain sync. |
Co-authored-by: Copilot <[email protected]>
After this PR, when a newly started L2 EE chain has finished a beacon sync,
driver
will try to import pending P2P preconf blocks in the cache.