As of 2018/08/16, there is no official Arionum testnet (but one is on the roadmap). If you would like to run your own testnet you can do so easily by following the steps to setup a mainnet node here. Then in the file “include/config.inc.php” change the testnet config to true like so…
$_config['testnet'] = true;
Make sure you update the config on a fresh install BEFORE you load your node in a browser for the first time. Probably important to keep your testnet and mainnet nodes separate without any conflicting data.
Notes on running an ARIONUM testnet:
- This is a private testnet. YOU are the network. YOU are the only miner. YOU are the only user.
- To get some test ARO, use the API to create a couple wallet addresses. Just run a GET in your browser to your own test node to generate a new address or use light wallet cli. Your node will return the keys in JSON. Write them down. Example: http://YOURNODEIPorDOMAIN/api.php?q=generateAccount For more info see http://peer1.arionum.com/doc/#api-API-generateAccount
- Then setup the arionum CPU miner in solo mode on the same node and mine ARO on your testnet using the new wallet address and key. Nonces by default are accepted as valid every 4 minutes to win you a block. If you edit the miner code, there is a “sleep(240)” line of code that you can adjust to make the miner confirm nonces faster. The api will accept all nonces as valid which will increment the block count so adjust as needed to speed up or slow down your testnet ming. You may want to update your /etc/hosts to have your node domain in it otherwise you can just use http://127.0.0.1 as your node. Don’t forget the schema http:// OR https:// if you have an SSL setup. Example: $ php miner solo http://127.0.0.1 YOURPUBLICKEY YOURPRIVATEKEY
- If you want to just run the miner in the background, an easy way is to use TMUX. Just open a SSH session and open a new tmux window and run the miner then just close the SSH window and you can re-open your tmux session later if you want. Also use “cpulimit” package to limit the miner process to like 1% other wise the miner is going to consume much of your CPU.
- Then once you have a balance, use the API to send some ARO to another address you created. Then you can use the two addresses to test your application by having your PHP code connect to your test node and make API calls.
- PRIVATE KEYS: If you are sending requests from an outside server/computer to your node they are NOT secure unless your node is running an SSL certificate and using HTTPS:// instead of HTTP:// this is just a testnet but your production nodes should be using SSL if you plan on POSTing any PRIVATE key information over the Internet. You can run transactions securely without HTTPS by signing transactions and sneding the signature and public key instead of ay private information.
- NEW FEATURES: To test new features, your testnet has to be at the correct block number. For example, the ALIAS and MASTERNODE commands where added during a hard fork at block 80,000. If you try to use these commands pre-fork, you will receive invalid signature errors.
- DATABASE: If you want to fill your database with test data (instead of mining it), you can export the MAINNET data and import it into your TESTNET database. While doing this, first turn off php-fpm and nginx, import the data. Then TRUNCATE the peers table. then restart php-fpm and nginx. Note that this will delete your testnet wallet history so you will need to generate new testnet wallets to use. Alternatively, you can setup a MAINNET node first, then turn off php-fpm/nginx, empty the peers table, update your config to testnet, then restart php-fpm and nginx.
Solo mining on your ARIONUM testnet:
Setup CPU miner…
cd ~ mkdir aro-miner cd aro-miner git init git clone https://github.com/arionum/miner.git cd miner
Run the miner solo to your own node…
php miner solo http://127.0.0.1 YOURWALLETPUBLICKEY YOURWALLETPRIVATEKEY
Once you see a few “Nonce confirmed” messages your address will now have some ARO that you received for winning the block. Congrats… you are now testnet wealthy!
Nonces by default using the testnet setup are accepted every 240 seconds or so but can be adjusted in the miner code by changing the sleep(240) to a lower count.
If you want to run your miner in the background, use the linux package “cpulimit” and limit your miner process to let’s say 1%. Its your own testnet. You don’t need a beefy miner.