Feat: replace BlockCell with watch channel#397
Open
julio4 wants to merge 3 commits intofeat/async_payload_builderfrom
Open
Feat: replace BlockCell with watch channel#397julio4 wants to merge 3 commits intofeat/async_payload_builderfrom
julio4 wants to merge 3 commits intofeat/async_payload_builderfrom
Conversation
avalonche
reviewed
Feb 20, 2026
|
|
||
| // check if self.cell has a payload | ||
| self.cancel.cancel(); | ||
| info!("Resolve kind {:?}", kind); |
Collaborator
There was a problem hiding this comment.
not sure if we still need this log
Contributor
There was a problem hiding this comment.
Maybe we can make it more informative but we should still have something that indicates the getPayload call
avalonche
approved these changes
Feb 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #394
📝 Summary
With #394, try_build is now an async method and we can use proper async channels and .await for flashblock timing signals.
watch::Receiver::changed()until the first Some(best_payload) is published💡 Motivation and Context
The current BlockCell implementation use
Mutex<Option<T>> + Notifyfor sharing the best payload between the builder task and engine get payload.WaitForValue::pollcallscx.waker().wake_by_ref()on every poll when no value which i think produces a waker spin loop instead of yielding back to executor and Mutex adds unnecessary resource locks (as we have only one directional PayloadBuilder publisher -> PayloadResolve consumer)