Bitcoin Forum
September 19, 2019, 04:39:33 PM *
News: Latest Bitcoin Core release: 0.18.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: A different way to create coinbase transaction  (Read 83 times)
TinfoilHat
Newbie
*
Offline Offline

Activity: 9
Merit: 4


View Profile
February 15, 2018, 02:17:58 PM
 #1

AFAIK when a miner succeeds in creating a block, he puts a special transaction (coinbase) in it which spends no input and sends a fixed amount of BTC to an address he can arbitrarily specify.

Instead of doing so, can we do the following: Miner simply puts an address in the block header. When he succeeds in creating the block, all nodes that receive this block create the coinbase transaction -which spends no input and sends the fixed amount to the address in header- in their UTXO pool.

Would that work?
1568911173
Hero Member
*
Offline Offline

Posts: 1568911173

View Profile Personal Message (Offline)

Ignore
1568911173
Reply with quote  #2

1568911173
Report to moderator
1568911173
Hero Member
*
Offline Offline

Posts: 1568911173

View Profile Personal Message (Offline)

Ignore
1568911173
Reply with quote  #2

1568911173
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1568911173
Hero Member
*
Offline Offline

Posts: 1568911173

View Profile Personal Message (Offline)

Ignore
1568911173
Reply with quote  #2

1568911173
Report to moderator
1568911173
Hero Member
*
Offline Offline

Posts: 1568911173

View Profile Personal Message (Offline)

Ignore
1568911173
Reply with quote  #2

1568911173
Report to moderator
1568911173
Hero Member
*
Offline Offline

Posts: 1568911173

View Profile Personal Message (Offline)

Ignore
1568911173
Reply with quote  #2

1568911173
Report to moderator
ranochigo
Legendary
*
Offline Offline

Activity: 1778
Merit: 1180

Somewhat inactive.


View Profile WWW
February 15, 2018, 02:44:55 PM
 #2

That's before the miner succeeds in mining the block. The coinbase and any other transactions are added before the miner hashes the block header and finds a hash matching the target. If you were to change anything within the block, the hash of the block changes completely.

What do you actually achieve by doing that?

DannyHamilton
Legendary
*
Offline Offline

Activity: 2198
Merit: 1432



View Profile
February 15, 2018, 03:35:25 PM
Merited by HeRetiK (1)
 #3

As ranochigo has pointed out, you cant change ANYTHING about a block once the proof-of-work is complete.  If you do, then the block becomes invalid.

More importantly, some of your understanding of the current process is not entirely correct.
AFAIK when a miner succeeds in creating a block, he puts a special transaction (coinbase) in it which spends no input and sends a fixed amount of BTC to an address he can arbitrarily specify.

No.

When a miner (or pool) BUILDS a block, he includes a special transaction (coinbase) which spends no value in the input (but stores arbitrary data in the input) and sends NO MORE THAN the SUM of the block subsidy (currently 21.5 BTC) PLUS all the transaction fees of all the transactions included in the block to one OR MORE outputs he can arbitrarily specify.

THEN the miner (or pool) starts the proof-of-work on that block.  IF they are first to complete the proof-of-work, THEN they get to broadcast their block (which already includes the coinbase transaction).  IF they are NOT first to complete the proof-of-work, THEN they update their blockchain, UTXO, and mempool with the information from the block that they receive, and start the whole proces all over again.

Instead of doing so, can we do the following: Miner simply puts an address in the block header.

There is currently nowhere in the header to store an address.  You'd have to change the format of the header and that would be a HARD FORK.  Getting anyone to agree to a HARD FORK is going to require a VERY GOOD REASON.  What problem are you trying to fix with this?

When he succeeds in creating the block, all nodes that receive this block create the coinbase transaction -which spends no input and sends the fixed amount to the address in header- in their UTXO pool.

All the nodes already add the outputs from the coinbase to their UTXO.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!