A Bitcoin transaction is a signed information that aims to transfer ownership of an amount of Bitcoin from one individual to another. This transaction records all details of the sender’s unused bitcoin, its origin (marked by the transaction ID or transaction hash), the transfer value, and the recipient’s public address. This information is broadcast to the Bitcoin network to get validation. If successful, the transaction will be placed in an online ledger called Blockchain to be transferred. Validated transactions are added to the information block. This block is connected with other blocks to create a block chain (so called Blockchain.)
To better understand how Bitcoin works, I have compiled a detailed guide with the following illustration. I use the name in the example to make it easier to read, but keep in mind that one of the main advantages of Bitcoin is its anonymous nature, so all parties cannot find out each others’ personal information. In reality, only the sending and receiving addresses are needed to be able to complete Bitcoin transactions.
Bitcoin Transaction Input & Output
If Alex sends 1 Bitcoin to Natalie, the transaction is like this:
This is a simple version of a Bitcoin transaction, but we can add information to get a broader picture. For example, source 1 of Alex’s Bitcoin is a payment he got from Andreas, from a previous transaction. What Alex received from Andreas was called Input in this transaction, while Alex’s payment to Natalie was called Output. Input always mentions the source and amount of Bitcoin, while Output mentions the destination and the number of Bitcoin for the recipient, namely Natalie.
Therefore, we can now illustrate Bitcoin transactions like this:
In this example, there is only one Input and one Output. But in reality, Bitcoin transactions can have more than one Input and Output. Bitcoin transactions have a list of Inputs and Outputs, each with its own index or order number for each entry. The number zero (0) is always considered the first entry.
Note the modification of the Input and Output of the first transaction between Andreas and Alex. Andreas has 3 Bitcoin which he received as a payment from a client in a previous transaction. He then sent 1 Bitcoin to Alex. The interesting thing about the Bitcoin protocol is that crypto money cannot be shared. That is, in this example, Andreas could not just send 1 Bitcoin to Alex. The process that occurred was Andreas sent 3 Bitcoin to Alex and then got back 2 Bitcoin.
After receiving Bitcoin from Andreas, Alex had to prove that he really was himself before he could send the Bitcoin to Natalie. The trick is, Alex must “solve” the Input Script with his private key. For more information on private keys, you can read my article about Address and Key Bitcoin.
After that, Alex can use the Bitcoin he has in Input. This cycle continues. Alex had to make a script to solve Natalie so he could spend the payment he received from Alex. Additional information – such as the version of the transaction, the locking time (ie the specific time the transaction was added to the Blockchain), and other specific rules that must be obeyed – are part of the transaction details.
Finally, like any other type of financial transaction, there must be an identification process. In Bitcoin, this process is carried out in the form of a transaction ID.
After the transaction is made, the transaction will then be forwarded to other nodes on the network to go through the verification process. The Bitcoin network node will then investigate the information in the transaction submitted for validation. Is all information complete? Is the amount of unused Bitcoin really available and not yet used? Is there a problem with double spending? Is the transaction signature valid?
If the validation is successful, the transaction will be continued and confirmed then added to the transaction block for the next step. This is the mining phase that must be done so that transactions can be placed on the Blockchain, and this will be discussed in a future article.