Tried testnet to get started...

brianddk
Posts: 4
Joined: Thu Aug 06, 2015 8:52 pm
os: windows

Tried testnet to get started...

Post by brianddk »

I'm trying to get started in namecoin, so I thought I would try to register some stuff on testnet. Found two problems with my master plan...
  1. Frequent periods with no miners on testnet
  2. No functioning faucet on testnet since nmctest.net let it's cert expire while HSTS was still active (making cert non bypass-able).
I do have a tiny 3GH miner I could put on testnet, but I suspect that may take forever to mine a block with the little thing.

biolizard89
Posts: 2001
Joined: Tue Jun 05, 2012 6:25 am
os: linux

Re: Tried testnet to get started...

Post by biolizard89 »

brianddk wrote:I'm trying to get started in namecoin, so I thought I would try to register some stuff on testnet. Found two problems with my master plan...
  1. Frequent periods with no miners on testnet
  2. No functioning faucet on testnet since nmctest.net let it's cert expire while HSTS was still active (making cert non bypass-able).
I do have a tiny 3GH miner I could put on testnet, but I suspect that may take forever to mine a block with the little thing.
I think Namecoin testnet has the rule from Bitcoin testnet that resets difficulty if no block is mined in a certain period of time (I think 40 minutes?). So if you'd like to place a bit of mining hashpower on testnet so that blocks are mined regularly, that would be very helpful and would be appreciated.

Who runs nmctest.net? Is that John Kenney's site? More testnet faucets would probably be nice if someone wants to set one up.
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

domob
Posts: 1129
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: Tried testnet to get started...

Post by domob »

biolizard89 wrote:I think Namecoin testnet has the rule from Bitcoin testnet that resets difficulty if no block is mined in a certain period of time (I think 40 minutes?). So if you'd like to place a bit of mining hashpower on testnet so that blocks are mined regularly, that would be very helpful and would be appreciated.
It has the rule, but it is 20 minutes. However, I personally think that we should not have a miner running 24/7 on testnet without actually doing transactions there. This just bloats the chain unnecessarily. Especially with the 20 minute rule, everyone is able to mine whenever they are actually testing something (with just a CPU, no ASICs needed). Furthermore, note that there is -regtest in Namecoin Core which can be used for a lot of basic testing as well.
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

brianddk
Posts: 4
Joined: Thu Aug 06, 2015 8:52 pm
os: windows

Re: Tried testnet to get started...

Post by brianddk »

biolizard89 wrote:I think Namecoin testnet has the rule from Bitcoin testnet that resets difficulty if no block is mined in a certain period of time (I think 40 minutes?). So if you'd like to place a bit of mining hashpower on testnet so that blocks are mined regularly, that would be very helpful and would be appreciated.
OK... I'll try to get a linux machine built then work on building cgminer.... anyone know how to configure a NMC tesnet miner?
domob wrote:It has the rule, but it is 20 minutes. However, I personally think that we should not have a miner running 24/7 on testnet without actually doing transactions there. This just bloats the chain unnecessarily. Especially with the 20 minute rule, everyone is able to mine whenever they are actually testing something (with just a CPU, no ASICs needed). Furthermore, note that there is -regtest in Namecoin Core which can be used for a lot of basic testing as well.
Understood. I will only mine when I have TXs.

What is regtest?

josephbisch
Posts: 69
Joined: Sun Nov 23, 2014 3:34 pm
os: linux

Re: Tried testnet to get started...

Post by josephbisch »

brianddk wrote:
biolizard89 wrote:I think Namecoin testnet has the rule from Bitcoin testnet that resets difficulty if no block is mined in a certain period of time (I think 40 minutes?). So if you'd like to place a bit of mining hashpower on testnet so that blocks are mined regularly, that would be very helpful and would be appreciated.
OK... I'll try to get a linux machine built then work on building cgminer.... anyone know how to configure a NMC tesnet miner?
Are you using cgminer with a pool or by yourself (probably by yourself if you are doing testnet)?

Pool:

Code: Select all

cgminer -o http://pool:port -u username -p password
By yourself:

Code: Select all

cgminer -o http://localhost:8332 -u username -p password --btc-address 15qSxP1SQcUX3o4nhkfdbgyoWEFMomJ4rZ
Make sure to change the value of the --btc-address option to your Namecoin address. And instead of 8332, the port is 8336 for mainnet and 18336 for testnet.

More info: https://github.com/ckolivas/cgminer
brianddk wrote:
domob wrote:It has the rule, but it is 20 minutes. However, I personally think that we should not have a miner running 24/7 on testnet without actually doing transactions there. This just bloats the chain unnecessarily. Especially with the 20 minute rule, everyone is able to mine whenever they are actually testing something (with just a CPU, no ASICs needed). Furthermore, note that there is -regtest in Namecoin Core which can be used for a lot of basic testing as well.
Understood. I will only mine when I have TXs.

