Public key and private key
Public key - it is a cryptographic key that can be used by any person to encrypt the message but it can be decrypted by the intended recipient with their private key. Public key is simply the deposit address that you send cryptocurrencies to. You can share it with other people.
Private key - is a number used in cryptography, similar to password. It is used to sign transactions in the blockchain and receive access to the wallet. Do not share it with anyone.
Let’s imagine that person X wants to send to person Y an important message with confidence that nobody would read it. Unfortunately, both of them live far apart. Person X came up with the idea to buy a box with a self-locking padlock and the key. X ships to Y empty box and open padlock with a request to put the message inside and close the box using the padlock. X does not worry about sending the open padlock (it is his public key) using the post office, because that padlock can be shared to everyone. The key to the padlock cannot be, it gives an access to the box. (it is a private key)
Fees
Each transaction requires transaction fees. It is the reward for miners for verifying and validating transactions and keeping the blockchain secure. Transaction fees can be set manually. They are charged as a certain amount of the cryptocurrency which is being sent. Obviously, the higher fees you pay, the faster your transaction will be completed. If they are too low, the transaction can never be validated because it is not profitable for miners. If it is too high than needed, the transaction will be validated immediately, but you will not receive a refund for the surplus.
Transaction fees encourage miners to join the network and to keep the blockchain secure. They receive it as a reward, just like for creating a block. A group of unconfirmed transactions is called a memory pool. Those with higher fees, will be completed faster than others. Bitcoin transaction fees depend on the transaction size. Each Bitcoin block can contain a certain number of transactions whose space is below or equal 1 MB. Due to limited space, it makes a rise in fees which miners collect.
How do Bitcoin transactions work?
Just like cryptocurrency wallets do not store cryptocurrencies, crypto transactions are not crypto transfers, like in banks. As it was described in the paragraph about private and public keys, a crypto transaction is actually transferring the right to use a certain crypto or its fraction. Each participant of the Bitcoin blockchain has pairs of public keys and private keys that control an amount of Bitcoin they own.
Although it would be possible to handle coins individually, it would be unwieldy to make a separate transaction for every cent in a transfer. To allow value to be split and combined, transactions contain multiple inputs and outputs. Normally there will be either a single input from a larger previous transaction or multiple inputs combining smaller amounts, and at most two outputs: one for the payment, and one returning the change, if any, back to the sender.
- Satoshi Nakamoto
Let’s move into the example of the Bitcoin transaction. Mike wants to send 0.5 BTC to Alice. Before that, Mark has already received 0.3 BTC from Alice and 0.3 from Paul. So, there might be two inputs - both worth 0.3 BTC each but received from different wallets. Amount is equal to 0.6 BTC. Then, we have two outputs - the first one equal to 0.5 BTC and the second one worth 0.1 BTC which is the change returned to Mike. The second output is calculated as the total of inputs, minus the amount Mike wants to send.
The private key creates a digital signature to announce this transaction to the network. Then, the network confirms if you own enough Bitcoin to make a transaction for a certain amount. After that, the transaction is broadcasted to the network where nodes verify that the sender's private key is able to access inputs.
You can read more about transactions in an article about cryptocurrency mining.
Bitcoin transaction on the blockchain
Let’s analyze details of the transaction linked here.*
On the first screenshot, you can see the hash, amount, fees, inputs and outputs addresses of the transactions. If you do not remember the meaning of those words, check this article.
Hash - unique identifier used to identify a particular transaction.
Status - information whether the transaction is unconfirmed or successful.
Received time - Time this transaction was broadcast to the network, YYYY-MM-DD.
Size - Total size of this transaction
Weight - A measurement to compare the size of different transactions to each other in proportion to the block size limit
Included in Block - Block this transaction was mined and confirmed in.
Confirmations - Successful act of hashing a transaction and adding it to the blockchain.
Total input - A value of all inputs in BTC
Total output - A value of all outputs in BTC
Fees - Total fees paid to process this transaction.
Fee per byte - A value of fee per byte in satoshi (1 satoshi = 0.00000001 BTC)
Value when transacted - a value of sent Bitcoin at the moment of validating transaction
Bitcoin block on the blockchain
Hash - Unique identifier used to identify a particular block
Confirmations - Successful act of hashing a block and adding it to the blockchain
Timestamp - Determines the timestamp when the block was added to the chain
Height - Number of blocks connected on the blockchain
Miner - Who confirmed the transactions in the block
Number of transactions - Number of transactions included in this block
Difficulty - Mathematical value of how hard it is to find a valid hash for this block
Merkle root - The root node of a merkle tree, a descendant of all the hashed pairs in the tree
Version - Block version related to protocol proposals underway
Bits - A sub-unit of BTC, equal to 0.000001 BTC
Weight - A measurement to compare the size of different transactions to each other in proportion to the block size limit
Size - Total size of the block
Nonce - Random value that can be adjusted to satisfy the proof of work
Transaction volume - Estimated total amount transacted in this block
Block rewards - Static reward for the miner who calculated the hash for this block
Fee reward - Amount of transaction fees rewarded to the miner for calculating the hash for this block
*https://www.blockchain.com/btc/tx/93567c520db7d25f53ac601175fbddfb40970132873a33e0046ec61e55063dfb
Comments
0 comments
Article is closed for comments.