Bitcoin Forum
May 03, 2024, 09:15:16 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: My records in the blockchain  (Read 300 times)
smokeydog (OP)
Member
**
Offline Offline

Activity: 96
Merit: 11


View Profile
October 27, 2017, 02:30:57 PM
Merited by ABCbits (1)
 #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?
It is a common myth that Bitcoin is ruled by a majority of miners. This is not true. Bitcoin miners "vote" on the ordering of transactions, but that's all they do. They can't vote to change the network rules.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714770916
Hero Member
*
Offline Offline

Posts: 1714770916

View Profile Personal Message (Offline)

Ignore
1714770916
Reply with quote  #2

1714770916
Report to moderator
DannyHamilton
Legendary
*
Offline Offline

Activity: 3388
Merit: 4615



View Profile
October 27, 2017, 03:00:43 PM
Merited by ABCbits (3)
 #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 (OP)
Member
**
Offline Offline

Activity: 96
Merit: 11


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

That was a big help.

Thanks.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!