A failed Dusk transaction can still cost you DUSK.
The revert doesn't erase the bill.
I assumed if a transaction runs out of gas and reverts, the failed execution basically leaves nothing behind.
Dusk separates those two outcomes.
You set a `gas_limit` and `gas_price`, but the actual fee is based on `gas_used * gas_price`. If execution runs out of gas, the transaction reverts while the gas already consumed is still paid.
Take a constructed example: a call has a 50,000 gas limit and a gas price of 2 LUX. If it burns all 50,000 gas before running out, the failed transaction still costs 100,000 LUX, or 0.0001 DUSK.
The state change disappears.
The fee doesn't.
That's the part I didn't expect.
One mechanism protects the ledger from committing an execution that never finished. The other still charges for the computation the network already performed. Both act on the same failed transaction, but they don't produce the same outcome.
So “failed” doesn't mean “free.” It means the state change is gone while the resource bill can remain.
How much of Dusk's transaction safety comes from reverting incomplete execution, and how much of its resource discipline comes from still charging for the work that already happened?
@Dusk #dusk $DUSK
The revert doesn't erase the bill.
I assumed if a transaction runs out of gas and reverts, the failed execution basically leaves nothing behind.
Dusk separates those two outcomes.
You set a `gas_limit` and `gas_price`, but the actual fee is based on `gas_used * gas_price`. If execution runs out of gas, the transaction reverts while the gas already consumed is still paid.
Take a constructed example: a call has a 50,000 gas limit and a gas price of 2 LUX. If it burns all 50,000 gas before running out, the failed transaction still costs 100,000 LUX, or 0.0001 DUSK.
The state change disappears.
The fee doesn't.
That's the part I didn't expect.
One mechanism protects the ledger from committing an execution that never finished. The other still charges for the computation the network already performed. Both act on the same failed transaction, but they don't produce the same outcome.
So “failed” doesn't mean “free.” It means the state change is gone while the resource bill can remain.
How much of Dusk's transaction safety comes from reverting incomplete execution, and how much of its resource discipline comes from still charging for the work that already happened?
@Dusk #dusk $DUSK
