Repository navigation
feat(pushsync): remember first hop results per neighborhood - #5710
Draft
gacevicljubisa wants to merge 18 commits into
Draft
gacevicljubisa wants to merge 18 commits into
gacevicljubisa wants to merge 18 commits into
Conversation
…first-hop-memory-mainnet
gacevicljubisa
force-pushed
the
feat/pushsync-first-hop-memory-mainnet
branch
from
November 19, 2026 07:19
ff06964 to
b3e76f3
Compare
gacevicljubisa
marked this pull request as ready for review
November 19, 2026 13:07
…er a radius change
gacevicljubisa
marked this pull request as draft
November 20, 2026 19:42
This branch has not been deployed
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.
Checklist
Description
This PR is stacked on #5390. The base branch is
fix/pushsync-out-of-depth-chunk-loss, so the diff shows only the changes below. It has two changes.1. Pushsync origin: first-hop memory (
pkg/pushsync/hopmemory.go,pkg/pushsync/pushsync.go)With #5390 the origin retries a chunk when it gets a shallow receipt. Each shallow receipt is paid. For the next chunk of the same neighborhood, the origin often selects the same first hop and pays for the same shallow receipt again.
The origin now keeps, per neighborhood (the chunk addresses that share the first
radiusbits), the last result of each first hop:Only the origin changes. Forwarders and the protocol do not change. The memory is not stored on disk. The new metric
first_hop_totalcounts the results by the reason the first hop was selected.2. Retrieval: the closest reachable peer, without the health mark (
pkg/retrieval/retrieval.go)closestPeerasked a healthy peer first, at any distance from the chunk. A healthy peer that is far from the chunk was asked before a closer peer that was not marked healthy. The request then used its attempts on far peers and the chunk was not retrieved.closestPeernow selects the closest reachable peer and does not use the health mark. When no reachable peer is left, it selects the closest connected peer. It applies to the origin and to forwarders.Known limitations
Motivation and Context
pushsim. It is not part of this PR.Related Issue (Optional)
Depends on #5390.
AI Disclosure