Skip to content

Commit

Permalink
Update neps/nep-0536.md
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Birch <birchmd8@gmail.com>
  • Loading branch information
bowenwang1996 and birchmd authored Mar 28, 2024
1 parent 55f192f commit 758104e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neps/nep-0536.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ and creating unnecessary refunds. Some examples:

The protocol changes are as follows:
* When a transaction is converted to a receipt, there is no longer a `pessmistic_gas_price` multiplier when the signer balance is deducted. Instead, the signer is charged `transaction_gas_cost * gas_price`. If the transaction succeeds, then unless the transaction contains a function call action, it will not generate any refund. On the other hand, when a transaction with multiple action fails, there is gas refund for the rest of unexecuted actions, same as how the protocol works today.

Check failure on line 38 in neps/nep-0536.md

View workflow job for this annotation

GitHub Actions / markdown-lint

Lists should be surrounded by blank lines [Context: "* When a transaction is conver..."]

neps/nep-0536.md:38 MD032/blanks-around-lists Lists should be surrounded by blank lines [Context: "* When a transaction is conver..."]
* For function calls, if X gas is attached during the execution of a receipt and Y gas is burnt, then `max(0, X-Y-refund_cost)` is refunded at the original gas price where `refund_cost = max(REFUND_FIXED_COST, 0.05 * X-Y)`.
* For function calls, if X gas is attached during the execution of a receipt and Y gas is used+burnt, then `max(0, X-Y-refund_cost)` is refunded at the original gas price where `refund_cost = max(REFUND_FIXED_COST, 0.05 * X-Y)`. In the case the refund is 0 then no refund receipt is generated.
* Tokens burnt on refund cost is counted towards tx_balance_burnt and the part over `REFUND_FIXED_COST` is not counted towards gas limit to avoid artificially limiting throughput.
* Because refund cost is now separate, action costs do not need to account for refund and therefore should be recalculated and reduced.

Expand Down

0 comments on commit 758104e

Please sign in to comment.