Here, we try to explain quickly the different concept
To ensure that no more than one person can publish a block at a time, only the first person able to solve the current problem can.
We are given:
The goal is to find a nonce (a random number) such as the number of leading zeros in SHA256(hash_last + hash_new + none)
is greater or equal to the current difficulty.
For instance 000000c13fa4c07a6d7983ee14619bd71f2ea4001c2c6dba9ab79da4920d5c
, I have six leading zeros.
TODO: how the miner get rewarded. SHA256 => 32 hex => 16 octet
Number of “proof of work” test done by the whole network per second, i.e., the number of time SHA256()
has been done.
The current hash rate was 620 EH (10^18).
It means that over 10 minutes, a maximum of np.log2(10^18 * 60*10)= 69 bits
can be tested.
With the current difficulty:
Last block hash with 19 leading zeros => 76 bits, 0000000000000000000256491fdd7cc579979b0b3f2397a73aac597ffebe8237
Proof of work is the most known because of bitcoin. There are many other alternatives
The more hardware and electrical power you have, the better you win.
Proof-of-stake: the more you own (and invest) in the network, the more power you have. This is equivalent to traditional exchanges where when you have shares in a company, you get coupons every X and you have a right to vote.
Proof-of-authority:
Proof-of-space
Proof-of-location:
https://docs.witnesschain.com/depin-coordination-layer/proof-of-location/introduction
Proof-of-ownership:
https://github.com/satoshilabs/slips/blob/master/slip-0019.md
When a transaction is signed, i.e., when I say to the network “I want to send X BTC to Bob”, my transaction is not instantaneously processed.
The miners will hear that I want to do a transaction. Miners are currently working on a block, so they may not add my transaction to it. Plus, there might be other transactions waiting to be processed. Therefore, my transaction is on a “waiting list” called the mem pool.
With Bitcoin, we quickly discover that security has a price, which is network capacity. Because of the proof of work, we are limited in the number of transactions. This is why some other blockchains appeared, with other consensus mecanisms. Yet, there is still some limitation or other drawbacks. And Bitcoin has not been left, so people search for a way to improve network capacity. Here comes the layers.
Layer 1 is the “real” / low level blockchain with its “small” capacity but all the garantees.
Layer 2 is a set of protocols / other mecanisms working on top of layer 1, where transactions are done “off-chain”, i.e., they are not recorded in the blockchain’s blocks.
Layer 3 tries to increase the capacity of level 2 using other mechanisms.
Today (2024), we are talking about this 3 layers architecture. Nevertheless, layers 3 do not exists at all, and layer 2 are experimental / in progress but not democratized. The most known layer 2 is the Lightning network 1, which allows doing bitcoin transactions thanks to bitcoin smartcontract and peer-to-peer network.
It is good to have big numbers in mind
Number of transaction in a block: 6400 (when 1.4MB)
Exchanges are marketplaces where you can exchange cryptocurrency against something. In the regulated ones, you can buy crypto using fiat money or to sell them. You can also exchange one crypto currency (say ethereum) against another (for instance dodge coin). In some specialized exchanges, you can buy NFT
In decentralized exchanges, you cannot use fiat money, but
Decentralized exchange
Unless you are able to mine cryptocurrency, you ca
Traditional currencies like Euro, Dollar, Yen, etc.
They are issued by a government and not backed by a physical counterparty like gold or silver.
Money conversion direction:
A wallet is a “place” where all your private keys are stored. A wallet can handle multiple cryptocurrency at a time (Bitcoin, Ethereum, …) and for each crypto, you can have multiple private keys. From each private key we are able to derive the corresponding public key and address.
https://strm.sh/posts/bitcoin-address-generation-in-pure-python/
TODO: illustration
A cold wallet is not accessible online. It can be a sheet of paper with the key writted in, a physical device (like Ledger), a file in a floppy disk or in your computer. Each time you want to use it, you need to load it. In terms of security, this is the best choice, as no one can steal it remotely. The main drawback is that you are responsible for it, there is no recovery possible in case of disaster (loss or other)
A hot wallet is stored online, usually thanks to a third party.
A wallet is custodial if you do not manage the keys of your wallet. Most of the time, when you use an exchange, you do not have access to the private key, and everything is accessible thanks to your email and main password.
A non-custodial wallet is a wallet that you manage yourself.
Private keys or wallet keys are a list of bits. They can be read thanks to hexadecimal formal (you look at 4 bits at a time and convert it as a alphanum charecter in 0123456789abcdef
).
Nevertheless, this is quite difficult to remember, or to copy (in a paper notebook for instance).
In BIP39 has been introduced a way to convert the private keys into a list of human readable words. BIP39 wordlist
Each word represent 11 bits
of the key.
This words are common, so their writing cannot be mistaken, and they have been choosen such as all four first letters are different.
In Bitcoin, a private key is 256 bits
, so you would need 24 words
to represent it.
TODO
## Hierarchical Deterministic Wallet
Rather than having many private keys to remember, another option is to have a master key and to derive all private key from it. TODO
For Know Your Customer.
The idea of bitcoin was to do transaction without sharing your identity. Anyone can create a cold wallet at no cost. However, it is empty. To get some coins, you need to exchange fiat money (€, $, £, …) against tokens/coins. To do that, you need to provide your identity (ID card).
Bitcoin Improvement Proposal
List of proposal (some are draft, other accepted or rejected) to improve the Bitcoin protocol.
As it exist for “normals” protocols with “RFC: Request for Comment”.
2048
words (one word represent 11 bits
) which can represent your private key passphrase to get your private key / wallet unlocked. Words should be short and common. The four first letters are different for all words. From the wallet private key, you can issue several public key for different cryptocurrency. For a wallet: 12 words
. Therefore, the key is 11 x 12 = 132 bits
longEthereum Request for Comment
Same as BIP, but for Ethereum.
The most known are:
# Smart Contract
This is a piece of code which can be executed during a blockchain transaction.
Within a blockchain, it is useless to run for instance a code doing image segmentation as there is no value. As a blockchain is a set of addresses and currency with verifiable properties, the codes are “contract” which gives credentials / prove the ownership of something to someone.
Non-Fongible Tokens.2
This is a particular type of “digital object” created thanks to smartcontract.
Interaction are done with the smartcontract.
To a digital document (image, text, or anything else) is given a signature and the possiblity to be owned.
The Smartcontract defines:
Lyfecycle of a token.
>> You can subscribe to my mailing list here for a monthly update. <<