[sui/shared] Make shared_object_sync less flaky #6467
Merged
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.
Because not all validators pass transactions on to consensus, the previous implementation of this test can sometimes fail because the one validator that was fed the initial transaction does not pass it along.
The test was carefully set-up so that this doesn't happen, but any change that affects the Rng seed that decides whether this happens or not can cause it spuriously fail or hang.
The behaviour under test is that out-of-date authorities can catch up with the rest because the appropriate certificates get shared through the consensus layer.
The change is to test this by excluding one validator to begin with, rather than including only one validator, to guarantee that at least one will propagate the certificate.
Test Plan:
Note that running simtest multiple times (see below) didn't seem to trigger the issue, I think because the logic that decides whether or not a validator propagates a transaction is driven by ObjectIDs changing:
So instead, this change needs to be tested before and after a change that required tweaking the validators to make this test work again, e.g. 6102b24 -- it should work on either side without any material changes (apart from merge conflict resolution).