This repository was archived by the owner on Jun 20, 2024. It is now read-only.
feat: initial functional version - #10
Merged
Merged
Conversation
lidel
reviewed
Feb 3, 2023
lidel
reviewed
Feb 6, 2023
hacdias
force-pushed
the
initial-iteration
branch
from
February 7, 2023 12:15
3d0e987 to
1e12408
Compare
hacdias
force-pushed
the
initial-iteration
branch
2 times, most recently
from
February 7, 2023 14:16
8945536 to
a701342
Compare
- block store provided by saturn - subdomain gateway support - dnslink gateway support - dnslink resolution - ipns resolution delegated to /api/v0/routing/get - /api/v0 redirected to randomly selected kubo node
hacdias
force-pushed
the
initial-iteration
branch
from
February 7, 2023 15:08
a701342 to
c912625
Compare
Collaborator
Author
|
@lidel @aschmahmann we have a reasonable working version here with the minimum features we need. I think we should get this reviewed and merged and then iterate on it. |
hacdias
marked this pull request as ready for review
February 7, 2023 15:11
lidel
approved these changes
Feb 8, 2023
Collaborator
There was a problem hiding this comment.
Thank you @hacdias, this includes functional parity (paths, subdomains, dnslinks, same metrics as kubo), and should be a good starting point.
Merging to unblock other workstreams:
Comment on lines
+114
to
+116
| func (api *bifrostGateway) GetIPNSRecord(ctx context.Context, c cid.Cid) ([]byte, error) { | ||
| return api.routing.GetValue(ctx, "/ipns/"+c.String()) | ||
| } |
Collaborator
There was a problem hiding this comment.
@hacdias mind opening a PR that immediately errors if CID codec is other than libp2p-key?
| // Naively choose one of the Kubo RPC clients. | ||
| endpoint := ps.kuboRPC[rand.Intn(len(ps.kuboRPC))] | ||
|
|
||
| u, err := url.Parse(fmt.Sprintf("%s/api/v0/routing/get?arg=%s", endpoint, key)) |
Collaborator
There was a problem hiding this comment.
ℹ️ exposing this is tracked in https://github.com/protocol/bifrost-infra/issues/2327
Comment on lines
+167
to
+169
| // Naively choose one of the Kubo RPC clients. | ||
| endpoint := endpoints[rand.Intn(len(endpoints))] | ||
| http.Redirect(w, r, endpoint+r.URL.Path+"?"+r.URL.RawQuery, http.StatusFound) |
lidel
force-pushed
the
initial-iteration
branch
from
February 8, 2023 03:46
b2ec980 to
200ed66
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an initial version of the Bifrost Gateway, which I would like to merge as soon as possible so we can work on improving it. It has the main features we require so far.
/api/v0/routing/getwith random selection of Kubo node./api/v0redirected to randomly selected Kubo node.External