Questions tagged [gas-limit]

Question related to either the transaction or block gas limit.

Filter by
Sorted by
Tagged with
43
votes
2answers
24k 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?
12
votes
2answers
14k 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 ...
18
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 ...
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 ...
17
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 ...
5
votes
2answers
3k 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 ...
6
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 ...
8
votes
4answers
12k views

How to increase gas limit in block using geth?

When I try to execute methods from my smart-contract, I get limited by the gas limit in a block and can't do anything. How to change the gas limit in the block?
2
votes
1answer
2k views

Why does the transaction exceed block gas limit? [closed]

When I try sending ether to another account, I keep getting the message "Exceeds block gas limit". I changed the gas amount from 5,000 to 100,000 but nothing else happened. Why does the transaction ...
16
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 ...
2
votes
2answers
3k views

Setting Block Gas Limit in private blockchain?

In a private blockchain with Parity, what is the correct way to set the Block Gas Limit? When I go to "Transfer" and then specify an address in the "recipient" field, a red bar pops up that says: ...
19
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
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 ...
15
votes
2answers
2k 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 ...
8
votes
1answer
2k 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 ...
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 ...
5
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 ...
1
vote
0answers
413 views

transaction gas limit in Parity genesis file

Essentially the question is how to set/change the "minimal cost of the transaction" a.k.a. "Gtransaction" value using Parity? On a private blockchain with a custom chain spec file I have a ...
4
votes
2answers
203 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 { ...
2
votes
1answer
1k views

“Error: base fee exceeds gas limit” when using the withdrawal pattern

When I am testing the withdraw() method from "WithdrawalContract" from http://solidity.readthedocs.io/en/develop/common-patterns.html using Remix and testrpc, it reported the following error. Testrpc ...
2
votes
1answer
96 views

Does using a very high gas limit somehow get your transactions executed slower?

I'm executing transactions on mainnet with a NodeJS script: async function send(web3, transaction, destAddr, gasPrice, privateKey) { const options = { data : transaction.encodeABI(), ...
1
vote
1answer
1k views

Truffle contract deployment either exceeds block gas limit or out of gas

I've been having the same issue when I was trying to deploy a contract using truffle develop console. The contract is not extremely big but does initiate two other contracts when called a certain ...
0
votes
0answers
358 views

Returned error: gas required exceeds allowance (91135865401031) or always failing transaction

I am trying to deploy smart contract on private network and do transactions via nodejs script. This is my genesis block: { "config": { "chainId": 16, "homesteadBlock": 0, "...
3
votes
1answer
2k 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 ...
12
votes
1answer
340 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 ...
3
votes
1answer
5k views

How do you calculate gas limit for transaction with data in Ethereum? [duplicate]

What is the correct algorithm to calculate gas limit for transaction with data in Ethereum?
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
1answer
534 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: ...
3
votes
1answer
158 views

Can someone verify this answer: gasLimit vs. minGasLimit

I would have thought that these are the upper and lower bounds of how much gas can be used in any one transaction. But the mainnet file has the same value for each of these. Can someone explain what ...
2
votes
1answer
177 views

Why would gasLimit be read as 4,700,036 instead of 4,712,388?

I have the Block Gas Limit of a private Parity-based blockchain set to 4,712,388. That's the "gasLimit" parameter. But when I view it on a block explorer on the very first block running on this ...
2
votes
1answer
213 views

“Thawing” mechanism to increate Block Gas Limit?

A smarter man than I (@edmund-edgar) recently told me: Th[e Block Gas Limit of 5000 as noted by the gaslimit=0x1388 parameter] represents the current Ethereum main chain, and the initial gas limit ...
2
votes
1answer
330 views

How to caculate/estimate Gas Limit and Gas Price based on current state of the ether network?

Ethgasstation and similar websites estimate proper Gas Price based on current state of Ethereum network. Is there any way of using working with Geth/web3 to estimate proper Gas Price? and similar to ...
1
vote
1answer
283 views

Gas Consuption: Deploying contracts from within a contract

I have a contract A that does nothing other than allowing to deploy contracts B and C in functions. Deployment of A exceeds gas limit. Seperate deployment of B and C work fine. So my naive assumption ...
14
votes
3answers
765 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?
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 ...
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 ...
3
votes
2answers
132 views

Will sharding allow for a much lower gas limit?

The current gas costs are for all nodes to process a transaction or contract function call. Once we have sharding, only a subset on the nodes(1 shard) will process that transaction/contract function ...
3
votes
2answers
395 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 ...
2
votes
1answer
657 views

Constant functions and gas

From what I've seen, constant and view functions do cost gas to run, since there is compute power involved. But geth will allow you to use up to 50,000 gas without asking. Is this correct? Does ...
1
vote
1answer
499 views

Remix IDE - transact to ___ errored: VM Exception while processing transaction: out of gas

pragma solidity ^0.4.18; contract Testing { address public owner; function Testing() public { owner = msg.sender; } function() public payable { } function withdrawAll() public { ...
1
vote
1answer
307 views

How to rescue my Ether [duplicate]

This comes happening being some time with me and i'm getting upset about it. In some terminal, i start geth with: geth -rpc --mine --fast --cache=1024 And in another terminal i start mine with my ...
1
vote
1answer
581 views

Getting 'base fee exceeds gas limit' on a transaction which requires a small amount of gas

I have the following contract: pragma solidity ^0.4.24; contract MyContract { address public owner; bool public unlocked; constructor() public { owner = msg.sender; ...