What is blockchain?
It is an accounting book of transactions conducted between two or more people, each page of the book represents a block of the chain, which contains the following information:
Page or block number.
Result of the previous block.
Block execution date.
A number represents each transaction between people.
Sum or summary of transactions.
The blockchain book has replicas on thousands of nodes or computers, as of March 29, 2021, there were more than 260,000 full nodes and more than 70,000 pruned nodes, and they can be geographically located all over the world.
Bitcoin blockchain
What is Bitcoin?
(BTC) is the first digital currency, used and distributed electronically.
It is a decentralized peer-to-peer network. No institution or person controls its issuance, spending or reserve.
Each Bitcoin in digital format has a controlled issuance policy in which there will only be a total of twenty-one million units.
Analysis of a block
For educational purposes I will take a block of the Bitcoin chain and see what information it contains:
Step 1: We enter a browser of the Bitcoin chain (a kind of Google), called Blockchair and whose link is:
https://blockchair.com/bitcoin
Step 2: We select a block; I will take block 120,000:
Step 3: From block 120,000 we can see that:
Block 120,000 contains the hash of block 119,999 and 120,001 contains the hash of 120,000. In such a way that altering any of the blocks implies altering the entire chain.
The 256 hash protects the integrity of the information contained in the block:
0000000000000e07595fca57b37fea8522e95e0f6891779cfd34d7e537524471
In article 2, we explain that every data file, by having a hash256, allows us to detect the slightest alteration.
Step 4: Block 120,000 presents a series of metadata such as:
Block processed on April 24, 2011, at 11:20 pm
Contains fifty-six transactions.
Step 5: Next, we present the first five transactions, notice that each transaction has a 256 hash, and select the fourth one to analyze.
Step 6: Transaction number four has a 256-hash number that identifies the transaction:
a7ee0da5061982cb9c2bb95da715a90c3f8a717fa6d2f74a9934825017acaea6
This hash allows to identify if an attacker alters the data of this transaction.
An account sends funds (senders):
1HCfKLEKipVE9tzuPoYPftQgqXE7acDwKL sends 27.32 BTC.
Two accounts receive the funds (Recipients):
1Yapu4N4f64xkrJVQsLLuWwezL4mXZdGp receives 25.33 BTC
1LFSZag1HnRKJngVqUJpY2jZjtyMze7GRN receives 1.99 BTC
Step 7: The data corresponding to this transaction is available through a Blockchair.com browser application, it is available in the JSON (Java Script Object Notation) format, you can read that:
The JSON receives the name “data”
The transaction is:
a7ee0da5061982cb9c2bb95da715a90c3f8a717fa6d2f74a9934825017acaea6
The block: 120,000
Note that the amount of data and metadata is large.
Conclusion:
Cryptography through Hash256 functions, allows to guarantee the integrity of bitcoin transactions through hash A:
a7ee0da5061982cb9c2bb95da715a90c3f8a717fa6d2f74a9934825017acaea6
Every time a user interacts with this transaction, if it causes an alteration in the Bitcoin protocol, it recalculates the hash B and if they are different, it will reject the altered file. This transaction once processed is impossible to modify and we say it is immutable.
Similarly, the hash256 of the 120,000 block guarantees that the block, there is no way to modify it.