Difference between revisions of "HowTo run PoP Miner"

From Veriblock Wiki
Jump to: navigation, search
Line 6: Line 6:
 
== Overview ==
 
== Overview ==
  
Proof-of-Proof (PoP) mining is what ultimately endorses the VeriBlock blockchain using Bitcoin's OP_RETURN, and thereby allows an altchain to have Bitcoin-level security through VeriBlock. It is different than Proof-of-Work mining, which collects valid transactions into a block and adds that block to the blockchain.
+
Proof-of-Proof (PoP) mining is what ultimately creates the payload to put in Bitcoin's OP_RETURN, and thereby allows an altchain to have Bitcoin-level security through VeriBlock. It is different than Proof-of-Work mining, which collects valid transactions into a block and adds that block to the blockchain.
  
 
== Prerequisites ==
 
== Prerequisites ==
  
PoP Mining requires Bitcoin accessibility.
+
* Send Bitcoins to your local PoP Miner's Bitcoin wallet
 +
* Run local NodeCore instance
  
For Testnet, that means just running a testnet Bitcoin node.
+
==Run the PoP Miner==
 +
 
 +
=== Setup ===
 +
 
 +
Note: If you are having trouble running nodecore-pop on Linux, you may need to make nodecore-pop executable: chmod a+x nodecore-pop
  
See this Bitcoin page for background info: https://en.bitcoin.it/wiki/Running_Bitcoin
+
Run a local instance of NodeCore
  
# Download Bitcoin Core https://bitcoin.org/en/download, run Bitcoin in testnet mode, and allow it to fully sync. This may take a while depending on your network connection.
+
Unzip nodecore-pop-*.zip
# Run bitcoin TestNet by passing in the testnet parameter:
+
In the bin folder, if you're using Windows then run nodecore-pop.bat, if you're using Linux or macOS then run nodecore-pop
## Windows: bitcoin-qt.exe -testnet
+
 
## Linux: bitcoind -testnet
+
Wait a few seconds for the PoP Miner to start up. You should see something like:
# Set up a rpc user and password in the bitcoin.conf file
 
# In Bitcoin Core, goto: Settings > Options > Main (tab) > Open Config File (button).
 
## [[File:HowTo_PoP_1a.png|400px]]
 
# specify the flags like below (server=1, rpcuser=your_username, rpcpassword=your_password), and save the file. Re-click the "Open Config File" to ensure the settings did indeed save (they should have)
 
# If prompted with "The configuration file is used to...", then click ok.
 
bitcoin.conf (a plaintext file) will open.
 
  
 
<pre>
 
<pre>
server=1
+
===[ NodeCore Proof-of-Proof Miner v0.1.3 ]===
rpcuser=bitcoinrpc
+
 
rpcpassword=someTestNetPassword123
+
INFO: Connecting to NodeCore at 127.0.0.1:10500
 +
WARN: PoP Miner: NOT READY (Could not connect to NodeCore)
 +
WARN: PoP Miner: NOT READY (Bitcoin blockchain is not downloaded)
 +
WARN: PoP Miner: NOT READY (Bitcoin service is not ready)
 +
SUCCESS: Bitcoin blockchain finished downloading
 +
INFO: Wallet loaded, current balance: 0.0 BTC
 +
INFO: Send coins to: mit5BbeUcper58ozwbMJCxs9hWAZfRKcWk
 +
SUCCESS: Bitcoin service is ready
 +
SUCCESS: PoP Miner: READY
 +
>
 
</pre>
 
</pre>
  
Get Bitcoin testnet coins from a faucet. Running PoP on VeriBlock testnet requires a small amount of testnet Bitcoin. You can find a list of popular Bitcoin testnet faucets here: https://en.bitcoin.it/wiki/Testnet#Faucets. Get a new Bitcoin testnet address from your running instance of Bitcoin, and then enter it into one of the Bitcoin testnet faucet sites to receive testnet Bitcoin coins.
+
Type "help" to see a list of all available commands:
  
==Run the PoP Miner==
+
<pre>
 +
> help
 +
 
 +
Commands:
 +
    getoperation <id>
 +
    getpopendorsementinfo <address>
 +
    help [command]
 +
    listconfig
 +
    listoperations
 +
    mine
 +
    quit
 +
    resubmit <id>
 +
    sendbitcointoaddress <address> <amount>
 +
    setconfig <key> <value>
 +
    showbitcoinaddress
 +
    showbitcoinbalance
 +
</pre>
 +
 
 +
If you have zero balance, then open up a testnet wallet (or go to a BTC Testnet faucet) and send coins to the PoP BTC address (in this case "mit5BbeUcper58ozwbMJCxs9hWAZfRKcWk")
 +
 
 +
Get Bitcoin testnet coins from a faucet. Running PoP on VeriBlock testnet requires a small amount of testnet Bitcoin. You can find a list of popular Bitcoin testnet faucets here: https://en.bitcoin.it/wiki/Testnet#Faucets. Send Bitcoin from the faucet to the PoP BTC address (in this example: mit5BbeUcper58ozwbMJCxs9hWAZfRKcWk).
 +
 
 +
Before mining, you should be able to run showbitcoinbalance and see a positive balance
 +
<pre>
 +
> showbitcoinbalance
 +
Bitcoin Balance: 0.049292 BTC
 +
</pre>
 +
 
 +
=== Mine ===
 +
 
 +
Simply run the "mine" command
 +
 
 +
<pre>
 +
> mine
 +
2018-04-18 12:29:22.215 [15dabd68] Mining operation is now: STARTED
 +
2018-04-18 12:29:22.219 [15dabd68] Mining operation current action: Ready
 +
2018-04-18 12:29:22.221 [15dabd68] Mining operation is now: RUNNING
  
Note: If you are having trouble running nodecore-pop on linux, you may need to make nodecore-pop executable: chmod a+x nodecore-pop
+
*** COMMAND RESULT ***
 +
* INFO: [V201] Mining operation started
 +
* To view details, run command: getoperation 15dabd68
 +
**********************
  
Run a local instance of NodeCore
+
2018-04-18 12:29:22.226 [15dabd68] Mining operation current action: Getting PoP publication data
 +
2018-04-18 12:29:22.239 [15dabd68] Received PoP mining instructions, publishing data: 00000001000000035D489E6E78F3C759BDDE71EEFB20D97A58A616B1187B6C2B666B827A2C53DCF3B766520B169C3AD22AC941C65AD77B46044AE83955448F00217C8C3562659235A15C85F155CA620C
 +
2018-04-18 12:29:22.242 [15dabd68] Mining operation current action: Creating Bitcoin transaction containing PoP publication data
 +
INFO: Received tx '9fb8d3f61826031749e89b6e0b940cf3a265a247691c4399ee5951d3945f15d4', new balance: '0.048938 BTC'
 +
2018-04-18 12:29:23.937 [15dabd68] Signed Bitcoin transaction: 0100000001CFFE10EBBF7B9C30372DE738B845BFEDD533B13324ABC6E2AEFA1C79089A810E010000006A4730440220754348272F33F380D34A3E82D2005752AD6BE672EFD070AF830DD2A162D64FD00220279DFCF6849DD1712793A96B3EA0A03B0C206B58BD8B15D12DF55DE425B039CB012103086A1756BA928FE5644BE7ED595C37A72D4BD6E09A518CCA9A9A80165C351E9DFFFFFFFF0268AC4A00000000001976A914EACAE5B5B6643640FD906791F511694E0BA9AF3088AC0000000000000000536A4C5000000001000000035D489E6E78F3C759BDDE71EEFB20D97A58A616B1187B6C2B666B827A2C53DCF3B766520B169C3AD22AC941C65AD77B46044AE83955448F00217C8C3562659235A15C85F155CA620C00000000
 +
2018-04-18 12:29:23.938 [15dabd68] Submitted Bitcoin transaction: 9fb8d3f61826031749e89b6e0b940cf3a265a247691c4399ee5951d3945f15d4
 +
2018-04-18 12:29:23.940 [15dabd68] Mining operation current action: Waiting for transaction to be included in Bitcoin block
 +
>
 +
</pre>
  
Unzip nodecore-pop-*.zip
+
This will show:
In the bin folder, if Windows then run nodecore-pop.bat, if linux then run nodecore-pop
+
* Bitcoin transaction (can see this on a block explorer, such as: https://www.blocktrail.com/tBTC/tx/9fb8d3f61826031749e89b6e0b940cf3a265a247691c4399ee5951d3945f15d4)
You will be prompted for a series of questions. Below is sample inputs. Note that Bitcoin TestNet port is 18332 (not 18333).
+
* The 80-byte PoP Payload that will be put in the OP_RETURN
  
One prompt will be for a "funded Bitcoin address." This can be retrieved by running "listunspent" from the built-in console. To get to the built-in consile, go to: Help > Debug > Console Tab:
+
There can be multiple PoP Transactions at once, therefore each is given an in-session identifier, in this case "[15dabd68]". This is a temporary session ID. Ultimately the PoP Transaction will be on the VBK blockchain, and have a VBK Transaction ID.
  
[[File:HowTo_PoP_4.png|400px]]
+
=== View Status of Mining ===
  
At this point, you should have:
+
While PoP Mining is very quick to start, it does take several confirmations on the BTC blockchain, and 250 confirmations on the VBK blockchain for payout. You can run getoperation on a session ID to see its current status:
* An instance of NodeCore running, such as one available at 127.0.0.1:10500
 
* A Bitcoin testnet node, such as on available at 127.0.0.1:18332
 
* That Bitcoin testnet node has an RPC username and password set up in its bitcoin.conf file
 
* A funded Bitcoin address (first get testnet Bitcoin coins from a faucet, then run listunspent to get an address), such as "mwAY47kNhN2TY1nc23Y18aDi4botjpGzAy"
 
  
 
<pre>
 
<pre>
 +
> getoperation 15dabd68
  
Please enter the VeriBlock NodeCore host [Default: 127.0.0.1](]):
+
PoP Mining Operation: 15dabd68
> 127.0.0.1
+
    Status: RUNNING
Please enter the VeriBlock NodeCore port [10500](Default:):
+
    Current Action: CONFIRM
> 10500
+
    PoP Publication Data: 00000001000000035D489E6E78F3C759BDDE71EEFB20D97A58A616B1187B6C2B666B827A2C53DCF3B766520B169C3AD22AC941C65AD77B46044AE83955448F00217C8C3562659235A15C85F155CA620C
Please enter the Bitcoin RPC host [127.0.0.1](Default:):
+
    Transaction: 0100000001CFFE10EBBF7B9C30372DE738B845BFEDD533B13324ABC6E2AEFA1C79089A810E010000006A4730440220754348272F33F380D34A3E82D2005752AD6BE672EFD070AF830DD2A162D64FD00220279DFCF6849DD1712793A96B3EA0A03B0C206B58BD8B15D12DF55DE425B039CB012103086A1756BA928FE5644BE7ED595C37A72D4BD6E09A518CCA9A9A80165C351E9DFFFFFFFF0268AC4A00000000001976A914EACAE5B5B6643640FD906791F511694E0BA9AF3088AC0000000000000000536A4C5000000001000000035D489E6E78F3C759BDDE71EEFB20D97A58A616B1187B6C2B666B827A2C53DCF3B766520B169C3AD22AC941C65AD77B46044AE83955448F00217C8C3562659235A15C85F155CA620C00000000
> 127.0.0.1
+
    Transaction ID: 9fb8d3f61826031749e89b6e0b940cf3a265a247691c4399ee5951d3945f15d4
Please enter the Bitcoin RPC port [8332](Default:):
+
    Block Header of Proof: 00000020D22D248064ECA9D9717DDF2C532CD3681E10B1F97462FC7A6101000000000000B3503C8DF213CC4AE02D0C96D5101DBFA85C0C7A950F1684D97DB9296F3A8C65AB80D75AFFFF001D6295F16F
> 18332
+
    Context Headers:
Please enter a funded Bitcoin address you would like to use for PoP:
+
        000000205D98FA5CE3BB7F40BDC6B74C3A3A0334EC29F4B7FB9850882A14CF9900000000FE7CB67E7E84491F9B2C9BDD08731343EBDE6E1B08E64E18265A70D55FB4F7DCF47BD75A9B03031A171C327000
> mwAY47kNhN2TY1nc23Y18aDi4botjpGzAy
+
    Merkle Path: 45:D4155F94D35159EE99431C6947A265A2F30C940B6E9BE84917032618F6D3B89F:D329F111C3FCE934C19827AEAB26C9DF22E1B21A219D2914429E7DB21A187DDD:0FB383E342468E76A9E16A27E3D1DA30268AC18F6A00B9032F5C6DD5B2D026A5:C53007F949B828F7A961BD353D1CD8C494F9EBB51816020D2AC27C27F597ADBA:B3D0436C782D545E4158CC5DD713184C3BE887CE18835561BFE34DAD3E33BE65:7605554A73E2A45ED8337A3778CE9CD66B5507EF32C7511C436DAC7BAAE2D0D9:B02952E115B2D21E1E437EF3AAD263A2323D922F10E60456BC97BE2E4227F415:3F6A1039A0C31A5A7E969F7286C476E94FBA511ED75B3D1A307E4430C23770FB:50C511B2D7C76006E4E6DD3C83CAF1C895A2943F1BFCBA4455A2BD106F97CAE8
Please enter your Bitcoin RPC username:
+
    Alternate Blocks:
> bitcoinrpc
+
  >
Please enter your Bitcoin RPC password:
 
> someTestNetPassword123
 
How many BTC would you like to pay as a transaction fee for each PoP? (Suggested: 0.001)
 
  > 0.001
 
  
 
</pre>
 
</pre>
  
''Note that after entering this info once, it will be saved to a ncpop.properties file for future reference. If you ever need to change these entries in the future, you can either delete ncpop.properties and restart nodecore-pop (where it will prompt you for new entries), or you can change the entires in the configuration file directly.''
+
== Status Codes ==
  
Because PoP Mining costs a small amount of BTC, you will be prompted for each transaction with something like: "'''Press enter to pay 0.001 BTC to perform a PoP! (q to quit)'''"
+
Status of the PoP Miner
  
A Proof of Proof mining operation is a long running process. It involves retrieving a PoP signature from NodeCore, submitting a Bitcoin transaction, waiting for the Bitcoin transaction to be included in a block, and finally submitting that Bitcoin block information back to NodeCore. Until that final submission to NodeCore takes place, the mining operation is incomplete, and you will not be rewarded for your PoP mining efforts.
+
{| class="wikitable"
 +
! Status
 +
! Description
 +
|-
 +
| STARTED
 +
|
 +
|-
 +
| RUNNING
 +
| Will most often see this state
 +
|-
 +
| COMPLETE
 +
|
 +
|-
 +
| FAILED
 +
|
 +
|}
  
The console output updates with each new stage of the mining operation.  Because it is possible to have multiple concurrent mining operations executing, each status update written to the console includes a "job identifier", that will look like [4826f210]. This job identifier can be used to correlate status messages for any given mining operation.  By far, the longest single task in the mining operation is waiting for a Bitcoin transaction to be included in a mined Bitcoin block. It is very common and normal to see many status message written very rapidly as soon as you initiate a new operation and then for the miner to seemingly "pause" with the latest message reading:
+
Current Actions
  
<pre>2018-04-02 00:15:00.052 [4826f210] Mining operation current action: Waiting for transaction to be included in Bitcoin block</pre>
+
{| class="wikitable"
 +
! Action
 +
! Description
 +
|-
 +
| READY
 +
| Operation has been initialized and is ready to start
 +
|-
 +
| PUBLICATION_DATA
 +
| Getting the publication data from NodeCore
 +
|-
 +
| TRANSACTION
 +
| Composing and submitting the Bitcoin transaction containing the PoP publication data
 +
|-
 +
| WAIT
 +
| Waiting and listening for new Bitcoin blocks that include the transaction
 +
|-
 +
| PROOF
 +
| Validating the merkle path of the transaction in the block
 +
|-
 +
| CONTEXT
 +
| Accumulating Bitcoin block headers to provide enough context to NodeCore to maintain an unbroken SPV view of the Bitcoin blockchain
 +
|-
 +
| SUBMIT
 +
| Submitting all required proofs of the Bitcoin transaction to NodeCore (NodeCore adds a PoP transaction to mempool)
 +
|-
 +
| CONFIRM
 +
| Waiting and listening for new Bitcoin blocks and transaction to confirm 20 times. Handles resubmission of PoP transaction to NodeCore if the Bitcoin blockchain should fork and previous block is no longer in the main branch.
 +
|-
 +
| DONE
 +
|
 +
|}
  
