-
Notifications
You must be signed in to change notification settings - Fork 49
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
A0-3364: cache network details of validators #1449
A0-3364: cache network details of validators #1449
Conversation
Left |
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, one last 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.
Cool stuff, some comments, although many of them ended up being almost one comment written in multiple places. :P
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.
Minor comments left.
9bd08cf
# Description Adding an RPC call to get network details of validators. This only pulls and caches network data that was previously observed by a node, without modifying or adding any new information flow between nodes in the network. Related PRs: #1448 #1449 <details> <summary> RPC query output on local network </summary> ```curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "alephNode_unstable_validatorNetworkInfo", "params": []}' http://localhost:9948/``` ``` { "jsonrpc": "2.0", "result": { "5F4H97f7nQovyrbiq4ZetaaviNwThSVcFobcA5aGab6167dK": { "session": 1, "network_level_address": "127.0.0.1:30346", "validator_network_peer_id": "5CwWuuXMCvcSC7hqeMdFSfNFzVGXCAtdSGAMjwV1nLwaqtqE" }, "5GBNeWRhZc2jXu7D55rBimKYDk8PGk8itRYFTPfC8RJLKG5o": { "session": 1, "network_level_address": "127.0.0.1:30344", "validator_network_peer_id": "5H7yZo8EzYkSsZn7MgC4f9vaVYQLgNaS4kEZ29Q7WtiYMVF8" }, "5Dfis6XL8J2P6JHUnUtArnFWndn62SydeP8ee8sG2ky9nfm9": { "session": 1, "network_level_address": "127.0.0.1:30345", "validator_network_peer_id": "5HZFGbT6tsY2iV2YT927wnN4q2TxmPT67SUJE99TqGQsjpGV" }, "5D34dL5prEUaGNQtPPZ3yN5Y6BnkfXunKXXz6fo7ZJbLwRRH": { "session": 1, "network_level_address": "127.0.0.1:30343", "validator_network_peer_id": "5E1YcJyx4u3kQ4UiRPgPXPSvb2vbcCR2DsxS927GM6x8wz85" } }, "id": 1 } ``` </details> Has been run also on testnet, slowly collects network details for authorities in each session (without `AccountId` because of the old runtime version). # Type of change Please delete options that are not relevant. - New feature (non-breaking change which adds functionality) # Checklist: <!-- delete when not applicable to your PR --> - I have created new documentation
Description
Adding structures that will be later helpful to construct RPC call to get network details of validators. This is a part 2/3 of the whole task, see #1447). This only pulls and caches network data that was previously observed by a node, without modifying or adding any new information flow between nodes in the network.
Follow up to #1448
Type of change
Please delete options that are not relevant.
Checklist: