6

What happens when I send a transaction that exceeds the gas limit of 3,141,592?

Will the transaction be transmitted to the network but never confirmed?

If my gas cost is 4,141,592 for example can 3,141,592 be paid in one block and 1,000,000 more in the next?

Will the error message I receive (if any) depend on the ETH client I am using?

1 Answer 1

8

The target block gas limit was PI million, but was increased to 1.5 PI million (4,712,388) in Homestead.

If you exceed the limit, in Geth, you will get error "Exceeds block gas limit" and the transaction will not be sent to miners. Other clients probably have a similar error.

If my gas cost is 4,141,592 for example can 3,141,592 be paid in one block and 1,000,000 more in the next?

You have to use 2 separate transactions if you want to split up the gas. (But 4.1M gas fits with the current limit of 4.71M so this single transaction is fine.)

1
  • Note that while clients will prevent you from sending a transaction with too high gas, there's nothing in the protocol spec that says transactions with gas too high are invalid. You could construct a transaction with the gas set above the limit. Miners would reject it, but once the gas limit hits the correct amount, anyone could replay that transaction Sep 8, 2016 at 3:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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