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

PIBD - Revert earlier pibd_aborted flag in sync logic #3757

Merged
merged 3 commits into from
Jun 22, 2023

Conversation

yeastplume
Copy link
Member

Reverts StateSync's pibd_aborted flag, to test whether it fixes PIBD appearing to resume after having fallen back to txhashset.zip download.

Also includes changes #3756 (will merge that separately if all tests go well here)

@yeastplume yeastplume changed the title [TEST, Do not merge] PIBD debug - revert earlier pibd_aborted flag in sync logic PIBD - Revert earlier pibd_aborted flag in sync logic Jun 20, 2023
@yeastplume
Copy link
Member Author

Have tested now, this fixes #3754. The SyncStatus struct essentially keeps track of a large state machine which is executed every tick (essentially getting reset) in order to determine what the state of sync should be. A separate pibd_aborted flag, which persists between SyncStatus invocations, is required in state sync struct to record whether we should stop attempting PIBD altogether and revert to the earlier txhashset.zip method.

@@ -62,6 +64,12 @@ impl StateSync {
self.earliest_zero_pibd_peer_time = t;
}

/// Flag to abort PIBD process within StateSync, intentionally separate from `sync_state`,
/// which can be reset between calls
pub fn set_pibd_aborted(&mut self) {
Copy link
Contributor

Choose a reason for hiding this comment

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

abort_pid() seems like a more straightforward name

@yeastplume
Copy link
Member Author

Thanks for reviewing!

@yeastplume yeastplume merged commit 2273ea9 into mimblewimble:master Jun 22, 2023
bayk added a commit to mwcproject/mwc-node that referenced this pull request Jun 23, 2024
mimblewimble#3757)

* revert earlier pibd_aborted flag in sync logic
* formatting
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