Skip to content

IPFS: use IPFS Gateway API#5600

Merged
isum merged 2 commits into
masterfrom
ion/use-ipfs-gateway-api
Oct 1, 2024
Merged

IPFS: use IPFS Gateway API#5600
isum merged 2 commits into
masterfrom
ion/use-ipfs-gateway-api

Conversation

@isum

@isum isum commented Aug 13, 2024

Copy link
Copy Markdown
Member

This PR implements a new IPFS client that connects and sends requests to the IPFS Gateway. The existing IPFS RPC API client has been refactored to reuse new code.

The --ipfs CLI argument accepts both IPFS Gateway URLs and RPC API URLs, and the appropriate client is automatically detected and created.

Closes #5573

Todos

  • Clean up tests affected by the changes
  • Add unit tests for new clients

@isum isum self-assigned this Aug 13, 2024
@isum isum force-pushed the ion/use-ipfs-gateway-api branch 3 times, most recently from 60c8b2d to 465e4fc Compare August 15, 2024 16:22
@fordN fordN requested a review from mangas August 26, 2024 15:52
@isum isum force-pushed the ion/use-ipfs-gateway-api branch 2 times, most recently from b2f492d to 4c7d7eb Compare September 18, 2024 15:43
Box::new(self)
}

async fn send_test_request(&self) -> anyhow::Result<()> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure what this is trying to achieve, is this only used for tests or is this a check for something specific? If it's only used for tests, could it be marked with cfg(test) ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Test requests are used to check which type of API a server address supports (RPC or Gateway) in order to initialize the appropriate client.

@mangas mangas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM overall, I think this should be tested in the integration cluster before merging

isum added 2 commits October 1, 2024 17:26
Introduces a new IPFS gateway client, refactoring the existing
RPC API client to reuse the new code. Also introduces some new
types and concepts to make working with IPFS easier.
Integrates the new IPFS types and clients into the existing codebase,
replacing the old types and client.
@isum isum force-pushed the ion/use-ipfs-gateway-api branch from 4c7d7eb to 075abbe Compare October 1, 2024 14:27
@isum isum merged commit 90e949d into master Oct 1, 2024
@isum isum deleted the ion/use-ipfs-gateway-api branch October 1, 2024 14:53
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.

Use IPFS gateway API

3 participants