Skip to content

[V127-specific] Deduct pending outbounds to get available funds in LackSigning

Multipartite requested to merge Multi/LackSigning-deduct-pending-outbounds into develop

[V127-unspecific]

This is intended to close #1796 (closed)
'Regression: reschedule txs can be assigned to a vault with insufficient balance'.

In consideration of consequences of assigning TxOutItems to vaults not known to have sufficient available funds
(like GAIA.ATOM failed transaction gas costs and vault insolvency from trying subtract an observed outbound before observing its inbounds, thus in future overestimating the vault balance)
this in LackSigning deducts vaults' pending outbounds of an asset in the same way as the txout manager,
migrating the txout manager functions GetPendingOutbounds and DeductVaultPendingOutbounds to /keeper/v1/keeper_vault.go and /types/type_vault.go respectively.

This also falls back on checking RetiringVaults if there are no available ActiveVaults, before the final fallback on active[0],
as every churn has a period early in migration rounds when no ActiveVaults have available funds (of all or some coins) yet.

At time of writing #1796 (closed) is assigned to @dixitaniket,
but I nevertheless submit these suggested commits (and thought process) as an MR in case I otherwise forget them. 🙏

Merge request reports

Loading