If a reasonable transaction fee was used to submit your Bitcoin transaction, it will eventually be included in a block, and the PoP miner will progress through the final stages of the operation. You will know an operation is complete when you see console output:
+
== ncpop.properties Reference ==
  
<pre>2018-04-02 00:18:27.315 [4826f210] Mining operation is now: Completed</pre>
+
These properties can be set in the ncpop.properties file (in bin folder, located next to nodecore-pop.bat). If this file does not exist, then you can create it.
  
At any point in the process, you may queue up another PoP mining operation by hitting the "ENTER" key.  You also may quit the application at any time by pressing "q" followed by the "ENTER" key. The quit sequence waits for all in-progress mining operations to complete before actually shutting down the application. This is to ensure that your PoP transaction is submitted and you have every opportunity to be rewarded for the Bitcoin you've spent to begin the operation. You will see status updates written to the console as it's attempting to finalize running operations:
+
These can also be seen from running the "listconfig" command, and set with the "setconfig" command.
  
<pre>Waiting on operation '2a479b68' at action: Waiting for transaction to be included in Bitcoin block
+
{| class="wikitable"
Waiting on 1 operations to complete</pre>
+
! Config Key
 +
! Default Value
 +
! Comment
 +
|-
 +
| bitcoin.network
 +
| testnet
 +
|
 +
|-
 +
| bitcoin.fee.max
 +
| 80000
 +
|
 +
|-
 +
| bitcoin.fee.perbyte
 +
| 200
 +
|
 +
|-
 +
| nodecore.rpc.host
 +
| 127.0.0.1
 +
|
 +
|-
 +
| nodecore.rpc.port
 +
| 10500
 +
|
 +
|-
 +
| nodecore.rpc.ssl
 +
| false
 +
|
 +
|-
 +
| nodecore.rpc.password
 +
|
 +
|
 +
|-
 +
| nodecore.rpc.cert.chain.path
 +
|
 +
|
 +
|}
  
Congrats, you have mined a PoP transaction!
+
== FAQ ==
  
== View PoP on the bitcoin blockchain ==
+
=== Do I need to run a full Bitcoin node? ===
 +
No. The PoP Miner uses the BitcoinJ library and embeds a bitcoin wallet, such that one does NOT need to run a full node to do PoP Mining.
  
Go back to your Bitcoin Core wallet, Transactions tab, and you will see PoP Transactions. Drill down on a transaction and you'll see a transaction ID.  
+
=== Does the Bitcoin I send to my PoP Wallet need to be confirmed? ===
 +
No. If the Bitcoin transaction with the deposit ends up being reverted, then the PoP transaction that depends on it just fails.
  
[[File:HowTo_PoP_2c.png|400px]]
+
This also has the benefit of allowing PoP Mining immediately after a BTC deposit, without waiting for several confirmations.
  
After a few minutes, this transaction ID should show up on Bitcoin testnet block explorers, such as http://testnet.coinsecrets.org.
+
== Troubleshooting ==
  
<pre>
+
=== "PoP Miner not ready" warning ===
Status: 0/unconfirmed, in memory pool
 
Date: 3/9/2018 14:33
 
Debit: 0.00000000 BTC
 
Transaction fee: -0.00100000 BTC
 
Net amount: -0.00100000 BTC
 
Transaction ID: 52bac8bad5c9d71f1adcf166c5ef5e651f269851b1816b61cb99ed62268f512b
 
Transaction total size: 283 bytes
 
Output index: 0
 
</pre>
 
Drill down on the block explorer, and you will see the proof in the OP_RETURN. Ignore the first 4 characters (0x4c refers to the OP_PUSHDATA1 opcode, and 0x50 refers to 80 bytes [the size of our published data] being pushed onto the stack), look at the last 160 (80 bytes), and that is your pop publication on the BTC testnet!
 
  
<pre>
+
{| class="wikitable"
OP_RETURN
+
! Warning
4c5000000001000000f29717032fb910956d001e9ae5554540864b4c998cf7233ca3ff78109365086b0e7ad55c480ce9dd55fa6763275aa2eedc0319ca1c
+
! Solution
</pre>
+
|-
 +
| PoP wallet does not contain sufficient funds
 +
| Send Bitcoins to your PoP BTC wallet address. Run commands showbitcoinbalance (it should be greater than zero), and sendbitcointoaddress.
 +
|-
 +
| Could not connect to NodeCore
 +
| Ensure an instance of NodeCore is running, and you could connect to it from the NC_CLI and run getinfo
 +
|-
 +
| Bitcoin blockchain is not downloaded
 +
| Ensure the ncpop.properties file has a line for bitcoin.network=testnet, and wait for the blockchain to download. There should be a message like "Blockchain downloading: 95%".
 +
|-
 +
| Bitcoin service is not ready
 +
| Check the other warnings. There should be a message like "SUCCESS: Bitcoin service is ready".
 +
|}
  
