Difference between revisions of "HowTo Mine BTCSQ"

From Veriblock Wiki
Jump to: navigation, search
(48 intermediate revisions by 5 users not shown)
Line 1: Line 1:
See: [[VAIF]]
+
See: [[BTCSQ]], [[Altchain_List]], [[Altchain_PoP_Miner]], [[PoW_Pools_BTCSQ]], [[VAIF]]
  
'''vBTC is currently in Alpha, and will change. This page is for testing purposes.'''
+
Bitcoin Squared (BTCSQ), formerly codename "vBTC"
  
 
__toc__
 
__toc__
Line 8: Line 8:
 
vBTC is the reference implementation for Bitcoin-based blockchains utilizing VeriBlock's Proof-of-Proof technology.
 
vBTC is the reference implementation for Bitcoin-based blockchains utilizing VeriBlock's Proof-of-Proof technology.
  
Below, you will find the steps needed to download and run the vBTC Alpha daemon.   
+
Below, you will find the steps needed to download and run the vBTC daemon.   
  
 
Please note, all coins associated with this network are without value, and are for testing purposes only.
 
Please note, all coins associated with this network are without value, and are for testing purposes only.
Line 20: Line 20:
  
 
=== Prerequisites: ===
 
=== Prerequisites: ===
 +
 +
It is recommended to have 4 cpu cores and 16GB of RAM to run all 3 applications. (NodeCore, APM, vBitcoin daemon)
 +
 +
Currently, VeriBlock TestNet requires a minimum of 6GB of space to sync.  10+ GB free space recommended.
 +
 
====64-bit Java====
 
====64-bit Java====
 
Tested using AdoptOpenJDK 8, 11, & 14 with HotSpot JVM. https://adoptopenjdk.net/
 
Tested using AdoptOpenJDK 8, 11, & 14 with HotSpot JVM. https://adoptopenjdk.net/
 +
 +
== Download Packages for Linux ==
 +
 +
