Difference between revisions of "Getminingcandidate"

Line 1: Line 1:
 
''getminingcandidate'' and ''getblocktemplate'' are Remote Procedure Call (RPC) programs. The RPC calls are located at an SV node and are currently managed and configured through Maestro software, though a number of software packages may perform these tasks.
 
''getminingcandidate'' and ''getblocktemplate'' are Remote Procedure Call (RPC) programs. The RPC calls are located at an SV node and are currently managed and configured through Maestro software, though a number of software packages may perform these tasks.
  
The miner can make a request with either of the above calls for block information:
+
A node can make a request with either of the above calls for block information:
 
* The ''getblocktemplate'' returns a full block.
 
* The ''getblocktemplate'' returns a full block.
 
* The ''getminingcandidate'' program returns the block header.
 
* The ''getminingcandidate'' program returns the block header.

Revision as of 13:56, 2 April 2020

getminingcandidate and getblocktemplate are Remote Procedure Call (RPC) programs. The RPC calls are located at an SV node and are currently managed and configured through Maestro software, though a number of software packages may perform these tasks.

A node can make a request with either of the above calls for block information:

  • The getblocktemplate returns a full block.
  • The getminingcandidate program returns the block header.

The returned data is the block candidate data for mining. It is expressed in the JSON language for data processing.

getminingcandidate returns a mining candidate block to the node which originally requested it. The node requests a block to mine. getminingcandidate is the program that obtains a block header to mine.

The getminingcandidate program or call is a replacement for getblocktemplate program. The replacement requirement arose from the need to process bigger blocks with Merkle tree paths in the block header. The Merkle tree proof in the block header allows for confirmation of transactions rather than reading the transactions as a whole. Consequently there can be more transactions within a block and more efficient external processing of the block.

Block header parameters for getminingcandidate

Parameter Description
Id Candidate identifier for submitminingsolution
Prevhash Hash of the previous block (hex string)
Coinbase Coinbase transaction (optional hex string encoded binary transaction)
Version Block version
nBits Difficulty given as hex string.
Time Block time.
Height Current block height
merkleProof Merkle branch of the block (list of hex strings)

Example Block Header in the json format

{

 "id": "0d49aa74-0986-474f-a6eb-5913fbbbba02",
 "prevhash": "0000000000000000012811f570b3c0ff8cb93c44d707499dc2fcfdd611f38d93",
 "coinbaseValue": 1251906370,
 "version": 536870912,
 "nBits": "1802c73f",
 "time": 1585156824,
 "height": 627795,
 "merkleProof": [
   "f4cba40673d5573ca1aab2ee8fbd300102767561190cad7aa6211e04223ff6c3",
   "2d69511004ba72b60a10e6482491d689470b9f8527aff0f550c197d8a2446c45",
   "6eb9f4ef18f9669db60b21dc52292eba5318d684f7c476bb12da03b6d97d7c4f",
   "7a69a2fb7b132b36496501357d923ce584f913b37879a1930a10682d284bc2a9",
   "976089f04a73862fac14d2eec8b3f23aef9167f9804c40ade23c4f385cd92928",
   "73ec68c1692643e7edd22a34729f4bc8529fed48eca8ac0cd6e8b2929fb44064",
   "ee59af2b7964c1c0f48cd06b4e4e77c783711746030cc20d46a339f3d9993709",
   "6c0a33f1a1778ebec5d63172c55edb433ae365dbf7cd37bfa3535c864e9b9ea7",
   "d59744d6f3548adda90444a44eb16c56022554fdd4a0448632acd36058c96599",
   "6bd2d6dcdea8dd04345b7b706ba125ed73394be899355cb7b355d258eea20ff5",
   "3842aadab31a0e3bb5c484d58262f052afbe7f684935bf4d19ed614521e750e5",
   "91dec854c6f222b9be0cc78bd34b2405e98f34c6d2c7db8f84db6d85a83eb51e",
   "2b07dc2afdcafa3719c4ef440ef5c5f0c332efa174d23bbb72749680b36575a7"
 ]

}

The Maestro software handles the call to and from the SV node to the ASIC miner. The ASIC miner then performs the hashing process to discover the next suitable block to be placed on the blockchain.