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

Explorer API: add new HTTP resource to decorate mix nodes with geoip locations #734

Merged
merged 5 commits into from Aug 11, 2021

Conversation

mmsinclair
Copy link
Contributor

This PR adds a new HTTP resource that returns the list of mix nodes with an additional optional field for the location information from the geoip service.

It also:

  1. Changes the cache of mix nodes from a Vec to a HashMap
  2. Caches the resolved geoip locations for each mix node in memory and writes this to disk along with the country distributions so that there is location data for most of the mix nodes should the node restart. Any mix nodes that have joined since the restart will not have location information until the country distribution task runs.

…e and keep mix node cache in a hash map instead of a vec
@mmsinclair mmsinclair force-pushed the feature/explorer-api-mixnode-locations branch from f45f2e3 to 696c517 Compare August 11, 2021 09:17
Copy link
Contributor

@neacsu neacsu left a comment

Choose a reason for hiding this comment

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

lgtm overall

explorer-api/src/state.rs Outdated Show resolved Hide resolved
explorer-api/src/state.rs Outdated Show resolved Hide resolved
explorer-api/src/mix_nodes/mod.rs Outdated Show resolved Hide resolved
explorer-api/src/country_statistics/mod.rs Show resolved Hide resolved
explorer-api/src/country_statistics/mod.rs Outdated Show resolved Hide resolved
explorer-api/src/country_statistics/mod.rs Outdated Show resolved Hide resolved
explorer-api/src/mix_node/http.rs Show resolved Hide resolved
explorer-api/src/mix_nodes/mod.rs Outdated Show resolved Hide resolved
explorer-api/src/mix_nodes/mod.rs Outdated Show resolved Hide resolved
explorer-api/src/mix_nodes/mod.rs Outdated Show resolved Hide resolved
explorer-api/src/mix_nodes/mod.rs Outdated Show resolved Hide resolved
explorer-api/src/mix_nodes/mod.rs Outdated Show resolved Hide resolved
explorer-api/src/state.rs Outdated Show resolved Hide resolved
@mmsinclair mmsinclair merged commit ccf8063 into develop Aug 11, 2021
@mmsinclair mmsinclair deleted the feature/explorer-api-mixnode-locations branch August 11, 2021 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants