Title: Is this how a single Bitcoin data looks like? Post by: bitcoinflea on January 09, 2021, 04:51:11 AM We all know what a dollar bill is made of (some plant fibers, paper and proprietary cloth fiber according to US Treasury specs) and so is a quarter (an alloy of metals minted by the US Central Bank)
But I'm curious about that one coin of crypto-currency, like Bitcoin (BTC) or Bitcoin Cash (BCH) The data that makes up crypto-currency like Bitcoin - what is it made of? Is it like what my diagram says it to be? https://imgur.com/OYQVVbH Hope you guys here can help - I'm really curious about that.... Title: Re: Is this how a single Bitcoin data looks like? Post by: ranochigo on January 09, 2021, 04:59:53 AM No.
There isn't any data that specifically represents a single Bitcoin. Rather, transactions references UTXOs (unspent transaction output) within transactions to send the funds. Every transaction, other than the coinbase transaction within a block contains a UTXO to be defined and spent. The UTXO set contains data like the TXID, TX index, block which it's in, script etc, amount, etc. Bitcoin works like a ledger where the coins are originated from the coinbase transaction in a block but there is no actual representation of individual unique coins. The ledger should not contain the private keys pairs for each pkh address. Transactions can only be spent by fulfilling the criteria as defined in the UTXO, be it corresponding signatures or specific conditions. Title: Re: Is this how a single Bitcoin data looks like? Post by: bitcoinflea on January 09, 2021, 05:25:49 AM No. There isn't any data that specifically represents a single Bitcoin. Rather, transactions references UTXOs (unspent transaction output) within transactions to send the funds. Every transaction, other than the coinbase transaction within a block contains a UTXO to be defined and spent. The UTXO set contains data like the TXID, TX index, block which it's in, script etc, amount, etc. Bitcoin works like a ledger where the coins are originated from the coinbase transaction in a block but there is no actual representation of individual unique coins. The ledger should not contain the private keys pairs for each pkh address. Transactions can only be spent by fulfilling the criteria as defined in the UTXO, be it corresponding signatures or specific conditions. So, are you telling me it's formless - like, it doesn't have a format or anything? It's not like this then: ------------------------------------------------------------------------------------------------- | index of owner's private key || index of latest Bitcoin ledger || index of Bitcoin denomination | ------------------------------------------------------------------------------------------------- (Sorry for the crude representation of my original graphic - just wanted to put it here for reference...) But if the UTXO is that thing, how should the Bitcoin look like? Sorry but I can't seem to form an image in my mind as to what it would look like.... Title: Re: Is this how a single Bitcoin data looks like? Post by: ranochigo on January 09, 2021, 05:37:08 AM ------------------------------------------------------------------------------------------------- Nope.| index of owner's private key || index of latest Bitcoin ledger || index of Bitcoin denomination | ------------------------------------------------------------------------------------------------- But if the UTXO is that thing, how should the Bitcoin look like? Transaction always references the UTXO that are created from the previous transaction. UTXOs are stored within the chainstate for the reference client. The link for the more technical format is here[1].Sorry but I can't seem to form an image in my mind as to what it would look like.... You should have a read up on Mastering Bitcoin, it has plenty of visual references which should aid your understanding. Specifically to this question, you'll have to refer to this[2]. [1] https://en.bitcoin.it/wiki/Bitcoin_Core_0.11_(ch_2):_Data_Storage#The_UTXO_set_.28chainstate_leveldb.29 [2] https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch06.asciidoc Edit: Link within the wiki is outdated and they changed the format of the chainstate from around 0.15.0 iirc. You'll have to refer to this: https://github.com/bitcoin/bitcoin/blob/master/src/coins.h#L24 for the current format Bitcoin Core uses. Title: Re: Is this how a single Bitcoin data looks like? Post by: bitcoinflea on January 09, 2021, 05:50:47 AM I've been scanning the references you sent...
The term "UTXO db" ... is that the very "coin" that I'm really looking for? If that's the case, by dissecting it (that is "UTXO db"), I'd get to understand how a Bitcoin looks like and works - is that it? :-/ Title: Re: Is this how a single Bitcoin data looks like? Post by: ranochigo on January 09, 2021, 06:06:14 AM I've been scanning the references you sent... Yes. That database represents all the unspent coins (or rather unspent outputs) that currently exist. If I've understood your question correctly, which is how Bitcoins are defined and represented at a protocol level. Reading the book would probably answer most of your queries. The term "UTXO db" ... is that the very "coin" that I'm really looking for? If that's the case, by dissecting it (that is "UTXO db"), I'd get to understand how a Bitcoin looks like and works - is that it? :-/ Title: Re: Is this how a single Bitcoin data looks like? Post by: HeRetiK on January 09, 2021, 12:46:49 PM I've been scanning the references you sent... The term "UTXO db" ... is that the very "coin" that I'm really looking for? If that's the case, by dissecting it (that is "UTXO db"), I'd get to understand how a Bitcoin looks like and works - is that it? :-/ Maybe taking a look at how a transaction looks like will also help you in your understanding: https://www.oreilly.com/library/view/mastering-bitcoin/9781491902639/ch05.html To reiterate what ranochigo already mentioend above, there is no "bitcoin" to look at. Bitcoins / satoshis are only accounting units. Transactions are as close as you get to "looking at one". Title: Re: Is this how a single Bitcoin data looks like? Post by: odolvlobo on January 09, 2021, 07:03:42 PM I believe that a UTXO was called a "coin" in the original nomenclature, but that is very rare now. So, now a bitcoin is just an amount, just like a dollar (excluding paper money and coins).
Title: Re: Is this how a single Bitcoin data looks like? Post by: Sanglotslongs2 on January 09, 2021, 07:08:52 PM Fantastic website for technical explanations :
https://learnmeabitcoin.com/technical/ Title: Re: Is this how a single Bitcoin data looks like? Post by: DannyHamilton on January 13, 2021, 12:38:43 PM The closest thing to a representation of value that you're going to find in bitcoins protocol is an Unspent Transaction Output (UTXO). Perhaps this will help you form an image in your mind:
Now, if you were the one that mined that block, then you would have the private key that is associated with that public key hash. As such, you could provide the necessary signature and spend that UTXO. If you wanted to spend 1 BTC of that 7.72872951 BTC you would create a transaction that looks like this:
Title: Re: Is this how a single Bitcoin data looks like? Post by: SKS5115 on January 15, 2021, 11:14:47 PM I had a lot of fun reading this conversation thread, I found several references to very useful websites.
But I don't think any of them really answer your question because they just can't. In the system theory, there is something called emergent property, it refers to a property that only appears when different pieces make up a system, for example the blood flow only exists if you have a functioning blood system in a body, you can't see the flow outside this frame of reference. The bitcoin itself does not exist outside of a blockchain, a bitcoin is a property that emerges from that system, to be able to see it, you must see the whole system itself. Title: Re: Is this how a single Bitcoin data looks like? Post by: DannyHamilton on January 17, 2021, 08:25:00 PM The bitcoin itself does not exist outside of a blockchain, a bitcoin is a property that emerges from that system, to be able to see it, you must see the whole system itself. The bitcoin does not even exist inside of a blockcchain. It is not a property, but rather an abstraction. Using the words "a bitcoin" is just something that we humans do to make it easier to discuss the transfer of control over value. Note, that the same is true of bitcoin ADDRESSES. There are no bitcoin addresses in the blockchain. Addresses are a condensed representation of a set of instructions which are presented to us humans by wallet software as a way to make it easier to talk about transferring control over value. |