json rpc – Which rpc technique is used to mine bitcoin?

on

|

views

and

comments


Which of the next rpc strategies is used to mine bitcoin and obtain its reward?

None, actually.

The first manner of interfacing with Bitcoin Core for mining is thru the getblocktemplate (GBT) RPC, which offers all data mining software program wants in regards to the present greatest block to construct upon, and what transactions to incorporate. The remainder is as much as the consumer.

Bitcoin Core isn’t concerned in “receiving” a reward for a block; moderately, the miner constructs a block that pays themselves. If that block is legitimate and will get accepted by the community, then they receives a commission; if it would not, they do not.

That is vital: Bitcoin mining rewards aren’t determined after mining by submitting it someplace; they’re determined forward of time, earlier than mining is tried. A miner (or its software program stack, or pool) will name GBT, construct a candidate block that makes use of the GBT outcome’s transactions + a coinbase transaction that pays the miner/pool, and then hand it to the mining {hardware} to resolve. Altering the payout after discovering a block would invalidate it.

  1. generateblock

It is a test-only RPC, which does truly mine a block, however with a user-specified set of transactions to incorporate. It additionally makes use of mining logic in Bitcoin Core itself, which is gradual and unoptimized, and can’t use ASICs or different specialised mining {hardware}. For something however check networks, it’s unusably gradual.

  1. 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 throughout the community.

As famous above nevertheless, it’s not concerned in getting a payout from mining; the block itself already comprises its payout data, and may be submitted wherever on the community.

  1. submitheader

That is to tell Bitcoin Core a couple of block header out of band. It is unrelated to mining.

Share this
Tags

Must-read

Constructing the Torc Driverless Security Case

At Torc, we’ve structured our security case on three foundational pillars: Engineer It to Be Secure, Function It to Be Secure, and the...

What’s DL+S? Unlocking the Huge Information Required to Develop Autonomous Vans

Breakthroughs in AI for autonomous driving don't occur in isolation. They occur when information, simulation, machine studying, infrastructure, and car testing work as...

Why I can’t wait to get right into a driverless automotive | Self-driving automobiles

Adrian Chiles (Driverless automobiles are taking us on a street to nowhere, 10 September) needs to know who requested for driverless automobiles. I...

Recent articles

More like this

LEAVE A REPLY

Please enter your comment!
Please enter your name here