massa
massa copied to clipboard
Add checks on object deserialization
-
inside block header deserialization add the following checks:
- check the signature (now we can because we see each object only once)
- check that (parents.count == 0) == (slot.period == 0)
- check that if slot.period == 0 we have no endorsements
- check the signatures of the endorsements
- check that the endorsements all target the parent block in the same thread (if not genesis)
- check that the
index
of every endorsement does not repeat - check that the
index
of every endorsement does not overflow endorsement_count-1
-
inside op deserialization:
- check signature
-
inside endorsement deserialization:
- check signature