Bitcoin Forum
August 29, 2015, 06:57:18 PM *
News: New! Latest stable version of Bitcoin Core: 0.11.0 [Torrent]
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Spending coinbase outputs in the same block?  (Read 631 times)
TierNolan
Hero Member
*****
Offline Offline

Activity: 798


View Profile

Ignore
February 21, 2013, 04:20:22 PM
 #1

Is that allowed?

I am thinking of schemes that need a number of transactions with 0 value input to 0 value outputs.

Could you just generate lots of txos in the coinbase and then use those in the block?

1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
1440874638
Hero Member
*
Offline Offline

Posts: 1440874638

View Profile Personal Message (Offline)

Ignore
1440874638
Reply with quote  #2

1440874638
Report to moderator
There are several different types of Bitcoin clients. Header-only clients like MultiBit trust that the majority of mining power is honest for the purposes of enforcing network rules such as the 21 million BTC limit. Full clients do not trust miners in this way.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1440874638
Hero Member
*
Offline Offline

Posts: 1440874638

View Profile Personal Message (Offline)

Ignore
1440874638
Reply with quote  #2

1440874638
Report to moderator
1440874638
Hero Member
*
Offline Offline

Posts: 1440874638

View Profile Personal Message (Offline)

Ignore
1440874638
Reply with quote  #2

1440874638
Report to moderator
1440874638
Hero Member
*
Offline Offline

Posts: 1440874638

View Profile Personal Message (Offline)

Ignore
1440874638
Reply with quote  #2

1440874638
Report to moderator
jgarzik
Legendary
*
qt
Offline Offline

Activity: 1470


View Profile

Ignore
February 21, 2013, 04:22:30 PM
 #2

Is that allowed?

No.  You need to wait 100-120 blocks before you may spend a coinbase output.


Jeff Garzik, bitcoin core dev team and BitPay engineer; opinions are my own, not my employer.
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
TierNolan
Hero Member
*****
Offline Offline

Activity: 798


View Profile

Ignore
February 21, 2013, 04:23:23 PM
 #3

No.  You need to wait 100-120 blocks before you may spend a coinbase output.

Ahh right, of course.  I should have remembered that.

1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
Sukrim
Legendary
*
Offline Offline

Activity: 1470


View Profile

Ignore
February 21, 2013, 04:40:22 PM
 #4

Is that allowed?
No.  You need to wait 100-120 blocks before you may spend a coinbase output.
Even if you mine the block yourself?

In other words, is a block seen as invalid, if it contains a transaction that spends a coinbase output?

https://bitfinex.com <-- leveraged trading of BTCUSD, LTCUSD and LTCBTC (long and short) - 10% discount on fees for the first 30 days with this refcode: x5K9YtL3Zb
Mail me at Bitmessage: BM-BbiHiVv5qh858ULsyRDtpRrG9WjXN3xf
Peter Todd
Legendary
*
expert
Offline Offline

Activity: 1036


View Profile

Ignore
February 21, 2013, 07:23:27 PM
 #5

Even if you mine the block yourself?

In other words, is a block seen as invalid, if it contains a transaction that spends a coinbase output?

Exactly.

The reason behind this rule is to limit the damage in the event that a block, or potentially a whole bunch of blocks, get orphaned by a better chain. The problem is that while normal transactions can always make their way back to the chain - they just become unconfirmed and can always be reconfirmed - when a block is orphaned the coinbase transaction simply no longer exists and thus transaction that spent that output are invalid. There could be a heck of a lot of those transactions, and thus a lot of peoples' payments disrupted.

The 100 block rule makes that really unlikely to happen because 100 block getting orphaned in a row is really unlikely to happen. Satoshi probably chose 100 blocks, rather than say 6 or something, to be conservative; making miners wait 16 hours before they can spend their reward is a pretty minor disadvantage compared to the huge amount of harm invalidating transactions can do. Personally I would have picked a week myself, but unlike Satoshi I have to sleep. Tongue

The value of this rule was really demonstrated a few years ago with the overflow bug. Basically a flaw was discovered where a special transaction could create an enormous number of coins out of thin air. The flaw was (very) quickly patched and miners upgraded, but it still took a good 50 blocks or so before the patched chain finally overtook the un-patched one. Because of the 100 block rule all the transactions on the un-patched chain eventually were confirmed on the patched one.

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!