Author Topic: Bitcoin Stash (BSH) Merged Mining Guide for SHA256 Coin Miners  (Read 420 times)

0 Members and 1 Guest are viewing this topic.

Offline bstashTopic starter

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Bitcoin Stash (BSH) Merged Mining Guide for SHA256 Coin Miners
« on: December 01, 2018, 11:43:15 PM »
Bitcoin Stash Merged Mining Guide
Overview
Bitcoin Stash is a merge mineable cryptocurrency that utilizes SHA256 for its mining algorithm. This means that it can be merge mined with other SHA256 coins like Bitcoin an Bitcoin Cash. Merge mining is a process where a miner is able to mine multiple cryptocurrencies at the same time. All that is required for a miner is to add 48 bytes of data to the coinbase of the parent block.
We will have a private testnet testing phase beginning at 11/4/18. On 11/4/18, miners will have access to Bitcoin Stash binaries (with only testnet capabilities available). They will be able to merge mine on the testnet by following the below instructions. A sample code implementation is provided in bitcoinstash_mergemining_sample.py.
Instructions
Follow the step belows to merge mine on Bitcoin Stash. Sample code implementation is provided in bitcoinstash_mergemining_sample.py.
1.Use RPC call getnewaddress() to get a new address for Bitcoin Stash (this will only need to be done once)
2.Call RPC command createauxblock() with address obtained from step 1). This will make a Bitcoin Stash block with a coinbase payment to the address.
3.From the JSON output of createauxblock(), use 'auxcoinbasedata' to obtain the data that must be inserted into the script sig of the coinbase in the parent block. To understand how this data is constructed, read the 'Constructing the Auxpow Coinbase Data' section below.
4.Start solving the parent block until you meet the encoded target threshold specified by the 'bits' field in the JSON output of createauxblock().
5.If the parent block meets the target as defined step 4, construct the auxpow header data. Submit the auxpow header data using RPC command submitauxblock() with first argument being 'hash' from output of createauxblock in step 2), the second argument is the hex string of the auxpow data. Instructions on constructing the auxpow data is shown below. If a valid auxpow header data was submitted, the merge mined block will be submitted on the Bitcoin Stash network.
Constructing the Auxpow Header Data
Auxpow header data is extra data attached to the BitcoinStash block header that links the block to the the parent block. It is composed from the below data.
Serialized coinbase transaction +
Hash of the parent block (32 bytes) +
Merkle branches (can be 0x00, if only transaction in block) +
Index in the merkle branch (4 bytes, must always be \x00\x00\x00\x00) +
Chain Merkle branch (4 bytes, can be 0x00, if no other child chain) +
Index in the chain merkle branch (4 bytes, can be \x00\x00\x00\x00 if no other child chain) +
Serialized parent block header
Constructing the Auxpow Coinbase Data
The auxpow coinbase data is data inserted into the parent block's coinbase to link the parent block to the BitcoinStash block. It is composed from the below data.
Merge Mining Header (4 bytes, must always be \xFA\xBE\x6D\x6D ) +
Root hash of Merkle Trie containing child chian (32 bytes, set to hash of Bitcoin Stash block if no other child chain) +
Merkle Trie Size, (4 bytes, set to 1 if no other child chain) +
Nonce, the nonce and the chain id of the child chain determines a pseudo random slot in the chain merkle trie (4 bytes, can be set to anything if no other child chain) +
Parent Chain Id (4 bytes, set to 210 if Bitcoin is the parent block 209 if Bitcoin Cash is parent block)
Stand Alone Mining
Stand alone mining (mining Bitcoin Stash only without using its merge mining capabilities), will also be possible through the standard RPC call getblocktemplate.
Merged Mining GitHub Link
Bitcoin Stash Wallet Binary Files (Windows & Linux)
Bitcoin Stash Website
Bitcoin Stash Forum

Bitcoin Stash Explorer
http://explorer.bstash.org


 

[ANN] Bitcoin Stash (BSH) | Bitcoin Cash Hard Fork | Merged Mining

Started by bstashBoard Alternative cryptocurrencies

Replies: 7
Views: 961
Last post December 31, 2018, 02:15:51 PM
by bstash
Bitcoin Stash | BCH Hard Fork | Merged Mining

Started by bstashBoard Deutsch (German)

Replies: 0
Views: 381
Last post December 16, 2018, 09:27:00 PM
by bstash
SimplyPool (simplypool.net) public mining pool for merge mining Bitcoin Stash with BTC

Started by bstashBoard Off-topic

Replies: 0
Views: 379
Last post December 21, 2018, 10:49:29 PM
by bstash
SupaDupa's Pro Guide to Litecoin Stratum Mining (Windows)

Started by rTechBoard Litecoin mining

Replies: 0
Views: 21003
Last post December 31, 2012, 08:28:05 AM
by rTech
SupaDupa's Pro Guide to Litecoin Stratum Mining (Windows) *UPDATED* 04/08/2013

Started by SupaDupaBoard Litecoin mining

Replies: 0
Views: 7268
Last post April 11, 2013, 04:04:11 AM
by SupaDupa