What is regtest?
This bitcoinj documentation link provides a nice description of regtest. Basically it is a testing mode intended for regression testing that allows you to generate new blocks on demand. You can pass a parameter (like 101 in the example) to generate that many blocks without waiting the time that would be necessary in mainnet or testnet mode.

brianddk
Posts: 4
Joined: Thu Aug 06, 2015 8:52 pm
os: windows

Re: Tried testnet to get started...

Post by brianddk »

josephbisch wrote:Are you using cgminer with a pool or by yourself (probably by yourself if you are doing testnet)?

Pool:

Code: Select all

cgminer -o http://pool:port -u username -p password
By yourself:

Code: Select all

cgminer -o http://localhost:8332 -u username -p password --btc-address 15qSxP1SQcUX3o4nhkfdbgyoWEFMomJ4rZ
Make sure to change the value of the --btc-address option to your Namecoin address. And instead of 8332, the port is 8336 for mainnet and 18336 for testnet.

More info: https://github.com/ckolivas/cgminer
Thanks for the good info.
biolizard89 wrote: I think Namecoin testnet has the rule from Bitcoin testnet that resets difficulty if no block is mined in a certain period of time
I reread this and it occurred to me....

Code: Select all

namecoin-qt -testnet -gen
should work if no one is on testnet... sure enough it does.

I will play with regtest later... but now I'm CPU mining testnet... ha! Plus don't need the faucet cause I just won a block... to funny... sorry I didn't put on my thinking cap earlier.

brianddk
Posts: 4
Joined: Thu Aug 06, 2015 8:52 pm
os: windows

Re: Tried testnet to get started...

Post by brianddk »

OK... bit of a correction... I got testnet coins, but they are immature. Still need the blockchain to get to 126120 before I can spend them... I"ll look into regtest and try to figure out how to generate blocks there.

josephbisch
Posts: 69
Joined: Sun Nov 23, 2014 3:34 pm
os: linux

Re: Tried testnet to get started...

Post by josephbisch »

brianddk wrote:OK... bit of a correction... I got testnet coins, but they are immature. Still need the blockchain to get to 126120 before I can spend them... I"ll look into regtest and try to figure out how to generate blocks there.
You need Namecoin Core first (regtest was introduced in a version of Bitcoin Core between the one NamecoinQ is based on and the one Namecoin Core is based on). Then run:

Code: Select all

./namecoind -regtest
./namecoin-cli -regtest setgenerate true 101
./namecoin-cli -regtest sendtoaddress <address of your app goes here> 10.0
./namecoin-cli -regtest setgenerate true 1
The 101 is so that you generate a block and then it has 100 blocks mined after it to allow it to mature. The 10.0 is the number of namecoins you are sending. The 1 on the last line is to generate another block to include the send on the third line in a block.

domob
Posts: 1129
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: Tried testnet to get started...

Post by domob »

josephbisch wrote:

Code: Select all

./namecoind -regtest
./namecoin-cli -regtest setgenerate true 101
./namecoin-cli -regtest sendtoaddress <address of your app goes here> 10.0
./namecoin-cli -regtest setgenerate true 1
Minor comment: The command to mine blocks was changed to just "generate 101" some time ago. I think the old one still works as well (not sure, though), but you should probably start using "generate" especially if you're just learning.
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

jonasbits
Posts: 47
Joined: Tue Mar 04, 2014 4:47 pm
os: linux

Re: Tried testnet to get started...

Post by jonasbits »

There is now an Offline Faucet based on bip39, bip32 and bip44:

The wordlist is: ( https://dcpos.github.io/bip39/ )
"abandon abandon achieve creek explain immune clerk yellow bunker invite country urban error gun skin mom kind jazz mobile lion swamp record scan bunker" - entropy is based on the genesis hash of namecoin testnet.

"m/44'/1'/0'/0/1" have the private key to address mozfLQiuF5w4GRTQCczumjEj7hbNxuLzAh (almost mozilla, easy to remember)

Right now there is 0.00115 nmcT at 5 keys. That should be enough for 3 name operations.
"m/44'/1'/0'/0/0"
"m/44'/1'/0'/0/5" - n32L8vXEenjbgtjWMjFzFCf1jDY4affRFs

This could be a interesting use of bip44, I have extended External(0)/Internal(change 1) with Names(2) for specialcoins regarding names:
"m/44'/1'/0'/2/1" at address mtLMUPHqaiGmVbYo7SnLP4rgGVwqesqjeu have ownership of "dd/example1"

Hope this helps!
(edited: fixed a mixup of testnet addresses)
My Namecoin address: NC3HGHk527xuWZBgMdGJ2GxjpRSw8D4oA6

Post Reply