hedera-json-rpc-relay
hedera-json-rpc-relay copied to clipboard
Set the `maxTransactionFee` to a configurable value instead of `constants.MAX_GAS_PER_SEC`
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_THRESHOLDand use it instead ofconstants.MAX_GAS_PER_SECinsendEthereumTransactionin the following place
Version
v0.55.0