You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So this is an error because if a transaction is being processed here, it is assumed that it was already validated by the transaction pool, in which case this should never happen. We are breaking that assumption in the EstimateGas function. I think the best way to handle this would be to run the transaction through transaction pool validation, either in its entirety or just to validate that the transaction can pay its fees, before applying the state transition.
Here is the validateTx function on TxPool, which you obviously can't call directly as it stands
funcValidateTransactorBalanceCoversTx(tx*types.Transaction, from common.Address, currentState*state.StateDB) error {
Two courses of action would either be to export the former, or just call the latter if that turns out to be inappropriate. The call should probably occur here-ish
Created issue from #809 (comment)
So this is an error because if a transaction is being processed here, it is assumed that it was already validated by the transaction pool, in which case this should never happen. We are breaking that assumption in the
EstimateGas
function. I think the best way to handle this would be to run the transaction through transaction pool validation, either in its entirety or just to validate that the transaction can pay its fees, before applying the state transition.Here is the
validateTx
function onTxPool
, which you obviously can't call directly as it standscelo-blockchain/core/tx_pool.go
Line 607 in f86d673
And here is the part that validates balances to ensure fees can be paid
celo-blockchain/core/tx_pool.go
Line 1201 in f86d673
Two courses of action would either be to export the former, or just call the latter if that turns out to be inappropriate. The call should probably occur here-ish
celo-blockchain/internal/ethapi/api.go
Line 740 in f86d673
If this seems onerous, please leave this log statement as is and copy the above into an issue to address later. And feel free to assign me to it.
The text was updated successfully, but these errors were encountered: