nspcc-dev / neofs-contract

NeoFS smart-contract
GNU General Public License v3.0
10 stars 17 forks source link

Rework network configuration parameters #372

Open roman-khimov opened 10 months ago

roman-khimov commented 10 months ago

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

I'm always frustrated when I'm looking at SetConfig/Config pair of the netmap contract. Only node knows what can be changed, only node knows what are the defaults, only node knows how to properly encode them and we have all settings in a single contract even though they're often unrelated.

Describe the solution you'd like

Move configuration options into contracts and make proper interfaces for them. No abstract options, please, everything must have a proper documented interface with the default value. Economic options are not a part of netmap, container options are not a part of netmap, reputation options are not a part of netmap.

Describe alternatives you've considered

Leaving opaque container, passing magic values on deploy. No, thanks.

roman-khimov commented 9 months ago

Same goes for neofs contract and its settings.

roman-khimov commented 6 months ago

Add some sane limits to numerics (like object size) as well to avoid code like in https://github.com/nspcc-dev/neofs-node/pull/2674#discussion_r1539879964.

cthulhu-rider commented 1 month ago

what do you guys think about adding notifications about changing values? They'd help sys nodes react more quickly to reconfigs. Although this is a separate topic, with new interface proposed within this one the notifications would be implemented more clear and less abstract (per-config notifications)

roman-khimov commented 1 month ago

Yep, makes sense.