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

Integrate node discovery #2

Open
dmugtasimov opened this issue Aug 28, 2021 · 3 comments
Open

Integrate node discovery #2

dmugtasimov opened this issue Aug 28, 2021 · 3 comments
Assignees

Comments

@dmugtasimov
Copy link

dmugtasimov commented Aug 28, 2021

TODO

  1. A wallet (Account Manager) distribution should contain a list of nodes that are expected to be
    online (at least on of them) at the moment when the distribution is installed (therefore it is
    recommended to gather such a list from running node at every build time of the distribution,
    and even have scheduled builds often enough to have up to date list in the distribution)
  2. When the wallet starts it should find the first online node from the list by making
    GET /api/v1/nodes/self/ (see http://3.143.205.184:8555/api/doc/#/v1/v1_nodes_retrieve )
    request to each node from the list
  3. Once the first online node is found then it should query the list of known nodes from it by making
    GET /api/v1/nodes/ request (see http://3.143.205.184:8555/api/doc/#/v1/v1_nodes_list )
  4. The list of nodes received from an online blockchain node must be saved to local storage of the
    wallet so at the next start it contains up to date list of nodes at next start
  5. The wallet may refresh the list of declared node periodically and save it to local storage

OPEN ISSUES

  1. Should Node return the other nodes online status? I suggest not to. Here are the reasons:
    1.1 A node may be online from the other Node perspective and offline for the wallet (it may happen
    because some IP addresses are blocked in certain networks or technical reasons)
    1.2 It is either an overhead for a node to check other nodes online status on each request, or
    the online status is outdated (if cached). Also the wallet might not even need an online
    status for each node in the list, but only for first few nodes (probably one in most cases)
  2. An online node might stale keep returning an outdated list of nodes. We might need a way
    to detect that or even have an algorithm to find a node with the latest block number to list
    the nodes from. I think we can do it later as a part of another task.
@dmugtasimov
Copy link
Author

@angle943 @buckyroberts @manishram Hi guys. I created the first task for wallet integration. I am not sure who I should assign it to. Please, feel free to unassign yourself from the task if you feel yourself not a part of the task.

Questions and comments about the task description are welcome.

@angle943
Copy link
Contributor

angle943 commented Aug 28, 2021

Regarding the TODOs:

  1. I believe this list of nodes will be maintained on the website-api or some type of other service that we will be sending a GET request to, in order to get the information. We would need @ThaDeveloper as well once the details have been finalized.

2-4) Yeah I can implement that.

A little update, I am currently building out the beta wallet here: https://github.com/thenewboston-developers/Wallet

But I am still using the Alpha version of the BE, as I am currently mainly focusing around the app architecture and the UI. I will tackle this issue once details get more finalized and my current task completed

BTW, I will be done with my current task (Architecture & UI) finished in about 2 months

@dmugtasimov
Copy link
Author

As for the item 1 I believe we should read the list of nodes from the active blockchain at build time and save it the distribution. We can maintain a node for that purpose so we always have an known online node build scripts can pick node list from.

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

No branches or pull requests

4 participants