hedera-local-node
hedera-local-node copied to clipboard
Override default max gas refund property for some environments
Currently, when we process a transaction in the consensus node we populate a field in the transaction receipt, called gasUsed
which is the larger number of the pair: 1. the actually consumed gas by the EVM and 2. gasLimit
- 20% of gasLimit
for the transaction.
The 20% of total gas limit max refund is configurable by an application property on the consensus node called contracts.maxRefundPercentOfGasLimit
.
In order for devs to be able to see the actual gas used (regardless of the max refund logic), add custom manual configuration on local node by changing the global dynamic property maxGasRefundPercentage property from 20 to 100. This would eliminate the refund policy in the consensus node and the gasUsed field would take the actually gas consumed value.
For the default version have it as 100% but in the previewnet, testenet and mainnet version set to to 20% like services.