페이지를 넘기고 있습니다.
다음 장을 불러오고 있습니다…
잠깐… 나만의 읽기 환경을 만들어 보세요.
글꼴과 테마는 화면 설정에서 설정하세요. 눈의 편안함도 중요합니다.
다음 장을 불러오고 있습니다…
The maximum gas a transaction or block may consume. A low limit can cause a transaction to fail mid-execution.
브라우저의 읽어주기 지원을 확인하는 중…
이 읽기 자료는 현재 영어로 제공됩니다. 인터페이스에는 선택한 언어가 적용됩니다.
영어 원문 읽기 →A transaction gas limit caps the execution resources that its sender authorizes. A block gas limit constrains aggregate execution in a block. These are related controls at different scales, not two names for the same setting. If execution exhausts its available gas, state changes from the failed execution are reverted while gas already consumed remains chargeable. Some invalid transactions are rejected before inclusion instead, which is a different failure from running out of gas inside a block.
Imagine a contract call that uses 70,000 gas under the state in which it executes. A 90,000 gas limit provides headroom; it does not mean that all 90,000 units will necessarily be spent. Lowering the limit to 50,000 does not make the same computation cheaper. It can make the computation fail before completion. Raising the price per unit likewise does not increase the number of permitted execution steps: the price and the limit are separate transaction parameters.
A simulation observes a particular network state and proposed transaction. Another transaction can alter a contract before yours is included, changing the path it takes. Applications should therefore explain estimation failures and avoid presenting an arbitrarily large limit as a universal remedy. The sender must also satisfy the network's balance and fee-cap requirements. A large authorized budget deserves attention because a different execution path may spend more than the happy-path estimate suggested.