namada icon indicating copy to clipboard operation
namada copied to clipboard

Enforcing fee payment on transactions

Open grarco opened this issue 10 months ago • 1 comments

After merging #2627 the transactions are now executed in order without the need to split the wrappers from the wasm transactions which poses an issue when it comes to fee payment that wasn't there in the previous execution model. In process_proposal we verify that the signer of a tx has enough balance to pay the fees for that tx: unfortunately though, with the new logic, the fee payment executed by the wrapper txs are now interspersed with the execution of the wasm codes. These could be transactions modifying the balance of the fee payers of the next transactions, meaning that the result of the check performed in process_proposal isn't valid anymore.

A possible solution could be to somewhat mimic the previous execution model by first collecting all the fees due by the transactions in the block and only then execute the wasm codes. This though would require some major changes (once more) in the execution model.

grarco avatar Apr 12 '24 15:04 grarco

Hmm - could we perhaps just simulate running the transactions in order when preparing the proposal, and drop any for which there is no longer enough balance?

cwgoes avatar Apr 20 '24 01:04 cwgoes