Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sui/shared] Make shared_object_sync less flaky (#6467)
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: ``` sui$ cargo simtest shared_object_sync ``` 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: ``` sui$ env MSIM_TEST_NUM=20 cargo simtest shared_object_sync ``` 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).
- Loading branch information