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

shuffle route_setup_nodes array in visor config on failure to dial #1785

Open
0pcom opened this issue Mar 21, 2024 · 0 comments
Open

shuffle route_setup_nodes array in visor config on failure to dial #1785

0pcom opened this issue Mar 21, 2024 · 0 comments
Labels
Milestone

Comments

@0pcom
Copy link
Collaborator

0pcom commented Mar 21, 2024

For a long time a redcurrant issue has been that more often than not the default (first entry) route setup-node on prod cannot be dialed.

A simple optimization might be - when a setup-node cannot be dialed after the default number of dial attempts, move that setup-node key to the last position (len -1) and move all the other keys in that array forward

thus, the initial config:

		"route_setup_nodes": [
			"0324579f003e6b4048bae2def4365e634d8e0e3054a20fc7af49daf2a179658557",
			"024fbd3997d4260f731b01abcfce60b8967a6d4c6a11d1008812810ea1437ce438",
			"03b87c282f6e9f70d97aeea90b07cf09864a235ef718725632d067873431dd1015"
		],

would be re-ordered as follows and flushed to the file:

		"route_setup_nodes": [
			"024fbd3997d4260f731b01abcfce60b8967a6d4c6a11d1008812810ea1437ce438",
			"03b87c282f6e9f70d97aeea90b07cf09864a235ef718725632d067873431dd1015"
			"0324579f003e6b4048bae2def4365e634d8e0e3054a20fc7af49daf2a179658557",
		],

assuming that the second key was successfully dialed.

Additionally, we need some debug logging that indicates no setup-nodes could be dialed when all the setup-nodes in the list have been exhausted, before (I suppose) trying again to dial all of them in the original order.

I believe this is better than just randomizing the order of the keys as it's responsive to feedback of unsuccessful dial attempts.

@0pcom 0pcom added enhancement New feature or request routing setup-node labels Mar 21, 2024
@0pcom 0pcom added this to the v1.4.0 milestone Mar 23, 2024
@0pcom 0pcom added the easy label Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant