Bitcoin Forum
June 07, 2024, 07:39:57 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Where are block rewards distributed in Bitcoin core?  (Read 155 times)
whoffie (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
May 26, 2020, 09:14:37 PM
 #1

Hey everyone! I'm taking a look at Bitcoin core and am looking for where the TX is effectively "generated" and send out to an address. I've found the nSubsidy block reward, but I'm currently looking for where the transaction is sent out and recorded on the blockchain. If I don't understand something right, please correct me, otherwise, if you have an answer please tell me!

Thanks, Whoffie
franky1
Legendary
*
Offline Offline

Activity: 4242
Merit: 4510



View Profile
May 26, 2020, 09:57:20 PM
 #2

the particular miner who is mining the block chooses what transactions to add to the block and also puts in the address for where they want the block reward to go to.

core doesnt really do the mining (block consolidation/creation) side of things any more its just validates a received block follows the rules.

the block consolidation/creation code is usually in mining pool software which is different to the main core code

look at the 'blocktemplate' for where it goes (getblocktemplate)

I DO NOT TRADE OR ACT AS ESCROW ON THIS FORUM EVER.
Please do your own research & respect what is written here as both opinion & information gleaned from experience. many people replying with insults but no on-topic content substance, automatically are 'facepalmed' and yawned at
whoffie (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
May 26, 2020, 10:12:22 PM
 #3

Oh ok thanks. I want to try to clarify though because I might've come across as misunderstood. My end goal is to put info on the blockchain that might not necessarily be a TX. I've looked for documentation on how to do this but everything seems pretty empty.
franky1
Legendary
*
Offline Offline

Activity: 4242
Merit: 4510



View Profile
May 26, 2020, 10:15:50 PM
 #4

Oh ok thanks. I want to try to clarify though because I might've come across as misunderstood. My end goal is to put info on the blockchain that might not necessarily be a TX. I've looked for documentation on how to do this but everything seems pretty empty.

oh.
well bloating the blockchain with meaningless data is not really a good thing to do
no one is going to happily advertise how to a newbie. otherwise everyone would be doing it

I DO NOT TRADE OR ACT AS ESCROW ON THIS FORUM EVER.
Please do your own research & respect what is written here as both opinion & information gleaned from experience. many people replying with insults but no on-topic content substance, automatically are 'facepalmed' and yawned at
whoffie (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
May 26, 2020, 10:38:34 PM
 #5

oh.
well bloating the blockchain with meaningless data is not really a good thing to do
no one is going to happily advertise how to a newbie. otherwise everyone would be doing it

I mean it's just a fork I'm learning with for fun. So is there documentation for this then?
ranochigo
Legendary
*
Offline Offline

Activity: 2982
Merit: 4193



View Profile
May 26, 2020, 11:14:29 PM
 #6

I mean it's just a fork I'm learning with for fun. So is there documentation for this then?
Most miners don't actually use getblocktemplate anymore and they have their own software written to accommodate for their needs (ASICBoost, custom msg in coinbase etc).

The documentation is here: https://developer.bitcoin.org/reference/rpc/getblocktemplate.html. The code is written here: https://github.com/bitcoin/bitcoin/blob/793e0ff22cbace2a0fbe1e4a2e88a7bc6bf44502/src/rpc/mining.cpp#L488.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
whoffie (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
May 27, 2020, 03:14:37 PM
 #7

Thanks! I'll take a look.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!