Looking for high-level answers on some of the mechanics behind consensus concepts

1 answers
1 votes
Looking for high-level answers on some of the mechanics behind consensus concepts
1) Can someone explain to me what peer-to-peer actually means, both apart from and in the context of block chains? P2P wasn't invented with Bitcoin was it?

2) What is a merkle tree and how does it work in the context of Bitcoin? What does it do? Why is this concept important?

3) In digital signatures, how is it possible for me to sign a transaction with my private key and not have it publicly shown to everyone?

Best answer

Expert Answers

newest most voted

1. Peer to Peer is basically an economic model where end-users who own a particular product make it available to another individual who might be interested in purchasing that product. This is different from B2P (Business to Peers) and B2B (Business to Business) where in the first, businesses sell to consumers (say buying an iPhone from Apple), or businesses sell to businesses (think milk factories supplying milk to cheese factories). A simple example of P2P would be cars being put up for sale on online platforms where car owners can sell their cars to someone wishing to buy them from someone instead of a showroom, eBay where consumers sell their owned items on the internet to someone who needs it, etc. So, yes, P2P wasn’t invented with Bitcoin but as a computing term was definitely popularized through Bitcoin. However, existing platforms that used P2P include torrent platforms like BitTorrent that rely on users connected on the network for file-sharing rather than directly from a centralized server.

2. Think of merkle tree as a way of summarizing all transactions in a block of a blockchain. Consider four transactions: TxA, TxB, TxC and TxD. Assuming these are the only transaction that go into blockchain blcA, then we can form our merkle tree by hashing the transactions together in pairs until we are left with one transaction at the end, known as root hash that represents the entire block summary. Since we know that even a single character change in the content to be hashed can cause the hash to be drastically different, just by looking at the merkle tree it can be ensured whether the transactions inside of it are valid and have not been meddled with since through butterfly effect it would cause all the hashes leading up to the root hash to change.

Here is how a merkle tree would look like (where H() is the hash function. H(TxA) represents hash of TxA and so on):

Tier 0: TxA, TxB, TxC, TxD
Tier 1: H(TxA), H(TxB), H(TxC), H(TxD)
Tier 2: H(H(TxA), H(TxB)), H(H(TxC), H(TxD))
Tier 3: H(H(H(TxA), H(TxB)), H(H(TxC), H(TxD))). (The root hash for the blcA).

3. When you are digitally signing a transaction, your private key is used for encryption, you are basically hashing your transaction with your private key, Since it is a property of the hashing function that is non-invertible, that is for a function f(x), given a value of f(x), you can not derive the value of x, it is not possible to invert or reverse engineer the hash to produce the private key.

There is also a detailed guide on public-private key cryptography here on Blockgeeks.

Hungry for knowledge?
New guides and courses each week
Looking to invest?
Market data, analysis, and reports
Just curious?
A community of blockchain experts to help

Get started today and earn 4 bonus blocks

Already have an account? Sign In