I've noticed that Parity and Geth will return the following error when sending a standard transaction with less than 21,000 gas:

"Transaction gas is too low. There is not enough gas to cover minimal cost of the transaction (minimal: 21000, got: X). Try increasing supplied gas."

Is this enforced at the protocol level? Or is it possible for someone to run a custom node and generate a valid transaction that can be broadcast to the network with less than the minimum gas? (even though I'm assuming if this is possible the transaction will just get included in a block and run out of gas).

  • A standard transaction is fixed at 21k gas (not contract calls). If you want to pay less, set lower gas price Mar 23 '18 at 5:26

The gas consumption is enforced at the protocol level. Every OP/activity has a gas cost associated to it. Sending a transaction will always cost a minimum of 21000 gas, writing a storage slot will be 20000, etc...

You could modify your node's code to skip this check and try to broadcast the transaction to the network, but it will never get included in a block since it doesn't follow the consensus.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.