Skip to content

Rusk: Introduce protocol-level minimum gas per transaction #3940

@HDauven

Description

@HDauven

Summary

Introduce a protocol-level minimum gas per transaction (min_tx_gas) to enforce a floor on fees (e.g. ~0.005 DUSK, 5M LUX) without globally increasing the gas_price and affecting more computationally expensive transactions (withdraw/stake/unstake). The rationale for this is to combat the too low transaction fees on mainnet.

Possible solution design or implementation

Add min_tx_gas to the VM execution config, activated via a feature flag at a chosen block height. In vm::execute we should reject transactions with gas_limit < min_tx_gas if the feature is active, and for successful calls, floor the receipt.gas_spent to at least the min_tx_gas (capped by gas_limit), and composed with existing blob/deploy charging.

In the mempool preverify we should require gas_limit >= max(min_gas_limit, min_tx_gas) (taking into account min_tx_gas if active, or the existing min_gas_limit if the feature is not active), and return a GasLimitTooLow error if the condition is not met.

Additional context

We currently set a minimum of 0.0025 DUSK (2.5M LUX) in the Rusk wallet, this change will thus require a new release of the Rusk wallet. The web wallet is not affected.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions