Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Mar 18, 2015

Self-evident; Enforcing internal consistency.

@paveljanik
Copy link
Contributor

I will not comment about the change itself...

But this will fail:

    BOOST_CHECK_EQUAL(AmountFromValue(ValueFromString("20999999.9999999")), 2099999999999990LL);

and as tests fail, this is sure NACK. The commit message contains typo (CAmout) etc.

@ghost
Copy link
Author

ghost commented Mar 18, 2015

Thanks for pointing out the typo.

The tx_valid.json raw txs are spending 2100000000000000 and will need to be corrected accordingly themselves, in addition to the ones you pointed out.

@laanwj
Copy link
Member

laanwj commented Mar 19, 2015

NACK. Too risky and controversial to change this.

@laanwj laanwj closed this Mar 19, 2015
@ghost
Copy link
Author

ghost commented Mar 19, 2015

I hope it is obvious the risk and controversy lie in the flawed accounting practice, not its correction.

@ghost
Copy link
Author

ghost commented Mar 28, 2015

@sipa
Copy link
Member

sipa commented Mar 28, 2015

I think this reinforces a misunderstanding about what this constant does.

The total number of BTC will never exceed 20999839.74826098, due to provably unspendable outputs, overwritten coinbase transactions (see BIP30), unclaimed subsidies (see block 124724), and the unspendable genesis block output. So your number is still not accurate.

The point is, this constant doesn't do anything but prevent some integer wraparound error. I believe we could turn it into 2 billion, and nothing would change at all. Maybe we should :)

@ghost
Copy link
Author

ghost commented Mar 29, 2015

I would almost agree with the spirit of the concluding remark. In this instance, inaction is the least preferable option for the reasons cited. The answer to the often brought up theme of max supply ought to be unambiguos. Erroneously, the current constant fails at that, reinforcing the misunderstanding in absurd contexts.

The value ought to be either aligned with the supply i.e. there will never be more (but perhaps less spendable) than 20999999.97690000 mined major units (a truistic statement), or the suggestion inherent in the constant's name ought to be entirely abandoned (max spendable amount as is being implied). The PR advocates the former for practical reasons, but I wouldn't be opposed to the latter, once the references to the constant are disambiguated (unlike mined, spendable is not a constant). Perhaps both in this exact order.

@laanwj
Copy link
Member

laanwj commented Apr 2, 2015

Apart from philosophical reasons there seems to be no motivation for changing this constant. Even if there is little risk, there is no gain to be had. That's a good reason to leave it as is.

If your purpose is to avoid that people misinterpret it, adding a comment explaining the (non-) use of the constant would do just as well.

@ghost
Copy link
Author

ghost commented Apr 2, 2015

@laanwj: The sole purpose of two test cases in /src/test/data is to successfully spend more BTC than will ever be mined, and the raw tx data is carefully constructed to make sure the overspend goes smoothly. I am not sure how to explain or comment it away, but am open to suggestions.

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants