Backend of Cryptocoins
#1
The subject of how cryptocoins work puzzles me. 
An example is when a new bitcoin is mined does it have a unique serial number? 
When you buy bitcoins say 0.035 how does the system which bitcoin that came from? Or doesn't that matter.
Are the blocks only used recording of transactions rather than what happens to each bitcoin?
This is quite a ramble I trying to get my mind around this and not getting any answers from googling.

#2
Cryptocurrency is an encrypted decentralized digital currency transferred between peers and confirmed in a public ledger via a process known as mining.

Below, we take a simplified look at how cryptocurrencies like bitcoin work. First, let’s review the basics and essentials of cryptocurrency, and then we will do an overview of the other properties that have made cryptocurrency what it is today.




The Cryptocurrency Basics

In order to understand how cryptocurrency works, you’ll need to understand a few basic concepts. Specifically:

Public Ledgers: All confirmed transactions from the start of a cryptocurrency’s creation are stored in a public ledger. The identities of the coin owners are encrypted, and the system uses other cryptographic techniques to ensure the legitimacy of record keeping. The ledger ensures that corresponding “digital wallets” can calculate an accurate spendable balance. Also, new transactions can be checked to ensure that each transaction uses only coins currently owned by the spender. Bitcoin calls this public ledger a “transaction block chain“.

Transactions: A transfer of funds between two digital wallets is called a transaction. That transaction gets submitted to a public ledger and awaits confirmation. When a transaction is made, wallets use an encrypted electronic signature (an encrypted piece of data called a cryptographic signature) to provide a mathematical proof that the transaction is coming from the owner of the wallet. The confirmation process takes a bit of time (ten minutes for bitcoin) while “miners” mine (ie. confirm transactions and add them to the public ledger).

Mining: In simple terms, mining is the process of confirming transactions and adding them to a public ledger. In order to add a transaction to the ledger, the “miner” must solve an increasingly-complex computational problem (sort of like a mathematical puzzle). Mining is open source, so anyone can confirm the transaction. The first “miner” to solve the puzzle adds a “block” of transactions to the ledger. The way in which transactions, blocks, and the public blockchain ledger work together ensures that no one individual can easily add or change a block at will. Once a block is added to the ledger, all correlating transactions are permanent and a small transaction fee is added to the miner’s wallet (along with newly created coins). The mining process is what gives value to the coins and is known as a proof-of-work system.




The Anatomy of Cryptocurrency


Although there can be exceptions to the rule, there are a number of factors (beyond the basics above) that make cryptocurrency so different from the financial systems of the past:

Adaptive Scaling: Adaptive scaling essentially means that cryptocurrencies are built with a number of measures to ensure that they will work well in both large or small scales.

Quote:Adaptive Scaling Example: Bitcoin is programmed to allow for one transaction block to be mined every ten minutes. The algorithm adjusts after every 2016 blocks (theoretically, that’s every two weeks) to get easier or harder based on how long it actually took for those 2016 blocks to be mined. So if it only took 13 days for the network to mine 2016 blocks, that means it’s too easy to mine, so the difficulty increases. However, if it takes 15 days for the network to mine 2016 blocks, that shows that it’s too hard to mind, so the difficulty decreases.

A number of other measures are included in digital coins to allow for adaptive scaling including limiting the supply overtime (to create scarcity) and reducing the reward for mining as more total coins are mined.

Cryptographic: Cryptocurrency uses a system of cryptography (AKA encryption) to control the creation of coins and to verify transactions.

Decentralized: Most currencies in circulation are controlled by a centralized government, and thus their creation can be regulated by a third party. Cryptocurrency’s creation and transactions are open source, controlled by code, and rely on “peer-to-peer” networks. There is no single entity that can affect the currency.

Digital: Traditional currency is defined by a physical object (USD representing gold for example), but cryptocurrency is all digital. Digital coins are stored in digital wallets and transferred digitally to other peoples’ digital wallets. No physical object ever exists.




Open Source: Cryptocurrencies are typically open source. That means that developers can create APIs without paying a fee and anyone can use or join the network.

Proof-of-work: Most cryptocurrencies use a proof-of-work system. A proof-of-work scheme uses a hard-to-compute but easy-to-verify computational puzzle to limit exploitation of cryptocurrency mining. Essentially, it’s like a really hard to solve “catpcha” that requires lots of computing power.

Pseudonymity: Owners of cryptocurrency keep their digital coins in an encrypted digital wallet. A coin-holder’s identification is stored in an encrypted address that they have control over – it is not attached to a person’s identity. The connection between you and your coins is pseudonymous rather than anonymous as ledgers are open to the public (and thus, the ledgers could be used to glean information about groups of individuals in the network).

Value: For something to be an effective currency, it has to have value. The US dollar used to represent actual gold. The gold was scarce and required work to mine and refine, so the scarcity and work gave the gold value. This, in turn, gave the US dollar value.

