So, I've read the articles and this is interesting stuff. I do however have some technical questions. How and where do you get a block header? I'm not looking for a "from the pool" answer but a more technical "connect to bla.bla.bla port blabla and send a Jason formatted packet as defined by protocol bla bla bla and parse the response as define by protocol bla bla bla.", you know technical stuff?
Technical stuff?
Ok...
Edit: Ok, so perhaps I went too far? I suppose this isn't the level of technical details you were looking for?
Start by building software that connects to peers on the network.
You'll need to implement your own peer discovery system. The default port that most peers listen on is port 8333.
Implement the bitcoins communications protocol to request blocks from your connected peers.
Verify the entire contents of every block since the genesis block to make sure you are on the correct chain.
Once you've downloaded and verified the entire blockchain, you'll need to take note of the sha256d hash of the most recently solved block.
Acquire a set of valid transactions that you intend to confirm (don't forget to include the coin generation transaction that will pay you your block reward). Organize those transactions and build a merkle tree. Take note of the merkle root.
Now you are ready to build your own block header.
The first 4 bytes will be the block version number represented as a signed integer.
The next 32 bytes are the 32 byte shad256d result of the most recently solved block.
The next 32 bytes are the merkle root calculated from your transaction list.
The next 4 bytes are an unsigned integer timestamp represented as the number of seconds since 1970-01-01T00:00 UTC
The next 4 bytes are a representation of the current difficulty target
The last 4 bytes are available for you to use as a nonce in your hashing algorithm
Sha256d hash this header and if the resulting value is lower than the current difficulty target, then broadcast the block to all your connected peers.
If the resulting value is NOT lower than the current difficulty target, then you'll need to modify one of the values and try again.
The easiest value to quickly modify is the nonce. If you've used up all the available nonce values and still haven't found a solution, then you can modify the timestamp. If you have run out of valid timestamp values and you still haven't found a solution, then you'll need to modify your transaction list and re-calculate your merkle root.
You can find more resources here:
https://en.bitcoin.it/wiki/Block_hashing_algorithmhttps://en.bitcoin.it/wiki/Protocol_documentationhttps://en.bitcoin.it/wiki/Difficulty