nspcc-dev / neofs-contract

NeoFS smart-contract
Other
9 stars 17 forks source link

Extend NNS contract's _deploy with predefined TLDs #334

Closed roman-khimov closed 1 year ago

roman-khimov commented 1 year ago

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).

cthulhu-rider commented 1 year ago

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

roman-khimov commented 1 year ago

Deploy only.

cthulhu-rider commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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.