Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit max REP value and number of REPs #307

Closed
carpawell opened this issue Oct 10, 2024 · 2 comments
Closed

Limit max REP value and number of REPs #307

carpawell opened this issue Oct 10, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement Improving existing functionality I2 Regular impact S2 Regular significance U3 Regular
Milestone

Comments

@carpawell
Copy link
Member

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

I'm always frustrated when nothing limits values. Sometimes, I need to think about limitations in real cases (e.g., we have contracts, contracts have stack/memory/storage limits), and I do not know what to do and if it is possible to have 1024 replicas 1024 times or even more.

Describe the solution you'd like

Check there are no unrealistic containers in our networks and add nice limits to API. 256 max REP value and 256 max numbers of REPs look good to me.

Describe alternatives you've considered

  1. Any other nice number: 128, 512, 1024. But 8 bits are traditionally a good pick.
  2. Do not have limits at all. But it will be possible to fail in some unexpected things because of overflow. Also, I cannot imagine thousands of SNs in real networks and a person who needs this number of REPlicas.

Additional context

nspcc-dev/neofs-contract#438

@carpawell carpawell added documentation Improvements or additions to documentation I2 Regular impact labels Oct 10, 2024
@roman-khimov roman-khimov added enhancement Improving existing functionality U3 Regular S2 Regular significance labels Oct 10, 2024
@roman-khimov roman-khimov added this to the v2.17.0 milestone Dec 24, 2024
@roman-khimov
Copy link
Member

Refs. #171.

@roman-khimov
Copy link
Member

Likely the REP value can be even lower, like 8. But the number of REPs is a bit different, imagine a good old CDN, we can have quite a number of REP 1 for various regions. Like what we hear for Akamai is

network of over approximately 365,000 servers in more than 135 countries. These servers reside on roughly 1,350 of the world's networks

so 256 is the number for now.

roman-khimov added a commit that referenced this issue Dec 27, 2024
These are mostly some sanity checks, having unlimited replicas can be
problematic. Limiting the overall number of nodes is important wrt signature
collection, stack can't have more than 2048 elements.

Explain CBF a bit better at the same time.

Signed-off-by: Roman Khimov <roman@nspcc.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement Improving existing functionality I2 Regular impact S2 Regular significance U3 Regular
Projects
None yet
Development

No branches or pull requests

2 participants