Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #<ISSUE_NUMBER>
This PR:
TestStorage
EpochMessage
and implement it forMessageKind
. This is useful to extract an epoch from a message to record it.epoch_number
method forSequencingMessage
to easily extract an associated epoch usingHasEpoch
trait of the message's underlying data.HasEpoch
trait for the "old" types (types prior to epoch upgrade). The implementation is trivial, returnsNone
.HasEpoch
trait does not make sense for theQuorumProposal2
andQuorumProposalWrapper
types. These types do not have an epoch field. Instead, the epoch needs to be calculated. Because of that theepoch
method of theHasEpoch
trait panics for these types.OverallSafetyTask
which includes:Decide
,Error
andReplicaViewTimeout
sent by nodes not belonging to the relevant epoch are ignoredDecide
event are taken into account, instead of only the leaf with the highest view. This fixes successful views count.REQUEST_TIMEOUT
to 2000 ms.This PR does not:
Add thetest_staggered_restart_with_epochs
test. The test is currently commented out. The problem is the test always fails in CI but it never fails for me locally. It makes debugging it much more time consuming. I will continue doing that but I'd like to have the PR merged in the meantime.After increasing
REQUEST_TIMEOUT
the test passes.Key places to review:
HasEpoch
implementions forQuorumProposal2
andQuorumProposalWrapper
in thecrates/types/src/data.rs
file. Are the panics fine there?crates/testing/src/overall_safety_task.rs
file