Bitcoin Forum
October 16, 2018, 06:57:28 AM *
News: Make sure you are not using versions of Bitcoin Core other than 0.17.0 [Torrent], 0.16.3, 0.15.2, or 0.14.3. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: My records in the blockchain  (Read 213 times)
smokeydog
Member
**
Offline Offline

Activity: 96
Merit: 10


View Profile
October 27, 2017, 02:30:57 PM
 #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?
1539673048
Hero Member
*
Offline Offline

Posts: 1539673048

View Profile Personal Message (Offline)

Ignore
1539673048
Reply with quote  #2

1539673048
Report to moderator
1539673048
Hero Member
*
Offline Offline

Posts: 1539673048

View Profile Personal Message (Offline)

Ignore
1539673048
Reply with quote  #2

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

Posts: 1539673048

View Profile Personal Message (Offline)

Ignore
1539673048
Reply with quote  #2

1539673048
Report to moderator
DannyHamilton
Legendary
*
Offline Offline

Activity: 2198
Merit: 1381



View Profile
October 27, 2017, 03:00:43 PM
 #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).

smokeydog
Member
**
Offline Offline

Activity: 96
Merit: 10


View Profile
October 27, 2017, 03:52:25 PM
 #3

That was a big help.

Thanks.
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!