Trying to do a namespace_preorder


#1

What is the reveal_address and how do I get it. thanks


#2

I am trying to run cli commands to register a domain (then some subdomains). My question is what is reveal_key and where can i locate it? Is reveal_address the same thing?


#3

Yes – the reveal address is the address of the reveal key.

Just a word of caution – if you haven’t done so already, I strongly recommend trying this on the testnet first (or on a local regtest node). There’s no way to change the namespace price curve after you send the namespace-reveal transaction.


#4

Jude I am in testnet.

Couple Questions

  1. I register this name joe01.id2

bstack@bstack-OptiPlex-7010:/etc/nginx$ blockstack-cli -t register joe01.id2 a5f03a6b9dfa9280d82896f8e2c06771f3798a10fd07247f18be2885b29b097d01 4f392107798c1cd4db71aa239be885df026dad74a8b79356fe7abf70ab4d953a01

http://testnet.blockstack.org:4000
{
“profileUrls”: {
“error”: null,
“dataUrls”: [
http://testnet.blockstack.org:4000/hub/1JoWfzBv8wjMnd5K8EQAS9x5f4Yz6mbXaw/profile.json
]
},
“txInfo”: {
“status”: true,
“message”: “Preorder and Register queued for broadcast.”,
“preorderTxHash”: “5b8ac11fcd5c5737faeb3d46a1e27cf2cc24c72e49e5390dafef23a69d462a41”,
“registerTxHash”: “fddb1e1dc2f23f745d8a0615127c6f632770c4d0165cfcc4c7a7f23044475b88”
}
}

  1. How do I get to see the above Tx?

  2. Is there a next step


  1. I try to registar domain asantebtg. I dont understand where the reveal key is

bstack@bstack-OptiPlex-7010:/etc/nginx$ blockstack-cli -t namespace_preorder asantebtg mpQr467oYx16Mu9RnJ3YjyDuU1QowgSJo5 04175dda75308ee96d686d10773def416dda682ae170b4e0d224d0a214f53b5d01
{
“status”: false,
“error”: “Namespace cannot be safely preordered”,
“isNamespaceValid”: true,
“isNamespaceAvailable”: true,
“paymentBalanceBTC”: 24708000,
“paymentBalanceStacks”: “20306800”,
“namespaceCostUnits”: “STACKS”,
“namespaceCostAmount”: “640000000”,
“estimateCostBTC”: 1183000
}

keychai used below:

{
“mnemonic”: “shaft mother cup wine prison slim flush voice pair chief naive burst”,
“ownerKeyInfo”: {
“privateKey”: “a5f03a6b9dfa9280d82896f8e2c06771f3798a10fd07247f18be2885b29b097d01”,
“version”: “v0.10-current”,
“index”: 0,
“idAddress”: “ID-myKTy3GtwyAcZjYvqoNYG5AQX49gxHLPfZ”
},
“paymentKeyInfo”: {
“privateKey”: “4f392107798c1cd4db71aa239be885df026dad74a8b79356fe7abf70ab4d953a01”,
“address”: {
“BTC”: “mpQr467oYx16Mu9RnJ3YjyDuU1QowgSJo5”,
“STACKS”: “ST1GS2V9Z7T0N6JFE9X3JMAERQAMQ44FC67AFZAST”
},
“index”: 0
}
}


#5

Any examples of real cli commands? Thanks for help


#6

You can hit up the regtest bitcoin node via the bitcoin URL listed under the “services” header on the testnet home page: https://testnet.blockstack.org/

After registering a name? No – once the register tx confirms, the name is registered. You can then go on to update, transfer, renew, or revoke it.

I try to registar domain asantebtg. I dont understand where the reveal key is

It’s the key you used to generate mpQr467oYx16Mu9RnJ3YjyDuU1QowgSJo5

The problem with the request here is that you don’t have enough stacks – the namespace costs 640000000 microstacks, but your payment key only has 20306800 microstacks

Yes – the testnet site has a “how to make a namespace” subsection in the “about” section.


#7

Jude is it possible to message you directly? I am looking for some training on cli. Thanks for help


#8

Also the live example link is broken. thx


#9

What would the syntax for namespace_reveal be? the “f3…” address is what I got back.

bstack@bstack-OptiPlex-7010:/etc/nginx$ blockstack-cli -t namespace_preorder testdomain n1GhzZDdtTA2TjaTsmJgqUov31dXAEAEEr 42a4912e737ff12f0b9fe17a840bcfe7a5bccfe27a940d6d3f94dd981c4d99d901
f3e8687dc420dd7db17c38c3729edf4fc6fee7735a24f8e5f71aaa3ebc287c01


#10

The namespace_reveal command generates the price curve for names. The numeric values are parameters to the price curve.

I’ve annotated the (admittedly sparse) CLI documentation below:

--version 2-BYTE-INTEGER
   Pass 1 for "pay in BTC or STX and burn the fee".
   Pass 2 for "pay in BTC _and_ send all name registration fees for the first year to the namespace-preorder private key".
   Pass 3 for "pay in STX only and burn the fee".

