mimblewimble / grin

Minimal implementation of the Mimblewimble protocol.
https://grin.mw/
Apache License 2.0
5.04k stars 992 forks source link

PIBD - Revert earlier pibd_aborted flag in sync logic #3757

Closed yeastplume closed 1 year ago

yeastplume commented 1 year ago

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 commented 1 year ago

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.

yeastplume commented 1 year ago

Thanks for reviewing!