https://www.blocktrail.com/tBTC/tx/52bac8bad5c9d71f1adcf166c5ef5e651f269851b1816b61cb99ed62268f512b
+
=== I do not have any bitcoin ===
  
[[File:HowTo_PoP_3.png|400px]]
+
For testnet, use a faucet to get test bitcoin. You can find a list of popular Bitcoin testnet faucets here: https://en.bitcoin.it/wiki/Testnet#Faucets.

Revision as of 18:31, 26 April 2018

See: Main_Page, PoP_Miner_CommandLine, PoP_Transaction_LifeCycle

Overview

Proof-of-Proof (PoP) mining is what ultimately creates the payload to put in Bitcoin's OP_RETURN, and thereby allows an altchain to have Bitcoin-level security through VeriBlock. It is different than Proof-of-Work mining, which collects valid transactions into a block and adds that block to the blockchain.

Prerequisites

  • Send Bitcoins to your local PoP Miner's Bitcoin wallet
  • Run local NodeCore instance

Run the PoP Miner

Setup

Note: If you are having trouble running nodecore-pop on Linux, you may need to make nodecore-pop executable: chmod a+x nodecore-pop

Run a local instance of NodeCore

Unzip nodecore-pop-*.zip In the bin folder, if you're using Windows then run nodecore-pop.bat, if you're using Linux or macOS then run nodecore-pop

Wait a few seconds for the PoP Miner to start up. You should see something like:

===[ NodeCore Proof-of-Proof Miner v0.1.3 ]===

INFO: Connecting to NodeCore at 127.0.0.1:10500
WARN: PoP Miner: NOT READY (Could not connect to NodeCore)
WARN: PoP Miner: NOT READY (Bitcoin blockchain is not downloaded)
WARN: PoP Miner: NOT READY (Bitcoin service is not ready)
SUCCESS: Bitcoin blockchain finished downloading
INFO: Wallet loaded, current balance: 0.0 BTC
INFO: Send coins to: mit5BbeUcper58ozwbMJCxs9hWAZfRKcWk
SUCCESS: Bitcoin service is ready
SUCCESS: PoP Miner: READY
 >

Type "help" to see a list of all available commands:

 > help

Commands:
    getoperation <id>
    getpopendorsementinfo <address>
    help [command]
    listconfig
    listoperations
    mine
    quit
    resubmit <id>
    sendbitcointoaddress <address> <amount>
    setconfig <key> <value>
    showbitcoinaddress
    showbitcoinbalance

If you have zero balance, then open up a testnet wallet (or go to a BTC Testnet faucet) and send coins to the PoP BTC address (in this case "mit5BbeUcper58ozwbMJCxs9hWAZfRKcWk")

Get Bitcoin testnet coins from a faucet. Running PoP on VeriBlock testnet requires a small amount of testnet Bitcoin. You can find a list of popular Bitcoin testnet faucets here: https://en.bitcoin.it/wiki/Testnet#Faucets. Send Bitcoin from the faucet to the PoP BTC address (in this example: mit5BbeUcper58ozwbMJCxs9hWAZfRKcWk).

Before mining, you should be able to run showbitcoinbalance and see a positive balance

 > showbitcoinbalance
Bitcoin Balance: 0.049292 BTC

Mine

Simply run the "mine" command

 > mine
2018-04-18 12:29:22.215 [15dabd68] Mining operation is now: STARTED
2018-04-18 12:29:22.219 [15dabd68] Mining operation current action: Ready
2018-04-18 12:29:22.221 [15dabd68] Mining operation is now: RUNNING

*** COMMAND RESULT ***
* INFO: [V201] Mining operation started
* To view details, run command: getoperation 15dabd68
**********************

