Early-subscribe Gloas proposer_preferences and fix publish digest - #9794
Open
NikhilSharmaWe wants to merge 3 commits into
Open
Early-subscribe Gloas proposer_preferences and fix publish digest#9794NikhilSharmaWe wants to merge 3 commits into
NikhilSharmaWe wants to merge 3 commits into
Conversation
NikhilSharmaWe
force-pushed
the
fix/gloas-early-proposer-prefs
branch
from
August 12, 2026 04:06
b90dfd3 to
f077003
Compare
Author
|
cc @eserilev |
eserilev
reviewed
Aug 12, 2026
Comment on lines
-821
to
+833
| // update the network globals | ||
| self.network_globals | ||
| .gossipsub_subscriptions | ||
| .write() | ||
| .insert(topic.clone()); | ||
|
|
||
| let topic: Topic = topic.into(); | ||
| let libp2p_topic: Topic = topic.clone().into(); | ||
|
|
||
| match self.gossipsub_mut().subscribe(&topic) { | ||
| match self.gossipsub_mut().subscribe(&libp2p_topic) { | ||
| Err(e) => { | ||
| warn!(%topic, error = ?e, "Failed to subscribe to topic"); | ||
| false | ||
| } | ||
| Ok(_) => { | ||
| debug!(%topic, "Subscribed to topic"); | ||
| self.network_globals | ||
| .gossipsub_subscriptions | ||
| .write() | ||
| .insert(topic); |
Member
There was a problem hiding this comment.
just leaving a note that with this change this fixes a small bug where a failed topic subscription was never retried
Member
|
CI is failing |
Signed-off-by: Nikhil Sharma <nikhilsharma230303@gmail.com>
NikhilSharmaWe
force-pushed
the
fix/gloas-early-proposer-prefs
branch
from
August 17, 2026 05:00
f077003 to
56590a7
Compare
Author
|
Fixed the rustfmt failure in the latest push. |
Author
eserilev
reviewed
Sep 2, 2026
Comment on lines
+1020
to
+1029
| fn gloas_early_prefs_subscribe_epoch(spec: &ChainSpec) -> Option<Epoch> { | ||
| if !spec.is_gloas_scheduled() { | ||
| return None; | ||
| } | ||
| let gloas_epoch = spec.gloas_fork_epoch?; | ||
| if gloas_epoch == Epoch::new(0) { | ||
| return None; | ||
| } | ||
| Some(gloas_epoch.saturating_sub(PROPOSER_PREFERENCES_EARLY_SUBSCRIBE_EPOCHS)) | ||
| } |
Member
There was a problem hiding this comment.
can we generalize this a bit? the publish side already seems generalized, but the subscriber side isnt. so this does work for fulu -> gloas. but it wont work for gloas -> heze for example
Author
There was a problem hiding this comment.
early-subscribe now targets the next prefs-bearing digest (not just Gloas)
Done in 5315811
Signed-off-by: Nikhil Sharma <nikhilsharma230303@gmail.com>
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.
Closes #9041
Description
Gloas needs
proposer_preferenceson the Gloas digest one epoch before activation so builders can bid in the first Gloas epoch. We still only joined new fork topics 2 slots early, and gossip publish always used the current ENR digest, so pre-fork prefs would not land on the right topic.This PR:
proposer_preferenceson the Gloas digest fromgloas_epoch - 1ForkContext::context_bytes(proposal_epoch)SUBSCRIBE_DELAY_SLOTS = 2for the full fork topic setSubscribeCoreTopicsI went with selective subscribe instead of joining all Gloas topics a full epoch early. Spec only calls out prefs, and the broader change was what hit the fallback simulator before.
Also makes
Network::subscribeupdategossipsub_subscriptionsonly on success so failed early-subscribe retries work.Test plan
NetworkService::build