Handle race in UTXO consolidate transactions on frozen vault
Additional issue related to #1895 (closed).
There's a bit of a race because the vault was unfrozen by a consolidate transaction (F0F88E72C48B69F7A8DF3CA7E0ED97C52F3C947155A7653C0375FD7FDAAAE58B
) that happens asynchronously. The consolidate transaction would use the same VINs as the ones with a fixed VIN set stored in round 7 retry, so even if a quorum did remain in the round 7 retry to prevent that hang, they would sign a transaction with already spent VINs and get stuck in broadcast retry (or drop it on the floor depending on the RPC error string, which I'm uncertain of: https://gitlab.com/thorchain/thornode/-/blob/v1.127.2/bifrost/pkg/chainclients/utxo/signer.go?ref_type=tags#L314-320).
I'm thinking the paths to handle this would be:
- Just stop doing explicit consolidates, outbounds consolidate implicitly over time, asset specific DOFM when released steps in to lower fees to the mean (probably simplest, but could be some implications on
MIGRATE
or elsewhere) - Refactor consolidate so those transactions are sent through the chain signer queue like everything else (probably a headache)
- Refactor the signing checkpoint to marshal the VIN txs, before attempting signing check those txs and if they are spent return no error and move on (still a minor race where outbounds can be dropped on the floor)