-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Syncstorewjb #19284
Syncstorewjb #19284
Conversation
we have a bad peak cache we used for chip0013 that is currently not used, i think we can identify the peaks that fail due to bad genesis and use the bad peak cache this will help us identify WP's that belong to these bad peaks and avoid validating the WP for those peaks. we would still need to request the WP since for new peaks that are not in the cache we need the WP to see if the last two epochs contained a block that is in the bad cache in order to fail im not sure this is needed because the WP should fail on this pretty fast since it is the first thing we validate and that happens before all the vdf heavy lifting , lmk what you think |
With this change, we still ask for the WP, but we ask it from the correct peer - ie the peer that has the heavier weight peak. Without this, we would ask for the WP from a random selection of all our peers, since all the peers have that block height even though it's the wrong header hash - and since most of those peers produce a WP we accept, there is no error in WP. |
|
Purpose:
Fix peer_has_block recording
Current Behavior:
Doesn't check hash before recording block
New Behavior:
Check hash before recording block
Testing Notes:
None