The problem of the Byzantine generals revolves around information technology and the consensus mechanism of many blockchains. It was originally implemented on Bitcoin. BTC aims to eliminate trust in third parties during a transaction. Byzantine Fault Tolerance (BFT) is also used on Proof Of Stake blockchains such as Cosmos (Tendermint BFT) and Terra. This is a problem that was theorized by mathematicians Leslie Lamport, Marshall Pease and Robert Shostak in 1982.
THE PROBLEM OF THE BYZANTINE GENERALS
You think if some generals attacked an enemy city. Each general commands his own army and they are scattered around the city. There is no central command, so each army is practically autonomous. In the problem of the Byzantine generals, coordination or lack thereof determines success or failure. In this case, an agreement is sought to attack the enemy or betray (by running away). When to attack or hold the position? This requires the formulation of a strategy to determine the success or failure of a decentralized distributed system.
As there is no direct link to communication between the generals, there is no coordination.
Even if there were links, they are not reliable as we have no guarantee that the message will reach its destination. There is distance between the armies. Coordination is necessary to carry out the attack plan so communication is needed. Each general takes orders from his king who formulates commands that must be carried out.

COMMANDS OF THE KING
Suppose the king had issued an order to attack the city. In order for the message to be transmitted, the king sends 2 messengers to each general. If there are 10 generals, we will have 20 messengers. The second messenger is actually a backup of the first messenger. Now here is the problem. What if the messengers were spies and instead of delivering the attack message, they changed it by saying to retreat? What if some messengers are ambushed? What if the generals don't get the message to attack?
What if one or more generals were a traitor and decided not to attack or even attack his comrades by helping the enemy? In case no message is received to attack, should the general still attack? Logic would say no but if you don't attack you may miss an opportunity to do so. If you do not attack, but the others do, you will be subjected to subordination for not obeying the king's orders. The general can be severely punished, which is why critical thinking becomes important in situations like these.
SOLUTION TO THE PROBLEM
The solution is to have a protocol that uses tolerance measures for these problems. Adopting a protocol is the best way to make decisions in the face of uncertainty.
Here are some actions the generals might take:
- No general has received an official message from the king to attack, which means to hold the position and not to attack. After a certain period has elapsed and no messages have been received, the generals can withdraw
- To trust the king's order to attack, the general can verify the messenger's message by asking for a secret phrase (which only the generals and the king know, apart from the messengers) to prove that the message comes from the king.
Does this situation remind you of the concept of asymmetric cryptography (PGP)?
1) Public key (used to encrypt the message; this key will be used by anyone who wants to send you an encrypted message)
2) Private key (used to decrypt the message; this is secret and is used to decrypt the message someone sent you using your public key)
To give an example, I want to send a "Hello Publish0x" message, I use a public key and the message becomes encrypted:
----- BEGIN PGP MESSAGE -----
wcBMA + 97 + Y4XyCSBAQf9F8sYmaBb9N3Jmrvgu2Gr9uP1aGyCjRDmKDv6C2FP
BPeyQw2mUkb4kH / + 4dsHEVcEWpfPJYMhw2H + lCa4nRfHioMGpxWEGV + CqqdV
8OCipc8FsUYG2x7WC + KVNed + 8Uc5lWb7CCgorqRfks3FW3zvnX5N + O6J0KvR
xv4sZm / FgWNCC2U99UswljMpPwoPeouOBdnpS88 / T81MErc4jv1nlgK7GUdZ
Fdy / 2yGYqsTSpB8e1srGNcKGPkI7VuqeEgED3MktD2v677ciLR6MvaeHdyya
OtzDPcDMaYsrAtuIfm6tDeTQR / tQmQ9Jpu4FaLr6Rc2paXB03d4psAcQgsHb
g9JHAfJKiE2KPAjf4PGD2 + PIEm8cCHjqXvHR0LyRvAY0jBdM2HtDbXNZuYYU
mBwkhFPh43LrTPSIOjg4JNn1ixiAIvdxibxv / lw =
= qL0W
----- END PGP MESSAGE -----
The message recipient's public key is used to encrypt the plaintext of the message. The recipient of the message then decrypts the message using his private key. Once you have your PGP key pair, you can give everyone your public key (this does not compromise its security). This is also how the private key and public addresses of a non-custodial wallet work. You always provide your address (public address) and then the private key is used to decrypt the code that arrives (even to recover your crypto if your device breaks!).
- However, the message must be received by at least one of the two messengers sent by the king.
To coordinate an action, a cavalier could use a raised banner that indicates to attack all other generals. This means that a banner identifies each army. However what happens if an army does not receive the attack message? The generals might agree that if at least 3 of the 5 generals raise their banner, the attack order is legit so they continue. Loyal generals will obey their king's orders and carry out the plan. The more messengers you have, the more likely it is that the message will reach the generals. If there are more loyal generals following orders, the better the outcome.
BITCOIN AND THE RESOLUTION OF THE PROBLEM
Bitcoin is innovative because it uses a reliable and authorization-free system. What Satoshi Nakamoto developed was a way to implement the solution to the "problem of the Byzantine general" in a digital electronic network using cryptographic security and public key cryptography. Cryptographic security involves an encoding process called hashing to prevent data tampering: each hashing represents a certain alphanumeric string, vary a single character, change the sequence. Public key cryptography verifies the identity of a user on the network. A transaction is placed in a block that connects to other blocks via its hash value. All hashes can be traced back to an initial block which is the root of all hashes. This has become known as a blockchain and uses a "Merkle Tree" to verify hashes that originate from a primordial block. All subsequent blocks follow the genesis one. The blocks are validated by nodes called miners, who compete with other miners to solve cryptographic puzzles to produce blocks as part of a consensus mechanism called Proof Of Work. The miner who is able to solve the problem by finding the exact hash receives a reward for her contribution.
Users who are part of this network must have a key pair consisting of a private key and a public key to verify their identity. The private key is used for digital signatures that authorize a transaction. Only the owner of the private key has this privilege and no other users. Public keys are derived from private keys. From the public address a user is identified on the network. The Nakamoto Consensus is a mechanism that tries to solve problems in an environment without trust and without authorization.
In this case the miners represent the generals. Each node validates transactions, which are like messages sent to generals. The enemy can be considered a malicious hacker or miner who wants to attack the network.
Messages use encryption to make attacks difficult. Messages or transactions are packaged in chunks and then hashed to prevent tampering. Satoshi makes things more probabilistic by having the miners compete with each other to try and validate blocks. Miners have to compete using their computing resources (called hashrates) to solve a puzzle. The higher a miner's hash rate, the more likely he is to solve the puzzle. This also depends on the difficulty coefficient. Input and output of the hashing function (SHA256 Online)

Validated blocks become immutable and hash-protected so that attempts to modify transactions can be avoided. The consensus is obtained when the miner who solved the problem transmits it to the network, all other miners must validate or deny it (if the value is incorrect). The correct value must be equal to or less than what is called the coefficient of difficulty. In this case, hashing also consists of a variable part, called a "nonce". Mining basically means finding a hashing below a certain threshold and spending energy (producing work that leads to network security). Mining therefore leads to the resolution of the condition imposed by the coefficient of difficulty. The verification takes place through the "nonce" inserted in the block: the hash of the output is verified from the input (ie the block is validated).


The blockchain is also decentralized, which means there shouldn't be any central point in the system. The blocks are stored in a distributed database which is copied to other computers on the network. This redundancy also helps provide fault tolerance, so that no failed computer can shut down the entire system. It's like having multiple messengers in case a messenger is ambushed by the enemy. The message will not be lost as other messengers will have a copy. In the real world, transactions take place between people who don't know or trust each other. The unit of measurement of the network is the terahash / second (at least 10 to 12 operations in a second, by each miner). More miners means more hashrate and therefore more chances of finding the correct nonce. The incentive is Bitcoin. As the hashrate (hash per second) increases, the difficulty increases.

A blockchain provides a layer that you don't need to trust in a person. This happens thanks to the consent of a network of nodes that validates the truth before it is recorded. If the general is unsure of the content of the message, it can be verified by the other generals based on what they know. Once registered on a node, a copy is sent to other nodes that are part of the network so that the information becomes redundant. This is the purpose of the PoW consensus algorithm.
The information isn't always perfect, and the bad guys will always try to trick the system. In this case, encryption was required so that it is not allowed to modify the messages. The system provides key pairs to digitally sign a message and to verify identity as proof that it comes from who it claims to be. Once validated, messages are recorded forever, which provides historical proof of that responsibility. For this you should be bullish on Bitcoin. Bitcoin is the future.

#LaserRayUntil100k
If you would like to use laser eyes by editing your photo, you can do it here: Memed (Laser Eyes)
Are you interested in ways to earn crypto bonus? Check it out here: Some Sites To Earn Crypto Bonus (Old & New)