Questions tagged [gas-limit]

Question related to either the transaction or block gas limit.

Filter by
Sorted by
Tagged with
39
votes
2answers
22k views

Is there a limit for transaction size?

Is there a theoretical limit for transaction data size when you send a transaction to Ethereum network? Ref. Is there a (theoretical) limit for amount of data that a contract can store?
17
votes
1answer
6k views

How to clear large arrays without blowing the gas limit?

As posted by redditor ethererik in the post GovernMental's 1100 ETH jackpot payout is stuck because it uses too much gas, 1,100 ethers are stuck in limbo because the payout of this GovernMental ...
17
votes
1answer
6k views

Are gas limit in transaction and block gas limit different?

What does gas limit mean? Are there two meanings of gas limit? gas limit in a transaction block gas limit
15
votes
2answers
1k views

Can a contract's internal storage keep increasing forever?

In other words, is there a limit on the amount of storage a contract can hold? Suppose a field is an Array for instance, and the contract has a method for adding items. Can I keep calling the ...
14
votes
2answers
1k views

Why was Frontier's “default” gasLimit = 3141592?

I've noticed this number at least in two places: On the Ethereum Network Status web page. In the sources of pyethereum. The number looks suspiciously familiar, and I keep asking myself: "Where ...
14
votes
1answer
2k views

Execution of Fallback function with more 2300 gas

I have tested a contract having a fallback function which updated a state variable (cost 5000 gas). I sent an amount of Ether to this contract with 100000 gas limit. The transaction is valid. As ...
13
votes
3answers
708 views

How come I need to specify a higher gasLimit than estimateGas?

If a contract call predictably requires 41043 of gas to be processed as estimated by estimateGas, how come I need to specify gasLimit of ~70000 to be processed?
11
votes
1answer
323 views

How growing contract storage increases the gas spending?

I have some further questions about this and this threads. For simplicity, let's imagine that I want to create a cryptocurrency on top of ethereum. The contract that "handles" this cryptocurrency ...
9
votes
2answers
12k views

how to estimate gas cost?

I have a function that iterate through an array, which could cost a lot of gas. But I still want to test out the estimate gas cost, then decide if I should maintain the design or not. function ...
9
votes
1answer
6k views

Does Gas Limit have any bearing on transaction/mining time?

Gas Price has an obvious impact on how long it takes for the transaction to be mined, but does the Gas Limit have any bearing on transaction time? Based on my understanding it shouldn't, as Gas Limit ...
8
votes
1answer
1k views

Private chain: Maximum size of “data” field in an Ethereum transaction?

The data field can be used to send arbitrary data in a transaction. I am aware that the amount of gas required increases with the increase in size of data, but, is there a limit to the size that's ...
7
votes
2answers
10k views

How to increase gas limit in block using geth?

When I try to execute methods from my smart-contract, I get limeted by gas limit in block and cant do anything. How to change gas limit in block?
7
votes
1answer
1k views

How to call Library Function from a Contract? => [error] The contract code couldn't be stored, please check your gas amount. undefined

When I compiled following code at "https://ethereum.github.io/browser-solidity/" it gives me two Web3 deploy code for: var libraryContract = web3.eth.contract(...); //Web3 deploy code var ...
7
votes
1answer
1k views

Gas limit won't change [duplicate]

I am currently running a private ethereum chain with 2 nodes. My coinbase address on the main node has plenty of ether so I went to make a transaction but got the error "Gas Limit exceeded". I noticed ...
6
votes
1answer
557 views

Is it possible that the block gas limit will drop below its current level?

