spacemeshos / go-spacemesh

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

identities.IterateMalicious doesn't handle equivocation set for V2 ATXs correctly #6331

Open ivan4th opened 2 months ago

ivan4th commented 2 months ago

Description

The identities.IterateMalicious doesn't check for married ATXs and thus yields the different set of malicious identities that you would get from going over every identity and calling identity.IsMalicious() for it, checking for true. identities.IterateMalicious is used during warmup. Related code: https://github.com/spacemeshos/go-spacemesh/blob/50910287e7f7122a841451a110a70c3f18e1f1bc/sql/identities/identities.go#L84-L85

Expected Behavior

identities.IsMalicious should handle equivocation sets correctly.