Namespace preorder wait in blockstack -regtest?

I am following the instructions in https://github.com/blockstack/blockstack-core/blob/master/docs/namespace_creation.md#registering-a-namespace to create a namespace (in bitcoind -regtest).

The doc says

If all goes well, you will get back a transaction hash.

I did get that back

You should wait for the transaction to be confirmed (~10 confirmations) before sending the reveal transaction.

Since this is private, is there something I have to do to force ~10 confirmations?

After waiting 10 or so minutes, I tried running reveal and got:

$ blockstack namespace_reveal hello "$PAYMENT_PKEY" "$CREATOR_PKEY" "b40dd1375ef63e5a40ee60d790ec6dccd06efcbac99d0cd5f3b07502a4ab05ac"
<f63e5a40ee60d790ec6dccd06efcbac99d0cd5f3b07502a4ab05ac"
[2018-02-18 19:26:48,976] [DEBUG] [spv:110] (23521.140223395813120) Using testnet/regtest
TEST ACTIVE: TX_MIN_CONFIRMATIONS = 0
TEST ACTIVE: CONFIG_PATH = /tmp/blockstack-run-scenario.blockstack_integration_tests.scenarios.namespace_check/client/client.ini
Envar: EPOCH_1_END_BLOCK = 1
Envar: EPOCH_2_END_BLOCK = 2
[2018-02-18 19:26:49,124] [DEBUG] [client:95] (23521.140223395813120) Connect to http://localhost:16264
[2018-02-18 19:26:49,125] [DEBUG] [client:110] (23521.140223395813120) Loaded storage drivers ['disk']
[2018-02-18 19:26:49,126] [WARNING] [config:91] (23521.140223395813120) (23521): in test environment
[2018-02-18 19:26:49,127] [WARNING] [config:112] (23521.140223395813120) NUM_CONFIRMATIONS = 0
[2018-02-18 19:26:49,127] [WARNING] [config:211] (23521.140223395813120) EPOCH_1_END_BLOCK = 1
[2018-02-18 19:26:49,127] [WARNING] [config:211] (23521.140223395813120) EPOCH_2_END_BLOCK = 2
Looking up NAMESPACE_PREORDER at b40dd1375ef63e5a40ee60d790ec6dccd06efcbac99d0cd5f3b07502a4ab05ac...
[2018-02-18 19:26:49,493] [DEBUG] [blocks:125] (23521.140223395813120) BlockDownloader: fetch blocks 0-0
[2018-02-18 19:26:49,540] [ERROR] [blocks:786] (23521.140223395813120) Invalid RPC response '{"id": 0, "result": null, "error": {"message": "No such mempool or blockchain transaction. Use gettransaction for wallet transactions.", "code": -5}}' (for b40dd1375ef63e5a40ee60d790ec6dccd06efcbac99d0cd5f3b07502a4ab05ac)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/virtualchain-0.17.0.4-py2.7.egg/virtualchain/lib/blockchain/bitcoin_blockchain/blocks.py", line 747, in fetch_txs_rpc
    assert txhex is not None, "Invalid RPC response '%s' (for %s)" % (simplejson.dumps(resp), txids[resp['id']])
AssertionError: Invalid RPC response '{"id": 0, "result": null, "error": {"message": "No such mempool or blockchain transaction. Use gettransaction for wallet transactions.", "code": -5}}' (for b40dd1375ef63e5a40ee60d790ec6dccd06efcbac99d0cd5f3b07502a4ab05ac)
[2018-02-18 19:26:49,541] [ERROR] [blocks:787] (23521.140223395813120) Failed to receive transactions
[2018-02-18 19:26:49,541] [ERROR] [actions:3314] (23521.140223395813120) 
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/blockstack-0.17.0.16-py2.7.egg/blockstack_client/actions.py", line 3309, in verify_namespace_preorder
    assert txinfo is not None and 'error' not in txinfo
AssertionError
{
    "error": "Failed to look up transaction b40dd1375ef63e5a40ee60d790ec6dccd06efcbac99d0cd5f3b07502a4ab05ac"
}
|blockstack-test namespace_check| 07:26:49  ubuntu@blockstack-xenial:~/src [3,0,b] 0
$ 

Does this mean that I don’t have enough confirmations or some other problem?

Thanks.

Hey @rocky, did you start blockstack-test-scenario with --interactive-web 3001? If so, then you should be able to load http://localhost:3001 in your Web browser and tell the test framework to generate more blocks. I’ll update the document to make this clearer.

Hope this helps!

Thanks for the info. It probably advanced things, but I think there is more or something else that is wrong…

I had run with --interactive-web 3001. Following your advice, I opened up a browser then and created maybe 30 or so blocks using the “Generate blocks” button.

I see that the “Blockchain height” has increased. (It is now 723). And I see a lot of debug output in response to generating blocks. The log messages starts:

