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: support enabling Helia on nodejs as a node in an ipfs-cluster #1987

Open
SgtPooki opened this issue Oct 19, 2023 · 3 comments
Open

feat: support enabling Helia on nodejs as a node in an ipfs-cluster #1987

SgtPooki opened this issue Oct 19, 2023 · 3 comments
Labels
need/triage Needs initial labeling and prioritization

Comments

@SgtPooki
Copy link

Describe the feature you are proposing

We have received multiple requests from Helia regarding connecting to an ipfs-cluster, but this got me thinking about running Helia as a node in the cluster. I have heard that ipfs-cluster is a Kubo-specific thing. Is that correct?

Can you add support for running other IPFS implementations with ipfs-cluster? If so, can we use this issue to track that work?

Additional context

N/A

@SgtPooki SgtPooki added the need/triage Needs initial labeling and prioritization label Oct 19, 2023
@hsanjuan
Copy link
Collaborator

Does Helia still expose the IPFS RPC API (so the same thing that Kubo offers?). In that case it should be possible.

@SgtPooki
Copy link
Author

SgtPooki commented Nov 2, 2023

Does Helia still expose the IPFS RPC API (so the same thing that Kubo offers?).

It doesn't, and I don't think we plan to add Kubo RPC API support, but it would be possible to create a Helia module that wraps a Helia node in a lightweight server that supports some rpc commands.

What RPC endpoints does a node need to support to work with a ipfs-cluster? All of them, or only a subset?

@hsanjuan
Copy link
Collaborator

This is the list:

	ID(context.Context) (api.IPFSID, error)
	Pin(context.Context, api.Pin) error
	Unpin(context.Context, api.Cid) error
	PinLsCid(context.Context, api.Pin) (api.IPFSPinStatus, error)
	// PinLs returns pins in the pinset of the given types (recursive, direct...)
	PinLs(ctx context.Context, typeFilters []string, out chan<- api.IPFSPinInfo) error
	// ConnectSwarms make sure this peer's IPFS daemon is connected to
	// other peers IPFS daemons.
	ConnectSwarms(context.Context) error
	// SwarmPeers returns the IPFS daemon's swarm peers.
	SwarmPeers(context.Context) ([]peer.ID, error)
	// ConfigKey returns the value for a configuration key.
	// Subobjects are reached with keypaths as "Parent/Child/GrandChild...".
	ConfigKey(keypath string) (interface{}, error)
	// RepoStat returns the current repository size and max limit as
	// provided by "repo stat".
	RepoStat(context.Context) (api.IPFSRepoStat, error)
	// RepoGC performs garbage collection sweep on the IPFS repo.
	RepoGC(context.Context) (api.RepoGC, error)
	// Resolve returns a cid given a path.
	Resolve(context.Context, string) (api.Cid, error)
	// BlockStream adds a stream of blocks to IPFS.
	BlockStream(context.Context, <-chan api.NodeWithMeta) error
	// BlockGet retrieves the raw data of an IPFS block.
	BlockGet(context.Context, api.Cid) ([]byte, error)

The ConfigKey one is probably unused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

2 participants