snarkOS icon indicating copy to clipboard operation
snarkOS copied to clipboard

feat: allow-external-peers

Open joske opened this issue 11 months ago • 9 comments

Feature https://github.com/AleoHQ/snarkOS/issues/3155

joske avatar Mar 06 '24 10:03 joske

Ok, so if nogossip is set, the node will not be requesting more peers; shouldn't this also mean that the node doesn't "shuffle" its peers, so that it doesn't lose them?

ljedrz avatar Mar 06 '24 10:03 ljedrz

@vicsn ?

joske avatar Mar 06 '24 10:03 joske

shouldn't this also mean that the node doesn't "shuffle" its peers, so that it doesn't lose them?

Yes, I did not have this logic in mind. @joske can you analyse and update the PR? Depending on the scope of required changes, we may also need to rename the flag to make it sound appropriate.

Can you also test the behavior manually? One suggested approach: start a network of e.g. 10 validators each having the new flag and the same 10 hardcoded client peers, and after half an hour you can check if all validators still have all client peers connected. Feel free to suggest another approach. Soon™️ this will be an automated integration test in CI, but that will take a few weeks still. :)

vicsn avatar Mar 06 '24 10:03 vicsn

I would advocate for allow-external-peers or no-external-peers (preferred) as the default flag

howardwu avatar Mar 09 '24 00:03 howardwu

I would advocate for allow-external-peers or no-external-peers (preferred) as the default flag

This PR ensures default behaviour WITHOUT flag is to NOT connect with peers. Therefore calling the flag --allow-external-peers sounds good to me, --no-external-peers is confusing.

vicsn avatar Mar 09 '24 08:03 vicsn

--allow-external-peers works for me. This means the default behavior is to not allow external peers.

@joske can you update this PR to reflect this change?

howardwu avatar Mar 10 '24 19:03 howardwu

Yes, was waiting for confirmation on the final name :)

joske avatar Mar 10 '24 22:03 joske

Yes, was waiting for confirmation on the final name :)

Please see above: --allow-external-peers is confirmed

howardwu avatar Mar 10 '24 22:03 howardwu

@joske can you update all instances of false to true? This includes the tests.

howardwu avatar Mar 15 '24 01:03 howardwu