Please correct me if any of my details are incorrect, they are probably a little vague, I am just as much as I have been lately trying to understand the premise behind btc.
At the beginning (of the video), he explains how everyone keeps an accounting book, this book contains every transaction. For example, Alice is playing with Bob 0.005 btc, but how do we know that this is a legitimate payment? Maybe Bob added this line to the ledger, to get around this, you need to add a digital signature at the end of the transaction. Each person has a pair of private and public keys. If Alice really wants to pay Bob 0.005 btc, she will conduct a transaction and her private key through a function that will create a digital signature, this signature can be verified by placing Alice's message, signature and public key in the function, if the function returns true, then we know that Alice really intends to pay Bob 0.005 btc. But what prevents Bob from just copying and pasting this line several times? Well, each transaction will have a unique identifier, so the signature will actually consist of the transaction ID, the transaction, and Alice's private key (this is obviously what Alice does). Each user on the network verifies this transaction using Alice's public key, transaction ID, transaction (message) and signature. A transaction is added to separate ledgers if the function that verifies the transaction returns true. No accounting book can have the same digital signature twice.
Okay, that's not exactly what's happening, it's a harbinger, if anything. What actually happens is that each participant of the bitcoin network has a so-called blockchain, this blockchain is a chain of accounting books, each block obviously contains transactions that are confirmed. Blocks are created by miners, blocks containing several transactions are created, the hash / digest of each block must start with a certain number of zeros (they alternate, but let's just imagine that it's 30 for simplicity). By hashing a block of transactions with the hash of the previous block, as well as a special number, it then looks for a hash that starts with 30 zeros, the miner hashes the hash of the previous blocks and transactions with the number, if the hash starts with 30 consecutive zeros, this means that we have found the correct number, and the block is broadcast to every node in the network. The minor also receives a reward.
The chances of finding this special number that gives a hash starting with 30 zeros are 1/(2^30), so each miner basically plays a lottery to try to solve this calculation first( it probably helps to have high-performance GPUs, etc.). When a block is found, it is broadcast to all participants of the bitcoin network, who then add it to their respective chains.
So my next questions are as follows.
How many transactions are there in one block?
When a transaction is made, does the person sending bitcoin to another participant transfer the transaction to the miners? And how does the miner (s) verify that the transaction he / they received is legitimate? (I assume that this has something to do with the digital signatures that I put in the beginning)
From what I can tell, the transaction fee will give the miner more incentive to include this transaction in the block, so if a person decided to pay a higher transaction fee, it means that they have a better chance of being included in this block, hence their transaction will be executed faster, right?
To develop the above question, does each miner receive all transactions? Is it possible that one miner may not receive a certain transaction ( with a high priority ) and solve the calculation without including this transaction in the block? and will this transaction be lost??
And, to further develop the above, how are transactions queued? I mean, how does the blockchain guarantee that no transaction will be lost?
So yes, it can be a long thread :)