Bitcoin Forum
May 13, 2024, 09:14:19 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Mining / Mining: separating the steps (Coding) on: May 06, 2016, 03:29:29 PM
Hi there,
I'm a software programmer and I'm interested in the specific steps inside a mining client.
I know i cannot efficiently mine with my PC but I'm interested in the steps to reproduce.

I'm using BitcoinJ to develop a small program to decode the Blocks from the standard LevelDB that the bitcoin core client downloaded.

If I understand it correctly, it's all about the 80 bytes header.
The variable things are the previous block hash and the merkle hash of the transactions contained in the new block (plus time and nonce).

So my first question:
Can a miner simply select some of the pending transactions to be included in the new block (=> the merkle hash)?

How are the solo mining clients doing this? Do they ask for a new block (as I could do in the debug console of the core client) and try to make it fit (by adjsuting the nonce ) or are they aware of all pending transactions and puzzle them together until it fits?

Thanks in advance,
Astaldo
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!