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

process new signage points no more than once #15624

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

process new signage points no more than once #15624

wants to merge 2 commits into from

Conversation

arvidn
Copy link
Contributor

@arvidn arvidn commented Jun 26, 2023

there are two places we call signage_point_post_processing() from.

  1. when we receive a new signage point from a peer, and we don't already know about it. We add it to our full node store and call the post processing function. We do all of this while holding the timelord_lock. This ensures we don't receive the same SP multiple times and end up adding them multiple times. The checking if we have it, adding it and post processing all happens atomically, by holding the timelord_lock.
  2. when receiving a new peak, we iterate over the signage points of the block, and we call the post processing function for them. We do not currently hold the lock or check to see if we have already seen the signage point.

This patch acquires the timelord_lock while iterating over the signage points in a new peak, to ensure the iteration does not interleave with receiving any new signage points. It also checks to see if we already have the signage point, and if so, skips calling the post processing function for it.

This is believed to fix an issue where we sometimes would send the same signage point multiple times to the farmer.

@arvidn arvidn added the Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog label Jun 26, 2023
@arvidn arvidn changed the title New signage point process new signage points no more than once Jun 26, 2023
@arvidn arvidn marked this pull request as ready for review July 13, 2023 18:32
@arvidn arvidn requested a review from a team as a code owner July 13, 2023 18:32
@arvidn
Copy link
Contributor Author

arvidn commented Jul 13, 2023

I will not have time to develop a test to exercise this. we may have to punt or resort to manual testing

Copy link
Contributor

@altendky altendky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just putting a hold on this while i run it for a bit and explore

@github-actions
Copy link
Contributor

This PR has been flagged as stale due to no activity for over 60 days. It will not be automatically closed, but it has been given a stale-pr label and should be manually reviewed by the relevant parties.

@github-actions github-actions bot added the stale-pr Flagged as stale and in need of manual review label Aug 28, 2023
@arvidn
Copy link
Contributor Author

arvidn commented Sep 7, 2023

this change might fix #11757

@github-actions github-actions bot removed the stale-pr Flagged as stale and in need of manual review label Sep 8, 2023
@github-actions
Copy link
Contributor

This PR has been flagged as stale due to no activity for over 60 days. It will not be automatically closed, but it has been given a stale-pr label and should be manually reviewed by the relevant parties.

@github-actions github-actions bot added the stale-pr Flagged as stale and in need of manual review label Oct 24, 2023
Copy link
Contributor

File Coverage Missing Lines
chia/full_node/full_node.py 87.5% lines 1653
chia/full_node/full_node_store.py 50.0% lines 370
Total Missing Coverage
10 lines 2 lines 80%

@github-actions github-actions bot added coverage-diff and removed stale-pr Flagged as stale and in need of manual review labels Sep 17, 2024
Copy link
Contributor

This PR has been flagged as stale due to no activity for over 60 days. It will not be automatically closed, but it has been given a stale-pr label and should be manually reviewed by the relevant parties.

@github-actions github-actions bot added the stale-pr Flagged as stale and in need of manual review label Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coverage-diff Fixed Required label for PR that categorizes merge commit message as "Fixed" for changelog stale-pr Flagged as stale and in need of manual review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants