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

fix: use new retrieval code path for indexers #1425

Merged
merged 4 commits into from
May 9, 2023
Merged

Conversation

jacobheun
Copy link
Contributor

@jacobheun jacobheun commented May 5, 2023

Summary

This change ensures that requests made via the network indexers, like cid.contact, are routed through the simplified graphsync retrieval pathways. Currently ingestion will fallback to legacy retrievals which is prone to stalling, and is less performant.

Verification with a local STI indexer

I verified the ingestion pathways succeeded locally by installing a local instance of StoreTheIndex.

# Install STI
go install github.com/ipni/storetheindex@latest
# Initialize the daemon
storetheindex init
# Remove the bootstrap nodes in the config to avoid connecting to mainnet
contents="$(jq '.Bootstrap.Peers = []' ~/.storetheindex/config)" && echo -E "${contents}" > ~/.storetheindex/config
# Start the daemon
storetheindex daemon
# Trigger a sync against the target Boostd instance
storetheindex admin sync --addr /ip4/127.0.0.1/tcp/50000/p2p/$PEER_ID --pubid $PEER_ID

You should then see logs in the daemon. Once ingested you can via records in the indexer:

  • Ingested Providers: http://localhost:3000/providers
  • Specific CIDs: http://localhost:3000/cid/$CID

Example output

$ provider ls ad --provider-addr-info=/ip4/127.0.0.1/tcp/50000/p2p/12D3KooWPGvdyREpGXC7BLj1idgLNFb8hLjHnw56hxp7nKQkcJQd --print-entries --topic=/indexer/ingest/localnet-0ac799ad-8fe5-484e-b345-2403e966897d
ID:           baguqeerax65mruyywqevq5czkzlv3ftef3gtnlxje62i2h4qmbkizzc5haia
PreviousID:   baguqeera52qpcvtzqmaenpf3qje4z5aefxaytrt63v3pw4wsw4cws2nhg4ca
ProviderID:   12D3KooWPGvdyREpGXC7BLj1idgLNFb8hLjHnw56hxp7nKQkcJQd
ContextID:    
Addresses:    [/ip6/::1/tcp/50000 /ip4/192.168.1.17/tcp/50000 /ip4/127.0.0.1/tcp/50000]
Is Remove:    false
Metadata :    
Extended Providers:
   Override: false
   Providers:
      None
Entries:
  ---------------------
  Chunk Count: 0
  Total Count: 0

Screenshot 2023-05-09 at 11 54 12 AM

Refs

Fixes #1432

@jacobheun jacobheun force-pushed the fix/index-ingestion branch from 46d096b to c8156cc Compare May 5, 2023 15:17
@jacobheun jacobheun changed the title fix(wip): use new retrieval code path for indexers fix: use new retrieval code path for indexers May 5, 2023
jacobheun and others added 3 commits May 8, 2023 12:52
This causes normal retrievls to fail, need to properly register the index provider engine for index retrieval fallback
@dirkmc dirkmc force-pushed the fix/index-ingestion branch from 138ab46 to dc0f02d Compare May 9, 2023 09:55
@dirkmc dirkmc marked this pull request as ready for review May 9, 2023 09:58
@dirkmc dirkmc merged commit 41b5126 into main May 9, 2023
@dirkmc dirkmc deleted the fix/index-ingestion branch May 9, 2023 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resolve stalled retrieval requests from network indexers
2 participants