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

Drop contract group call scope #2619

Closed
roman-khimov opened this issue Oct 11, 2023 · 1 comment
Closed

Drop contract group call scope #2619

roman-khimov opened this issue Oct 11, 2023 · 1 comment
Labels
neofs-adm NeoFS Adm application issues neofs-ir Inner Ring node application issues neofs-storage Storage node application issues security Affects security
Milestone

Comments

@roman-khimov
Copy link
Member

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

I'm always frustrated when I have to deal with contract group in NeoFS. It's an additional key that doesn't fit well into the key management scheme, it complicates contract deployments and updates. The good thing about it is that it simplifies invocations, but to me it doesn't justify the management overhead for our system.

Describe the solution you'd like

Use Rules witness where needed for executions and enumerate all correct calls there. Many invocations are just fine with CalledByEntry only, some require more complex scopes. The minimal required scope must be used for every invocation.

Describe alternatives you've considered

Wasting time and code to manage contract group, meh.

Additional context

Refs. #2405.

@roman-khimov roman-khimov added neofs-ir Inner Ring node application issues neofs-storage Storage node application issues refactor neofs-adm NeoFS Adm application issues security Affects security labels Oct 11, 2023
@roman-khimov roman-khimov added this to the v0.39.0 milestone Oct 11, 2023
@roman-khimov
Copy link
Member Author

container calls nns to register TLDs in _deploy.
container calls balance to transfer registration fee in Put and PutNamed.
container calls nns to register nice name in PutNamed.
container calld neofsid to add a key in Put and PutNamed.
container calls nns to drop nice name in Delete.

netmap calls newEpoch of container and balance when its own NewEpoch is being processed.

nns can call onNEP11Payment if owner is a contract, but this likely doesn't matter much.

And that's it, all of the calls that really use contract group now.

roman-khimov added a commit that referenced this issue Oct 19, 2023
roman-khimov added a commit that referenced this issue Oct 20, 2023
It's not the most elegant way to handle the problem since normally each
contract handler should decide on these things by its own (even per-call),
but given the structure we have this is the easiest "universal" set of rules.
It has a downside in that it MUST be synchronized with contracts changes, but
those are not very frequent, so I think it's good enough. Managing group key
is far worse problem than that.

Signed-off-by: Roman Khimov <[email protected]>
roman-khimov added a commit that referenced this issue Oct 20, 2023
It's not the most elegant way to handle the problem since normally each
contract handler should decide on these things by its own (even per-call),
but given the structure we have this is the easiest "universal" set of rules.
It has a downside in that it MUST be synchronized with contracts changes, but
those are not very frequent, so I think it's good enough. Managing group key
is far worse problem than that.

Signed-off-by: Roman Khimov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
neofs-adm NeoFS Adm application issues neofs-ir Inner Ring node application issues neofs-storage Storage node application issues security Affects security
Projects
None yet
Development

No branches or pull requests

1 participant