Skip to content

CLI - auto sort nodelist in config and on dexbot-cli run#635

Merged
joelvai merged 20 commits intoCodaone:develfrom
thehapax:sorted-nodelist
Aug 16, 2019
Merged

CLI - auto sort nodelist in config and on dexbot-cli run#635
joelvai merged 20 commits intoCodaone:develfrom
thehapax:sorted-nodelist

Conversation

@thehapax
Copy link
Collaborator

Add option to the CLI configure to sort node list based on latency and remove those nodes that are too far away. Also, when starting by dexbot-cli run, the nodes from the config file are checked and sorted for latency before starting the bot.

this is an initial version, no gui updates have been made. hope this will help the node issues.

next update : switch to another node when there is too much latency in order placement.

@thehapax thehapax requested a review from joelvai July 23, 2019 06:14
@thehapax
Copy link
Collaborator Author

Note: could also use tqdm for progress bar, as a future feature.

@joelvai
Copy link
Collaborator

joelvai commented Jul 29, 2019

One thing that came to my mind. Wouldn't it be better to have the node pinging in dexbot-cli run / configure as optional parameter? Let's say I want to order my nodes and then run dexbot. The bot will have to ping trough all the nodes for three times in total. Also it would make the order of the nodes in configuration file kinda pointless since it will ping all the nodes anyway when running the bot.

Removing bad nodes automatically when sorting is nice 👍

@PermieBTS
Copy link
Collaborator

PermieBTS commented Jul 30, 2019

Digital Lucifer (@dls-cipher) has cleansed the node list removing unsuitable nodes.
Relevant to this pull: #643

@thehapax
Copy link
Collaborator Author

Digital Lucifer (@dls-cipher) has cleansed the node list removing unsuitable nodes.
Relevant to this pull: #643

Reviewed, most of the nodes are reachable from my test 21/25 and @joelvai can merge at anytime

@thehapax
Copy link
Collaborator Author

thehapax commented Aug 3, 2019

One thing that came to my mind. Wouldn't it be better to have the node pinging in dexbot-cli run / configure as optional parameter? Let's say I want to order my nodes and then run dexbot. The bot will have to ping trough all the nodes for three times in total. Also it would make the order of the nodes in configuration file kinda pointless since it will ping all the nodes anyway when running the bot.

Removing bad nodes automatically when sorting is nice 👍

@joelvai Updated and fixed above in latest commits. Let me know if you want me to update def measure_latency(nodes): in main_controller or if you want to do it. I fixed as much pep8 and the subprocess complaint as possible.

@joelvai joelvai merged commit be145ba into Codaone:devel Aug 16, 2019
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.

4 participants