ranger.shi (OP)
Newbie
Offline
Activity: 26
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 14, 2014, 07:04:49 AM |
|
Why does Bitcoin store all transaction inputs and outputs, instead of just an “account/balance” ledger? I think ,that will reduce the blocksize very much. and reduce the program diffcluty. at the same time it is easy to protect the block chain
but why not?
|
|
|
|
bornil267645
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 14, 2014, 07:13:32 AM |
|
it's might make it simpler but there has to be a explanation otherwise they would've done it already. ![Cool](https://bitcointalk.org/Smileys/default/cool.gif)
|
|
|
|
ranger.shi (OP)
Newbie
Offline
Activity: 26
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 14, 2014, 07:22:01 AM |
|
it's might make it simpler but there has to be a explanation otherwise they would've done it already. ![Cool](https://bitcointalk.org/Smileys/default/cool.gif) I don't think have any explanation . I have researched bitcoin code for a long time, I sure that is safe. Is anything i don't kown? ![Undecided](https://bitcointalk.org/Smileys/default/undecided.gif)
|
|
|
|
giszmo
Legendary
Offline
Activity: 1862
Merit: 1105
WalletScrutiny.com
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 14, 2014, 07:32:46 AM |
|
outputs are well defined with an amount. addresses are rather implicit and depend on the ordering of transactions to get an implicit balance. As transactions are only ordered by a miner, things are stricter if you spend from outputs rather than from addresses.
Also in the original concept address reuse was not really a big thing, so it wouldn't matter if you spend from the one output or from the address, so the blockchain should not really be smaller or bigger with such a scheme.
|
ɃɃWalletScrutiny.com | Is your wallet secure?(Methodology) WalletScrutiny checks if wallet builds are reproducible, a precondition for code audits to be of value. | ɃɃ |
|
|
|
ranger.shi (OP)
Newbie
Offline
Activity: 26
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 14, 2014, 07:47:58 AM Last edit: August 14, 2014, 08:00:20 AM by ranger.shi |
|
outputs are well defined with an amount. addresses are rather implicit and depend on the ordering of transactions to get an implicit balance. As transactions are only ordered by a miner, things are stricter if you spend from outputs rather than from addresses.
Also in the original concept address reuse was not really a big thing, so it wouldn't matter if you spend from the one output or from the address, so the blockchain should not really be smaller or bigger with such a scheme.
is any explanation with the scheme? I want to design a altcoin , one function have to use this scheme, I am afraid of safe case, but current I can not find any leaks ....
|
|
|
|
ranger.shi (OP)
Newbie
Offline
Activity: 26
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 14, 2014, 09:15:02 AM |
|
|
|
|
|
Relnarien
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 14, 2014, 10:03:21 AM |
|
Why does Bitcoin store all transaction inputs and outputs, instead of just an “account/balance” ledger? I think ,that will reduce the blocksize very much. and reduce the program diffcluty. at the same time it is easy to protect the block chain
but why not?
It will not make the blockchain smaller. In fact, it will make it much larger. There are 2^160 possible Bitcoin addresses, which means that keeping an account database rather than an account ledger would require maintaining an accurate representation of the balance contained in 2^160 Bitcoin addresses. If you do that per block, then you would need stacks of servers just to keep the blockchain running. It is also not secure to store exact balances instead of input-output transactions because it would be difficult, if not impossible, to verify if the indicated balance was maliciously altered.
|
|
|
|
Dabs
Legendary
Offline
Activity: 3416
Merit: 1912
The Concierge of Crypto
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 14, 2014, 03:03:09 PM |
|
Transactions contain the details about the "accounts" and if you add them all up, you get the "balance" of whatever addresses you are looking at.
|
|
|
|
kjj
Legendary
Offline
Activity: 1302
Merit: 1026
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 15, 2014, 05:09:01 AM |
|
Imagine a global account and balance ledger...
Now imagine the ledger changing as a batch of transactions are confirmed. You need to ship the new ledger to thousands of nodes on the internet. How do you do it?
Option 1 is to transfer the new ledger intact. This can be push or pull, but it needs to flood the network. I hope it isn't necessary to explain what's wrong with option 1.
Option 2 is to create some sort of delta or diff. This is what we actually do. The blockchain is just a list of diffs starting from an empty ledger and ending with the current state.
|
17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8 I routinely ignore posters with paid advertising in their sigs. You should too.
|
|
|
ranger.shi (OP)
Newbie
Offline
Activity: 26
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 15, 2014, 08:30:54 AM |
|
Imagine a global account and balance ledger...
Now imagine the ledger changing as a batch of transactions are confirmed. You need to ship the new ledger to thousands of nodes on the internet. How do you do it?
Option 1 is to transfer the new ledger intact. This can be push or pull, but it needs to flood the network. I hope it isn't necessary to explain what's wrong with option 1.
Option 2 is to create some sort of delta or diff. This is what we actually do. The blockchain is just a list of diffs starting from an empty ledger and ending with the current state.
we only transfer a batch of transactions which in a block,all nodes will verify the block and update related all account view, just like bitcoin. maybe you will think account view will very large, in fact coin view in bitcoin have the same problem , on the other way system can gather same fees to control the account total munber.
|
|
|
|
Sergio_Demian_Lerner
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 15, 2014, 02:01:29 PM |
|
My best guess is that Satoshi preferred the input/output model because it makes very easy preventing transaction spam on the network (before inclusion into the blockchain).
When you adopt the account/balance model, you must choose one of the following design decisions to be able to detect double-spends (which can be used to DoS the network):
1. Require transactions to include a proof-of-work 2. Predict the balance of each account every time you receive a transaction 3. Reduce the block interval to a value so small that allowing a single transaction per block is enough for the user (e.g. 5 seconds). Then you forward a single transaction per account between blocks.
There are surely more solutions, but probably more complicated.
The simplest solution (for a 10 minute block interval) is the one Satoshi choose, because it does not require additional temporary data structures.
Sergio.
|
|
|
|
kjj
Legendary
Offline
Activity: 1302
Merit: 1026
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 15, 2014, 03:38:19 PM |
|
Using a nonce has problems in a global system.
|
17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8 I routinely ignore posters with paid advertising in their sigs. You should too.
|
|
|
gmaxwell
Moderator
Legendary
Offline
Activity: 4242
Merit: 8654
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 15, 2014, 04:11:50 PM |
|
First, the entire privacy model for Bitcoin is predicated on users not reusing keys. Without that, bitcoin is obscenely non-private, and gravely disadvantaged compared to any other store of value or transaction system in wide use. This alone immediately would destroy any value an 'account' system would have, and so you can basically stop at this point and think no more.
Though there are other reasons, beyond the increased difficulty of evaluating zeroconf transactions Sergio mentioned above—
Then the account model has major problems with corner cases... e.g. You have problems with determinism in conflict situations: e.g. Alice has 2 BTC and pays Bob 0.9 BTC, then Alice pays Carol 1 BTC. Later Bob gets angry the transaction hasn't confirmed and demands Alice reissue with a fee. Alice does but then Bob gets paid twice and Carol not at all.
Even just anti-replay you need an random access lookup to see if the nonce has been used already, and the nonce is per input if you ar eto have conflict control. You have more data (the list of nonces) is unprunable (or difficult to make prunable)... and so any space you saved by not having extra outputs is lost in abundance by having to store nonces forever— even after an account goes to zero value, since if it were funded again someone could replay a years old spend— once the spending actually does happen.
In short, account like setups _seem_ simpler and more intuitive, but they have ugly edge conditions that are difficult to get right and create overhead that wipes out the possible gains. When you consider that the privacy model precludes that kind of use in any case, there really is no upside and a lot of downside.
|
|
|
|
Dabs
Legendary
Offline
Activity: 3416
Merit: 1912
The Concierge of Crypto
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 15, 2014, 04:55:07 PM |
|
Some donation addresses are constantly re-used, as well as some game addresses, like dice.
But with all the transactions coming into those addresses and going out, doesn't that sort of "mix" who did what, and some times you can even claim you had no direct link to them as someone else did it and paid you after, or something.
And then there are those who do the Coin Join thing, or the Shared Send.
And then there is that "trusted escrow/mixer/tumbler" who combines a bunch of unspent outputs into one, then splits it out later.
I think it is a good idea to almost always include the minimum transaction fee, even if it is not requested or required by the bitcoin client.
|
|
|
|
jl2012
Legendary
Offline
Activity: 1792
Merit: 1111
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 15, 2014, 05:23:04 PM |
|
My best guess is that Satoshi preferred the input/output model because it makes very easy preventing transaction spam on the network (before inclusion into the blockchain).
When you adopt the account/balance model, you must choose one of the following design decisions to be able to detect double-spends (which can be used to DoS the network):
1. Require transactions to include a proof-of-work 2. Predict the balance of each account every time you receive a transaction 3. Reduce the block interval to a value so small that allowing a single transaction per block is enough for the user (e.g. 5 seconds). Then you forward a single transaction per account between blocks.
There are surely more solutions, but probably more complicated.
The simplest solution (for a 10 minute block interval) is the one Satoshi choose, because it does not require additional temporary data structures.
Sergio. Just using an incrementing nonce for each account is sufficient to solve the issue. Not so simple. All full nodes have to keep the nonce of all addresses, even for those with zero balance. No pruning is possible.
|
Donation address: 374iXxS4BuqFHsEwwxUuH3nvJ69Y7Hqur3 (Bitcoin ONLY) LRDGENPLYrcTRssGoZrsCT1hngaH3BVkM4 (LTC) PGP: D3CC 1772 8600 5BB8 FF67 3294 C524 2A1A B393 6517
|
|
|
ilpirata79
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
August 15, 2014, 05:49:16 PM |
|
This could be easily "done".
It is like keeping only the unspent outputs.
The problem is the trust. How can you be sure that the ledger that is being sent to you is the correct one?
That is because all the blockchains with all the transactions and hashes is needed.
Best regards, ilpirata79
|
|
|
|
|