1

I looked at the question on how transactions are broadcast to the rest of the network in the blockchain network. In this stack exchange post, the author @morsecoder in the accepted answer mentions that :

Think of it like how gossip would spread. There are a bunch of people (nodes), and when one of them knows something, they tell it to the few (8 or so) people they are near (connected with), and then those people tell a few more people the message that was told to them, and then... Eventually everyone knows about the original information (transaction).

But what if all the eight nodes to whom a given node send the transaction are malicious/faulty? And all of them change the message in the original transaction. Wouldn't it allow for wrong transaction to get merged in the blockchain network?

Also, once any given node sends the transaction it received to its peers, how does the network know that majority of peers have received the correct transaction and it's ready to get merged in the main chain. I'm not talking about the bitcoin network here. So, I'm not worried about the PoW for now. I just want to know that when a node sends the transaction it received to its peers, the peers send it to their peers, how does the network keep the count of which transaction has been accepted by how many nodes?

  • When you say "in the blockchain network", do you mean in the bitcoin network? Because different blockchain networks handle sybil protection differently. – David Schwartz May 15 at 16:52
1

But what if all the eight nodes to whom a given node send the transaction are malicious/faulty? And all of them change the message in the original transaction. Wouldn't it allow for wrong transaction to get merged in the blockchain network?

Transactions have signatures that sign the whole transaction (except signatures. Signatures are added after the transaction is signed). Signatures prove authenticity so it's impossible to change the transaction without invalidating the signature check.

I just want to know that when a node sends the transaction it received to its peers, the peers send it to their peers, how does the network keep the count of which transaction has been accepted by how many nodes?

There's no count of acceptance. Every node keeps its own mempool which is a list of transactions that could be included in the next block.

PoW is about making blocks. When a block is broadcast, the transaction becomes the part of the immutable blockchain (unless that block is orphaned (replaced by another block.))

If the only nodes you're connected to are malicious, the worst thing they can do to you is to isolate you and log your IP-address and transactions.

| improve this answer | |
  • Now I get that all nodes maintain the local list of verified transactions. I'm still not sure about counting the transaction part. I'm confused about whether the majority votes is required for verifying the transaction or for verifying the proposed block to merge in the chain? If it is required for merging the block, then how come the network find out that majority of nodes have verified the block. I have same doubt for the transaction part. Thank you for your answer :) – Mike Patel May 13 at 15:18
  • Miners validate transactions too. If even one transaction is invalid they would lose all the block reward. So invalid transactions don't make into blocks. If some of the other miners support the block and mine showing that block as the reference block, then there would be a chain split. Nodes don't vote, they just ignore a block and don't share it with their peers if they see the transaction as invalid (or nonstandard. There's also a standardness rule that transactions not obeying that can be included in blocks but those aren't relayed). – MCCCS May 13 at 15:45

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.