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

Extend NNS contract's _deploy with predefined TLDs #334

Closed
roman-khimov opened this issue Apr 17, 2023 · 5 comments
Closed

Extend NNS contract's _deploy with predefined TLDs #334

roman-khimov opened this issue Apr 17, 2023 · 5 comments
Assignees
Labels
nns NNS contract related issue
Milestone

Comments

@roman-khimov
Copy link
Member

Accept an array of {name, email} params and register TLD with some default refresh/retry/expire/ttl values. TLD should be owned by the committee.

Related to nspcc-dev/neofs-node#2195. See also neo-project/non-native-contracts#32 (although it has a domain set in the code, while we want them to be in _deploy parameters).

@roman-khimov roman-khimov added the nns NNS contract related issue label Apr 17, 2023
@roman-khimov roman-khimov added this to the v0.18.0 milestone Apr 17, 2023
@cthulhu-rider
Copy link
Contributor

do we wanna register such domains in both update/deploy or deploy only?

@roman-khimov
Copy link
Member Author

Deploy only.

@cthulhu-rider
Copy link
Contributor

TLD should be owned by the committee

do we require committee witness to work with these domains? Or each committee member becomes a solo admin?

During NeoFS initialization NNS contract is deployed with bootstrap domain owned by the committee. Later az member attempts to register designate-committee-notary-tx.boostrap domain but if we require committee witness then az should provide committee multi-signature.

@roman-khimov
Copy link
Member Author

IIUC we currently have somewhat broken TLDs in that they require a TLD owner signature to register a domain. Which btw means that we can't change committee keys (a particular account for particular set of keys is set in stone as an owner). Compare that to C# NNS root entry management --- only committee (and not a specific address) can register and manage it, but then anyone can register a domain using any of the available roots.

We need something like that, TLD managed by committee (not having a real owner), but then Register allowing to grab any domain (and only doing admin checks for third-level domains). This should solve the problem.

CC @AnnaShaleva.

@AnnaShaleva
Copy link
Member

AnnaShaleva commented Apr 20, 2023

they require a TLD owner signature to register a domain

That's not exactly true. They require TLD admin's signature to register the TLD's children domain. And admin can always be changed by owner.

Which btw means that we can't change committee keys

Thus, we actually can change the committe keys, but we should probably change the TLD domain admin as far.

Compare that to C# NNS root entry management --- only committee (and not a specific address) can register and manage it

That's true, only committee can register TLD. And after that anyone can register subdomains for the existing TLD, and committe signature isn't required for that.

cthulhu-rider added a commit to cthulhu-rider/neofs-contract that referenced this issue May 28, 2023
There is a need to pre-register some domains for NeoFS system needs. The
easiest way to do this is to register such TLDs at deployment stage.
These domains should be owned by the (whole) committee and require its
multi-signature. There is also need to work with such domain trees on
behalf of the individual committee member, so it's worth to make each
member an admin.

Add list of (domain, e-mail) pairs to extra deployment parameters
(`_deploy` callback). Register all specified domains and bind them to
the committee. Since current access policy works with specific owner
(fixed script hash), owner witness check (internal `checkAdmin` method
and contract `Transfer`/`SetAdmin` methods).

Closes nspcc-dev#334.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
cthulhu-rider added a commit to cthulhu-rider/neofs-contract that referenced this issue May 28, 2023
There is a need to pre-register some domains for NeoFS system needs. The
easiest way to do this is to register such TLDs at deployment stage.
These domains should be owned by the (whole) committee and require its
multi-signature. There is also need to work with such domain trees on
behalf of the individual committee member, so it's worth to make each
member an admin.

Add list of (domain, e-mail) pairs to extra deployment parameters
(`_deploy` callback). Register all specified domains and bind them to
the committee. Since current access policy works with specific owner
(fixed script hash), owner witness check (internal `checkAdmin` method
and contract `Transfer`/`SetAdmin` methods).

Closes nspcc-dev#334.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
cthulhu-rider added a commit to cthulhu-rider/neofs-contract that referenced this issue Jun 8, 2023
Previously, NNS contract required signature of the TLD owner to grant
access for L2 domain name registration. This didn't allow to properly
manage TLDs by committee (only) since it is multi-account and dynamic
while all domains were owned by the single account. Also, such behavior
made it almost impossible to register L2 domains in practice.

To solve the described problems, the following changes are introduced to
the access rules (`register` method of the NNS contract):
 * TLDs are managed only by the committee only;
 * free L2 domains are free-to-take;
 * all L3+ domains are managed by parent domain owner or administrator
   only.

Refs nspcc-dev#334.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
cthulhu-rider added a commit to cthulhu-rider/neofs-contract that referenced this issue Jun 8, 2023
In order to register TLD, committee multi-signature must be gathered.
It is not always easy. For example, on "fresh" network, committee
members may not have a notary role, so they will not be able to use
Notary service to collect a signature. At the same time, Notary service
is the only convenient way to collect a multi-signature in a distributed
mode. To simplify the solution of the described task, it would be
convenient to be able to register pre-known TLDs at the NNS contract
deployment stage (which is performed by the committee).