Cryptocurrency works with a similar concept. In cryptocurrency, “coins” (which are nothing more than publicly agreed on records of ownership) are generated or produced by “miners”. These miners are people who run programs on specialized hardware made specifically to solve proof-of-work puzzles. The work behind mining coins gives them value, while scarcity of coins and demand thereof causes their value to fluctuate. The idea of work giving value to currency is called a “proof-of-work” system. The other method for validating coins is called proof-of-stake. Value is also created when transactions are added to public ledgers as creating a verified “transaction block” takes work as well.




All of this is from google, I copied it.

#3
Thanks James,
Being trying to read a bit more, but still I struggle.
I think that a bitcoin doesn't have a unique number and is just added to a wallet when created, what is encrypted is the wallet and transaction which is then locked down each time a block is completed.
How is the total of bitcoins checked? It just seems that transactions are checked and agreed upon then locked, who checks and how is the total bitcoins issued checked? Or is it controlled only at issue?

#4
(05-17-2017, 07:25 PM)Ianf Wrote: Thanks James,
Being trying to read a bit more, but still I struggle.
I think that a bitcoin doesn't have a unique number and is just added to a wallet when created, what is encrypted is the wallet and transaction which is then locked down each time a block is completed.
How is the total of bitcoins checked? It just seems that transactions are checked and agreed upon  then locked, who checks and how is the total bitcoins issued checked? Or is it controlled only at issue?

@BitcoinZAR I have the same questions Smile

#5
I have been searching and can't find an answer to the totals question is there a forum where the community hangs out with the controller?

#6
(05-20-2017, 07:47 AM)Ianf Wrote: I have been searching and can't find an answer to the totals question is there a forum where the community hangs out with the controller?

I don't understand. What do you mean by "community hangs out with the controller" ?
Register on Platinum Wealth (My referral link)

#7
How Bitcoins works; from the beginning:

1. Bitcoins are first created when they are mined by solving a block. The first transaction in the block is basically you saying "I'm giving myself 50 Bitcoins to my address A" (plus transaction fees from the block).

2. When you want to spend Bitcoins, you have to point to one or more transactions that show where you got them from, and say how many Bitcoins you are transferring where. It's like saying "I got Bitcoins at transaction X. I'm sending 20 coins to address B."

3. The point is that more often than not you don't want to send all the coins you got from the transaction, so you also specify how much change you are sending to another address, usually controlled by yourself: "I got Bitcoins at transaction X. I'm sending 20 coins to address B and 30 coins to address A."

4. Since all of the above is cryptographically signed, one can be sure nobody can spend coins they don't have (spending more than they have, spending someone else's coins, etc).

5. To make sure nobody is cheating, everyone is looking at everyone's hands by checking each transaction that comes their way. If you cheat, your transaction does not get forwarded.

That explains the concept of how Bitcoin works.

Just to be clear:

"Does each bitcoin have a unique identifier, like currency notes have serial numbers?"

Not like currency (that each bill has a serial number and you can't break them apart), more like bank statements (the identifier identifies the transaction on a certain amount of Bitcoins), but that's still a simplification.

"If so, could you trace a particular bitcoin's ownership chain (ie. find the current owner of a particular bitcoin by its identifier)?"

You can trace the history of transactions on the set of Bitcoins up to who mined them, but not on a particular 1BTC.
Register on Platinum Wealth (My referral link)

#8
There is actually no such thing as a bitcoin - there are only transactions, which are denominated in bitcoins. Those transactions do have a history and that history can be complex.

It's and abstract idea imo. Since some bitcoins can be traced back to certain transactions and others can not you might actually find that some bitcoins are worth more than others depending on what transaction they where a part of remember when that guy bought a pizza with bitcoin well someone bought that particle bitcoin for 2 bitcoins.

It's amazing, it seems a bitcoin is a bitcoin is not true. Some are more valuable than others.

Saw something in another thread about how newly mined "pure" bitcoins with no transaction history can have a premium over other bitcoins due to their potential non-traceability.

Here we had someone valuing certain bitcoins more than others due to their transaction history.
Register on Platinum Wealth (My referral link)

#9
Spreadsheet ranger
Thanks for explaining , so the blockchain is one massive ledger with more bitcoins added by mining.
But how do bitcoiners know what the total number of bitcoins issued are and is there check against the bitcoins issued vs. the total of bitcoins in the ledger?

#10
(05-20-2017, 02:57 PM)Ianf Wrote: Spreadsheet ranger
Thanks for explaining , so the blockchain is one massive ledger with more bitcoins added by mining.
But how do bitcoiners know what the total number of bitcoins issued are and is there check against the bitcoins issued vs. the total of bitcoins in the ledger?

Bitcoin is defined by a protocol.

  1. There are 21 million bitcoins that can be mined total, ever. This is by design.

  2. Every transaction that happens is stored indefinitely by the blockchain. The blockchain is where the trust that who says they own a bitcoin owns it comes from, and the basis of this trust is somewhat two fold. (Side note: This also means if a wallet is ever definitively linked to someone, there is a permanent record of their transactions)

  3. The blockchain is generated using hashing functions (By definition, a good hashing function is irreversible by anything other than brute force), and part of the input to the hashing function is the last thing prior to it in the chain. This means to forge 1 record, you would have to succesfully forge the entire blockchain.

  4. you can't forge the entire blockchain as everyone has a copy of what already exists. A theoretical 51% attack on the blockchain is also partially mitigated by having historical blocks every so often, so the damage someone with it is partially minimized here.

  5. Because everyone has a record of it, anyone can look at the blockchain to see how many have been mined.

  6. Using that number alone however does not account for any bitcoins that may be permanently lost. (Data loss making them inaccessible, forgotten wallet paswords, etc.)

When a block of bitcoins is mined, everyone else knows about it at some point soon after through the block chain when a luno/coinbase/walltername transaction happens. 

From all of this, you can find the number of bitcoins that have been mined so far by looking at the blockchain and totaling the amount that have been mined so far. There are several websites that can do this for you. Many of these are full blockchain explorers, others may just give you general data regarding the current state of the chain.

Example - The total number of bitcoins that have already been mined; in other words, the current supply of bitcoins on the network. https://blockchain.info/charts/total-bit...mespan=all

You can also do this manually if you want. https://en.bitcoin.it/wiki/Transaction However it's not worth it.
Register on Platinum Wealth (My referral link)

#11
I found a forum that seem to be clued up on the blockchain. A topic was started by me on this. https://bitcointalk.org/index.php?topic=...sg19111936
It seems that there is no totals checked on the blockchain. What was interesting was the mechanism of creating the miners fee in the block.
It is a struggle for me to understand new things. Wink

#12
(05-21-2017, 12:02 PM)Ianf Wrote: I found a forum that seem to be clued up on the blockchain. A topic was started by me on this. https://bitcointalk.org/index.php?topic=...sg19111936
It seems that there is no totals checked on the blockchain. What was interesting was the mechanism of creating the miners fee in the block.
It is a struggle for me to understand new things. Wink

Yea that pretty much echoes what Ranger explained.

To add to that since I saw you asked about counterfeit bitcoins. There is no such thing as a "bitcoin" that can be copied. Rather, there is a list of all the transactions that have taken place on the bitcoin network and the order they have taken place. Every client has a copy of this list or theoretically have access to this list if they're a thin client...

Essentially, the only way to counterfeit bitcoins would be to spend them in more than one place. This is called a double-spend attack. However, because of the design of the bitcoin blockchain (the list of all the transactions) and the way that list is secured by mining, this requires a tremendous amount of computer power. You can read about this here: Double_spending



#13
(05-21-2017, 12:02 PM)Ianf Wrote: I found a forum that seem to be clued up on the blockchain. A topic was started by me on this. https://bitcointalk.org/index.php?topic=...sg19111936
It seems that there is no totals checked on the blockchain. What was interesting was the mechanism of creating the miners fee in the block.
It is a struggle for me to understand new things. Wink

If you want to make a transaction "today" you need to add a non-trivial fee. The "No fees" claim when bitcoin started became "low fees" a while back, and has now vanished completely with luno adding dynamic fees to cover costs. Once the block reward goes away entirely there's suddenly a lot more that fees need to cover, and they will need to be quite large.

Which is why I got out of bitcoin. Interesting experiment, not ready to replace the world's financial systems.
Register on Platinum Wealth (My referral link)

#14
This seems to answer my questions

Quote:Quick answers to your doubts:

1.) The total amount is always tally;
2.) No bitcoin is lost between transactions; and
3.) No counterfeit bitcoin exist.

The only "way" to destroy circulating bitcoin is by sending them to the unspent-able so-called BitcoinEater addresses which were generated without private keys.

I will keep on looking to see how total amount always tally.

#15
Hi Guys 
I got a comprehensive reply.
You can check out the whole reply in the link I posted above.


Quote:You can see here that there are currently 51,045,935 transaction outputs, and that the sum of the values of those outputs is 16,342,861.10771819 BTC

Considering:

  • We are currently at block height 467441

  • The first 210,000 blocks had a subsidy of 50 BTC

  • The next 210,000 blocks had a subsidy of 25 BTC

  • The remaining 47,441 blocks had a subsidy of 12.5 BTC
The total bitcoin value of all outputs (if OP_RETURN wasn't subtracted and miners didn't fail to pay themselves their maximum allowable reward) should be:
(210,000 X 50) + (210,000 X 25) + (47,441 X 12.5) = 16,343,012.5

This theoretical total minus the actual total (where OP_RETURN outputs are subtracted) is:
16,343,012.5 - 16,342,861.10771819 = 151.39228181

OP_RETURN is intended to be used when intentionally creating an unspendable output, but there are other outputs that are provably unspendable. Bitcoin Core keeps these other provably unspendable outputs in its UTXO. There have been several efforts to analyze the ledger and find ALL provably unspendable outputs.  Here's an analysis that was completed in July 2014:






Users browsing this thread: 1 Guest(s)

Color Skins

Change Color:

Background Patterns:

Background Images:

Main Options: