Skip to content

mixpool: Do not return early for revealed secrets#3454

Merged
davecgh merged 1 commit intodecred:masterfrom
jrick:wait-secrets
Nov 11, 2024
Merged

mixpool: Do not return early for revealed secrets#3454
davecgh merged 1 commit intodecred:masterfrom
jrick:wait-secrets

Conversation

@jrick
Copy link
Member

@jrick jrick commented Nov 11, 2024

When a RS (reveal secrets) message was published, the mixpool Receive method would immediately return, and blame assignment was immediately run. This created a logic race (due to message propagation over the network) where not all peers would run blame assignment with all currently-published messages, and different peers would blame different sets of peers for missing messages.

Correct this by modifying the Receive method to not return ErrSecretsRevealed until the total number of expected messages have been received first.

When a RS (reveal secrets) message was published, the mixpool Receive method
would immediately return, and blame assignment was immediately run.  This
created a logic race (due to message propagation over the network) where not
all peers would run blame assignment with all currently-published messages,
and different peers would blame different sets of peers for missing messages.

Correct this by modifying the Receive method to not return ErrSecretsRevealed
until the total number of expected messages have been received first.
@davecgh davecgh added this to the 2.0.5 milestone Nov 11, 2024
@davecgh davecgh merged commit 9be537a into decred:master Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants