What current issue(s) does this address, or what feature is it adding?
A recent discussion on slack showed that an edge case can exist in which neo-python runs out of node address to fill our desired connection slots and cannot recover. In such a scenario neo-python recycles all addresses it ever learned over the network (both bad and good) and tries to find a working node. There is a threshold on how long it tries before recycling again. This threshold is time based, not address list exhaustive. The recycling logic always produces the same list, therefore if the first n addresses in the list are bad, we can hit the time threshold and recycle before finding a good node.
How did you solve this problem?
We randomize the addresses just after recycling them. This should eventually result in being able to restore.
How did you make sure your solution works?
Are there any special changes in the code that we should be aware of?
Please check the following, if applicable:
[ ] Did you add any tests?
[X] Did you run make lint?
[ ] Did you run make test?
[X] Are you making a PR to a feature branch or development rather than master?
[X] Did you add an entry to CHANGELOG.rst? (if not, please do)
Coverage decreased (-0.003%) to 85.311% when pulling ce6dd37201ce1c20af2f8781abad62305f8b36a1 on ixje:update-network-recovery into cc6fd894f6c7c395a02e736e2a2b9c374b58a39a on CityOfZion:development.
What current issue(s) does this address, or what feature is it adding? A recent discussion on slack showed that an edge case can exist in which
neo-python
runs out of node address to fill our desired connection slots and cannot recover. In such a scenarioneo-python
recycles all addresses it ever learned over the network (both bad and good) and tries to find a working node. There is a threshold on how long it tries before recycling again. This threshold is time based, not address list exhaustive. The recycling logic always produces the same list, therefore if the firstn
addresses in the list are bad, we can hit the time threshold and recycle before finding a good node.How did you solve this problem? We randomize the addresses just after recycling them. This should eventually result in being able to restore.
How did you make sure your solution works?
Are there any special changes in the code that we should be aware of?
Please check the following, if applicable:
make lint
?make test
?CHANGELOG.rst
? (if not, please do)