Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delay delete of deferred transactions until end of commit handler (#2…
…1376) This fixes a bug in how we handle the end of epoch pre- and post- data quarantining. In the old code, we check if there were any deferred txns loaded in the current commit with this code: https://github.com/MystenLabs/sui/blob/2f52a7283e5f805b728ce1570cb66d27f0a95648/crates/sui-core/src/authority/authority_per_epoch_store.rs#L2150 Because this looks at the table, it does not reflect that the fact that we may have already scheduled deletes from the table. In the new code, we look at the in-memory map https://github.com/MystenLabs/sui/blob/67fea6a41b90e6b49d9829766a29b4f74cfa4900/crates/sui-core/src/authority/authority_per_epoch_store.rs#L2038 - keys are removed from this map immediately upon loading them at https://github.com/MystenLabs/sui/blob/67fea6a41b90e6b49d9829766a29b4f74cfa4900/crates/sui-core/src/authority/authority_per_epoch_store.rs#L1884 This in turn can cause us to improperly skip drop randomness transactions at the end of the epoch here: https://github.com/MystenLabs/sui/blob/67fea6a41b90e6b49d9829766a29b4f74cfa4900/crates/sui-core/src/authority/authority_per_epoch_store.rs#L3594
- Loading branch information