Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netsync: Remove spent PRs from tip block txns. #3367

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Jun 12, 2024

This requires #3366.

Now that recently removed mix messages are independently cached for a short period, this reverts the change that only removed spent pair requests from previous block transactions to make it track the current best tip again.

For reference, the change was originally made to avoid immediately removing mixpool messages that are still propagating the network when a block was quickly mined which includes transactions created from those very same mix messages.

However, as noted when the change was made, while it was a quick way to address the stated scenario, it doesn't deal with large reorgs nicely.

The new method is much more robust and works under all scenarios, so it is preferable for the mixpool to track the current tip.

@davecgh davecgh added this to the 2.0.3 milestone Jun 12, 2024
@davecgh davecgh force-pushed the netsync_remove_prs_from_tip_block branch 3 times, most recently from 87b3696 to 7e53596 Compare June 12, 2024 23:37
@davecgh davecgh force-pushed the netsync_remove_prs_from_tip_block branch 4 times, most recently from b32e0d3 to 49ffd40 Compare June 15, 2024 03:21
Now that recently removed mix messages are independently cached for a
short period, this reverts the change that only removed spent pair
requests from previous block transactions to make it track the current
best tip again.

For reference, the change was originally made to avoid immediately
removing mixpool messages that are still propagating the network when a
block was quickly mined which includes transactions created from those
very same mix messages.

However, as noted when the change was made, while it was a quick way to
address the stated scenario, it doesn't deal with large reorgs nicely.

The new method is much more robust and works under all scenarios, so it
is preferable for the mixpool to track the current tip.
@davecgh davecgh force-pushed the netsync_remove_prs_from_tip_block branch from 49ffd40 to 4b485d5 Compare June 17, 2024 16:09
@davecgh davecgh merged commit 4b485d5 into decred:master Jun 17, 2024
2 checks passed
@davecgh davecgh deleted the netsync_remove_prs_from_tip_block branch June 17, 2024 16:18
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