-
Notifications
You must be signed in to change notification settings - Fork 1
Add Cardano #8
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
base: main
Are you sure you want to change the base?
Add Cardano #8
Conversation
Not used in the pipeline
LadyChristina
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great overall but there are a few things I'd recommend revisiting, especially documentation-wise (see comments)
| Collect geodata for Cardano relay nodes. | ||
| """ | ||
| import json | ||
| import os |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import
| relay_targets = set() | ||
| for pool_id, relays in pool_relays.items(): | ||
| for relay in relays: | ||
| ip = relay.get('ipv4') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to have cases where only ipv6 is set? What would happen then?
| skipped = 0 | ||
| new_entries = 0 | ||
| for node_ip in relay_targets: | ||
| if node_ip.endswith('onion'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps worth keeping a separate list with onion addresses? Or at least keeping track of how many there are and logging it
| @@ -0,0 +1,147 @@ | |||
| """ | |||
| Collect geodata for Cardano relay nodes. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to have a couple more sentences here that explain the steps that are followed for this, e.g. that onion addresses are skipped etc. (It would be fine to have that somewhere else too, e.g. in the README but I think it should be at least in one place).
| # Remove trailing punctuation (commas, periods, etc.) | ||
| name = name.rstrip('.,;:') | ||
|
|
||
| # Special rules for specific providers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a big deal but this could be a dictionary that is iterated through (I would definitely suggest making this change if adding more names in the future)
| @@ -0,0 +1,270 @@ | |||
| """ | |||
| Parse Cardano geodata and create CSV files for plotting. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again it would be good to have some more info as to how parsing is done, e.g. how unknown hosts are handled
No description provided.