2018-04-18 12:29:22.226 [15dabd68] Mining operation current action: Getting PoP publication data
2018-04-18 12:29:22.239 [15dabd68] Received PoP mining instructions, publishing data: 00000001000000035D489E6E78F3C759BDDE71EEFB20D97A58A616B1187B6C2B666B827A2C53DCF3B766520B169C3AD22AC941C65AD77B46044AE83955448F00217C8C3562659235A15C85F155CA620C
2018-04-18 12:29:22.242 [15dabd68] Mining operation current action: Creating Bitcoin transaction containing PoP publication data
INFO: Received tx '9fb8d3f61826031749e89b6e0b940cf3a265a247691c4399ee5951d3945f15d4', new balance: '0.048938 BTC'
2018-04-18 12:29:23.937 [15dabd68] Signed Bitcoin transaction: 0100000001CFFE10EBBF7B9C30372DE738B845BFEDD533B13324ABC6E2AEFA1C79089A810E010000006A4730440220754348272F33F380D34A3E82D2005752AD6BE672EFD070AF830DD2A162D64FD00220279DFCF6849DD1712793A96B3EA0A03B0C206B58BD8B15D12DF55DE425B039CB012103086A1756BA928FE5644BE7ED595C37A72D4BD6E09A518CCA9A9A80165C351E9DFFFFFFFF0268AC4A00000000001976A914EACAE5B5B6643640FD906791F511694E0BA9AF3088AC0000000000000000536A4C5000000001000000035D489E6E78F3C759BDDE71EEFB20D97A58A616B1187B6C2B666B827A2C53DCF3B766520B169C3AD22AC941C65AD77B46044AE83955448F00217C8C3562659235A15C85F155CA620C00000000
2018-04-18 12:29:23.938 [15dabd68] Submitted Bitcoin transaction: 9fb8d3f61826031749e89b6e0b940cf3a265a247691c4399ee5951d3945f15d4
2018-04-18 12:29:23.940 [15dabd68] Mining operation current action: Waiting for transaction to be included in Bitcoin block
 >

This will show:

There can be multiple PoP Transactions at once, therefore each is given an in-session identifier, in this case "[15dabd68]". This is a temporary session ID. Ultimately the PoP Transaction will be on the VBK blockchain, and have a VBK Transaction ID.

View Status of Mining

While PoP Mining is very quick to start, it does take several confirmations on the BTC blockchain, and 250 confirmations on the VBK blockchain for payout. You can run getoperation on a session ID to see its current status:

 > getoperation 15dabd68

PoP Mining Operation: 15dabd68
    Status: RUNNING
    Current Action: CONFIRM
    PoP Publication Data: 00000001000000035D489E6E78F3C759BDDE71EEFB20D97A58A616B1187B6C2B666B827A2C53DCF3B766520B169C3AD22AC941C65AD77B46044AE83955448F00217C8C3562659235A15C85F155CA620C
    Transaction: 0100000001CFFE10EBBF7B9C30372DE738B845BFEDD533B13324ABC6E2AEFA1C79089A810E010000006A4730440220754348272F33F380D34A3E82D2005752AD6BE672EFD070AF830DD2A162D64FD00220279DFCF6849DD1712793A96B3EA0A03B0C206B58BD8B15D12DF55DE425B039CB012103086A1756BA928FE5644BE7ED595C37A72D4BD6E09A518CCA9A9A80165C351E9DFFFFFFFF0268AC4A00000000001976A914EACAE5B5B6643640FD906791F511694E0BA9AF3088AC0000000000000000536A4C5000000001000000035D489E6E78F3C759BDDE71EEFB20D97A58A616B1187B6C2B666B827A2C53DCF3B766520B169C3AD22AC941C65AD77B46044AE83955448F00217C8C3562659235A15C85F155CA620C00000000
    Transaction ID: 9fb8d3f61826031749e89b6e0b940cf3a265a247691c4399ee5951d3945f15d4
    Block Header of Proof: 00000020D22D248064ECA9D9717DDF2C532CD3681E10B1F97462FC7A6101000000000000B3503C8DF213CC4AE02D0C96D5101DBFA85C0C7A950F1684D97DB9296F3A8C65AB80D75AFFFF001D6295F16F
    Context Headers:
        000000205D98FA5CE3BB7F40BDC6B74C3A3A0334EC29F4B7FB9850882A14CF9900000000FE7CB67E7E84491F9B2C9BDD08731343EBDE6E1B08E64E18265A70D55FB4F7DCF47BD75A9B03031A171C327000
    Merkle Path: 45:D4155F94D35159EE99431C6947A265A2F30C940B6E9BE84917032618F6D3B89F:D329F111C3FCE934C19827AEAB26C9DF22E1B21A219D2914429E7DB21A187DDD:0FB383E342468E76A9E16A27E3D1DA30268AC18F6A00B9032F5C6DD5B2D026A5:C53007F949B828F7A961BD353D1CD8C494F9EBB51816020D2AC27C27F597ADBA:B3D0436C782D545E4158CC5DD713184C3BE887CE18835561BFE34DAD3E33BE65:7605554A73E2A45ED8337A3778CE9CD66B5507EF32C7511C436DAC7BAAE2D0D9:B02952E115B2D21E1E437EF3AAD263A2323D922F10E60456BC97BE2E4227F415:3F6A1039A0C31A5A7E969F7286C476E94FBA511ED75B3D1A307E4430C23770FB:50C511B2D7C76006E4E6DD3C83CAF1C895A2943F1BFCBA4455A2BD106F97CAE8
    Alternate Blocks:
 >

