Which sender is banned in case of nvalid transactions or blocks?

1

When a node receives an invalid transaction or block, as far as I know, it bans the sender for 24 hours. However, I didn't exactly get which sender is banned. Is it the neighbor node that provides the data to this node, or is it the creator of the data (transaction or block)?

Önder Gürcan

Posted 2017-05-30T09:06:38.367

Reputation: 227

Answers

3

There is no way to know which node created a transaction or block, unless they publish that information themselves. Nodes should not have an identity that leaks into transaction or block data.

So banning for relaying invalid blocks or transactions always applies to the peer that gave you the information, based on their IP address. The protocol requires you to validate information before relaying, so you are in violation whenever you pass on invalid data.

Pieter Wuille

Posted 2017-05-30T09:06:38.367

Reputation: 54 032

A node is banned for 24 hours or forever? I checked Misbehaving() function which makes state->fShouldBan = true;. But I could not find any other function that makes state->fShouldBan = false;. If it is forever, I guess the node also removes the misbehaving peer from its neighbor list, right?

Önder Gürcan 2017-05-30T15:25:00.177