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

Implement upstream peering & discovery #5

Open
schancel opened this issue Jul 2, 2019 · 1 comment
Open

Implement upstream peering & discovery #5

schancel opened this issue Jul 2, 2019 · 1 comment

Comments

@schancel
Copy link
Owner

schancel commented Jul 2, 2019

Story: As a wallet developer, I only want to have to maintain a list of a small number of servers in the wallet, and to query only one of these servers. Therefore, it would be nice to ensure that the servers are able to proxy requests to other backend nodes if they are unable to fulfill a request -- and then cache the response in the future.

Exit Criteria: Nodes can look up and cache data from upstream peers.

Impact: Significantly easier to use by wallet developers.

@schancel
Copy link
Owner Author

schancel commented Jul 3, 2019

So this probably needs a

GET /peers/ endpoint that returns all current peers.
and a PUT /peers/<ID> (possibly an ephemeral pubkey) that allows others to push a peer to you.

Then we'll also need a

GET /recent/keys endpoint that fetches a serialized form of a circular buffer. Peers can scrape this regularly to get keys to add to the keystore. If a peer is misbehaving it can just be banned.

Some other things are possible like "pay for peering" if we think the servers should maintain a hotwallet, but that's extra complexity which would be nice to avoid if we can prevent DDoSes a different way.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant