solana: Need to undo cost tracker changes for non-retryable failed transactions
Problem
Transaction cost is applied to cost_tracker before execution, if the transaction failed and not qualify for retry, it’s cost should be undo from cost_tracker.
Proposed Solution
- zip
load_and_execute_transactions_output.execution_resultswithtransaction_costsandtransactions_qos_results, undo cost for notexecution_result.was_executed_successfully()
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (12 by maintainers)
Great discussion but @nikhayes do you mind starting a new issue if you think there aren’t any existing issues covering the cost model issues you’ve brought up? Let’s keep this issue focused on making sure the cost tracker isn’t over counting what actually gets in the block. Another issue for making use of the actual compute units would be nice too. And one last thing is that the cost tracker isn’t enforced in replay, leaders have a lot of flexibility in how they create blocks right now.
The proposed solution sounds right to me. And potentially later
execution_resultscould also carry actual-cu for us to update the model with.