Support list of (name, e-mail) pairs describing pre-defined TLDs as
optional deployment parameters (passed into `_deploy` callback).

Closes nspcc-dev#334.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
cthulhu-rider added a commit to cthulhu-rider/neofs-contract that referenced this issue Jun 8, 2023
Previously, NNS contract required signature of the TLD owner to grant
access for L2 domain name registration. This didn't allow to properly
manage TLDs by committee (only) since it is multi-account and dynamic
while all domains were owned by the single account. Also, such behavior
made it almost impossible to register L2 domains in practice.

To solve the described problems, the following changes are introduced to
the access rules (`register` method of the NNS contract):
 * TLDs are managed only by the committee only;
 * free L2 domains are free-to-take;
 * all L3+ domains are managed by parent domain owner or administrator
   only.

Refs nspcc-dev#334.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
cthulhu-rider added a commit to cthulhu-rider/neofs-contract that referenced this issue Jun 8, 2023
In order to register TLD, committee multi-signature must be gathered.
It is not always easy. For example, on "fresh" network, committee
members may not have a notary role, so they will not be able to use
Notary service to collect a signature. At the same time, Notary service
is the only convenient way to collect a multi-signature in a distributed
mode. To simplify the solution of the described task, it would be
convenient to be able to register pre-known TLDs at the NNS contract
deployment stage (which is performed by the committee).

Support list of (name, e-mail) pairs describing pre-defined TLDs as
optional deployment parameters (passed into `_deploy` callback).

Closes nspcc-dev#334.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
cthulhu-rider added a commit to cthulhu-rider/neofs-contract that referenced this issue Jun 8, 2023
In order to register TLD, committee multi-signature must be gathered.
It is not always easy. For example, on "fresh" network, committee
members may not have a notary role, so they will not be able to use
Notary service to collect a signature. At the same time, Notary service
is the only convenient way to collect a multi-signature in a distributed
mode. To simplify the solution of the described task, it would be
convenient to be able to register pre-known TLDs at the NNS contract
deployment stage (which is performed by the committee).

Support list of (name, e-mail) pairs describing pre-defined TLDs as
optional deployment parameters (passed into `_deploy` callback).

Closes nspcc-dev#334.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
cthulhu-rider added a commit to cthulhu-rider/neofs-contract that referenced this issue Jun 10, 2023
Previously, NNS contract required signature of the TLD owner to grant
access for L2 domain name registration. This didn't allow to properly
manage TLDs by committee (only) since it is multi-account and dynamic
while all domains were owned by the single account. Also, such behavior
made it almost impossible to register L2 domains in practice.

To solve the described problems, the following changes are introduced to
the access rules (`register` method of the NNS contract):
 * TLDs are managed only by the committee only;
 * free L2 domains are free-to-take;
 * all L3+ domains are managed by parent domain owner or administrator
   only.

Refs nspcc-dev#334.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
cthulhu-rider added a commit to cthulhu-rider/neofs-contract that referenced this issue Jun 10, 2023
In order to register TLD, committee multi-signature must be gathered.
It is not always easy. For example, on "fresh" network, committee
members may not have a notary role, so they will not be able to use
Notary service to collect a signature. At the same time, Notary service
is the only convenient way to collect a multi-signature in a distributed
mode. To simplify the solution of the described task, it would be
convenient to be able to register pre-known TLDs at the NNS contract
deployment stage (which is performed by the committee).

Support list of (name, e-mail) pairs describing pre-defined TLDs as
optional deployment parameters (passed into `_deploy` callback).

Closes nspcc-dev#334.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
cthulhu-rider added a commit to cthulhu-rider/neofs-contract that referenced this issue Jun 10, 2023
In order to register TLD, committee multi-signature must be gathered.
It is not always easy. For example, on "fresh" network, committee
members may not have a notary role, so they will not be able to use
Notary service to collect a signature. At the same time, Notary service
is the only convenient way to collect a multi-signature in a distributed
mode. To simplify the solution of the described task, it would be
convenient to be able to register pre-known TLDs at the NNS contract
deployment stage (which is performed by the committee).

Support list of (name, e-mail) pairs describing pre-defined TLDs as
optional deployment parameters (passed into `_deploy` callback).

Refs nspcc-dev#334.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
cthulhu-rider added a commit to cthulhu-rider/neofs-contract that referenced this issue Jun 10, 2023
In order to register TLD, committee multi-signature must be gathered.
It is not always easy. For example, on "fresh" network, committee
members may not have a notary role, so they will not be able to use
Notary service to collect a signature. At the same time, Notary service
is the only convenient way to collect a multi-signature in a distributed
mode. To simplify the solution of the described task, it would be
convenient to be able to register pre-known TLDs at the NNS contract
deployment stage (which is performed by the committee).

Support list of (name, e-mail) pairs describing pre-defined TLDs as
optional deployment parameters (passed into `_deploy` callback). Also
make `migration.NewContract` to pre-register 'neofs' TLD.

Refs nspcc-dev#334.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nns NNS contract related issue
Projects
None yet
Development

No branches or pull requests

3 participants