Rework network configuration parameters #160

Open
opened 2025-12-28 18:08:44 +00:00 by sami · 5 comments
Owner

Originally created by @roman-khimov on GitHub (Nov 27, 2023).

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.

Originally created by @roman-khimov on GitHub (Nov 27, 2023). ## 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.
Author
Owner

@roman-khimov commented on GitHub (Dec 20, 2023):

Same goes for neofs contract and its settings.

@roman-khimov commented on GitHub (Dec 20, 2023): Same goes for `neofs` contract and its settings.
Author
Owner

@roman-khimov commented on GitHub (Apr 2, 2024):

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.

@roman-khimov commented on GitHub (Apr 2, 2024): 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.
Author
Owner

@cthulhu-rider commented on GitHub (Aug 8, 2024):

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)

@cthulhu-rider commented on GitHub (Aug 8, 2024): 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)
Author
Owner

@roman-khimov commented on GitHub (Aug 8, 2024):

Yep, makes sense.

@roman-khimov commented on GitHub (Aug 8, 2024): Yep, makes sense.
Author
Owner

@roman-khimov commented on GitHub (Nov 15, 2024):

Triggers too many changes to be done now. API operates with NetworkConfig of KV pairs, SDK is a mix of known/unknown parameters. Postponing for now.

@roman-khimov commented on GitHub (Nov 15, 2024): Triggers too many changes to be done now. API operates with `NetworkConfig` of KV pairs, SDK is a mix of known/unknown parameters. Postponing for now.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-contract#160
No description provided.