Description
Summary of Bug
#1128 removed the unique constraint on URLs across all managers. This makes it possible for multiple managers to define a resolver with the same URL.
As a result, right now it is possible for a single manager to define multiple resolvers with the same url themselves. Since each resolver still gets a unique ID and anchored data is registered to a resolver using the unique ID, this isn't really a technical issue. However, I don't think this is necessarily a "feature" either.
What does it mean if a manager defines two resolvers with the same URL? This can happen quite easily if the same regen tx define-resolver
command is sent twice. On mainnet if someone registers the same URL twice, which resulting ID should they use? It seems that there should be a unique constraint on URLs for a single manager.
Version
Steps to Reproduce
Define two resolvers with the same URL from the same manager account:
$ regen-ledger/build/regen q data resolver 1
resolver:
id: "1"
manager: regen129cwzpkph3kk2fwqc3jvugcf4wfllwf9yyredu
url: http://localhost:8000/resource
$ regen-ledger/build/regen q data resolver 2
resolver:
id: "2"
manager: regen129cwzpkph3kk2fwqc3jvugcf4wfllwf9yyredu
url: http://localhost:8000/resource
Also observe that the same data can be registered to both of these resolvers (requires a RegisterResolver
message for each). Again, not a technical issue, but what does this mean?
$ regen-ledger/build/regen q data resolvers-by-iri regen:13toVgf5aZqSVSeJQv562xkkeoe3rr3bJWZgg1jJfnzPGBtJNpVVakm.rdf
pagination:
next_key: null
total: "2"
resolvers:
- id: "1"
manager: regen129cwzpkph3kk2fwqc3jvugcf4wfllwf9yyredu
url: http://localhost:8000/resource
- id: "2"
manager: regen129cwzpkph3kk2fwqc3jvugcf4wfllwf9yyredu
url: http://localhost:8000/resource
For Admin Use
- Not duplicate issue
- Appropriate labels applied
- Appropriate contributors tagged
- Contributor assigned/self-assigned