-
Notifications
You must be signed in to change notification settings - Fork 158
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
Name resolution on node side for RPC requests #494
Comments
We need to solve 2 corners cases:
Also, if we decide to do it, name -> pk conversion should be done on the wallet side using an API call to make sure that only pk appears in txn data, otherwise it will make historical block verification very hard (node needs to know name -> pk map at any height) |
What is the mechanism to do a name/pk decision when it comes to sending a client to client messages? In that case, the node has to decide if it is misspelled pk or a name. Can we use the same decision system? |
Currently the name has a max length 12 so it's not a problem. But it's a problem we need to solve. The most simple solution is to restrict name length to make sure it's shorter than address 😂 And to be more explicit, the process should be purely on client side like this:
Also there is another minor security concern: if the node is compromised, sdk may send money to the wrong address... |
It can't. Nobody will be using this for TXNs. Only thing I wanted is that it will be possible to resolve on a node to do simple RPC requests like query balance. |
2 more related comments:
|
Description of the issue
I think that read-only RPC requests (e.g., getBalance, getNonce, ...) should allow for name service resolution by a node to same roundtrip (latency) and overhead with handling extra network traffic.
These request could take another parameter in the request. If JSON contains String
name
it would try to resolve and use this, if it containsaddress
it would use this field as an address. This system guarantees that no name that looks like a valid address can be "accidentally" resolved and data returned for an unexpected target. It also requires explicit action from the client (not to use address field, but name field instead), which implies that the client wants to do this action and otherwise would have to resolve the name and use it in the subsequent request anyway.When it comes to transactions, they still need a program hash and client would have to request this from the node. Nodes shouldn't allow transactions by named addresses.
Issue-Type (put an
x
sign in the square brackets)Checklist
Your environment
The text was updated successfully, but these errors were encountered: