nspcc-dev / neo-go

Go Node and SDK for the NEO blockchain
MIT License
118 stars 77 forks source link

Extend netmode package with NeoFSMainNet and NeoFSTestNet #3503

Open AnnaShaleva opened 2 weeks ago

AnnaShaleva commented 2 weeks ago

Is your feature request related to a problem? Please describe.

netmode package doesn't contain NeoFS chains IDs. We've already discussed this problem with @roman-khimov, but I can't find the conversation. The arguments against extension were that NeoFS-related things are not finally established in the Neo ecosystem as it required for moving these constants to the netmode package.

But I see that there are users of NeoGo for those it will be useful to have a designated constants for NeoFS networks, because they work with NeoFS node configs. Thus, I suggest to consider extending netmode package one more time.

Describe the solution you'd like

Add netmode.NeoFSMainNet and netmode.NeoFSTestNet constants.

Describe alternatives you've considered

Keep netmode package as is and let the users of netmode package handle FS chain configs by their own forces.

AnnaShaleva commented 2 weeks ago

BTW, it should likely be netmode.MainNetNeoFS and netmode.TestNetNeoFS to match the embeds: https://github.com/nspcc-dev/neo-go/blob/5566e354d451fd14d3b2a856cfe4b1b654a7343e/config/config_embed.go#L24-L32

roman-khimov commented 2 weeks ago

Mainnet and testnet networks are well-known, can be added.