Skip to content
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

feat(retrieval): multiplex into the neighborhood #4405

Merged
merged 6 commits into from
Oct 18, 2023
Merged

Conversation

istae
Copy link
Member

@istae istae commented Oct 17, 2023

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

introduces a similar multiplexing mechanism as the pushsync one.
Peers that are one hop away from the neighborhood (and the neighbor peers) have extra retries to find the chunk.

closes ethersphere/bee-backlog#67

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

Screenshots (if appropriate):

@istae istae marked this pull request as ready for review October 17, 2023 12:29
@istae istae requested review from mrekucci and acha-bill October 17, 2023 12:35
@@ -182,7 +182,9 @@ func bootstrapNode(
}
b.localstoreCloser = localStore

retrieve := retrieval.New(swarmAddress, localStore, p2ps, kad, logger, acc, pricer, tracer, o.RetrievalCaching)
r := func() (uint8, error) { return swarm.MaxBins, nil }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend naming this closure with a short and meaningful name.

@@ -712,7 +712,10 @@ func createRetrieval(
forwarderCaching bool,
) *retrieval.Service {
t.Helper()
ret := retrieval.New(addr, storer, streamer, chunkPeerer, logger, accounting, pricer, tracer, forwarderCaching)

r := func() (uint8, error) { return swarm.MaxBins, nil }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same as above.

@istae istae merged commit a7bd625 into master Oct 18, 2023
13 checks passed
@istae istae deleted the retrieval-multi-errs branch October 18, 2023 13:20
@istae istae self-assigned this Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

retrieval multiplexing for peers that are one hop away from the neighborhood
2 participants