0

I'm new to bitcoin, and my knowledge of bitcoin is quite garbled and messy (I have only a vague understanding of Satoshi's original white paper for bitcoin......)

I've been reading up on bitcoin mining lately, and I just thought of a mining strategy which may or may not work.

What I want to do is this:

(1) Obtain the hash of the previous block to use as a component of my new block. This previous block hash can be updated accordingly if a new block is added into the blockchain.

(2) Based on the previous block hash, I calculate the possible block header combinations of the nonce, the version number, the timestamp* and the Merkle root. The goal is to simply find a valid block header which has a lower hash value than the current target.

(3) Make several bitcoin accounts, and execute a transaction based on this pre-constructed block header. For example, based on the pre-constructed block header, I have to execute a transaction at a specific time, with a specific Merkle root, etc. Once my transaction has appeared in the mempool, I can immediately submit my pre-constructed block header to verify the transaction - and earn bitcoins in the process.

*: The timestamp should be within a reasonable range - (a) greater than the median of the past 11 blocks, and (b) be within 2 hours of the network adjusted time. Otherwise, the timestamp would not be considered valid by the bitcoin network.

The potential advantage (at least, that's what I think) of this strategy is that I can earn bitcoins 100% of the time because I already know the winning nonce to the puzzle, putting the other miners at a disadvantage.

Is this even remotely feasible? Does this take more computing time and power than the typical bitcoin mining process? Or am I missing something?

  • I don't understand at all. How is this different from regular mining? What source of bitcoins would you have other than the block reward? – David Schwartz Dec 23 '19 at 5:27
  • @David Schwartz I was thinking that I can construct a block with a valid block header hash beforehand, carry out a transaction based on this pre-constructed block, and then mine it for bitcoin. Since I already know the valid block header hash (the solution) for this block, I can mine it for bitcoin instantly. The difference is that I already know the solution to the block, because I had constructed it beforehand. But you are right; this strategy allows me to only earn the 12.5 BTC block reward. – Biology nerd Dec 23 '19 at 9:05
  • @Biologynerd why do you expect to be able to easily find a valid block header hash 'before-hand'? You seem to have some misunderstanding about mining based on this. Every miner is simultaneously working on a different block - if you publish a transaction it does not necessarily affect what other miners are working on. Your chance of success is the same, either way. – chytrik Dec 23 '19 at 23:37
1

(2) Based on the previous block hash, I calculate the possible block header combinations of the nonce, the version number, the timestamp* and the Merkle root. The goal is to simply find a valid block header which has a lower hash value than the current target.

The block header is 80 bytes size:

  1. version: 4 bytes.
  2. previous hash: 32 bytes.
  3. merkle root: 32 bytes.
  4. time: 4 bytes.
  5. bits: 4 bytes.
  6. nonce: 4 bytes.

Miners iterate the nonce (4 bytes), and the fast ones the extranonce (4 bytes more). The other items are already known, they get them from the pool.

You propose to iterate nonce (4 byte) + version (4 byte) + merkle root (32 byte) to find a target hash faster than them. I belive it will not work.

0

What you have described will convey no advantage; your expected success rate is still just dependant in the amount of hashpower you control, relative to the rest of the network.

If you construct a block that has a valid block hash, then you should immediately submit it to the network so that yo have the best chance of having your block included in the eventual longest chain (thus receiving the block reward).

You can include a transaction of your own if you’d like (even one that has never been previously seen by other nodes in the network- so long as it is valid), but doing so (or not) will have no affect on your ability to mine a block. A block with only a coinbase transaction is no more/less easy to mine than a block that is absolutely full of transactions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.