Exploring the Blockchain - How does a Blockchain Transaction work behind the scenes?!

in crypto •  2 months ago

Today i wanted to share some insight about the Blockchain with you guys. I tried to make this complicated process as easily understandable as possible.
So lets go through a transaction example:

Bob wants to send assets to alice
------------------------------------------
Therefore he signs off a transaction to her using her wallet address (something like this: 0xC964A459fc06AF09cd9cFe993761F558073F7864). A hash of a public key address

This transaction is signed by Bobs private key

The transaction is picked up by the Blockchain network (Peer2Peer Network) and is inserted into a 'pool of unconfirmed transactions'

Miners on the network (often referred to as nodes) select transactions of this pool and place them in their block. //Comment : Show whats inside a block

Every miner has his own block but they can contain the same transactions. A bitcoin Block has a maximum size which is 1 MB at the moment

Before that however the miner checks if the senders address has sufficient funds according to the Blockchain

When the Block is filled with transactions the miner will start to solve a unique mathematical Problem to that specific Block. Blocks are different , but difficulty is the same.


-----------------------------
Mathematical Problem:
• The mathematical Problem the miners are trying to solve is finding a corresponding hashfunction to their specific Block.
• Thereby the input of the Hashfunction is all the transactions of the block and some corresponding metadata.
• In bitcoin for example a correct hashfunction has to have a certain amount of starting zeros.
• The more the harder.
• If the hash output doesn't have enough zeros it changes a part of the data inside the block called the nonce.
• So long until either he finds the correct hash input or another miner finds his corresponding one.
• It is so energy intense because guessing that many hash functions takes up a lot of computational power.
• All this is done to avoid miners spamming fraudulent blocks hoping one of them gets accepted by the network
• Imagine email with proof of work


The miner who solves the mathematical problem first broadcasts his solution tho the other miners

The other miners now check again of his proof of work has the correct solution and if all transactions are still valid according to the Blockchain

If the majority of the miners reaches consensus the Block gets added to the Blockchain.

Every new Block on top equals a new confirmation. Meaning it gets harder and harder to alter that specific block.

When this new block is added all miners go back and fill their Blocks completely new. Why? Cause of similar transactions and the pointer to the previous hash.

Hope it helped you understand a bit more about Blockchains and what we are doing day in and day out!
Here's another graphic:
--------------------------------
sources:
https://medium.com/coinmonks/how-a-miner-adds-transactions-to-the-blockchain-in-seven-steps-856053271476
https://bitcoin.stackexchange.com/questions/53649/what-happens-to-private-key-on-payment
https://bitcoin.stackexchange.com/questions/8031/what-are-bitcoin-miners-really-solving

Best regards
Orlando

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Hi! I am a robot. I just upvoted you! I found similar content that readers might be interested in:
https://medium.com/coinmonks/how-a-miner-adds-transactions-to-the-blockchain-in-seven-steps-856053271476

·

Thanks got this under my sources.

good post hi I follow you follow and vote back me