pshenmic / platform-cli

A command-line application for creating transactions in Dash Platform L2 network
https://pshenmic.dev
MIT License
5 stars 2 forks source link

thread 'main' panicked at src/commands/register_dpns_name.rs:106:70: #12

Closed sibTamias closed 2 weeks ago

sibTamias commented 2 weeks ago

Hi! I'm trying to register a name and I'm getting an error message. I don't know where to find the --private-key, --private-key <PRIVATE_KEY> Path to file with private key from Identity in WIF format [default: ], where is the "Identity private key" located?

code:

mn@MacBook-Pro:~/Desktop$   ./platform-cli register-dpns-name --network mainnet --dapi-url https://<ip my evonode >:443 --identity ........uGDdxJdxUSg7zrxwanA7bM1wT........  --private-key  < ????>  --name tamias

platform-cli 0.1.5 (https://github.com/pshenmic/platform-cli)
Starting registering DPNS name process (mainnet)
Name: tamias, Normalized Name: tam1as, Full Domain Name: tamias.dash, Is Contested: true
thread 'main' panicked at src/commands/register_dpns_name.rs:106:70:
Unable to read private key file: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
mn@MacBook-Pro:~/Desktop$
pshenmic commented 2 weeks ago

This is the private key from your Identity, one from the set of four, which is generated when you register an Identity. Your client, with which one you originally registered your Identity with, should have the possibility to export your private keys in the file.

What interface did you use for your identity?

sibTamias commented 2 weeks ago

What interface did you use for your identity?

I'm not sure I understand what you mean when you say "your client, with whom you originally registered your identity". I'm already confused. Here are the steps I took to register the nodes on the L1 and L2 blockchains:

  1. When registering Evonode , I used the following output ( like this one) :
{
    "id": "f26c147ff7b9e3154f6f06f2b24a88012019bfe2",
    "priv_key": {
        "type": "tendermint/PrivKeyEd25519",
        "value": "6zY4iNkKW37wgoLBdE8lv62RKLMAaST0Bg8n2OItUlzZeK4AI9qrMuxEdIcemk2gPx0+jLgOjPXw55mNenBn6A=="
    }
}

The value "id" was entered into the field "platformNodeID" when registering on the L1 network,

and the value of "priv_key/value:" was entered when registering (L2) with Dashmate -> "Enter a Platform node key: ... " .

2) Then, on the platform-explorer website, I entered the ProTx of my Evonode into the search bar and a window appeared showing the "Identity Address: ... " and my "Node ID:.." == "id" (from above )

3 ) With the help of hints from "@qwizzie", I was able to successfully launch Dash Evo Tools and withdraw credits from three of my evonodes. In "Dash Evo Tool" I used Evo's ProTx and the private keys of the owner's and vote's addresses only. That's all! I am still unsure of where to find the private key required for the "platform-cli".

Screenshot 2024-10-27 at 16 28 19
qwizzie commented 2 weeks ago

@sibTamias Are you trying to register usernames for your masternode identities ? Those are automatically created for Evonodes and do not come with a privatekey so far i know. So i don't think you can register an username for a masternode identity through Platform CLI. I am not even sure if there is a way to register an username with these kind of specific identities.

In its current phase Platform CLI can not register an identity and therefore require the privatekey of an identity.
You could wait untill Platform CLI support registering a new identity or you could look into Dash Evo Tool in a few days.

Process is basically :

Register Identity (Platform CLI can't help you with this right now) Register Username Use Username

sibTamias commented 2 weeks ago

I am not even sure if there is a way to register an username with these kind of specific identities.

I have no idea where to get another ID with a private key. Porridge in my head from such a variety. I read it somewhere, but I don't remember)

qwizzie commented 2 weeks ago

I think it is best since you are already using Dash Evo Tool to wait for the next version of Dash Evo Tool, that will allow you to register a new identity and a new username.

@pshenmic any rough estimate / idea when people can register an identity through Platform CLI as well ? It seems to be the missing piece right now.

pshenmic commented 2 weeks ago

ohh.. I think i see what's hapenning, there is an validator's identity, which is created automatically once your validator gets in the current list.

I think its kinda mixed up with regular identities (which are created separately via transactions), and I'm not sure you can do any actions with your validator identity other than vote / withdraw. I just asked platform team about that, so not sure yet.

What you would need is to register a separate identity in the network, and then associate a name with it. But in case you want to link it to your masternode, let me check if thats possible (techincally I think it does)

@qwizzie next week it will be possible, we are trying to finish the mainnet testing right now, but we face the same problems with tooling there =D