Status Codes

Status of the PoP Miner

Status Description
STARTED
RUNNING Will most often see this state
COMPLETE
FAILED

Current Actions

Action Description
READY Operation has been initialized and is ready to start
PUBLICATION_DATA Getting the publication data from NodeCore
TRANSACTION Composing and submitting the Bitcoin transaction containing the PoP publication data
WAIT Waiting and listening for new Bitcoin blocks that include the transaction
PROOF Validating the merkle path of the transaction in the block
CONTEXT Accumulating Bitcoin block headers to provide enough context to NodeCore to maintain an unbroken SPV view of the Bitcoin blockchain
SUBMIT Submitting all required proofs of the Bitcoin transaction to NodeCore (NodeCore adds a PoP transaction to mempool)
CONFIRM Waiting and listening for new Bitcoin blocks and transaction to confirm 20 times. Handles resubmission of PoP transaction to NodeCore if the Bitcoin blockchain should fork and previous block is no longer in the main branch.
DONE

ncpop.properties Reference

These properties can be set in the ncpop.properties file (in bin folder, located next to nodecore-pop.bat). If this file does not exist, then you can create it.

These can also be seen from running the "listconfig" command, and set with the "setconfig" command.

Config Key Default Value Comment
bitcoin.network testnet
bitcoin.fee.max 80000
bitcoin.fee.perbyte 200
nodecore.rpc.host 127.0.0.1
nodecore.rpc.port 10500
nodecore.rpc.ssl false
nodecore.rpc.password
nodecore.rpc.cert.chain.path

FAQ

Do I need to run a full Bitcoin node?

No. The PoP Miner uses the BitcoinJ library and embeds a bitcoin wallet, such that one does NOT need to run a full node to do PoP Mining.

Does the Bitcoin I send to my PoP Wallet need to be confirmed?

No. If the Bitcoin transaction with the deposit ends up being reverted, then the PoP transaction that depends on it just fails.

This also has the benefit of allowing PoP Mining immediately after a BTC deposit, without waiting for several confirmations.

Troubleshooting

"PoP Miner not ready" warning

Warning Solution
PoP wallet does not contain sufficient funds Send Bitcoins to your PoP BTC wallet address. Run commands showbitcoinbalance (it should be greater than zero), and sendbitcointoaddress.
Could not connect to NodeCore Ensure an instance of NodeCore is running, and you could connect to it from the NC_CLI and run getinfo
Bitcoin blockchain is not downloaded Ensure the ncpop.properties file has a line for bitcoin.network=testnet, and wait for the blockchain to download. There should be a message like "Blockchain downloading: 95%".
Bitcoin service is not ready Check the other warnings. There should be a message like "SUCCESS: Bitcoin service is ready".

I do not have any bitcoin

For testnet, use a faucet to get test bitcoin. You can find a list of popular Bitcoin testnet faucets here: https://en.bitcoin.it/wiki/Testnet#Faucets.