Author

Topic: My records in the blockchain (Read 313 times)

member
Activity: 96
Merit: 11
October 27, 2017, 10:52:25 AM
#3
That was a big help.

Thanks.
legendary
Activity: 3472
Merit: 4801
October 27, 2017, 10:00:43 AM
#2
Over time I make 1000 transactions,  when I startup my wallet app, i have a balance.   It has also been explained to me that no balance is held in the records for any given address or public key.  This implies that each time I send, a balance tied to my address must be generated.   Am I close on this assumption.

No.

The blockchain stores "transactions".  Transactions are funded by spending unspent outputs, and assign value by creating new unspent outputs.

Each time you send, you list the exact unspent outputs that you want to use to fund the transaction (this list is called transaction inputs).  Then you create new outputs.

Every full node maintains a list of all the outputs that have been created that aren't yet spent. When they see your transaction, they compare your list of transaction inputs to their list of unspent outputs.  If you have an input that is not in their list of unspent outputs, then your transaction is invalid.

Then they add up the values of all your transaction inputs to find out what the total value is that you are supplying to the transaction.  They add up the values of all the new outputs that your transaction creates.  If the value of sum of your inputs is less than the value of the sum of the outputs, then the transaction is invalid.

How are records stored,  is it similar to a table based relational system like mysql?

Implementation is left up to the developer.

If not is some kind of hashing used to find records in the data for a given address?

The hash of the block is an identifier for a block.

The hash of the transaction is an identifier for a transaction.

A specific output is referenced by the transaction that created it, and it's offset in the list of outputs that are created by that transaction (first output is output number 0, second output is output number 1, third output is output number 2, etc).
member
Activity: 96
Merit: 11
October 27, 2017, 09:30:57 AM
#1
Over time I make 1000 transactions,  when I startup my wallet app, i have a balance.   It has also been explained to me that no balance is held in the records for any given address or public key.  This implies that each time I send, a balance tied to my address must be generated.   Am I close on this assumption.

How are records stored,  is it similar to a table based relational system like mysql?  If not is some kind of hashing used to find records in the data for a given address?
Jump to: