unit-e
unit-e copied to clipboard
Punish duplicate stakes
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:
- The block with
BLOCK_FAILED_DUPLICATE_STAKE
won't be relayed immediately after validation (src/validation.cpp#L4886). - If active chain's tip has
BLOCK_FAILED_DUPLICATE_STAKE
then the headers won't be returned in response toGETHEADERS
(src/net_processing.cpp#L2334). -
nMisbehavior
of the node which sent the block with duplicate stake will be increased (src/net_processing.cpp#L1105, src/net_processing.cpp#L1147).
We might want to implement a similar policy regarding duplicate stakes.
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:
- 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.
- 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 that's a very good point. We probably don't want to ban the node then, just prevent block relay.
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 ?
Particl punishes nodes detected to be staking the same coins by delaying their blocks
This ticket was never about disconnecting nodes.
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).