Skip to content

chore(test): Replay WAL before start round #898

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

Closed
wants to merge 6 commits into from

Conversation

ancazamfir
Copy link
Collaborator

@ancazamfir ancazamfir commented Mar 7, 2025

Closes: #XXX

An experiment for simply moving the WAL replay before start round. If we enter new round with a proposal already we should not getValue() again.
We should also find all the votes already stored for all rounds, etc. NewRound mux would need more updates though.
edit: it's actually step_change mux and it looks pretty complete.


PR author checklist

For all contributors

For external contributors

@ancazamfir ancazamfir changed the title code(experiment): Replay WAL before start round code(test): Replay WAL before start round Mar 7, 2025
@ancazamfir ancazamfir changed the title code(test): Replay WAL before start round chore(test): Replay WAL before start round Mar 7, 2025
Copy link

codecov bot commented Mar 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (d4bd49d) to head (a47e139).
Report is 4 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@     Coverage Diff     @@
##   main   #898   +/-   ##
===========================
===========================
Components Coverage Δ
core ∅ <ø> (∅)
engine ∅ <ø> (∅)
app ∅ <ø> (∅)
starknet ∅ <ø> (∅)

@ancazamfir
Copy link
Collaborator Author

ancazamfir commented Mar 10, 2025

So it looks like one thing missing in step change mux, specifically for this case Unstarted -> Propose, is looking for conditions at higher rounds (L49 and L55). We should add multiple round wal tests.

@romac
Copy link
Member

romac commented Mar 25, 2025

@ancazamfir I added a new PrepareHeight input to avoid mutating the driver state from outside of the core-consensus crate, what do you think?

@ancazamfir
Copy link
Collaborator Author

ancazamfir commented Mar 25, 2025

I think that some issues that may occur with this PR approach are related to the timeouts. In particular if the timeout has been writtedn to wal but its effects (e.g. voting nil) has not before the restart, then after restart we will run the timers. This is because the timeouts in Unstarted step (with the exception of TimeoutPrecommit) have no effect.
We should understand how to handle this. Not sure if writing StartRound to wal would help.

Also we need to add wal tests that include timeouts (if we don't have already).

@romac
Copy link
Member

romac commented Mar 28, 2025

As discussed today, let's close this in favor of #896

@romac romac closed this Mar 28, 2025
@ancazamfir
Copy link
Collaborator Author

@romac just to clarify, we will still replay (proposals) at start height before start round, meaning most of the changes here should still apply, right?

@romac
Copy link
Member

romac commented Mar 28, 2025

Yes, but since the other PR contains most of the changes already I will move what's needed from here to there.

@romac romac deleted the anca/wal_replay_unstarted branch June 4, 2025 15:33
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