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

Include restriction in name query results in CLI #806

Closed
1 of 4 tasks
jchickanosky opened this issue Apr 27, 2022 · 2 comments · Fixed by #834
Closed
1 of 4 tasks

Include restriction in name query results in CLI #806

jchickanosky opened this issue Apr 27, 2022 · 2 comments · Fixed by #834
Labels
CLI Command line interface feature enhancement New feature or request good first issue Good for newcomers name Name Module nice-to-have Features not required in upcoming milestone
Milestone

Comments

@jchickanosky
Copy link

jchickanosky commented Apr 27, 2022

Summary

The name service includes the attribute restricted on each NameRecord. When querying for a name from the name services using the CLI, this restricted attribute is not returned.

Command:
provenanced query name lookup <address name(s) bound to>
Current Result:
name:
- pb
- io
- pio
- provenance
pagination:
next_key: null
total: "0"

Problem Definition

The NameRecord.restricted boolean controls if this name can be extended and used as a parent name by any account or if it can just be extended using the name owner's account. As a Provenance SDK client, when creating a name it is important that I choose a parent/root name that that I am allowed to extend. Because the CLI does not provide the restricted attribute in the query results, it is only by trial and error creating and executing a transaction with a MsgBindNameRequest with desired root names as parent names until I did not receive a message similar to this:
UNKNOWN: failed to execute message; message index: 0: parent name is restricted and does not resolve to the provided parent address: invalid request: invalid request

Proposal

When using the CLI to query a name from the name service ("query name lookup"), include "restricted: " on each name returned.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@iramiller iramiller added this to the v1.10.0 milestone Apr 27, 2022
@iramiller iramiller added name Name Module nice-to-have Features not required in upcoming milestone good first issue Good for newcomers enhancement New feature or request CLI Command line interface feature labels Apr 27, 2022
@piercetrey-figure
Copy link

might be good if the provenanced query name resolve <name> would also return this... or if that might cause problems for something downstream for some reason, maybe a separate query endpoint for just getting the details of a name (address/restricted status/whatever else is available)

@minxylynx
Copy link
Contributor

Would also be helpful if the events emitted during creation would include this flag as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI Command line interface feature enhancement New feature or request good first issue Good for newcomers name Name Module nice-to-have Features not required in upcoming milestone
Projects
Development

Successfully merging a pull request may close this issue.

4 participants