Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

feat: add proxy blockstore for testing against non-saturn backend #50

Merged
merged 5 commits into from
Feb 24, 2023

Conversation

hacdias
Copy link
Collaborator

@hacdias hacdias commented Feb 21, 2023

  • Adds a proxy blockstore that simply proxies block requests to any ?format=raw gateway like ipfs.io or localhost Kubo.
  • Adds environment variable that is capable of using this instead of caboose.
  • Changes the default to use the proxy gateway.

This can be useful for testing, as well as other use cases. Built on top of #48

@hacdias hacdias self-assigned this Feb 21, 2023
@hacdias hacdias changed the base branch from main to issue/43 February 21, 2023 13:29
@hacdias hacdias requested a review from lidel February 21, 2023 13:33
@hacdias hacdias marked this pull request as ready for review February 21, 2023 13:46
@lidel lidel changed the title feat: add proxy blockstore feat: add proxy blockstore for testing against non-saturn backend Feb 21, 2023
Copy link
Collaborator

@lidel lidel left a comment

Choose a reason for hiding this comment

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

Thank you @hacdias, small asks below

main.go Show resolved Hide resolved
blockstore_proxy.go Outdated Show resolved Hide resolved
blockstore_proxy.go Outdated Show resolved Hide resolved
blockstore_proxy.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
Base automatically changed from issue/43 to main February 21, 2023 23:28
@hacdias hacdias force-pushed the test-bs branch 2 times, most recently from 87cd7ab to 7b86715 Compare February 22, 2023 12:00
@hacdias hacdias requested a review from lidel February 22, 2023 12:09
@hacdias
Copy link
Collaborator Author

hacdias commented Feb 22, 2023

@lidel I made it default, support more than one URL, chosen randomly.

@lidel lidel force-pushed the test-bs branch 6 times, most recently from e47fd9c to 9ba968c Compare February 24, 2023 19:53
hacdias and others added 5 commits February 24, 2023 20:57
we explicitly require it to be set, to avoid situation where someone
runs bufrost-gateway, has local ipfs-desktop, and thinks they use Saturn
CDN ;-)
Copy link
Collaborator

@lidel lidel left a comment

Choose a reason for hiding this comment

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

Thank you @hacdias!

I've added some docs and for now require user to explicitly choose the backend by defining either PROXY_GATEWAY_URL or STRN_ORCHESTRATOR_URL.

This should remove any confusion around which backend is used, especially if someone runs local Kubo node and thinks they use Saturn.

@lidel lidel merged commit c305b3b into main Feb 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants