hedera-json-rpc-relay icon indicating copy to clipboard operation
hedera-json-rpc-relay copied to clipboard

Set the `maxTransactionFee` to a configurable value instead of `constants.MAX_GAS_PER_SEC`

Open victor-yanev opened this issue 1 year ago • 0 comments

Problem:

Currently we are setting the maxTransactionFee to the hbar equivalent of 15 million gas, which is the maximum gas per second that the network can handle, and this is the HAPI fee which is paid by the relay operator account, but we don't want to freely let the operator spend this huge amount, we should change this value to something more sensible and also make it configurable.

Solution:

  • Add a new environment variable MAX_TRANSACTION_FEE_THRESHOLD and use it instead of constants.MAX_GAS_PER_SEC in sendEthereumTransaction in the following place

Version

v0.55.0

victor-yanev avatar Sep 17 '24 14:09 victor-yanev