One more question for the community.
Is the main job of the miners is to solve the POW puzzle (by guessing the Nonce)? o
Is the integrity of the transactions done automatically (programatically) by the blockchain code or manually (who is doing it)?
Non-mining nodes donāt propagate blocks. only mining nodes do when they found a nonce that fits the puzzle (having a hash below the target) . Non-mining full nodes just validate each transaction, blocks,ā¦ ect.
So full non-mining nodes are important because they check and validate everything and makes the network more secure. But they donāt get a financial reward for it.
The more full nodes, the safer the network. Because it has more nodes who can identify a malicious one.
What exactly is your concern with time?
Miners are guessing a number (nonce) until some number produce a blockhash below the target. (starting with certain amounts of zeroās.
The bitcoin wallet software constructs a block automatically with transactions with the highest fee. But you could construct a block manually as well and then finding the right nonce for it.
The time in a blockās header should not be before the time of the median of the last 11 blocks in the blockchain. I understand this to keep the block times moving forward.
But what I donāt understand is that why the time is allowed to be 2 hours ahead of the median network time. A nefarious miner can add 5 minutes to every block they create in order to influence the difficulty level in the next adjustment period. If 5 minutes can make this difference, then why allow 2 hours?
In reference to my question about time:
My concern is the allowed range of block time:
Min: median time of previous 11 blocks
Max: median network time + 2 hours
Why is the max block time set as such?
Thanks for the reply @Fabrice but I still donāt get it.
Are you saying that a non-mining node propagates the blockchain for the sake of making the network secure solely? No compensation or reward is expected by them?
Bitcoin mining difficulty adjusts overtime to always have an average of 10 minute blocktime.
The 10 minute blocktime is chosen as a compromise between fast transaction clearing and the probability of a fork to occur. If a miners solves a block it needs to propagate through the whole network so all nodes have time to sync.
yes, non mining nodes donāt get a reward and syncs with the blockchain from other nodes. Itās more for users to be sure they use the truth blockchain to transact without the need to trust others. If you use an SPV like mycelium, you need to trust other nodes to Transact bitcoin.
I just finished the wallets lesson and have a question about hardware wallets. Ivan was discussing that a HW wallet holds the PK and never gives it to the computer. Now I just happened to use my Ledger Nano S to withdraw mining funds from Nicehash. I ran Ledger Live to generate a deposit address. This address was then copied into Nicehash so the funds could be deposited. In this context, whatās happening with the private / public keys and digital signatures. How are they relevant?
in this context, your ledger will generate a new address using your private key and display the newly generated address. thatās all. If you send bitcoin to another address, your ledger will sign the transaction after you confirm it on the device. This signature leaves the device. Your private key never leaves the device. The signature does leave the device and cryptographical proof that it belongs to your private key (without reveiling it) and that you can spend these particular bitcoins. your wallet basically needs to unlock bitcoins that your private key owns.
Here is a video explaining the basics of hardware wallets:
https://youtu.be/J0Rh6kt-AXY
Thanks, that video is good, but I guess it helped me realize what Iām not understanding with bitcoin transactions in general. So my wallet (software or hardware) will use my private key to sign a transaction so that itās provable that the request came from my wallet. At what point in time is my public key used (and how it is accessed, and by whom) to verify that the transaction came from me? Does this question make sense, or should I try to figure out another way to rephrase it?
It was stated that all of the TXs in an orphaned block are returned to the mempool.
Question: Is this really true, since some of the TXs in the propagated (longer) blockchain could have also been in the orphaned block. Please explaln. Thanks!
Yes, they will go back to the mempool. some transactions could also be included in the other block wich will mark them as comfirmed once the node gets the information synced.
The public key is used to ensure you are the owner of an address that can receive funds. The public key is also mathematically derived from your private key.
Yes, I understand that the public key is derived from my private key, but itās done in my wallet. So I guess what Iām asking is, at what point does my public key get transmitted to the nodes so they can verify that my tx is valid and that Iām the one who really requested the transaction?
you donāt just transmit your public key. itās used to generate an address and is also part of unlocking your bitcoins locked on that public key.
all nodes validate each transaction that is submitted to the network. but only your keys can unlock these bitcoins to spend it again.
In bitcoin programming course you will learn more about how batches of bitcoins are locked and how you can unlock this using your keys and spend it.
Watch this amazing presentation about keys and addresses in Bitcoin. (in dept)
Incredible Blockchain that delivers protection, security, and privacy. The use of cold & hot storage wallets, exchanges, tokens, applications, and coding necessary to bring decentralized methods to everyone. Iām pumped! Iām pumped! Go! @ivantechacademy
Its kind of like handing bank notes over at a teller in a branch is it not?
Hi, Iād like to know when the miner gets his award in the context of orphan blocks. It seems that he canāt be awarded immediately after appending the block.
you are right, the miner of a stale block wonāt get the blockreward. Thatās also a reason that miners need to wait for 100 blocks until they can spent it.