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

Add switch for autopeering or static neighbors with configuration #395

Merged
merged 22 commits into from
Feb 19, 2024

Conversation

0xKtota
Copy link
Collaborator

@0xKtota 0xKtota commented Feb 11, 2024

No description provided.

@0xKtota 0xKtota requested a review from dlt-green February 11, 2024 22:04
0xKtota and others added 5 commits February 12, 2024 02:34
x added autpoeering update for existing installation (=true)
x added autpoeering to installation info
@dlt-green
Copy link
Owner

how manage peering partners when autopeering is false?
added cfg update for existing installations
added autopeering to installation info

@dlt-green
Copy link
Owner

dlt-green commented Feb 12, 2024

readme update open
for me it's ok for merge into dev

@fhb191309
Copy link
Collaborator

can we have a short description the next time?

what is flexible autopeering used for ?

@dlt-green
Copy link
Owner

dlt-green commented Feb 12, 2024

please be part of coming 'Node-Installer-Docker - Training for Collaborators' 26 Feb 2024 21:00 CET - Rules are discussed there and reviewed and set to public here

@dlt-green
Copy link
Owner

dlt-green commented Feb 12, 2024

can we have a short description the next time?

what is flexible autopeering used for ?

in my opinion it's needed when you want to set up static peers (for the normal user not needed) but in certain cases maybe useful. like i said above, there are some points to clear:
x how manage peering partners when autopeering is false?
x readme is open to change
x what happend to manually added peering partners?
also available after node update?
what happens when static peers are in config and when you enable autopeering afterwards?

x added some code thats needed to run correct also for nodes, what are already installed
x in the future a description is needed and the PR must be squashed before

Copy link
Owner

@dlt-green dlt-green left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️questions must be answered to get a review

@dlt-green dlt-green force-pushed the dev branch 3 times, most recently from dba1d48 to 07b79fe Compare February 13, 2024 16:15
@dlt-green dlt-green force-pushed the dev branch 5 times, most recently from 1ab887e to e0068ec Compare February 14, 2024 09:37
@0xKtota
Copy link
Collaborator Author

0xKtota commented Feb 17, 2024

can we have a short description the next time?
what is flexible autopeering used for ?

Sure👍

Description:
The "flexible autopeering" feature enables Hornet nodes to utilize either automatic peering, manual peering, or both, offering customizable network connectivity options.

please be part of coming 'Node-Installer-Docker - Training for Collaborators' 26 Feb 2024 21:00 CET - Rules are discussed there and reviewed and set to public here

date saved 📝

x how manage peering partners when autopeering is false?

With this version via Hornet's dashboard, but I'm currently testing an improved version where you store the static neighbors in the .env to use them for generating the peering.json

x readme is open to change

Should the information be written into the readme that you can use manual peers in addition to autopeering, or what do you mean? because the fact that you can set PoW, for example, is not listed either

x what happend to manually added peering partners?
also available after node update?

After an update these might be lost and you would have to add the static peers again, so I'm working on an improved version, which I'll submit shortly.

what happens when static peers are in config and when you enable autopeering afterwards?

If you have configured static peers and later activate autopeering, the node normally works with a combination of both peering methods.

In some cases, the IF recommends a combination of both peer methods:

"To minimize service distribution in case your autopeered peers are flaky, we recommend you only use autopeering if you have at least four static peers."

https://wiki.iota.org/hornet/references/peering/#autopeering

x added some code thats needed to run correct also for nodes, what are already installed
x in the future a description is needed and the PR must be squashed before

👍

@dlt-green
Copy link
Owner

dlt-green commented Feb 17, 2024

thanks for your answers. The question is whether it is enough to be able to change this setting manually via the ENV, or to suggest this setting via the installer during installation. With PoW it was necessary to actively include this as a point due to possible legal problems for the hosts. But you can also change PoW afterwards. maybe only offer the parameter as a setting via the ENV. Most people will use autopeering this way, and so there is no risk of the node not working at all after installation. then we also must prepare the peering.json to not lose this file. you don't must code this all by your wown, you should disguss this in our x-team before how we maybe solve this!

0xKtota and others added 3 commits February 18, 2024 23:37
This improved version offers a more intuitive approach to managing auto-peering and configuring static neighbors. To activate auto peering, users can simply press "E" and Enter. To disable auto peering, users can enter static neighbors by pressing the "X" key. The configurations are saved in the .env file using the format "Alias:MultiAddress, ...".

When running prepare_docker.sh, the script extracts the configuration data from the .env file and converts it to the peering.json format and also handles spaces and the absence of an alias. This file is then stored in the specified folder to ensure smooth integration into the networks.
 improved version with static peers in .env
@0xKtota 0xKtota requested a review from dlt-green February 18, 2024 23:01
Copy link
Owner

@dlt-green dlt-green left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging into dev ok for further testing, There may be other small things that need to be adjusted. docker adjustments still need to be checked

@dlt-green dlt-green changed the title Add flexible autopeering Add switch for autopeering or static neighbors with configuration Feb 19, 2024
@dlt-green
Copy link
Owner

⌛waiting for review

@dlt-green
Copy link
Owner

✅external PR accepted (3 approvals necessary | PR getting 3 approvals / no changes requested)
ℹ️will be integrated into the next version after successful testing, there will be maybe some adjustments necessary (dev-branch)
💚thank you for supporting our installer, don't forget to give us a ⭐ if you like it

@dlt-green dlt-green merged commit 232d31e into dlt-green:dev Feb 19, 2024
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