-
Notifications
You must be signed in to change notification settings - Fork 9
[explorer/nodewatch]: statistics service migration #1421
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: dev
Are you sure you want to change the base?
Conversation
… key Problem: The endpoint is missing when using the main public key to query node info. Solution: Added a new endpoint to query node info by the main public key. Added error handler for 400 and 404
… key Problem: The endpoint is missing when using the node public key to query node info. Solution: A new endpoint was added to query node info using the node public key.
Problem: The API node status field is missing Solution: Added API node status properties in NodeDescriptor
Problem: The filter node is missing on the API node list endpoint Solution: Added query params only_ssl, limit, and order only_ssl: to filter out SSL enable node, it needs explorer and wallet limit: the number of numbers returned from the endpoint order: shuffle node list when require
Problem: missing geo-location information in the node list Solution: load the geo location file from the specific path, and create a mapping for node
Problem: The nodes count endpoint is missing. Solution: Read the JSON file `symbol_time_series_nodes_count` and allow query data from the new endpoint.
Problem: missing finalizedEpoch, finalizedHash, and finalizedPoint in node descriptor Solution: added finalized properties in node descriptor
fb779b2
to
0842cb0
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #1421 +/- ##
=======================================
Coverage 98.26% 98.27%
=======================================
Files 163 158 -5
Lines 6691 6648 -43
Branches 143 143
=======================================
- Hits 6575 6533 -42
+ Misses 116 115 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
@@ -23,6 +23,13 @@ def __init__( | |||
height=0, | |||
finalized_height=0, | |||
balance=0, | |||
finalized_epoch=0, | |||
finalized_hash=None, | |||
finalized_point=0, |
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.
Does it make sense to group all the finalized properties into a namedtuple?
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.
Yes, sound good to me 👍🏼
I'll update it.
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.
An update.
I'm unsure it's a good practice to use nested way to get attr in Python.
Used namedtuple to group finalized_height
, finalized_epoch
, finalized_hash
, and finalized_point
as finalized_info.
Found out that chart_utlis.py's VersionAggregator
consumes finalized_height directly from the object instead of finalized_info.height
. Because of the namedtuple, it required a nested approach to retrieve the attribute.
Here is my commit d5f6ed7
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.
Yeah, if it complicates the code, then leave it as is.
Problem: missing some of the features and endpoints to migrate from the statistic service to Node Watch.
Solution: Added those endpoints and features.