<blockquote>
<p>when going into real production I guess you need data like the latest hash, info about the block and transactions and so forth.</p>
</blockquote>
<p>If you're using a mining pool, you would use Stratum to subscribe to a mining pool's job notifications and their notifications would include this information. If you're using bitcoind to mine on your own, you'd use <code>getblocktemplate</code>. Additionally, you can build the template yourself.</p>
<blockquote>
<p>Is there an API to which you submit your work</p>
</blockquote>
<p>If you're trying to submit a block to the Bitcoin network itself, there is the <code>submitblock</code> bitcoind RPC call that will allow you to submit a full block. If you're trying to submit shares to a mining pool, you'd probably use the <code>mining.submit</code> Stratum RPC call.</p>
<blockquote>
<p>to which you attach also your bitcoin address of your wallet, and once you make the right guess the btc is transferred to this account?</p>
</blockquote>
<p>If you're using a mining pool, you specify this information at the mining pool's website. The block work they give you will be paying to their address, so it's irrelevant.</p>
<p>If you're mining yourself, you'd specify this by including a &quot;coinbase&quot; transaction at the beginning of the block that pays an address you specify the appropriate block reward and transaction fees.</p>

CC BY-SA 4.0
2021-02-20T16:46:48.710Z
Thank you for the explanation. I still don’t understand to which address I have to connect? What are the configuration details?
WJA
CC BY-SA 4.0
2021-02-21T01:55:55.170Z
@JohnAndrews If you're mining on a pool, then the pool will provide you with their Stratum URL and allow you to configure your worker credentials. If you're mining directly on the Bitcoin network, you would be running a regular Bitcoin node just like anyone else and broadcasting your blocks that way.
ieatpizza
CC BY-SA 4.0
2021-02-21T09:23:37.820Z
What I dont like with the pools is that it seems that its not possible to configure your own methodology. Basically what U am looking for is: 1) give me the inputs for guessing, 2. I do my own guessing, 3 I submit the work. But for that I have to run a full node with all the historical transactions downloaded?
WJA
CC BY-SA 4.0
2021-02-21T14:41:45.507Z
@JohnAndrews Unless you're doing it only to learn how mining works (and understanding that you will not actually make any money), it's completely pointless to mine on your own because you will literally never earn a single penny. If you want to generate a valid block template (for educational purposes) though, I believe all you need is a reliable source of the latest mined block, the current full UTXO set, and the mempool. You'd need to validate the latest block and include its hash, then you'd need to validate the unconfirmed transactions you're including in your block against the UTXO set.
ieatpizza
CC BY-SA 4.0
2021-02-20T16:44:18.910Z
2021-02-20T16:44:18.910Z
ieatpizza
<p>The concept of bitcoin mining (hash functions &amp; the goal) are well elaborated on many sites. There are also lots of examples.</p>
<p>However, when going into real production I guess you need data like the latest hash, info about the block and transactions and so forth.</p>
<p>In addition, once you make your guess, you have to submit the work somewhere.</p>
<p>I can however not find any resources that explain where to do this? Is there an API to which you submit your work, to which you attach also your bitcoin address of your wallet, and once you make the right guess the btc is transferred to this account?</p>
<p>What are the bitcoin endpoints in my case?</p>

<mining-software><mining-setup>
Where do you get the transaction data & where do you submit your work?
WJA
# Where do you get the transaction data & where do you submit your work?

(Asked by: username_0 on 2021-02-20)

The concept of bitcoin mining (hash functions & the goal) are well elaborated on many sites. There are also lots of examples.

However, when going into real production I guess you need data like the latest hash, info about the block and transactions and so forth.

In addition, once you make your guess, you have to submit the work somewhere.

I can however not find any resources that explain where to do this? Is there an API to which you submit your work, to which you attach also your bitcoin address of your wallet, and once you make the right guess the btc is transferred to this account?

What are the bitcoin endpoints in my case?

**Tags:** mining-software, mining-setup


---

## 1 answers

### Answer by username_1 on 2021-02-20. Score: 1

> when going into real production I guess you need data like the latest hash, info about the block and transactions and so forth.

If you're using a mining pool, you would use Stratum to subscribe to a mining pool's job notifications and their notifications would include this information. If you're using bitcoind to mine on your own, you'd use `getblocktemplate`. Additionally, you can build the template yourself.

> Is there an API to which you submit your work

If you're trying to submit a block to the Bitcoin network itself, there is the `submitblock` bitcoind RPC call that will allow you to submit a full block. If you're trying to submit shares to a mining pool, you'd probably use the `mining.submit` Stratum RPC call.

> to which you attach also your bitcoin address of your wallet, and once you make the right guess the btc is transferred to this account?

If you're using a mining pool, you specify this information at the mining pool's website. The block work they give you will be paying to their address, so it's irrelevant.

If you're mining yourself, you'd specify this by including a "coinbase" transaction at the beginning of the block that pays an address you specify the appropriate block reward and transaction fees.

> **Comments:**
> **username_0**: Thank you for the explanation. I still don’t understand to which address I have to connect? What are the configuration details?  
> **username_1**: @JohnAndrews If you're mining on a pool, then the pool will provide you with their Stratum URL and allow you to configure your worker credentials. If you're mining directly on the Bitcoin network, you would be running a regular Bitcoin node just like anyone else and broadcasting your blocks that way.  
> **username_0**: What I dont like with the pools is that it seems that its not possible to configure your own methodology. Basically what U am looking for is: 1) give me the inputs for guessing, 2. I do my own guessing, 3 I submit the work. But for that I have to run a full node with all the historical transactions downloaded?  
> **username_1**: @JohnAndrews Unless you're doing it only to learn how mining works (and understanding that you will not actually make any money), it's completely pointless to mine on your own because you will literally never earn a single penny. If you want to generate a valid block template (for educational purposes) though, I believe all you need is a reliable source of the latest mined block, the current full UTXO set, and the mempool. You'd need to validate the latest block and include its hash, then you'd need to validate the unconfirmed transactions you're including in your block against the UTXO set.  

---

