Submitted by p0wd3r, also found by oakcobalt, dontonka, and berndartmueller
Due to an expected error occurring in one chain, the gas for the other chains cannot be updated.
IterateAndUpdateCctxGasPrice is used to periodically update the gas price of cctx. It iterates through all cctx in all chains to update their gas price.
https://github.com/code-423n4/2023-11-zetachain/blob/main/repos/node/x/crosschain/keeper/abci.go#L34-L53
One possible error that can be returned in CheckAndUpdateCctxGasPrice is insufficient balance in the GasStabilityPool.
https://github.com/code-423n4/2023-11-zetachain/blob/main/repos/node/x/crosschain/keeper/abci.go#L107-L112
The GasStabilityPool is only replenished when an outbound transaction is finalized.
https://github.com/code-423n4/2023-11-zetachain/blob/main/repos/node/x/crosschain/keeper/keeper_cross_chain_tx_vote_outbound_tx.go#L131-L136
Therefore, during the execution of IterateAndUpdateCctxGasPrice, outbound cctx may not have been finalized yet, leading to a possible scenario of insufficient balance in the GasStabilityPool, which is an expected occurrence. However, in the current implementation, if the GasStabilityPool of one chain is insufficient, the function directly returns, and the remaining chains in the loop are not processed. For other chains, the GasStabilityPool might be sufficient, and they should not be neglected.
VScode
If CheckAndUpdateCctxGasPrice returns an error, skip the loop for that cctx and continue with the outer loop for the chain.
lumtis (ZetaChain) confirmed
