wire: add previous revealed secrets hashes to RS message #3239
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For proper blaming behavior, peers who publish their secrets are blamed and removed from the following run if all secrets were revealed, but no other misbehavior was detected.
In order to correctly pin the blame on the peers who disrupted the mix by initially revealing their secrets messages, this blaming will only be triggered when a reveal secrets message is received that does not reference any other received secrets messages.
Because the secrets message hash now commits to these previous hashes by its signature, an additional method is added to return the commitment hash (to be published and verified in key exchange messages) that does not hash the previous messages (as they do not exist at the time of creating the key exchange).
While here, an issue was discovered and corrected in the serialization of the MixVect type. When the vector has zero length, deserializing would return early after reading the first 0 dimension, but serialization was writing both the count and message size dimensions. This was corrected by changing the serialization method to return early if the count is zero.