Bitcoin Block - what is it and how does it work?
How is the Bitcoin block formed?
Bitcoin Block Structure - Header
Bitcoin Transaction Block Structure
Bitcoin Block Characteristics
A Bitcoin block is part of the blockchains, which is a collection of records of completed cryptocurrency transactions. A block is a piece of or all of the information about operations that haven't yet been reflected in the chain's previous pieces. Each new blockchain 2022 is appended to the end of the chain without the ability to alter it, and its structure contains information about previous blocks.
How is the Bitcoin block formed?
The blockchain and its blocks are depicted in a diagram.
The block structure contains a record of actions as well as the chain's final piece. The inclusion of a personal solution, which is represented in the title, is a unique feature of the following block. The process of achieving the goal takes a long time, and it is carried out by miners, who are network participants who receive a bonus for each new block.
To add a block to the blockchain, you must locate the header's hash parameter, whose indicator is less than the given limit. The miner's job is to sort through the possibilities and select the correct input data. Powerful equipment is employed to solve the problem, including video cards and ASIC chips.
The blockchain and its blocks are depicted schematically.
A record of operations is kept in the block structure, as is the chain's final piece. The presence of a personal solution, as indicated by the title, is a unique feature of the next block. The process of achieving the goal takes a long time, and miners - network participants who receive a bonus for each new block - are the ones who are responsible for it.
To add a block to the blockchain, you must first locate the hash parameter of the header whose indicator is less than the given limit. The miner's job is to sort through all of the alternatives and select the correct input data. ASIC chips, video cards, and video cards are employed to solve the problem.
During the mining process, it is not uncommon for miners to obtain multiple solutions for a single block. As a result, the chain begins to branch. The branch with the longest length will be regarded as authentic in the future, while the other will vanish. If a transaction is on a short branch, it is removed from the chain and placed back in the list of unconfirmed transactions. It is eventually incorporated into the next block element.
Bitcoin Block Structure - Header
the block consists of a header and a list of operations. Header Properties:
Hash - hash (SHA-256 algorithm). This hash is random in nature, so the time of its determination is easy to predict. It is worth noting that only the header is subject to hashing, and this does not apply to operations in the cryptocurrency to buy. The number of transactions does not have a significant impact on the hash calculation.
The hash property of the previous block in the blockchain chain is prev block. The presence of such a feature boosts the network's reliability and makes forgery more difficult. You'll have to repeat the rest if you make changes to one block.
Mrkl root - a list of hashes for operations. The bottom line is that the block hash has a direct relationship with network operations. The purpose is to prevent the forging of the chain. It takes a long time to perform a direct computation with a big number of operations. As a result, the chain's operations are hashed first, and then the hashes are utilized to create block hashes. The requirement for such activities is explained by the following difference: after a new operation is added to the chain element, the hash of the transaction is modified. The header hash is calculated more frequently — up to 3-5 thousand times per second.
The block's main parameter, bits, is a condensed version of the hash value. If the hash of the following element does not exceed the bits parameter, the network recognizes it and adds it to the chain. This setting determines the difficulty of mining a new block. Every 14 days, the number is updated.
The formula is straightforward. The volume of blocks formed in 14 days is first computed, and then the result is compared to the reference value. A block takes 10 minutes to make, as previously stated. The complexity arises as the number of blocks grows, and vice versa. As a result, the system adjusts to the total capacity of the linked equipment and the number of players.
N_tx — the number of operations in the list.
Once is a parameter that is chosen until the hash value falls below bits. At least one of the parameters must be different from the old hash in order for it to be different from the old hash. The version remains unchanged, the preceding block's hash is updated when a new chain element appears, the list of hashes is updated when a new transaction is added, the time is updated every few seconds, and the target parameter is updated every 14 days. A nonce parameter is used to prevent waiting for any of the specified properties to be updated.
Size — the size of the block (measured in bytes).
Bitcoin Transaction Block Structure
The actions carried out in the cryptocurrency network are the next piece of the block. They take the form of a list that joins together to form a block and becomes a link in the chain. The source and beneficiary of the transfer are shown for each item in the list (transaction).
A public key is used to indicate the addressee's information. The recipient creates a new operation in which money is removed from the previous transaction and transferred to a different addressee in order to apply for the credited monies. A digital signature is necessary to prove the right to the transferred funds since it allows the network to verify the validity of each transaction.
The list of transactions in the block is implemented using the following properties:
Hash is a parameter that specifies the operation's hash. This means that the transaction is hashed twice: once when the operation's hash is computed, and then again when the block's hash is computed. In the blockchain chain, the linking of chain elements works. This means that the new block's hash refers to the hash of the chain element before it. A similar approach is used to create the transaction system. The remaining ashes will be destroyed, and the chain will be rejected by network users if you replace the executed action and save the hash at the same time.
Vout_sz — the number of addresses where funds are transferred (may vary from one or more).
Vin_sz — the number of past transactions in which funds are transferred to new recipients (from 1 and more).
Ver - version (still unchanged - 1).
Size — the volume of the operation (unit of measurement — Bytes). The format is JSON.
Loch time is a zero-valued attribute that has not yet been applied. The basic concept is to carry out tasks with a temporal delay. As a result, they are linked to the future or to a particular element rather than the presently running block. The Loch time attribute indicates how many chain pieces must be ignored before the transaction may be enabled. This option could be useful in a circumstance when you need to cancel and re-sign an operation.
A list of transaction inputs is stored in the property. The outputs from the preceding operations (prev out) are used in this step. Each output has its own set of characteristics, including Hash (the last operation's hash), n (the operation's sequence number), and scriptSig. The sender must demonstrate that the money is for personal use. This is accomplished by supplying the preceding operation's public key as well as enabling the private key (ECDSA signature). This is sufficient evidence of the act of spending your own money.
Outputs – a list of the outputs. There are two attributes here, as before: Value and scriptPubKey. The amount of money paid to the addressee is the first item on the list. Because the data is based on previous transactions, the total number cannot exceed the number of transactions that have already been completed. Nanomonets are used to write the Value property (this is done to exclude the appearance of fractions). The second attribute denotes a particular scenario. It comprises a language operator and a hash of the public key. The goal is to examine the transaction and certify its legitimacy.
The entire quantity of monies at the time of a cryptocurrency transaction monitoring is the same as the number of coins at the time of the transaction's conclusion. The payout is half every four years, which helps to keep the amount of bitcoins in circulation stable. If a fraudster replaces a block and allocates 100 coins, the new one will be rejected by honest network users and will not take root in the chain. As a result, the more users the system has, the more reliable it is.
Bitcoin Block Characteristics
The main characteristics of the Bitcoin block:
Block mining occurs every 10 minutes.
Each block can hold no more than one megabyte of data. Although the cryptocurrency code specifies a bandwidth restriction, the bandwidth stays high. The data volume will be increased to 2 MB after optimization. Bitcoin Cash, for example, has an 8 MB volume.
Up to 3-5 thousand processes involving two wallets with a limited number of outputs and inputs can be accommodated in a single 1-megabyte block. The network bandwidth is currently set at seven operations per second. The lack of this signal is becoming increasingly visible as the number of users grows, leading to the creation of Bitcoin Cash.