Which of the next rpc strategies is used to mine bitcoin and obtain its praise?
None, in point of fact.
The principle means of interfacing with Bitcoin Core for mining is in the course of the getblocktemplate
(GBT) RPC, which gives all data mining tool wishes in regards to the present absolute best block to construct upon, and what transactions to incorporate. The remainder is as much as the consumer.
Bitcoin Core isn’t eager about “receiving” a praise for a block; somewhat, the miner constructs a block that will pay themselves. If that block is legitimate and will get permitted by way of the community, then they receives a commission; if it does not, they do not.
That is necessary: Bitcoin mining rewards don’t seem to be determined after mining by way of filing it someplace; they are determined forward of time, earlier than mining is tried. A miner (or its tool stack, or pool) will name GBT, construct a candidate block that makes use of the GBT result is transactions + a coinbase transaction that will pay the miner/pool, and then hand it to the mining {hardware} to resolve. Converting the payout after discovering a block would invalidate it.
- generateblock
This can be a test-only RPC, which does if truth be told mine a block, however with a user-specified set of transactions to incorporate. It additionally makes use of mining good judgment in Bitcoin Core itself, which is gradual and unoptimized, and can not use ASICs or different specialised mining {hardware}. For the rest however check networks, it’s unusably gradual.
- submitblock
This RPC can be utilized to offer a block out of band to Bitcoin Core. It’s used when mining {hardware} has discovered a block, to get it to propagate around the community.
As famous above on the other hand, it isn’t eager about getting a payout from mining; the block itself already comprises its payout data, and will also be submitted anyplace at the community.
- submitheader
That is to tell Bitcoin Core a few block header out of band. It is unrelated to mining.