massa icon indicating copy to clipboard operation
massa copied to clipboard

Update consensus graph rule

Open damip opened this issue 2 years ago • 0 comments

Update the consensus graph rules with the new one:

image

Translation in terms of incompatibility detection algorithm:

When a block B arrives in consensus:

  • inherit all incompatibilities from all of B's parents
  • let to_traverse = [ all active non-final blocks that are not incomp with B AND not in the ancestry of B AND for which the absolute slot distance with B is higher or equal to thread_count]
  • while let Some(traversing_b) = to_traverse.pop():
    • add traversing_b and all its descendants to B's incomp list, and remove all of traversing_b's descendants from to_traverse

@qdrn @leoloco can you:

  • check the above algo matches the spec
  • specify the extra "can't reference too recent parents" rule ?

This needs to be done AFTER https://github.com/massalabs/massa/issues/2894

@qdrn blocking until the multi-stake protection plan is organized.

damip avatar Sep 23 '22 16:09 damip