cip | title | author | discussions-to | status | type | category | created | license |
---|---|---|---|---|---|---|---|---|
45 |
Modify Transaction Fee Check |
Tong Wang <@yoduyodu> |
Final |
Standards Track |
Ring 0 |
2021-08-16 |
Apache 2.0 |
Paying transaction fees using non-native currencies should be feasible if a transactor has a balance greater than or equal to the sum of the fee and the transferred value.
When paying transaction fees, the transaction should be deemed as valid if the transactor's balance is greater than or equal to the transaction fee + transferred value. This CIP seeks to modify the transaction fee check rule.
When checking if the balance covers the transaction fee in state_transition
and tx_pool
, it should pass if the balance >=
transaction fee + transferred value. The current behavior is:
- For native currency(CELO), require balance >= fee.
- For non-native currencies(cUSD, cEUR, ...), require balance > fee.
- Add
transferred value
in fee check to align with Geth. - Transaction fee checks should be consistent across using native currency CELO and other non-native currencies.
This introduces a change in the transaction validity check.
For native currency(CELO):
- Send a Tx with balance >= fee, but balance < fee + value: ✅ before HF block, ❌ after.
- Send a Tx with balance >= fee + value: ✅ before HF block, ✅ after. For non-native currencies(cUSD, cEUR, ...):
- Send a Tx with balance < fee + value: ❌ before HF block, ❌ after.
- Send a Tx with balance = fee, with value == 0 : ❌ before HF block, ✅ after.
- Send a Tx with balance > fee + value: ✅ before/after HF block.
Updated in https://github.com/celo-org/celo-blockchain/pull/1696/files
A more strict transaction validity check should imply less security risks.
This work is licensed under the Apache License, Version 2.0.