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

Support exposing booster bitswap peer directly to indexer via extended providers #951

Closed
hannahhoward opened this issue Nov 15, 2022 · 0 comments
Assignees
Labels
area/retrieval Area: Retrieval

Comments

@hannahhoward
Copy link
Collaborator

hannahhoward commented Nov 15, 2022

What

The indexer now supports "extended providers", a mechanism for adding new peers and protocols to a family of advertisements:
ipni/index-provider#292

Through this, we'd like to enable two new features --

  1. SPs should be able to expose their bitswap peer ID directly to the external world if they prefer, rather than going through the boost protocol proxy
  2. For those continuing to use the protocol proxy (cause it's perhaps easier, and maybe they don't want to go through the hassle of a complicated configuration), stop re-advertising every deal when bitswap goes on or off.

Implementation Outline

Currently, we have the following Bitswap configs:

type DealmakingConfig struct {
        // ...
        
    	// The peed id used by booster-bitswap. To set, copy the value
	// printed by running 'booster-bitswap init'. If this value is set,
	// Boost will:
	// - listen on bitswap protocols on its own peer id and forward them
	// to booster bitswap
	// - advertise bitswap records to the content indexer
	// - list bitswap in available transports on the retrieval transport protocol
	BitswapPeerID string
         
         //...
}

I propose adding two additional configs

type DealmakingConfig struct {
        // ...
        
    	// The peed id used by booster-bitswap. To set, copy the value
	// printed by running 'booster-bitswap init'. If this value is set,
	// Boost will:
	// - listen on bitswap protocols on its own peer id and forward them
	// to booster bitswap
	// - advertise bitswap records to the content indexer
	// - list bitswap in available transports on the retrieval transport protocol
	BitswapPeerID string
         

         // Public multiaddresses for booster-bitswap
         // If empty, booster-bitswap is assumed to be running privately
         // Boost will listen on bitswap protocols on its own peer id and forward them to booster bitswap via the protocol proxy
         // If public addresses are set, Boost will announce the booster bitswap peer id directly to the indexer as an extended provider
         BitswapPublicAddresses []string
         
          // If operating in public mode, in order to announce Booster-Bitswap as an extended provder, this value must point to a
          // a file containing the booster bitswap peer id's private key. Can be left blank when operating with protocol proxy
         BitswapPrivKeyFile string
}

With these in place, we will need to:

  • delete any per deal bitswap announcements made (the per deal is now always graphsync only)
  • advertise the bitswap peer id as an extended provider when operating in public mode
  • advertise with no context id to add bitswap as a protocol when operating in proxied mode

We'll continue to update the advertisement on every startup but it won't update on a per deal basis -- it's just one new ad.

Also need to update booster-bitswap itself to have a public mode that doesn't create a forwarded host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/retrieval Area: Retrieval
Projects
Status: Done
Development

No branches or pull requests

2 participants