Feat: replace BlockCell with watch channel#397
Merged
Conversation
avalonche
reviewed
Feb 20, 2026
avalonche
approved these changes
Feb 20, 2026
d384647 to
05d882c
Compare
f0b677f to
4da2ef6
Compare
4da2ef6 to
b4fcd2b
Compare
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.
📝 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)