unit-e icon indicating copy to clipboard operation
unit-e copied to clipboard

Punish duplicate stakes

Open Nizametdinov opened this issue 6 years ago • 5 comments

Particl punishes nodes detected to be staking the same coins by delaying their blocks, which increases the chance of those blocks to be orphaned. Apparently, the intention is to reduce forking.

That's how it works:

We might want to implement a similar policy regarding duplicate stakes.

Nizametdinov avatar Jan 09 '19 16:01 Nizametdinov

So the risk of this is that an attacker could try to target honest nodes and get them to disconnect from each other. The attack would be:

  1. every time the attacker mines/proposes a block, he signs N different blocks using that header, sending one different block (all with the same stake) to each of the network peers.
  2. each honest peer now forwards their corresponding block to other peers. Since each block is treated as duplicate to the other one, they'll increase each other's nMisbehavior. Given the default setting of banscore 100, it would take 10 blocks to make everyone disconnect.

amiller avatar Jan 23 '19 16:01 amiller

@amiller that's a very good point. We probably don't want to ban the node then, just prevent block relay.

Gnappuraz avatar Jan 24 '19 10:01 Gnappuraz

Yeah definitely a good point, but as @Gnappuraz mentioned - not relaying blocks created with a duplicate stake (a stake transaction which was seen before by the node) sounds good anyway. What do you think @amiller ?

thothd avatar Jan 24 '19 10:01 thothd

Particl punishes nodes detected to be staking the same coins by delaying their blocks

This ticket was never about disconnecting nodes.

scravy avatar Jan 24 '19 10:01 scravy

Particl punishes nodes detected to be staking the same coins by delaying their blocks

This ticket was never about disconnecting nodes.

This part can affect nodes connectivity, as @amiller described can be abused:

nMisbehavior of the node which sent the block with duplicate stake will be increased (src/net_processing.cpp#L1105, src/net_processing.cpp#L1147).

thothd avatar Jan 24 '19 10:01 thothd