I'm looking to cgminer software (https://github.com/ckolivas/cgminer) for understand that how mining works. It is difficult to understand and there are lots of codes. For this I'm asking this question here.

Is it possible that can I confirm a specific transaction? For example I sent a bitcoin from my address to other address and it generates a transaction ID. Can I pass this transaction id to my custom solo miner and it confirms it. Is it possible?

Is there a software that mines custom transaction seems like:

myOwnGPUorCPUMiner -tx [my custom transaction id]

It will confirm my transaction and finished or continues to mine other transactions. (This code is just an example)

  • Possible duplicate of bitcoin.stackexchange.com/q/16867/5406 – Murch Dec 25 '17 at 20:08
  • It question seems like to mine but I'm actually asking that how to write codes for this purpose. – kodmanyagha Dec 25 '17 at 20:14
  • I agree with Murch. Code or no code, this is not a question of confirming a transaction but mining a full block that includes said transaction. Current difficulty does not allow for such activity by mining solo. – jorijnsmit Dec 27 '17 at 9:26

In Bitcoin, it is the miners' task to order the transactions. Thus, it is possible for a miner to pick which transactions they want to confirm. By default, they pick the ones that will provide the largest mining revenue to them, but often they will pick transactions to prioritize out of band.

However, you can only confirm a transaction by mining a block. That's what a confirmation is, a transaction being included in a block and thus being committed to on the blockchain.

However, it is infeasible for you to mine a block at home. Whatever minig power you may be able to acquire and run at home will likely not help you mine a single block in the next 1,000 years. I've elaborated here: In the ASIC-age, is it worth starting mining Bitcoin at home?

  • Can I put my own transactions first? For example I want to tell to my miner that mine this transaction first? – kodmanyagha Dec 25 '17 at 20:37
  • Yes. If you was the miner, you could modify the default source code and so you can: (1) Pick your transaction out of the meme-pool first (2) Put only 1 transaction - your own transaction in a block....But as Murch said: You don't have any chance to mine a block yourself. – Alpha Dec 25 '17 at 21:16
  • I don't want to mine all block. Only my own transaction. Is it possible? – kodmanyagha Dec 25 '17 at 22:46
  • You can only confirm a transaction by mining a block. That's what a confirmation is, a transaction being included in a block. – Murch Dec 25 '17 at 22:46
  • Miners can build custom blocks? – kodmanyagha Dec 25 '17 at 23:18

Bitcoin network is secured by two powerful protocols both of which are attack proof.

First of all for not allowing anybody adding arbitrary transaction in the blockchain; you should do a proof of work calculation which takes 1000 years on a single PC. doing such an intense calculation is so expensive and does not defer between accepting one transaction or thousand of transaction. so miners prefer to put as much as they could in a single mined block to gets more bitcoin from overall transaction fees. dont forget: you cannot 'mine' a transaction without putting it in a block, and you cannot mine a block without doing the proof of work calculation.

secondly and more importantly, generated block should be accepted by other full nodes of the network. so if you generate a block containing a transaction without enough evidence from signature of sender; they would refuse from accepting your block and that block would be worthless.

these two things helps bitcoin philosophy to secure its independence from being raped by any kind of filtering boycott or sanctions.

  • I'm downvoting this answer, because it doesn't address the main concerns of the question it is posted on. – Murch Apr 3 '18 at 21:55

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.