As I found here (What is Gas Limit in Ethereum?) and here (The Ethereum gas limit seems prohibitively low. Will it ever be raised? If so, when and how?), the gas limit is gradually growing (as the ...
5
votes
3answers
6k views

Gas limit exceeded on private chain

I am currently running a private ethereum chain with 2 nodes. My coinbase address on the main node has plenty of ether so I went to make a transaction but got the error "Gas Limit exceeded". I noticed ...
5
votes
1answer
457 views

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

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,...
5
votes
2answers
590 views

How is it possible to pay 2,100 Ether ($309,267) for a transaction fee?

Here is the transaction details that has transaction fee for 2,100 Ether ($309,267.00) only for sending 0.1 Ether. There is no fairness for users, hence accidentally adding a zero might cause them ...
5
votes
2answers
1k views

Is there a reason Ropsten doesn't have the same block gas limit as mainnet?

It appears as though Ropsten still has a limit of 4.7m gas while mainnet is almost 8m. This makes testing for real-world dapps difficult. Why is it that ropsten and mainnet are not in alignment with ...
5
votes
1answer
6k views

What is the relationship between Gwei and gas?

I know that a Gwei means 1000000000 wei, but when we send a transaction with 21000 gas, is that mean we send 21000 Gwei? please explain Gwei for me
5
votes
1answer
369 views

Transaction out of gas but gas used less than gas limit

I have this method on a contract that I'm testing on rinkeby function addMatch(string _name, uint _fixtureId, uint8 _home, uint8 away, uint _start) public onlyOwner returns (uint8) { require(...
5
votes
3answers
1k views

Contract exceeds block gas limit

I have a fairly complex contract that inherits from a bunch of other contracts, like the OpenZeppelin ERC20 libs and Oraclize libs. When I go to deploy it onto testnet in Remix or Mist, it says that ...
4
votes
2answers
1k views

If view or pure function doesn't cost any gas, would they be abused/free ride?

So if I understand this correctly, view function only read data from ethereum and doesn't mutate any state and pure function doesn't even read data and they are intended for cases like return 1+1; If ...
4
votes
2answers
2k views

Contract deployment throws block gas limit error

I'm trying to deploy a smart contract in a test network, using a [meteor DApp][1]. I have this parameters for the genesis block: gasLimit: "0x1388" However, any time I try to deploy any single ...
4
votes
2answers
143 views

Is there a gas limit for view requests?

E.g. a function that just returns huge struct data. Is there any limit in data so that calling this function will not be possible? pragma solidity ^0.4.13; contract Project { struct Person { ...
4
votes
1answer
238 views

How to simulate out of gas events on a private blockchain?

I want to get the error message "Intrinsic gas too low" during a eth.sendTransaction call. Is it possible to simulate the condition of having run out of gas in a private blockchain scenario? Can ...
4
votes
1answer
833 views

Why is Block Gas Limit set to 5000?

If you look at the Parity chain spec for mainnet (https://github.com/paritytech/parity/blob/master/ethcore/res/ethereum/foundation.json), you will see this line: "gasLimit": "0x1388", But that ...
4
votes
1answer
487 views

Can Solidity access the gaslimit (not just the remaining gas)?

Solidity has access to the remaining gas via msg.gas which changes from line to line. But I would like to know if I can access the initially submitted gasLimit. Is that possible in Solidity?
4
votes
1answer
101 views

Is it possible to establish a conditional gas limit in a transaction?

Imagine a contract that rewards the first user that publish a specific big piece of data into the blockchain. The transaction may cost an appreciable cost if the information size is big. The problem ...
4
votes
2answers
2k views

errored: Error: gas required exceeds allowance or always failing transaction

Hi I have this error : transact to Roulette.betSingle errored: Error: gas required exceeds allowance or always failing transaction My programm : contract Roulette { uint public ...
4
votes
1answer
2k views

How Ethereum estimate the gas for running a contract?

I am new to Ethereum. I know gas limit and gas price well. but still confused in when sending a transaction to run a deployed contract, does Ethereum suggest an estimation of how much gas limit is ...
4
votes
1answer
164 views

how accurate are gas estimates?

I am currently running some tests on ganache using web3.js connector. Most of my transactions run OK if I supply the same amount of gas that is suggested by web3.eth.estimateGas(), however, one of ...
4
votes
1answer
1k views

Why is there block gas limit?

Why is there block gas limit? Should it just be the sum of gas limit used by each transactions inside the block? Why do we need an extra field for it instead of calculate it?
4
votes
1answer
1k views

Gas limit of a contract method call

When we call a contract method, what will be the gas limit? Is there any other gas limit besides the block gas limit? If there are any others, can we manually set the gas limit when we call a method?...
4
votes
1answer
1k views

How to minimize gas consumption during contract creation

I have trouble deploying a contract to the main network and I believe this is due to high gas consumption. An earlier version of the contract worked on the main network. The current version works in ...
4
votes
1answer
91 views

Sharding and gas limit

Currently, the gas limit imposes an upper bound on the amount of computation that can be done in an Ethereum smart contract. Part of the purpose of this limit is to upper-bound the burden on miners ...
4
votes
1answer
516 views

How do you provide a GasPrice and GasLimit to overcome the “low tx nonce or out of funds” log message

I am getting the following logged by my private chain geth node when running a test in truffle: removed tx ( TX(ff8ec4f713e64fb25df07d153607e29629c9276b57e0b7e331f17b5a3c31fdd1) Contract: ...
4
votes
1answer
173 views

How to disable 'Gas requirement not constant' warning in Solidity

I keep getting these warnings when compiling Solidity code: Gas requirement of function [...] unknown or not constant. I know that the gas requirement is not constant, and I've implemented a ...
4
votes
0answers
129 views

Genesis.json permanence and updating the blockchain

I understand that the initial genesis.json attributes are a permanent thing, and it cannot be changed retroactively. But what I want to know is which parameters are changeable afterwards and how? ...
3
votes
1answer
1k views

How Geth and Parity knows the global gas limit?

As said in Péter Szilágyi post DAO Wars: Your voice on the soft-fork dilemma: Miners supporting the DAO soft-fork can do so by starting Geth 1.4.8 with --dao-soft-fork. This will cause the block ...
3
votes
1answer
1k views

Error: “The contract code couldn't be stored, please check your gas limit” [duplicate]

It's seem that is a very common topic but I couldn't find the solution in other questions, sorry for asking it again. I'm following a beginner example, trying to deploy a contract in Rinkeby Network ...
3
votes
2answers
2k views

Solidity Exceeds block gas limit during Mocha Tests with Ganache-cli

How can I increase the gas limit in this case? The error message is "n: Exceeds block gas limit" or "base fee exceeds gas limit". I think there is some kind of api I need to set the block gas limit ...
3
votes
2answers
2k views

What is maximum limit of GAS in a smart contract

Can you please explain the concept GAS in smart contract properly if possible with example. And what is the max limit of GAS in a contract? It is clear if i use more gas i have to pay more...so ...
3
votes
1answer
436 views

For higher priority would it be a good idea to send a transaction with highest gasPrice?

I am little bit lost related to gas refund issue. On the following answer: https://ethereum.stackexchange.com/a/11017/4575 it has been mentioned that: However, if things do get crowded and miners ...
3
votes
2answers
3k views

What is “data” param of rawTx? How to send ETH by using web3

I want to send eth by using web3 on testnet. Source address is 0xbddf0bf3ac858d7fb8a2bdda55884d61779ba5a9. The destination is 0x8005ceb675d2ff8c989cc95354438b9fab568681. I found the example on web3 ...
3
votes
1answer
316 views

Unreal big gas consumption for contract deploying

I have a big contract (more then 1000 strings of code). I deploy it without any problems. When i estimate the gas consumption let gas_need = Web3Helpers.web3.eth.estimateGas({data: code}); console....
3
votes
2answers
361 views

Garbage collection

For a project I model a tree with each node having some data assosiated. A property of that tree is that under some circumstances a node can get deleted, which automatically makes the whole subtree it ...
3
votes
1answer
180 views

How to check if a mining pool runs the forking client or not? [The DAO]

As Geth and Parity forking version are out, the switch to a soft fork related to The DAO is said to happend on block 1800000 if block gas limit is below or equal to 4M. We can see global gas limit on ...
3
votes
2answers
347 views

Why do miners not always “vote” to increase the block gas limit?

Miners can increase/decrease the block gas limit. I read that they can increase/decrease for about 0.01% per block. Why do miners not always want to increase the block limit? This would lead in more ...
3
votes
1answer
412 views

Gas not enough and not able to run functions

I am a new comer to the Ethereum and I am writing a piece of smart contract for my project. I used Win 10 and Mist 0.8.8 with the testnet that started with "R". The contract code has the functions of ...