calling `add_pending_certificates` when AuthorityState gets error from handling certificate
in fn handle_certificate in authority_server.rs, when state.handle_certificate(&certificate) gets an error, we call .add_pending_certificates(vec![(tx_digest, Some(certificate))]). Is this still needed?
code pointer: https://github.com/MystenLabs/sui/blob/main/crates/sui-core/src/authority_server.rs#L483
I think we should not do this for shared object certificate, since this does not take shared locks correctly. For owned object transactions, we don't have to queue the certificate but it should be ok.
can you elaborate why " this does not take shared locks correctly." ?
Before, adding a shared object txn to the pending queue, shared object locks must be taken. Otherwise the certificate will not be able to figure out its shared input object versions. Also, most handle certificate errors are likely non-transient and should not be retried internally, after we make sure there will be no missing input object errors.