Difference between revisions of "Altchain PoP Miner"

From Veriblock Wiki
Jump to: navigation, search
Line 14: Line 14:
 
=== Download NodeCore ===
 
=== Download NodeCore ===
 
* Download the latest NodeCore software suite from the [https://github.com/VeriBlock/nodecore-releases/releases VeriBlock Github repository] and extract the contents of the package.
 
* Download the latest NodeCore software suite from the [https://github.com/VeriBlock/nodecore-releases/releases VeriBlock Github repository] and extract the contents of the package.
* Follow the instructions at [https://wiki.veriblock.org/index.php/NodeCore_QuickStart NodeCore QuickStart] to start a local instance of NodeCore. '''For Altchain PoP mining to be successful, the local NodeCore instance must be fully synced with the VeriBlock network.'''
+
* Follow the instructions at [https://wiki.veriblock.org/index.php/NodeCore_QuickStart NodeCore QuickStart] to start a local instance of NodeCore.  
 +
 
 +
'''For Altchain PoP mining to be successful, the local NodeCore instance must be fully synced with the VeriBlock network.'''
  
 
=== Configuration ===
 
=== Configuration ===

Revision as of 17:56, 28 November 2019

Altchain PoP Miner install and run instructions

Overview

The Proof-of-Proof (PoP) consensus protocol enables a security inheriting blockchain (any Altchain) to inherit the complete proof-of-work of a security providing blockchain (VeriBlock). For a deeper understanding of the PoP consensus protocol, please refer to the PoP White Paper.

A PoP miner serves as the communication and transactional bridge between the mined Altchain and the VeriBlock blockchain. As often as they wish, a PoP miner will take the most recent blockchain state data from the Altchain, along with an identification of the miner, and publish it to the VeriBlock blockchain via a PoP transaction with the embedded data. The PoP miner then waits for the transaction to be included in a VeriBlock block and also proven in the Bitcoin blockchain (through the process of VeriBlock PoP Mining).

PoP mining is a competitive endeavor in which miners compete to have their endorsement of the Altchain state included in the earliest possible VeriBlock block.

Getting Started

Download NodeCore

For Altchain PoP mining to be successful, the local NodeCore instance must be fully synced with the VeriBlock network.

Configuration

By default the application comes without a configuration file, in order to generate the configuration file you should run the application (see Run).

The application.conf file is composed by different configuration blocks:

miner
Configuration Name Default Value Description Example
feePerByte 1000 The atomic units to pay per transaction byte
miner {
  feePerByte: 1000
  maxFee: 10000000
}
maxFee 10000000 Maximum veriblock atomic units to pay as transaction fee
nodecore
Configuration Name Default Value Description Example
network mainnet The network type, there are three options: mainnet, testnet and alphanet
nodecore {
  network: mainnet
  ip: 127.0.0.1
  port: 10500
}
ip 127.0.0.1 The NodeCore ip to which the miner will connect to
port 10500 The NodeCore port to which the miner will connect to
securityInheriting
test
Configuration Name Default Value Description Example
host http://localhost:10600/api API url from the coin daemon
securityInheriting {
  test: {
    host: "http://localhost:10600/api"
    autoMinePeriod: null
  }
}
autoMinePeriod null Disabled by default, represents the amount of blocks which should appear to auto mine

You can add chains to the securityInheriting block, for example:

securityInheriting
btc
Configuration Name ExampleValue Description Example
family btc The chain family
securityInheriting {
  btc: {
    family: btc
    id: 50
    name: "vBitcoin"
    host: "http://localhost:18332"
    username: hello
    password: world123
  }
}
id 50 The chain id
name vBitcoin The chain name
host http://localhost:10600/api API url from the coin daemon
username hello The username used on the daemon authentication (if any)
password world123 The password used on the daemon authentication (if any)

Example of a full configuration file:

miner {
  feePerByte: 1000
  maxFee: 10000000
}

nodecore {
  network: mainnet
  ip: 127.0.0.1
  port: 10500
}

securityInheriting {
  btc: {
    family: btc
    id: 50
    name: "vBitcoin"
    host: "http://localhost:18332"
    username: hello
    password: world123
  }
  test: {
    host: "http://localhost:10600/api"
    autoMinePeriod: null
  }
}

Run

  • From the veriblock-alt-pop-{version}/bin folder, run the application:
    • WINDOWS: Run veriblock-alt-pop.bat
    • LINUX/MAC: Run veriblock-alt-pop. NOTE: If you are having trouble running nodecore-apm on Linux, you may need to make nodecore-apmexecutable: chmod a+x veriblock-alt-pop
  • On first execution of the application, a lightweight VeriBlock wallet will be created.

The Altchain PoP miner communicates with NodeCore to maintain the internal wallet. A connection to NodeCore is always required.

In order to start mining you have to send VBK coin funds to the created wallet.

Docker

https://hub.docker.com/r/veriblock/altchain-pop-miner

Mining

Right now there are no real Altchains integrated with APM. However, we have created a virtual altchain for testing purposes

  • To begin a mining operation for the test alchain, type 'mine test' and press ENTER

Once we start having more plugins ready, Every single APM instance will be able to perform mining operations on multiple different chains.

Shell

The Altchain PoP miner provides several commands:

  • help: Lists all the commands
  • clear: Clears the screen
  • quit: Stops the application
  • listconfig: Lists the current config values
  • setconfig <key> <value>: Sets a config value
  • mine <chain> [block]: Begins a proof of proof mining operation for the given chain
  • listoperations: Lists the currently running mining operations
  • getoperation <id>: Supplies the details of the operation matching the given id
  • getoperationvtb <id>: Supplies the VTB details of the operation matching the given id
  • getbalance: Gets the coin balance for the VeriBlock address