Questions tagged [gas-limit]
Question related to either the transaction or block gas limit.
124
questions with no upvoted or accepted answers
4
votes
0
answers
200
views
Does 'estimateGas' behave the same on Ganache and on mainnet?
I noticed that estimateGas behavior in Ganache has changed:
In version 6.4.1, it throws an exception if exceeding the gas-limit.
In version 6.5.1, it returns the estimation even if exceeding the gas-...
4
votes
0
answers
467
views
Difference between execution costs on remix an Ganache?
I created a contract on remix and then deployed it. when I call any function there is an execution cost in gas. I also deployed the same contract on Ganache for testing. I find the execution cost in ...
4
votes
0
answers
225
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
0
answers
594
views
how Set manual gas limit for specific transaction(using hardhat, polygon test and main network)?
how Set manual gas limit when deploying(mint) for specific transaction(using hardhat, polygon test and main network)?
3
votes
0
answers
132
views
What parameters should I use in my EIP1559 transaction for a fast confirmation time
Looking to take part in some minting gas wars and looking to prepare a transaction before hand. What values should I use for my Base Fee Per Gas, Max Fee Per Gas, and Max Priority Fee Per Gas to ...
3
votes
0
answers
46
views
Blocks can't contain more than 81 transactions
I'm building a private blockchain with Parity clients. For performance testing, I'm submitting many identical transactions. One of the nodes has a GPU miner attached. There are 2 issues I cannot ...
3
votes
1
answer
1k
views
Error Ganache: Run out of gas - Works in Remix/Not from dApp
I am working on an application that stores and retrieves personal data on/from the ethereum blockchain. Just working on this to improve my Solidity and SC expertise and get comfortable with the ...
3
votes
0
answers
664
views
What is the max value of gaslimit in genesis.json?
What is the max number of gaslimit you can set in genesis.json?
I'd like to put lots of data in one block, so I need to set max gaslimit in genesis.json.
3
votes
0
answers
199
views
"Removed tx from pool: low tx nonce or out of funds" on deploy empty contract
First, I know that there is a similar question, but maybe we're talking about different problems.
I'm running geth-1.4.3-stable.
My account balance is: 1808.90008114 ether
I want to deploy a ...
2
votes
1
answer
31
views
How can I keep gas execution cost as close to gas limit as possible?
I notice that the percentage of total consumption varies across different functions on the blockchain.
For example: this one uses 94%, while this one only uses 51%.
From a developer perspective, how ...
2
votes
1
answer
580
views
"contract x" ran out of gas. Something in the constructor (ex: infinite loop) caused gas estimation to fail ganache
i'm trying to deploy contracts on private network ganache using ganache application.
but it threw an error because of its big size:
"contract x" ran out of gas. Something in the constructor (...
2
votes
0
answers
34
views
Using veiw functions to overload Blockchain node
Question: What is stopping me from creating view function with heavy computation (infinite loop). Deploying it on Blockchain and then calling it just so I could overload a Blockchain node that ...
2
votes
0
answers
471
views
Is gasleft() the best way to manage big loops in solidity?
I'm developing an Smart Contract that has to iterate through an undetermined size list of ERC20 tokens, and make a swap for each token. I'm aware that you cannot loop an undetermined size list, ...
2
votes
0
answers
116
views
Send raw transaction from geth when not synced (exceeds block gas limit)
I have a geth node which is not synced and I want to send eth.
> TX={ from: FROM, to: TO, value: VALUE, nonce: NONCE, gas: GAS, gasPrice: GP }
> personal.unlockAccount(...)
> SIGNED_TX=eth....
2
votes
0
answers
587
views
Maximum amount of TX per block
Yesterday we did a test. We launched around 1500 transactions simultaneously to our test private blockchain.
They all went through perfectly, all at almost the same time (with correct and consecutive ...
2
votes
0
answers
155
views
What Web3JS method do I call to know what value to use for the gas price with sendSignedTransaction?
I am using Web3JS 1.0+ to send transactions to my smart contract.
I've been using the following constant for the gas price in my code that I got a long time ago from a tutorial. What is the "...
2
votes
1
answer
593
views
Exceeds block gas limit error to call view functions
With solidity view function, you can specific the amount of gas to use.
My understand is since it is not a state changing transaction, all the gas cost is not charged for, and the client should be ...
2
votes
1
answer
224
views
Can the behaviour of the Ropsten Test net be compared to that of the main net?
can be assumed, that a contract behaves in the same way on the Ropsten Test test as well as on the main net, in terms of gas consumption for example?
(I think, that the gas price might be different?)
...
2
votes
0
answers
566
views
Remix Testrpc "base fee exceeds gas limit"
I am following this great tutorial from Ed Zynda. I started testrpc and tried to deploy the FuncToken.sol to a Web3 Provider. I managed to connect to the local RPC (have to change protocol from https ...
2
votes
0
answers
737
views
Parity error -32010 Transaction cost exceeds current gas limit. Limit: 4703218, got: 4712388. Try decreasing supplied gas
I am playing with a private blockchain. I get this error when I try to deploy a contract:
[-32010] Transaction cost exceeds current gas limit. Limit: 4703218,
got: 4712388. Try decreasing ...
1
vote
1
answer
68
views
Why does MetaMask cap the gasLimit for ERC20 transfers?
We have found that MetaMask doesn't appear to actually estimate gas for ERC20 transfers as it does for interactions with other contracts.
Here, it appears to estimateGas when the interaction is with a ...
1
vote
0
answers
63
views
Is in L2 gas limit much higher than in L1?
Naturally, in a blockchain gas per transaction is limited, because block place and distributed calculating power are scarce resources.
Can you point me a Level 2 system, where the gas limit per ...
1
vote
1
answer
262
views
increase the gas limit for read functions
hey guys this may be a broad question...
I'm writing a smart contract that recursively builds an svg image given a seed number. the function that draws the image is a view function so it doesn't cost ...
1
vote
0
answers
15
views
What is current block gas limit after Ethereum Merge update?
What is the current block gas limit after Ethereum Merge update?
1
vote
0
answers
28
views
Error message after contract interaction was successful
When calling a contract function, I am getting the common unable to estimate gaslimit error message: Error: cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://...
1
vote
0
answers
132
views
tx.gasprice gives wrong gas estimation
I am using tx.gasprice and block.basefee in my contract to calculate the used gas.
The problem is that I can't estimate the gas correctly or sometimes not at all when the contract uses tx.gasprice;.
...
1
vote
0
answers
309
views
Why does the Polygon PoS Chain Average Gas Limit (per block) keep changing?
Most EVM chains have a fixed gas limit and gas target per block. For Ethereum, it's 30M and 15M: https://etherscan.io/chart/gaslimit
For Polygon, the gas limit seems to change every single block. How ...
1
vote
0
answers
32
views
Deterministic gas use
In ether, any pure ether transfer will always cost 21000 gas.
However, due to the nature of the MPT used in the Balances tree, wouldn't some addresses have more layers of the tree to hop through and ...
1
vote
0
answers
17
views
Can I use a function gas cost to calculate network utilisation?
I’m developing a governance DApp and need to research various blockchains and their scalability. One of the ways I’m doing this is by estimating the gas price of all the smart contract functions that'...
1
vote
0
answers
306
views
Block capacity - Hyperledger Besu
Good afternoon,
I am trying to perform a transaction capacity test on my network with Hyperledger Besu with 4 validator nodes and a time per block of 4seconds.
I have created a script with NodeJS that ...
1
vote
0
answers
90
views
How can I use eth_estimateGas on a mint function when the public sale is closed?
function mint(uint256 addr, uint256 id) public payable {
require(id < 10000000000, "id invalid");
require(saleActive == true, "Public Sale not active!");
require(msg....
1
vote
0
answers
122
views
Setting gasLimit hides actual error returned from contract
I have a minting smart contract deployed on Rinkeby and using dapp to call mint function using ethers.js. However I’m kind of stuck in loop of two problems that revolve around each other.
1- If I don’...
1
vote
1
answer
60
views
how to tackle block gas limit to send large data file as transaction on ethereum
I want to send ethereum blockchain a file approx 39KB. The file is like array generated by python code. I dont want to use IPFS and oracle. Is this file exceed block gas limit? if yes, then can i ...
1
vote
1
answer
189
views
estimate gas usage for a contract
I'm trying to estimate the gas usage for a smart contract for an NFT token - is it possible to do before the actual sale?
contract is already published and all functions as well.
so I want to know how ...
1
vote
1
answer
522
views
My ERC-721 minting gas fee is almost $10000. Too high. How fix it?
I just deployed NFT Dapp on mainnet.
Estimated gas fee is too High. It's almost $10000
How can i fix it?
I never knew on local canache or rinkeby testnet
There was fine gas fee..
is it depend on ...
1
vote
0
answers
70
views
Out of gas exception though only 99% was consumed
We know one of our transactions consumes always 62_599 of gas, once we have decided to set the gas limit to 63_000 the tx has failed with out of gas exception.
Right after we have increased the gas ...
1
vote
0
answers
261
views
Rinkeby/Infura Block Gas Limit Issues
I am trying to deploy a contract with a gasLimit of around 8,000,000 on the Rinkeby testnet using an Infura provider. Basically something like this:
await MyContract.deploy({ gasLimit: 8000000 });
...
1
vote
0
answers
59
views
What happens when you pass more gas than what is available?
When making a contract call in Solidity, the gas stipend can be altered with the following special options:
{value: WEI_VALUE, gas: GAS_VALUE}
What happens when the GAS_VALUE is bigger than what is ...
1
vote
0
answers
148
views
What are the benefits of using hard coded gas values in smart contract?
I was reading the docs of Arbitrum and found this
hard coded gas values should be adjusted (or better yet, removed entirely if possible (it's probably possible; really now, why are you hard-coding a ...
1
vote
0
answers
205
views
Gas Estimation Error - Swap Contract
I'm working on developing a contract that automatically performs a swap and have been having an issue with the swap function. I finally got the contract deployed on Kovan, but have been getting the ...
1
vote
1
answer
45
views
Does copying mappings variables that are large such as balances cosume a lot of gas?
In erc20 contracts, conventionally balances mapping saves the current balance the users are holding.
mapping (address => uint256) private balances;
If this contract has a lot of users( which means ...
1
vote
0
answers
141
views
How to fix gas-related errors in sending a transaction
I tried to make my first transaction but kept failing.
I searched here and there but still could not find a solution.
And came here to write a question.
I am trying to send some from account[0] to ...
1
vote
0
answers
41
views
Why is there gas infinity here?
I'm starting with Solidity and Smart Contracts, and the static analysis in Remix is complaining about gas infinity for the function bet:
contract Forecast {
struct Bet {
address ...
1
vote
1
answer
134
views
Changing contract property to public increases gas costs
I am following kind of an outdated tutorial and trying to adapt it to the more recent changes in Solidity and other packages. Following one of my changes, I am running into a problem that I can't find ...
1
vote
0
answers
1k
views
Does the gas limit for AAVE transactions need to be so high?
There are two parts to the fee you pay for an Ethereum transaction - gwei and gas limit. Gwei is determined by how competitive (ie, congested) the Ethereum network is. As most people are aware, the ...
1
vote
0
answers
492
views
Gas estimation errored with the following message (see below). The transaction execution will likely fail
When I try to excute the deposit function it shows Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?
execution ...
1
vote
0
answers
79
views
Store constants as non-256 bit fields
My contract has a lot of uint256 constant fields that are later used for various calculations. I am close to reaching the maximum allowed contract size and I am looking for optimizations.
I see that ...
1
vote
1
answer
561
views
Can't call function from contract using web3.js due to gas issue
I'm building a smart contract and dapp using ganache and web3.js.
In my smart contract I have a function (named "add_pilot") which gets 4 parameters and add them to a mapping. It looks like this:
...
1
vote
0
answers
253
views
Error in mist : exceed block gas limit
I am trying to deploy a smart contract in private network using mist, but when I deploy my contract and provide transaction fee as 0.04 ether it throws error as exceeding block gas limit. Here is the ...
1
vote
0
answers
49
views
How can i deploy contract with > 4.7 Mgas required on Ropsten?
I was able to deploy contract that requires more gas than default Ropsten block gas limit:
https://ropsten.etherscan.io/tx/0x7c40cd2c539c03d110da8988641518ff6ff907a284f5074ed3d8517eb80b51f9 (5594037 > ...