spacemeshos / go-spacemesh

Go Implementation of the Spacemesh protocol full node. 💾⏰💪
https://spacemesh.io
MIT License
761 stars 212 forks source link

Double ATX-merge malfeasance proof #6335

Closed poszu closed 1 week ago

poszu commented 2 months ago

Description

Contextual validation includes a check that verifies that there is only 1 merged ATX for an equivocation set of identities in every epoch (IDs in one set cannot create more than 1 merged ATX per epoch).

There are 3 scenarios that need support:

  1. [ ] IDs married before checkpoint - the marriage ATX is checkpointed. It's not possible to create marriage proof, but all nodes on the network already know they are married.
  2. [ ] The first merged ATX was published before checkpoint. The incoming one is published retroactively for the epoch that is checkpointed. This should be syntactically invalid and the doubled ATX should be rejected (do we mark the equivocation set malicious? If so what is the proof that we want to put into the DB?)
  3. [ ] happy path (no checkpoint involved) #6341