Crypto Fundamentals Part 3: Blockchain Basics

in #bitcoin6 years ago (edited)

Disclaimer: This newsletter is informational in nature; nothing written here should be construed as financial advice.

Blockchain Basics

Let's get super clear what blockchain actually is. We'll discuss it in analogy, using Bitcoin as the example, and we'll leave an aspect of it--consensus--for a future update.

A blockchain is a form of database. It's not a very efficient database, but when paired with "consensus", it provides the extraordinary features of Bitcoin and other crypto currencies.

I'll also note things you'll need to know as you go study this further: domain terminology, idea, pitfalls, etc.

Basic Terminology

Public Ledger -- Bitcoin's blockchain is a public ledger. Just like a banks ledger of accounts, it keeps a record of who owns what. Unlike a bank, this ledger is stored in cyber space and is public. Your name isn't associated with the account number, but anyone who knows your account number can look at the ledger and see the current balance and all transactions related to that account. One implication of this is that as soon as you send or receive Bitcoin, the person you transferred it to or from--if they are sufficiently savvy--can find out quite a bit about your other holdings, especially when it comes to Ethereum and ERC20 tokens.

Transaction -- a transfer of Bitcoin. Transactions start their life as a "request" to transfer money until the network confirms the validity of the request and adds the transfer to the public ledger. A transaction is very commonly abbreviated as a "TX" or "tx".

Block -- a group of Bitcoin transactions. Bitcoin collects transactions into a "block" of TXs over the course of 10 minutes. Every 10 minutes, it packages up a group of TXs and commits a block of them to the public ledger.

Blockchain -- a chain of blocks. As blocks are committed to the blockchain, they are added in a linear fashion, one after another, forming a chain of blocks. What makes them a chain and not just a row? That leads us to hashes.

Hash -- a digital fingerprint of something. It's a means of producing a super-unique representation of something digital. A hash of a book would be a short alpha-numeric string that would change drastically if only one letter in the book changed. Each block contains a hash that effectively binds it to the entire known history of the blockchain. More on this later. For now, just remember: hash = digital fingerprint.

In Public?!

It might surprise you to find out that so much of your Bitcoin data is public. This is one of the many challenges with Bitcoin at the moment: way too much information is easily read off the blockchain. In fact, there are companies who analyze that data to figure out who owns what. They then can sell that information to other companies for marketing or even to the IRS. Amazon just filed a patent on this type of analysis recently.

Privacy coins are one of the big topics of 2018 for this reason. I will likely publish a survey of privacy coins in a future issue. For now, just know that there are coins that solve this problem (in a variety of ways), and people are starting to wisen up to the need for privacy.

Lastly, on the topic of public things, how do we know that the blockchain can't just be changed, if it's sitting out there in public? Can't someone just go change it if it's sitting out there? Part of that answer is "consensus", but that's for a future update. The other part of the answer relates to the hash concept we just mentioned a few paragraphs back. A hash is a digital fingerprint, a unique string of letters and numbers that uniquely represent the original thing.

When a new block is committed to the ledger, the hash--fingerprint--of the preceding block is included in the block being committed. Remember, that that block that was just hashed, similarly includes a hash of its predecessor. That means that the blockchain has this chain of fingerprints that links each block, in order, through all of time. If someone wants to change a block, even just 2 hours ago, they would have to redo all the work that was done to generate the last 12 blocks (1 block per 10 minutes), and re-link those blocks via this hashing setup.

As it turns out, the computer time/power needed to do that is so large, that it's effectively impossible to change anything after it's 6 blocks deep (1 hour) in the chain.

This is where you'll run into the term "confirmation". A confirmation refers to another block being added to the chain. When you transact, you'll see your transaction building "confirmations", which just means the number of blocks that have been added to the chain, after the block that contains your TX. You'll get another confirmation every... you guessed it... 10 minutes. While an hour (6 blocks) basically guarantees the "immutability" of your TX, there are plenty of exchanges and wallets that only require 2 to 4 confirmations because the likelihood of anyone being able to change anything even with so few confirmations is very, very low.

Picture!

Ok, you've made it this far. Time for some pictures... Let's see how it looks when you make a transaction request to the network.

Core Blockchain Analogy

A useful analogy for thinking about transactions and the blockchain is a lockbox. The crypto world works via "public/private key pairs". What that fancy term means is also for a future update, but for now, the public key is the one you give out to people so they can send you Bitcoin, hence "public". This is the one you can relate to as your "account number" or Bitcoin "address". This is like a lockbox... something you could key to your choice of code, hand out to other people, and enable them to lock stuff up in a way that they would be sure that only you are able to get at the contents.

A "private" key is like your code to the lockbox. Usually, you won't ever even see your private key, but the website you're using or the hardware wallet you're using is holding it for you. Just know that it's there because it becomes critically important to securing your coin, more about that in a future update as well. Since you're the only one with the private key (code to the lockbox), anything locked in one of your lockboxes is only accessible by you. Notice how critically important keeping this private key secure is... anyone who gets that private key owns everything that was locked up with it...

And the blockchain is like a series of lockboxes strung together, where each lockbox has a piece of paper inside with the serial numbers of all the lockboxes that come before it in the chain (or a fingerprint of all of those serial numbers).

So what does a transaction look like?

Step 1

First of all, when you go read about this stuff, you'll see the same names everywhere, so... permit me to introduce Alice, Bob, and Charlie or Carol. Alice and Bob are regulars. Carol's name changes to some other name starting with a C sometimes. Much less standardized. I digress...

Alice wants to send Bob a shiny gold coin. She gets his public key / Public Address (a lockbox keyed to his private key) from him and locks up the gold coin so only he can get at it, importantly thereby relinquishing her own access to the gold coin (since she also doesn't have his private key).

Step 2

Then she sends that transaction (locked up lockbox) to the Bitcoin network, which we'll describe in a future update.

Step 3

The network verifies that Alice has sufficient funds, packages her transaction up with many other transactions being requested at the same time into a block of transactions, adds the hash that ties that block to everything that came before the new block, and tacks that new block onto the blockchain.

That's it! Well, there's a lot more, but those are the basics of transacting with Bitcoin.

Open Questions for Next Time

  • What's the nature of that network of computers that processes Alice's transaction?
  • What stops Alice from just copying her "digital money" and spending the same coin many times?
  • Why go through all this trouble of storing everything in a public ledger / blockchain, when we already have banks and PayPal and Venmo to provide us money services?
  • My Latest Viewpoint on the Crypto World

The Market Overall

Nothing new to say

EOS

One day closer to launch!
If you haven't registered your EOS, be sure to before June 1st. This, of course, only applies to those of you outside the US, given that no one within the US participated in the EOS crowd sale.
Here are a couple of links from YouTube illustrating the process and made by reputable crypto personalities...
The Awakenment - a channel devoted to EOS
Dallas Rushing - Smart guy who produces great crypto content

Find more from me...

My dTube channel where I host my (growing) free educational videos about cryptocurrency and blockchain. dTube is a blockchain-based version of YouTube. It and it's underlying tech Steem is well-worth checking out and reading about. If you have any trouble with the d.Tube channel, you won't be alone... try the same set of videos on my YouTube channel.

My website, where I have archived these updates as well as where make other announcements from time to time.

If you value what I do and want to support the hours and do and will put into the production of this newsletter and educational videos, you can donate via my Patreon page.

Hoping to Provide Some Clarity Amid the Ambiguity...

Sort:  

Coins mentioned in post:

CoinPrice (USD)📈 24h📉 7d
BTCBitcoin7418.990$2.08%-9.93%
EOSEOS11.889$-2.76%-7.93%
ETHEthereum554.269$3.69%-18.57%
STEEMSteem2.297$-0.04%-25.08%

Coin Marketplace

STEEM 0.29
TRX 0.12
JST 0.032
BTC 62276.80
ETH 3005.63
USDT 1.00
SBD 3.62