During the work on #1244 duplicate attestations generated Invalid Signature errors at the time of block proposals when trying to generate aggregates (the BLS aggregate signature was computing the same aggregator more than once in the signature generated), this didn't happened before making the handle_new_block and handle_tick synchronous (i.e. without removing the GenServer and just converting casts to calls in the ValidatorManager the error was reproduced). A quick solution is already in place:
# TODO: We need to check why we are producing duplicate attestations, this was generating invalid signatures
unique_attestations = attestations |> Enum.uniq()
Description
The purpose of this task is two-fold
Understand the root cause of duplicated attestations and fix it
We are receiving duplicates just from ourselves, this error pop-up only when we are publishing attestations, if we just receive them from other nodes we don't have this issue.
Understand why we are still adding duplicate aggregate attestations in our block proposals (this was happening before #1244)
This might be related to the previous one, given that we only uniquely filtered them at the aggregation step this behavior might be affecting also aggregates and not just committee attestations.
Example of a block with duplicated aggregate attestations:
Context
During the work on #1244 duplicate attestations generated Invalid Signature errors at the time of block proposals when trying to generate aggregates (the BLS aggregate signature was computing the same aggregator more than once in the signature generated), this didn't happened before making the
handle_new_block
andhandle_tick
synchronous (i.e. without removing the GenServer and just converting casts to calls in the ValidatorManager the error was reproduced). A quick solution is already in place:Description The purpose of this task is two-fold
Understand the root cause of duplicated attestations and fix it We are receiving duplicates just from ourselves, this error pop-up only when we are publishing attestations, if we just receive them from other nodes we don't have this issue.
Understand why we are still adding duplicate aggregate attestations in our block proposals (this was happening before #1244) This might be related to the previous one, given that we only uniquely filtered them at the aggregation step this behavior might be affecting also aggregates and not just committee attestations.
Example of a block with duplicated aggregate attestations: