-
Notifications
You must be signed in to change notification settings - Fork 130
fix(l1): sleep between FCU and getPayload calls in dev-mode block producer #5310
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
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 attempts to fix a timing issue in dev-mode block production by moving the sleep interval from after block production to between the FCU (forkchoiceUpdated) and getPayload calls. The change switches from tokio::time::sleep to tokio::time::interval for more precise timing control.
Key Changes:
- Added
Durationimport and created atokio::time::intervalticker - Moved the timing delay from the end of the loop to between FCU and getPayload calls
- Removed the
tokio::time::sleepat the end of the loop
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Lines of code reportTotal lines added: Detailed view |
**Description** This commit reverts the revert of #5205 done in #5257. As of #5310, the dev mode block producer now waits for the configured amount of time after initiating the payload build process and before retrieving the built payload, rather than after payload validation. This solves the issue we were having after merging #5205 where empty payloads were retrieved because the `engine_getPayload` call was immediately done after the `engine_forkChoiceUpdate`.
…ducer (lambdaclass#5310) **Motivation** Our `--dev` block production had a bug where we waited an interval before sending an FCU and called getPayload immediately after, causing inclusion latency to be 1.5x the interval. **Description** This PR moves the sleep between the FCU and getPayload calls, fixing the issue. It also switches to `tokio::time::interval` for more precision.
**Description** This commit reverts the revert of lambdaclass#5205 done in lambdaclass#5257. As of lambdaclass#5310, the dev mode block producer now waits for the configured amount of time after initiating the payload build process and before retrieving the built payload, rather than after payload validation. This solves the issue we were having after merging lambdaclass#5205 where empty payloads were retrieved because the `engine_getPayload` call was immediately done after the `engine_forkChoiceUpdate`.
Motivation
Our
--devblock production had a bug where we waited an interval before sending an FCU and called getPayload immediately after, causing inclusion latency to be 1.5x the interval.Description
This PR moves the sleep between the FCU and getPayload calls, fixing the issue. It also switches to
tokio::time::intervalfor more precision.