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

‘Lidar is lame’: why Elon Musk’s imaginative and prescient for a self-driving Tesla taxi faltered | Tesla

After years of promising traders that thousands and thousands of Tesla robotaxis would quickly fill the streets, Elon Musk debuted his driverless automobile...

Common Motors names new CEO of troubled self-driving subsidiary Cruise | GM

Common Motors on Tuesday named a veteran know-how government with roots within the online game business to steer its troubled robotaxi service Cruise...

Meet Mercy and Anita – the African employees driving the AI revolution, for simply over a greenback an hour | Synthetic intelligence (AI)

Mercy craned ahead, took a deep breath and loaded one other process on her pc. One after one other, disturbing photographs and movies...

Recent articles

More like this

LEAVE A REPLY

Please enter your comment!
Please enter your name here