[[BTCSQ#Get_Package]]
  
 
== Download Packages for Windows x64 ==
 
== Download Packages for Windows x64 ==
 +
 +
[[BTCSQ#Get_Package]]
  
 
Package contains:
 
Package contains:
  
=== vBitcoin Alpha Daemon ===
+
=== vBitcoin 0.4 Daemon ===
 
* vbitcoin-qt.exe
 
* vbitcoin-qt.exe
 
* vbitcoind.exe
 
* vbitcoind.exe
Line 36: Line 47:
  
 
=== vbitcoin.conf location ===
 
=== vbitcoin.conf location ===
On Windows this file needs to be copied (found in the vBTC directory after you unzip the package) to '''%appdata%\vBitcoin''' or '''C:\Users\User\AppData\Roaming\vBitcoin'''<br>
+
Located within the '''vBTC-release.0.4-<version>/data''' directory.
  
You will need to create the '''vBitcoin''' directory if this is the first time running the application, if it is not the first time running it, you will need to delete the '''testnet3''' folder inside.
+
===NodeCore 0.4.13-rc.1===
  
===NodeCore 0.4.9===
+
===Altchain PoP Miner 0.4.13-rc.1===
===Altchain PoP Miner 0.4.9===
 
  
 
== Configuration and First Run ==
 
== Configuration and First Run ==
Line 55: Line 65:
  
 
==== Running vBitcoin QT Wallet ====
 
==== Running vBitcoin QT Wallet ====
Once you have copied over the '''vbitcoin.conf''' file into your data directory at '''%appdata%/vBitcoin''' you can double click vbitcoin-qt.exe.<p>
+
Double click the '''start-vbitcoin-qt.bat''' file to launch the QT Wallet using the '''data''' directory, instead of the default '''%appdata%\vBitcoin'''<p>
 
[[File:vBitcoin_Start.png|thumb|400px|none|vBitcoin Initial Start]]
 
[[File:vBitcoin_Start.png|thumb|400px|none|vBitcoin Initial Start]]
 
<p>
 
<p>
 
  
 
==== Generate Reward Address ====
 
==== Generate Reward Address ====
Line 66: Line 75:
 
==== Edit application.conf ====
 
==== Edit application.conf ====
  
After unzipping the package, it can be found in '''altchain-pop-miner-0.4.9-<version>/bin/application.conf'''
+
After unzipping the package, it can be found in '''altchain-pop-miner-0.4.12-<version>/bin/application.conf'''
  
 
Open application.conf, and update the '''payoutAddress''' to match the newly generated vBitcoin address to receive rewards.<p>  NOTE: If you changed the vBitcoin RPC username or password, or if you are running a VeriBlock TestNet node on another machine you will want to update those fields as well.<p>
 
Open application.conf, and update the '''payoutAddress''' to match the newly generated vBitcoin address to receive rewards.<p>  NOTE: If you changed the vBitcoin RPC username or password, or if you are running a VeriBlock TestNet node on another machine you will want to update those fields as well.<p>
Line 73: Line 82:
  
 
<pre>
 
<pre>
 +
miner {
 +
  network: testnet
 +
  feePerByte: 1000
 +
  maxFee: 10000000
 +
  api.port: 8080
 +
  connectDirectlyTo: ["localhost"]
 +
}
 
securityInheriting {
 
securityInheriting {
 
   vbtc: {
 
   vbtc: {
     // Valid options are round 1, 2, or 4 (any combination) Round 4 indicates a Keystone. [1,2,4]
+
     // This can be set to [1,2,3,4]
 
     autoMineRounds: [4]
 
     autoMineRounds: [4]
 
     payoutAddress: "tb1qdvkkx4r824wcgu92acwn88wll929jxkwey5gsd"
 
     payoutAddress: "tb1qdvkkx4r824wcgu92acwn88wll929jxkwey5gsd"
Line 85: Line 101:
 
     auth: {
 
     auth: {
 
       username: "vbitcoin"
 
       username: "vbitcoin"
       password: "AlPhATeSt!"
+
       password: "BETATeSt!"
 +
    }
 +
    payoutInterval: 150
 +
    extraConfig: {
 +
      daemonConnectionTimeout: 20000
 
     }
 
     }
    payoutInterval: 50
 
    // Uncomment if you want verbose request logging
 
    #extraConfig: {
 
    #  enableRequestLogging: true
 
    #}
 
 
   }
 
   }
 +
}
 
</pre>
 
</pre>
  
 
==== Start the APM ====
 
==== Start the APM ====
  
Once you have edited the '''application.conf''' file, please start the APM by double clicking '''altchain-pop-miner.bat''' within the '''altchain-pop-miner-0.4.9-<version>/bin/''' directory.<p>
+
Once you have edited the '''application.conf''' file, please start the APM by double clicking '''altchain-pop-miner.bat''' within the '''altchain-pop-miner-0.4.12-<version>/bin/''' directory.<p>
  
 
==== Funding APM Wallet ====
 
==== Funding APM Wallet ====
Line 105: Line 121:
 
https://vbk.bitspill.net
 
https://vbk.bitspill.net
  
==== Wait for NodeCore Synchronization ====
+
==== Wait for SPV Synchronization ====
 
Once the wallet is funded you will need to wait for NodeCore to synchronize with the VeriBlock TestNet network if it is not already.
 
Once the wallet is funded you will need to wait for NodeCore to synchronize with the VeriBlock TestNet network if it is not already.
 
<pre>
 
<pre>
2020-06-03 18:29:09 nc-poll INFO NodeCoreNetwork - The connected NodeCore is not synchronized, Local Block: 569652, Network Block: 569648, Block Difference: 4, waiting until it synchronizes...
+
2020-11-02 12:40:54 nc-poll   INFO  VeriBlockNetwork - SPV is not synchronized: 963230 blocks left (LocalHeight=30399 NetworkHeight=993629 InitialBlockDownload=false)
2020-06-03 18:29:21 nc-poll INFO AltchainPoPMiner - The connected NodeCore is synchronized
+
2020-11-02 12:40:54 nc-poll   INFO AltchainPoPMiner - SPV is not ready
 +
 
 
</pre>
 
</pre>
  
== How To PoP Mine vBTC ==
+
== How To PoP Mine BTCSQ ==
  
 
=== Run getdebuginfo to check if APM is ready ===
 
=== Run getdebuginfo to check if APM is ready ===
Line 118: Line 135:
  
 
<pre>
 
<pre>
>getdebuginfo
+
> getdebuginfo
 +
getdebuginfo
 
Running several checks, this may take a few moments...
 
Running several checks, this may take a few moments...
SUCCESS - NodeCore connection: Connected
+
{
SUCCESS - NodeCore synchronization status: Synchronized
+
  "information": [
SUCCESS - vBitcoin connection: Connected
+
    "SUCCESS - SPV connection: Connected",
SUCCESS - vBitcoin synchronization status: Synchronized
+
    "SUCCESS - SPV synchronization status: Synchronized 0 blocks left (LocalHeight=993821 NetworkHeight=993821 InitialBlockDownload=false)",
SUCCESS - The PoP wallet contains sufficient funds
+
    "SUCCESS - vBitcoin connection: Connected to http://localhost:18332",
 +
    "SUCCESS - vBitcoin configured network: vBitcoin & APM are running on the same configured network (testnet)",
 +
    "SUCCESS - vBitcoin synchronization status: Synchronized 0 blocks left (LocalHeight=7128 NetworkHeight=7128 InitialBlockDownload=false)",
 +
    "SUCCESS - vBitcoin payoutAddress: 'tb1qtmtcd6y398n7tdxafscah0x9yg5ffprpum20y4' is configured",
 +
    "SUCCESS - vBitcoin configuration for autoMineRounds is valid",
 +
    "SUCCESS - The tVBK PoP wallet contains sufficient funds, current balance: 9.99506000 tVBK"
 +
  ],
 +
  "diagnosticInfo": {
 +
    "user_language": "en",
 +
    "java_runtime_name": "OpenJDK Runtime Environment",
 +
    "sun_boot_library_path": "C:\\Program Files\\AdoptOpenJDK\\jdk-14.0.2.12-hotspot\\bin",
 +
    "java_runtime_version": "14.0.2+12",
 +
    "java_specification_version": "14",
 +
    "os_name": "Windows 10",
 +
    "os_arch": "amd64",
 +
    "os_version": "10.0",
 +
    "memory_total_gb": "2.21 GB",
 +
    "memory_max_gb": "3.98 GB",
 +
    "processor_count": "12",
 +
    "processor_type": "Intel64 Family 6 Model 63 Stepping 2, GenuineIntel",
 +
    "working_directory": "C:\\Users\\User\\Desktop\\vBTC-release.0.4-888de8e\\altchain-pop-miner-0.4.12-rc.3\\bin",
 +
    "datetime_now_utc": "2020-11-02 14:18:51.593-0600"
 +
  }
 +
}
 +
200 success (17.17 ms)
 
</pre>
 
</pre>
  
Line 165: Line 207:
 
|-
 
|-
 
| Altchain
 
| Altchain
| Test B (Test B)
+
| vBTC
 
|-
 
|-
 
| Identifier
 
| Identifier
Line 204: Line 246:
 
DONE    11. COMPLETED                      Paid amount: 47.20500000
 
DONE    11. COMPLETED                      Paid amount: 47.20500000
 
</pre>
 
</pre>
 +
 +
== How To PoW Mine BTCSQ ==
 +
 +
One can proof-of-work mine via the stratum pool.
 +
 +
There is a stratum implementation and running pool.
 +
 +
Note: This pool is setup for '''CPU''' and '''GPU''' mining.
 +
 +
===CPU Miner Binaries:===
 +
 +
Linux: https://mirror1.veriblock.org/btcsq-minerd
 +
 +
Windows:  https://mirror1.veriblock.org/btcsq-minerd.exe
 +
 +
===CPU Miner Start String Examples:===
 +
 +
Linux:
 +
<pre>./btcsq-minerd -o 'stratum+tcp://testnet.pool.vbtc.veriblock.org:3333' -u <legacy_address> -p x -a sha256d</pre>
 +
 +
Windows:
 +
<pre>btcsq-minerd.exe -o stratum+tcp://testnet.pool.vbtc.veriblock.org:3333 -u <legacy_address> -p x -a sha256d</pre>
 +
 +
To use this pool you will need to generate a legacy address using the command:
 +
<pre>vbitcoin-cli getnewaddress "mining" legacy</pre>
 +
 +
Pool: https://testnet.pool.vbtc.veriblock.org/
 +
 +
Detailed instructions: https://github.com/VeriBlock/vbk-ri-stratum-pool
 +
 +
===GPU Miner Binaries:===
 +
 +
Windows: https://github.com/tpruvot/ccminer/releases/tag/2.3.1-tpruvot
 +
 +
===GPU Miner Compilation (Ubuntu 20.04)===
 +
 +
<pre>
 +
sudo apt-get install libcurl4-openssl-dev libssl-dev libjansson-dev automake autotools-dev build-essential
 +
git clone https://github.com/VeriBlock/ccminer-btcsq
 +
cd ccminer-btcsq
 +
./build.sh
 +
</pre>
 +
 +
===GPU Miner Start String Examples:===
 +
 +
Linux:
 +
<pre>./ccminer -a sha256d -o stratum+tcp://testnet.pool.vbtc.veriblock.org:3333 -u <legacy_address> -p x</pre>
 +
 +
Windows:
 +
<pre>ccminer.exe -a sha256d -o stratum+tcp://testnet.pool.vbtc.veriblock.org:3333 -u <legacy_address> -p x</pre>
 +
 +
See: [[PoW_Pools_BTCSQ]]
  
 
== How to upgrade ==
 
== How to upgrade ==
Line 211: Line 305:
 
Get latest package. This will have 3 separate applications:
 
Get latest package. This will have 3 separate applications:
 
* APM
 
* APM
* NodeCore (needed by APM)
+
* NodeCore
 
* vBTC daemon
 
* vBTC daemon
  
Line 223: Line 317:
 
## vbk-testnet.wallet --> this has your tVBK for sending altchain pop transactions
 
## vbk-testnet.wallet --> this has your tVBK for sending altchain pop transactions
 
# Start new APM
 
# Start new APM
 
=== Upgrade NodeCore ===
 
 
Use standard operations to upgrade NodeCore. This assumes you already have the blockchain downloaded and your property file set:
 
 
# Stop old NodeCore
 
# Move bin/testnet folder to new NodeCore
 
# Copy bin/nodecore.properties to new NodeCore
 
# Your folder structure will look similar to:
 
## /bin
 
### /testnet
 
### nodecore
 
### nodecore.bat
 
### nodecore.properties
 
# Restart new NodeCore
 
 
See for detail: [[HowTo_run_NodeCore#How_to_upgrade_NodeCore_and_keep_your_wallet]]
 
  
 
=== Upgrade vBTC Daemon ===
 
=== Upgrade vBTC Daemon ===
  
 
# Shut down old vBTC
 
# Shut down old vBTC
 +
# Copy '''testnet3''' directory from old package folder into the '''data/''' folder of the new package.
 
# Start new vBTC
 
# Start new vBTC
  
Line 250: Line 328:
 
Note: It may take some time to resync the network. (There are known issues to optimize this).
 
Note: It may take some time to resync the network. (There are known issues to optimize this).
  
 +
== How To Compile BTCSQ ==
 +
 +
BTCSQ is based on BTC, and so it should be very similar to compile.
 +
 +
Please refer to https://github.com/VeriBlock/vbk-ri-btc/blob/release/0.4/doc/build-unix.md for manually building the application.
  
 
== Appendix ==
 
== Appendix ==
Line 258: Line 341:
 
** vBTC - https://github.com/VeriBlock/vbk-ri-btc
 
** vBTC - https://github.com/VeriBlock/vbk-ri-btc
 
** C++ altchain library - https://github.com/VeriBlock/alt-integration-cpp
 
** C++ altchain library - https://github.com/VeriBlock/alt-integration-cpp
** APM - https://github.com/VeriBlock/nodecore/tree/develop/altchain-pop-miner
+
** APM - https://github.com/VeriBlock/nodecore/tree/master/pop-miners/altchain-pop-miner
* NodeCore daemon - [[HowTo_run_NodeCore]]
 
 
* How to run APM - [[Altchain_PoP_Miner]]
 
* How to run APM - [[Altchain_PoP_Miner]]
* VBK TestNet explorer - https://testnet.explore.veriblock.org/altchain-details/3860170
+
* Explorers
 +
** vBTC explorer - https://testnet.explore.vbtc.veriblock.org
 +
** VBK TestNet explorer - https://testnet.explore.veriblock.org/altchain-details/3860170
 
* Background Information
 
* Background Information
 
** https://wiki.veriblock.org/index.php/Altchain_PoP_Lifecycle
 
** https://wiki.veriblock.org/index.php/Altchain_PoP_Lifecycle
 
** https://wiki.veriblock.org/index.php/VeriBlock_and_Proof-of-Proof_FAQ
 
** https://wiki.veriblock.org/index.php/VeriBlock_and_Proof-of-Proof_FAQ
 
** https://wiki.veriblock.org/index.php/How_VeriBlock_PoP_BFI_Protects_Altchains
 
** https://wiki.veriblock.org/index.php/How_VeriBlock_PoP_BFI_Protects_Altchains
 +
** TODO: [[HowTo_Mine_vBTC]], [[Join_vBTC_Testnet]]

Revision as of 02:43, 9 December 2021

See: BTCSQ, Altchain_List, Altchain_PoP_Miner, PoW_Pools_BTCSQ, VAIF

Bitcoin Squared (BTCSQ), formerly codename "vBTC"

Overview

vBTC is the reference implementation for Bitcoin-based blockchains utilizing VeriBlock's Proof-of-Proof technology.

Below, you will find the steps needed to download and run the vBTC daemon.

Please note, all coins associated with this network are without value, and are for testing purposes only.

In the current implementation, we are using tVBK (testnet) to PoP mine (testnet) vBTC. vBTC inherits security from the VeriBlock TestNet, and VeriBlock TestNet inherits security from Bitcoin Testnet.

In order to PoP mine ALL 3 of the following are required to stay open and running:
1) NodeCore
2) vBitcoin
3) Altchain PoP Miner

Prerequisites:

It is recommended to have 4 cpu cores and 16GB of RAM to run all 3 applications. (NodeCore, APM, vBitcoin daemon)

Currently, VeriBlock TestNet requires a minimum of 6GB of space to sync. 10+ GB free space recommended.

64-bit Java

Tested using AdoptOpenJDK 8, 11, & 14 with HotSpot JVM. https://adoptopenjdk.net/

Download Packages for Linux

BTCSQ#Get_Package

Download Packages for Windows x64

BTCSQ#Get_Package

Package contains:

vBitcoin 0.4 Daemon

  • vbitcoin-qt.exe
  • vbitcoind.exe
  • vbitcoin-cli.exe
  • vbitcoin-tx.exe
  • vbitcoin-wallet.exe
  • vbitcoin.conf

vbitcoin.conf location

Located within the vBTC-release.0.4-<version>/data directory.

NodeCore 0.4.13-rc.1

Altchain PoP Miner 0.4.13-rc.1

Configuration and First Run

NodeCore

  1. Sync TestNet
    1. While you could sync from block 0, the fastest way is using the bootstrap downloader:
    2. Inside the nodecore folder, double click download_testnet_bootstrap.bat and it will download the latest TestNet bootstrap and place it in the nodecore/bin/testnet folder.
  2. Once the bootstrap-downloader has finished, you can close the window and double click bin/nodecore.bat to start NodeCore in testnet mode.

vBTC

Running vBitcoin QT Wallet

Double click the start-vbitcoin-qt.bat file to launch the QT Wallet using the data directory, instead of the default %appdata%\vBitcoin

vBitcoin Initial Start

Generate Reward Address

vBitcoin getnewaddress

APM (Altchain PoP Miner)

Edit application.conf

After unzipping the package, it can be found in altchain-pop-miner-0.4.12-<version>/bin/application.conf

Open application.conf, and update the payoutAddress to match the newly generated vBitcoin address to receive rewards.

NOTE: If you changed the vBitcoin RPC username or password, or if you are running a VeriBlock TestNet node on another machine you will want to update those fields as well.

Sample Config:

miner {
  network: testnet
  feePerByte: 1000
  maxFee: 10000000
  api.port: 8080
  connectDirectlyTo: ["localhost"]
}
securityInheriting {
  vbtc: {
    // This can be set to [1,2,3,4]
    autoMineRounds: [4]
    payoutAddress: "tb1qdvkkx4r824wcgu92acwn88wll929jxkwey5gsd"
    pluginKey: btc
    id: 3860170
    name: "vBitcoin"
    host: "http://localhost:18332"
    // Uncomment if your vBTC daemon is auth protected
    auth: {
      username: "vbitcoin"
      password: "BETATeSt!"
    }
    payoutInterval: 150
    extraConfig: {
      daemonConnectionTimeout: 20000
    }
  }
}

Start the APM

Once you have edited the application.conf file, please start the APM by double clicking altchain-pop-miner.bat within the altchain-pop-miner-0.4.12-<version>/bin/ directory.

Funding APM Wallet

APM Initial Start

When the APM starts, you will see a line similar to Send funds to the tVBK wallet V4xwrouY6UNtBEC9V8fmWaibd4taqz
You will want to fund this wallet with VeriBlock TestNet coins. You can get testnet coins from a faucet, such as bitspill's community faucet at:
https://vbk.bitspill.net

Wait for SPV Synchronization

Once the wallet is funded you will need to wait for NodeCore to synchronize with the VeriBlock TestNet network if it is not already.

2020-11-02 12:40:54 nc-poll    INFO  VeriBlockNetwork - SPV is not synchronized: 963230 blocks left (LocalHeight=30399 NetworkHeight=993629 InitialBlockDownload=false)
2020-11-02 12:40:54 nc-poll    INFO  AltchainPoPMiner - SPV is not ready

How To PoP Mine BTCSQ

Run getdebuginfo to check if APM is ready

This performs several checks, such that it can connect to both NodeCore and vBTC daemons, and has a VBK balance.

 > getdebuginfo
getdebuginfo
Running several checks, this may take a few moments...
{
  "information": [
    "SUCCESS - SPV connection: Connected",
    "SUCCESS - SPV synchronization status: Synchronized 0 blocks left (LocalHeight=993821 NetworkHeight=993821 InitialBlockDownload=false)",
    "SUCCESS - vBitcoin connection: Connected to http://localhost:18332",
    "SUCCESS - vBitcoin configured network: vBitcoin & APM are running on the same configured network (testnet)",
    "SUCCESS - vBitcoin synchronization status: Synchronized 0 blocks left (LocalHeight=7128 NetworkHeight=7128 InitialBlockDownload=false)",
    "SUCCESS - vBitcoin payoutAddress: 'tb1qtmtcd6y398n7tdxafscah0x9yg5ffprpum20y4' is configured",
    "SUCCESS - vBitcoin configuration for autoMineRounds is valid",
    "SUCCESS - The tVBK PoP wallet contains sufficient funds, current balance: 9.99506000 tVBK"
  ],
  "diagnosticInfo": {
    "user_language": "en",
    "java_runtime_name": "OpenJDK Runtime Environment",
    "sun_boot_library_path": "C:\\Program Files\\AdoptOpenJDK\\jdk-14.0.2.12-hotspot\\bin",
    "java_runtime_version": "14.0.2+12",
    "java_specification_version": "14",
    "os_name": "Windows 10",
    "os_arch": "amd64",
    "os_version": "10.0",
    "memory_total_gb": "2.21 GB",
    "memory_max_gb": "3.98 GB",
    "processor_count": "12",
    "processor_type": "Intel64 Family 6 Model 63 Stepping 2, GenuineIntel",
    "working_directory": "C:\\Users\\User\\Desktop\\vBTC-release.0.4-888de8e\\altchain-pop-miner-0.4.12-rc.3\\bin",
    "datetime_now_utc": "2020-11-02 14:18:51.593-0600"
  }
}
200 success (17.17 ms)

Once vBitcoin and NodeCore have synchronized, and you have funded your tVBK wallet in the APM, you can type 'mine vbtc' to submit a PoP transaction.

You may need to wait for wallet funding:

2020-06-03 18:46:06 event-list INFO  TransactionMonitor        - Detected incoming VBK transaction: 844A9DFFFAA1F26CA413AD4354AC4844A90053BE31C03C894C049A1CD5739119
2020-06-03 18:46:06 event-list INFO  AltchainPoPMiner          - Current balance: 10.00000000 tVBK
2020-06-03 18:46:06 event-list INFO  AltchainPoPMiner          - Miner is ready!

Submit PoP Transaction

 > mine vbtc
mine vbtc
2020-06-03 18:47:16 main       INFO  AltchainPoPMiner          - Created operation [vbtc85541518] on chain vBitcoin
   INFO: (2020-06-03 18:47:16) [v200] Mining operation started
         Operation id: vbtc85541518
200 success (266.7 ms)
2020-06-03 18:47:16 pop-tasks- INFO  ApmTaskService            - [vbtc85541518] Getting the mining instruction...
2020-06-03 18:47:16 pop-tasks- INFO  BitcoinFamilyChain        - Retrieving mining instruction at height 53 from vBitcoin daemon at http://localhost:18332...
2020-06-03 18:47:16 pop-tasks- INFO  ApmTaskService            - [vbtc85541518] Successfully retrieved the mining instruction!
2020-06-03 18:47:16 pop-tasks- INFO  ApmTaskService            - [vbtc85541518] Submitting endorsement VBK transaction...
2020-06-03 18:47:16 pop-tasks- INFO  ApmTaskService            - [vbtc85541518] Successfully added the VBK transaction: D8A0D80B1C286B1C5B04CE6894C6BBDA0CFF23FA288D72F60DF7A48A58B66005!
2020-06-03 18:47:16 pop-tasks- INFO  ApmTaskService            - [vbtc85541518] Waiting for the transaction to be included in VeriBlock block...

Verify PoP Transaction on VBK TestNet Explorer

Transactions can be seen and verified at https://testnet.explore.veriblock.org/

https://testnet.explore.veriblock.org/tx/D8A0D80B1C286B1C5B04CE6894C6BBDA0CFF23FA288D72F60DF7A48A58B66005

The transaction information should match your payoutAddress you selected earlier:

Altchain Data Example
Altchain vBTC
Identifier 3860170
Endorsed Block Hash 000000076CF8E04E16DD28FAA5831041B56CD1AF46B80959586CD754C7091E2E
Endorsed Block Height 53
Reward Address tb1qdvkkx4r824wcgu92acwn88wll929jxkwey5gsd
First Previous Keystone 00000000142988A6E06E52DE0D57420D590E602D9E908731FD6AF7B09C2089B5
Second Previous Keystone 000000071279A847E7C1E633651CC54FDCCAD492E13052562DAF7E71714D5B7D

View PoP tx from start to finish

> getoperation vbtc366214b4
...
Operation workflow:
DONE      1. START                           Created APM operation id: vbtc366214b4
DONE      2. RETRIEVE_MINING_INSTRUCTION     Endorsed vBitcoin block height: 95
DONE      3. SUBMIT_ENDORSEMENT_TRANSACTION  tVBK endorsement transaction id: 43B8A911BCCF8B5D20E8D6374B22555CD1A1DD22B356461EDBDD23581900C660 (fee: 0.00248000)
DONE      4. CONFIRM_ENDORSEMENT_TRANSACTION
DONE      5. DETERMINE_BLOCK_OF_PROOF        tVBK Block of Proof: 0000000005E4E0F3A62A5FCD7852BE4EDBAC033E836B07A8 @ 583257
DONE      6. PROVE_ENDORSEMENT_TRANSACTION   Merkle path has been verified
DONE      7. WAIT_FOR_KEYSTONE_OF_PROOF      tVBK Keystone of Proof: 000000001A1EFAB5F9890DD4182D57DF53519F5BD8676E45
DONE      8. GET_VBK_PUBLICATIONS            Retrieved 14 VTBs
DONE      9. SUBMIT_POP_TRANSACTION          VTBs submitted to vBitcoin! vBitcoin PoP TxId: 0a3fcf3d4db23eee84c922dcd535b949ba9bb0bbf353012f8ca77128287d8640
DONE     10. WAIT_FOR_PAYOUT_BLOCK           Payout detected in vBitcoin block 145 to vBitcoin address tb1qps3s9t9kz9atl6m666t57ehzy849la08wshahy!
DONE     11. COMPLETED                       Paid amount: 47.20500000

How To PoW Mine BTCSQ

One can proof-of-work mine via the stratum pool.

There is a stratum implementation and running pool.

Note: This pool is setup for CPU and GPU mining.

CPU Miner Binaries:

Linux: https://mirror1.veriblock.org/btcsq-minerd

Windows: https://mirror1.veriblock.org/btcsq-minerd.exe

CPU Miner Start String Examples:

Linux:

./btcsq-minerd -o 'stratum+tcp://testnet.pool.vbtc.veriblock.org:3333' -u <legacy_address> -p x -a sha256d

Windows:

btcsq-minerd.exe -o stratum+tcp://testnet.pool.vbtc.veriblock.org:3333 -u <legacy_address> -p x -a sha256d

To use this pool you will need to generate a legacy address using the command:

vbitcoin-cli getnewaddress "mining" legacy

Pool: https://testnet.pool.vbtc.veriblock.org/

Detailed instructions: https://github.com/VeriBlock/vbk-ri-stratum-pool

GPU Miner Binaries:

Windows: https://github.com/tpruvot/ccminer/releases/tag/2.3.1-tpruvot

GPU Miner Compilation (Ubuntu 20.04)

sudo apt-get install libcurl4-openssl-dev libssl-dev libjansson-dev automake autotools-dev build-essential 
git clone https://github.com/VeriBlock/ccminer-btcsq
cd ccminer-btcsq
./build.sh

GPU Miner Start String Examples:

Linux:

./ccminer -a sha256d -o stratum+tcp://testnet.pool.vbtc.veriblock.org:3333 -u <legacy_address> -p x

Windows:

ccminer.exe -a sha256d -o stratum+tcp://testnet.pool.vbtc.veriblock.org:3333 -u <legacy_address> -p x

See: PoW_Pools_BTCSQ

How to upgrade

If you are already pop mining vBTC, then upgrading is relatively easy.

Get latest package. This will have 3 separate applications:

  • APM
  • NodeCore
  • vBTC daemon

Each part can be upgraded as needed. For example you may only want to upgrade to the new APM, and not change NC or vBTC.

Upgrade APM

  1. Shut down old APM
  2. Copy these files to new APM /bin folder:
    1. application.conf
    2. vbk-testnet.wallet --> this has your tVBK for sending altchain pop transactions
  3. Start new APM

Upgrade vBTC Daemon

  1. Shut down old vBTC
  2. Copy testnet3 directory from old package folder into the data/ folder of the new package.
  3. Start new vBTC

Note: The new vBTC should have the same vbitcoin.conf and blockchain as before, therefore no need to update the conf or blockchain.

Note: It may take some time to resync the network. (There are known issues to optimize this).

How To Compile BTCSQ

BTCSQ is based on BTC, and so it should be very similar to compile.

Please refer to https://github.com/VeriBlock/vbk-ri-btc/blob/release/0.4/doc/build-unix.md for manually building the application.

Appendix

Helpful Links