--lifetime 4-BYTE-INTEGER
   Number of blocks names last for before they have to be renewed.  Pass 4294967295 (0xffffffff) to make names last forever.

--coefficient 1-BYTE-INTEGER
   Multiplicative constant for the price.

--base 1-BYTE-INTEGER
   Exponent base for the price.

--price_buckets CSV-OF-16-NYBBLES
   Exponents to raise the base to (each between 0 and 15), as a function of name length.

--nonalpha_discount NYBBLE
   Value to divide the price by if the name contains a non-alphabetical character.

--no_vowel_discount NYBBLE
   Value to divide the price by if the name does not contain vowels.

Here’s an example of how these parameters get used to calculate name prices (taken from the old documentation).

Name lifetimes (blocks): infinite
Price coefficient:       4
Price base:              4
Price bucket exponents:  [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
Non-alpha discount:      2
No-vowel discount:       5
Burn or receive fees?    Receive to mr6nrMvvh44sR5MiX929mMXP5hqgaTr6fx

Name price formula:
(UNIT_COST = 10.0 satoshi):
                                     buckets[min(len(name)-1, 15)]
             UNIT_COST * coeff * base
cost(name) = -----------------------------------------------------
                   max(nonalpha_discount, no_vowel_discount)


Name price table:
| length | price       | price, nonalpha | price, no vowel | price, both |
--------------------------------------------------------------------------
|      1 | 42949672960 |      8589934592 |      8589934592 |  8589934592 |
|      2 | 10737418240 |      5368709120 |      2147483648 |  2147483648 |
|      3 |  2684354560 |      1342177280 |       536870912 |   536870912 |
|      4 |   671088640 |       335544320 |       134217728 |   134217728 |
|      5 |   167772160 |        83886080 |        33554432 |    33554432 |
|      6 |    41943040 |        20971520 |         8388608 |     8388608 |
|      7 |    10485760 |         5242880 |         2097152 |     2097152 |
|      8 |     2621440 |         1310720 |          524288 |      524288 |
|      9 |      655360 |          327680 |          131072 |      131072 |
|     10 |      163840 |           81920 |           32768 |       32768 |
|     11 |       40960 |           20480 |            8192 |        8192 |
|     12 |       10240 |            5120 |            2048 |        2048 |
|     13 |        2560 |            1280 |             512 |         512 |
|     14 |         640 |             320 |             128 |         128 |
|     15 |         160 |              80 |              32 |          32 |
|    16+ |          40 |              20 |              10 |          10 |

#11

Here’s an example that creates the .id2 namespace on testnet:

blockstack-cli namespace_reveal id2 $REVEAL_ADDRESS 3 52595 250 4 6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0 10 10 $PAYMENT_KEY

You can see the parameters at work this way:

$ curl http://testnet.blockstack.org:16268/v1/namespaces/id2 | jq
<..snip..>
    "691": [
      {
        "address": "n2uziUFPG7QPp4oJavnK3JzFK22czqwy2Y",
        "base": 4,
        "block_number": 689,
        "buckets": [
          6,
          5,
          4,
          3,
          2,
          1,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0,
          0
        ],
        "coeff": 250,
        "lifetime": 52595,
        "namespace_id": "id2",
        "no_vowel_discount": 10,
        "nonalpha_discount": 10,
        "op": "!",
        "op_fee": 5500,
        "opcode": "NAMESPACE_READY",
        "preorder_hash": "983318ec8bdff5b9d115ca4022efd8f67b0c9525",
        "ready_block": 691,
        "recipient": "76a914ed4b542c8e7f52604262e42bd6b4436c2715431c88ac",
        "recipient_address": "n39egTLhzPNmzFFjzoyHTD5oRBxFpUzPfw",
        "reveal_block": 690,
        "sender": "76a914ed4b542c8e7f52604262e42bd6b4436c2715431c88ac",
        "sender_pubkey": "03ccfdd61bffa58e4abc4d0a7f21a8f386e43c8f42d649d965e53555beb022c541",
        "token_fee": "64000000000",
        "txid": "aa05cc09e5b08377a8326b45ba642d093730683ff3867e8e327be38faf850857",
        "version": 3,
        "vtxindex": 1
      }
    ]
<...snip...>

#12

Thanks for the Jude


#13

Jude, after I have an id registered, how do I get mneumonic key,ownerkeyinfo and paymentkeyinfo associated to that id?

I also was able to create a domain, how can I get the same info for the domain. thanks
Thanks


#14

You’re supposed to remember the mnemonic – it’s your master private key.

Given your name, you can get its ID address with the whois command. If you have your mnemonic, you can use the get_owner_keys command in the CLI to figure out which ID-address (and owner key) owns your name.


#15

Jude, So its the initial keychain mnemonic? That would mean the domain and all the ids I created (personal2.id2, personal3.id2 and the domain asante) all have same mnemonic? thx


#16

Yes.

Please reach out to @xan and he can help you get started.