celo-org / celo-blockchain

Official repository for the golang Celo Blockchain
https://celo.org
GNU Lesser General Public License v3.0
552 stars 196 forks source link

Asymmetry in mechanisms to skip calling debitGasFees & creditGasFees #2267

Closed piersy closed 4 months ago

piersy commented 5 months ago

The blockchain client skips calling debitGasFees if the fee is zero, this is to support estimating gas (gas is not charged for the credit or debit gas fees calls since they are covered by an increased intrinsic cost). However the blockchain client does not skip calling credit gas fees if the fee is zero, in fact this check is currently performed in the contract .

We should be consistent about where this functionality is skipped, or whether it is skipped at all.

Given that we just added a flag to allow explicit skipping of credit and debit calls. It seems sensible to remove all other logic to skip.