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

Add REST API and use it for bootstrap data #176

Merged
merged 5 commits into from
Oct 2, 2020
Merged

Add REST API and use it for bootstrap data #176

merged 5 commits into from
Oct 2, 2020

Conversation

domob1812
Copy link
Collaborator

This implements #162: It adds an optional REST API to the GSP, which has just one endpoint (for now at least): /bootstrap.json.gz, serving the getbootstrapdata result as gzip-compressed JSON. Note that the data is only refreshed every once in a while, and cached in-between. So it will not exactly match getbootstrapdata, but will be a "somewhat fresh" data result which is all we need.

In addition, getbootstrapdata as RPC method is no longer supported by the Charon server. The Charon client will instead try to retrieve it from the REST API, which is a lot more efficient for that big data chunk.

Extend tauriond so that it can run a REST server.  The server has just
one endpoint (at least for now), /bootstrap.json.gz, which returns the
getbootstrapdata JSON (as per the RPC method) with gzip compression.
Keep a copy of the bootstrap data for the REST API in memory, and
only refresh it with a certain interval.  (If we are still catching up,
no cache is kept.)
Instead of passing getbootstrapdata through Charon, use the new REST
API to get the data from tauriond in client mode.
Add in letsencrypt.pem, which holds the --cafile that can be used
with the Taurion REST client on the production server (rest.taurion.io).
Extend the charon.py integration test to also exercise getbootstrapdata
via the new REST interface between client and server.
@domob1812 domob1812 added performance Something related to improving performance interface Something related to the RPC (or other) interface labels Sep 30, 2020
@domob1812 domob1812 added this to the 0.3 milestone Sep 30, 2020
@domob1812 domob1812 merged commit 6b7fdac into 0.3 Oct 2, 2020
domob1812 added a commit that referenced this pull request Oct 2, 2020
Add REST API and use it for bootstrap data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interface Something related to the RPC (or other) interface performance Something related to improving performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant