2

(I tried to make a more specific question, but is a bit confusing to me. Sorry.)

When a miner calculate a hash, where exactly does he send to in order to validate it? To all the nodes in the network?

Which protocol does it use to send this hashes? For example, HTTPS requires a trusted third party to sign server-side digital certificates, but there is no "server-side" in a decentralized network.

Why is not possible for a hacker to intercept all the hashes been sent by a miner or pool, and send it all himself as if he was a miner?

3

Miners don't send hashes, they send blocks. Blocks are public information to be broadcast to the entire network. When a miner completes a block, he sends it to nodes that he is connected to. Those nodes verify the block, and if they find it to be valid, they will send the block to the nodes that they are connected to. This peer to peer gossip is how blocks and transactions reach every node in the Bitcoin network.

An attacker an intercept a block, but that won't do anything for him. He would just become another thing relaying the block to nodes on the network.

Miners aren't paid by submitting aa block to something specific. They are paid by including a special transaction in the block which pays them Bitcoin by essentially creating them from nothing. There are rules about what amount this can be, so if it doesn't fit those rules, the block is invalid. The miner essentially pays himself and the rest of the network agrees on whether he is entitled to that payment. An attacker intercepting this cannot change the miner's payment without having to completely redo the proof of work, i.e. mining the block themselves.

3
  • 1
    I'm not sure if I understood, you said "Miners don't send hashes, they send blocks", the miners keep searching for a number that gives de correct hash (something like this sha256(sha256(data+nonce)) < difficulty), this is the block, right? Let's suppose I've found this nonce that makes the hash for the true return on the equation, where and how I'd send it? I'd send to a Pool? Using which protocol? TCP? HTTPS? A hacker couldn't sniff this post and change my request to an invalid hash then send my valid first claiming the reward since he got my POW before claim it? – Lucas Araújo Jul 31 '20 at 15:30
  • 2
    The miner hashes a block header. The block header contains a hash of all of the transactions in that block. It also contains the nonce which is what miners are primarily changing when performing the PoW. When they find a block header that meets the PoW rules, they send the block using the Bitcoin P2P protocol to other nodes. The reward paying them is a special transaction in that block. Changing that transaction would mean redoing the PoW. Hence a MiTM can't steal the reward. – Andrew Chow Jul 31 '20 at 15:38
  • 2
    @LucasAraújo inside the blockheader they hashed, miners put in the Submit block a coinbase transaction and that special transaction will send the reward to an adress from miner's wallet, so even if hacker send the share, the reward will be sent to the miners and not to the hacker – Hamita Aug 2 '20 at 16:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.