neo icon indicating copy to clipboard operation
neo copied to clipboard

Remove unnecessary default seedlist

Open satoshichou opened this issue 2 years ago • 12 comments

Close https://github.com/neo-project/neo/issues/2772

satoshichou avatar Jun 15 '22 10:06 satoshichou

To be honest, i have no idea what the point of these settings since we already have everything in the config.json.

Jim8y avatar Jun 19 '22 22:06 Jim8y

I agree with OP to remove this behaviour. It is counter intuitive and had me scratching my head multiple times in the past. If SeedList means the list of nodes to seed from, then an empty list should mean "do not connect to any seed". Having to input some non-existent ip address just so it stops connecting to MainNet feel bad.

The whole hardcoding default config seems like some attempt to avoid null pointer exceptions due to invalid configs (iirc from the past). It shouldn't be that hard to check the config against a JSON schema and shutdown in case of an invalid config instead of doing this default thing.

ixje avatar Jun 20 '22 13:06 ixje

https://github.com/neo-project/neo/issues/2772#issuecomment-1162616415

erikzhang avatar Jun 22 '22 04:06 erikzhang

#2772 (comment)

But not worked as this behaviour, see: https://github.com/neo-project/neo/issues/2772#issuecomment-1162706000 And we already have them in config.json, why someone have to remove seedlist[]? Can't see any scene like this. But make seedlist[] empty is an ordinary behaviour in single consensus privatenet, it shouldn't connect mainnet seeds.

superboyiii avatar Jun 24 '22 02:06 superboyiii

https://github.com/neo-project/neo/issues/2772#issuecomment-1163554219

shargon avatar Jun 24 '22 07:06 shargon

But make seedlist[] empty is an ordinary behaviour in single consensus privatenet, it shouldn't connect mainnet seeds.

This ☝️

#2772 (comment)

@shargon can you explain what are you're trying to say with this comment? We can read that the behaviour is "by design" according to the dotnet team, but I don't think the current behaviour in NEO core is the intention by the NEO team. At least the way I read Erik's comment is "when the whole seedlist key is missing from the config it should take the default seed list, "but" an empty array should give an empty seedlist". Empty seedlist to me means, do not connect to any seed nodes and that's not what it is doing as shown in my screen recording

ixje avatar Jun 27 '22 07:06 ixje

I think it's necessary to make default seedlist empty, please move on. @erikzhang @shargon

satoshichou avatar Jul 04 '22 06:07 satoshichou

What's the sense of remove the seedlist but not the StandbyCommittee? I think that we should remove all and ensure that it's configured by the json

shargon avatar Jul 04 '22 10:07 shargon

What's the sense of remove the seedlist but not the StandbyCommittee? I think that we should remove all and ensure that it's configured by the json

Actually I don't care about any other parameters because in no sense I need to make it empty on my config.json for privatenet, but seedlist has this sense. When I start a single consensus and a seed node or you call it operation node/debug node/terminal node, I input command, deploy contract on it and it doesn't need to connect any peers. However, it connects to mainnet seeds finally.

satoshichou avatar Jul 04 '22 10:07 satoshichou

@ixje Maybe we can temporarily set seedlist like "SeedList": [""] to avoid this issue.

superboyiii avatar Jul 21 '22 06:07 superboyiii

@ixje Maybe we can temporarily set seedlist like "SeedList": [""] to avoid this issue.

That's a workaround similar to using a non-existent ip address, that is not a solution in my opinion. SeedList: [] meaning do not connect to anything is what I call developer friendly and I thought that's what NEO is trying to be.

ixje avatar Jul 21 '22 07:07 ixje

@ixje Maybe we can temporarily set seedlist like "SeedList": [""] to avoid this issue.

That's a workaround similar to using a non-existent ip address, that is not a solution in my opinion. SeedList: [] meaning do not connect to anything is what I call developer friendly and I thought that's what NEO is trying to be.

I think we need to restrict that in Neo.Json to re-deserialize settings for all empty array to keep all in the same behaviour.

superboyiii avatar Jul 21 '22 10:07 superboyiii

Let's handle this one for 3.7.0, either we fix it or not. It's a relatively simple thing, but some people find the default behavior annoying. And we have this PR for a long long time without any decision which is bad.

My take on it is that it should be merged, please vote :+1: or :-1: below and we either merge it (well, it needs a rebase now) or close it next week. @AnnaShaleva @shargon @vncoelho @superboyiii

roman-khimov avatar Nov 16 '23 19:11 roman-khimov

I agree to merge this PR, but at the same time I agree with https://github.com/neo-project/neo/pull/2773#issuecomment-1173634283. If we're removing the default SeedList (mainnet's one) and suppose that the default configuration can be used for any network (testnet, privnet), then other mainnet-related fields also should be removed (mainnet standby committee, magic, etc.). Otherwise we have kind of "mixed" configuration that includes both mainnet-related things and truly "default" things.

But it's a nitpicking and not critical.

AnnaShaleva avatar Nov 20 '23 17:11 AnnaShaleva

agree with @AnnaShaleva

vncoelho avatar Nov 20 '23 17:11 vncoelho

@satoshichou, can you rebase/extend it slightly?

roman-khimov avatar Nov 20 '23 18:11 roman-khimov

Are we really asking somebody to update his/her PR after almost 1.5 years? Looking at the persons profile shows no GitHub activity since creating this PR. I say just merge this and deal with Anna's suggestions in a new PR.

ixje avatar Nov 21 '23 08:11 ixje

Closed by inactivity and moved to https://github.com/neo-project/neo/pull/2980

shargon avatar Nov 21 '23 09:11 shargon

Are we really asking somebody to update his/her PR after almost 1.5 years

You never know. At least it was important for me to try updating/merging the PR from the original author. If it can't be done, OK, no problem, but we have tried.

roman-khimov avatar Nov 21 '23 10:11 roman-khimov

I'm always there, the shadow 👻 . Really good to see this moving forward. Neo is awesome! @roman-khimov @ixje @shargon @vncoelho

satoshichou avatar Nov 22 '23 02:11 satoshichou

laugh one's ass off

RichardBelsum avatar Nov 22 '23 03:11 RichardBelsum

laugh one's ass off

You never know when I will be back. May the force be with you. 😏

satoshichou avatar Nov 22 '23 03:11 satoshichou

I'm always there, the shadow 👻 . Really good to see this moving forward. Neo is awesome! @roman-khimov @ixje @shargon @vncoelho

@satoshichou please check https://github.com/neo-project/neo/pull/2980

Jim8y avatar Nov 22 '23 03:11 Jim8y

I'm always there, the shadow 👻 . Really good to see this moving forward. Neo is awesome! @roman-khimov @ixje @shargon @vncoelho

@satoshichou please check #2980

Yeah, already saw this. Good moving.

satoshichou avatar Nov 22 '23 03:11 satoshichou

@satoshichou feel free to open again the pull request!

shargon avatar Nov 22 '23 07:11 shargon

@satoshichou feel free to open again the pull request!

Yours is enough!

satoshichou avatar Nov 22 '23 07:11 satoshichou