[2018-02-19 13:02:54,899] [DEBUG] [session:104] (23317.140165079475968) [23317] Connect to bitcoind at http://blockstack@localhost:18332, timeout=60.0
[2018-02-19 13:02:55,388] [DEBUG] [blockstack-test-scenario:1151] (23317.140165079475968) next block (now at 723)
[2018-02-19 13:02:55,388] [DEBUG] [session:104] (23317.140165079475968) [23317] Connect to bitcoind at http://blockstack@localhost:18332, timeout=60.0
[2018-02-19 13:02:55,390] [DEBUG] [namedb:92] (23317.140165079475968) Connect to database '/tmp/blockstack-run-scenario.blockstack_integration_tests.scenarios.namespace_check/blockstack-server.db'
[2018-02-19 13:02:55,390] [DEBUG] [indexer:175] (23317.140165079475968) consensus snapshots at '/tmp/blockstack-run-scenario.blockstack_integration_tests.scenarios.namespace_check/blockstack-server.snapshots'
[2018-02-19 13:02:55,390] [DEBUG] [indexer:210] (23317.140165079475968) lastblock at '/tmp/blockstack-run-scenario.blockstack_integration_tests.scenarios.namespace_check/blockstack-server.lastblock'
[2018-02-19 13:02:55,390] [DEBUG] [indexer:213] (23317.140165079475968) Lastblock: 722 (/tmp/blockstack-run-scenario.blockstack_integration_tests.scenarios.namespace_check/blockstack-server.lastblock)
[2018-02-19 13:02:55,394] [DEBUG] [blockstack-test-scenario:587] (23317.140165079475968) sync virtualchain up to 723

However running the reveal command still gives an error:

$ blockstack namespace_reveal hello "$PAYMENT_PKEY" "$CREATOR_PKEY" "b40dd1375ef63e5a40ee60d790ec6dccd06efcbac99d0cd5f3b07502a4ab05ac"
<f63e5a40ee60d790ec6dccd06efcbac99d0cd5f3b07502a4ab05ac"
[2018-02-19 13:04:42,469] [DEBUG] [spv:110] (25555.139983887120128) Using testnet/regtest
TEST ACTIVE: TX_MIN_CONFIRMATIONS = 0
TEST ACTIVE: CONFIG_PATH = /tmp/blockstack-run-scenario.blockstack_integration_tests.scenarios.namespace_check/client/client.ini
Envar: EPOCH_1_END_BLOCK = 1
Envar: EPOCH_2_END_BLOCK = 2
[2018-02-19 13:04:42,609] [DEBUG] [client:95] (25555.139983887120128) Connect to http://localhost:16264
[2018-02-19 13:04:42,610] [DEBUG] [client:110] (25555.139983887120128) Loaded storage drivers ['disk']
[2018-02-19 13:04:42,611] [WARNING] [config:91] (25555.139983887120128) (25555): in test environment
[2018-02-19 13:04:42,612] [WARNING] [config:112] (25555.139983887120128) NUM_CONFIRMATIONS = 0
[2018-02-19 13:04:42,612] [WARNING] [config:211] (25555.139983887120128) EPOCH_1_END_BLOCK = 1
[2018-02-19 13:04:42,612] [WARNING] [config:211] (25555.139983887120128) EPOCH_2_END_BLOCK = 2
Looking up NAMESPACE_PREORDER at b40dd1375ef63e5a40ee60d790ec6dccd06efcbac99d0cd5f3b07502a4ab05ac...
[2018-02-19 13:04:42,990] [DEBUG] [blocks:125] (25555.139983887120128) BlockDownloader: fetch blocks 0-0
[2018-02-19 13:04:43,038] [ERROR] [blocks:786] (25555.139983887120128) Invalid RPC response '{"id": 0, "result": null, "error": {"message": "No such mempool or blockchain transaction. Use gettransaction for wallet transactions.", "code": -5}}' (for b40dd1375ef63e5a40ee60d790ec6dccd06efcbac99d0cd5f3b07502a4ab05ac)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/virtualchain-0.17.0.4-py2.7.egg/virtualchain/lib/blockchain/bitcoin_blockchain/blocks.py", line 747, in fetch_txs_rpc
    assert txhex is not None, "Invalid RPC response '%s' (for %s)" % (simplejson.dumps(resp), txids[resp['id']])
AssertionError: Invalid RPC response '{"id": 0, "result": null, "error": {"message": "No such mempool or blockchain transaction. Use gettransaction for wallet transactions.", "code": -5}}' (for b40dd1375ef63e5a40ee60d790ec6dccd06efcbac99d0cd5f3b07502a4ab05ac)
[2018-02-19 13:04:43,038] [ERROR] [blocks:787] (25555.139983887120128) Failed to receive transactions
[2018-02-19 13:04:43,038] [ERROR] [actions:3314] (25555.139983887120128) 
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/blockstack-0.17.0.16-py2.7.egg/blockstack_client/actions.py", line 3309, in verify_namespace_preorder
    assert txinfo is not None and 'error' not in txinfo
AssertionError
{
    "error": "Failed to look up transaction b40dd1375ef63e5a40ee60d790ec6dccd06efcbac99d0cd5f3b07502a4ab05ac"
}
|blockstack-test namespace_check| 01:04:43  ubuntu@blockstack-xenial:~/src [3,0,b] 0
$

Unless there are other suggestions, message that in the above that I guess I will follow down is

AssertionError: Invalid RPC response '{"id": 0, "result": null, "error":
{"message": "No such mempool or blockchain transaction. Use gettransaction for wallet transactions.", "code": -5}}' 
(for  b40dd1375ef63e5a40ee60d790ec6dccd06efcbac99d0cd5f3b07502a4ab05ac)

I have just redone everything from scratch and everything works.

  • I stopped and restarted blockstack-test-scenario,
  • Issued a namespace preorder
  • Created 15 or so blocks through the web interface at 127.0.0.1:3001
  • revealed name namespace

Thanks for the help.

1 Like

Glad you got it to work!