Questions tagged [gas-limit]

Question related to either the transaction or block gas limit.

Filter by
Sorted by
Tagged with
0
votes
0answers
13 views

gas required exceeds allowance while trying to mintERC721 token using myetherwallet [closed]

I have been working on Udacity Blockchain capstone project. I ran all the tests and deployed the contract on rinkeby test network. However, when i try to mint the token it is giving me above errors. I ...
0
votes
0answers
11 views

How can I get the gas limit specified for a past transaction from web3?

I'd like to know the difference between gas limit specified and gas actually used by a confirmed transactions from previous blocks. For each transaction on Etherscan, you can see both the actual gas ...
0
votes
1answer
25 views

Why array.pop() doesn't work on my private network?

I have deployed a PoA network using Hyperledger Besu and I'm using Remix in order to code a very simple smart contract. Here is the smart contract code: // SPDX-License-Identifier: MIT pragma solidity ...
0
votes
1answer
46 views

How to estimate gas limit for “payable” smart contract?

We all know that gas limit for EOA to EOA transfer is 21000. I am got stuck at a point and unable to get dynamic gas limit estimation for "payable" smart contract using Web3. When sending Ether from ...
0
votes
0answers
18 views

How do I add more gas to the ganache-cli

I started the ganache-cli with 'ganache-cli -l 800000000' I deployed my contract with 'truffle --network development' which is defined in the truffle-config.js file as: networks: { // Useful for ...
0
votes
0answers
19 views

Ethereum token transaction taking too much time to confirm [duplicate]

I was transacting an ethereum token CRO crypto coin out of wallet. There was 3 fees options. I chose fees for slow transaction time. And it told the transaction should confirm in 30 minutes. But now ...
0
votes
1answer
19 views

What does “gas limit” of a block limit?

Many people(one example) stated that "gas limit" of a block limited "gas limit" of transactions included in it. To verify, I downloaded a block (block number: 10185031) and added "gas limit" of all ...
0
votes
2answers
38 views

Why are transaction fees defined by both gas price and gas limit, and not just one cost limit?

I understand that the gas limit is there so that we don't lose all our ETH when something goes wrong. The gas price is there to define how much 1 gas costs. But the fee is always gas price * gas limit,...
0
votes
0answers
32 views

How to correctly account for transaction costs when swapping from one ERC-20 token to another using for example the Kyber network?

If I for example have 5 KNC (an ERC-20 token) and would like to swap them for x amount of DAI (another ERC-20), this would on the Kyber network, as far as I understand, be achieved via two conversions:...
2
votes
1answer
121 views

How does miners vote to determine the block gas limit?

In many posts people say "miners periodically vote to determine the block gas limit". But how actually do they vote and change the block limit? Do they vote for every block/or do it every day or for ...
0
votes
0answers
23 views

intrinsic gas too low in Ropsten

I am trying the sendSignedTransaction in Ropsten and I assigned the value of gas limit and gas price: gasLimit: web3.utils.toHex(21000), gasPrice: web3.utils.toHex(web3.utils.toWei('10', 'gwei')) ...
2
votes
2answers
34 views

Gas cost for Ether transfer to Smart Contract from EOA

It is pretty clear that Ether transfer between accounts is 21,000 gas. Does the same apply for transferring Ether to Smart contract address, or does transfer from EOA to Smartcontract cost more gas? I ...
0
votes
0answers
22 views

Invalid nonce and gaslimit

When i try to deploy a contract i get the following errors Skipping adding transaction to block because of gas limit: 0x7893d69159325fb60c90772c84b9e3c74a1627440d70e799fce81275066e8743 (limit: ...
0
votes
1answer
55 views

How to Specify Gas Limit and Value in wei or gwei?

Dear Anyone Who Can Help Me, This is my first time posting and asking for help, I'm in the midst of Deploying and Running the Transactions in Remix IDE (as per the picture). I'm stuck at the Gas ...
4
votes
1answer
67 views

How transactions are selected by the miners?

The deployment of transaction executions is bounded by the block gas limit that changes dynamically. If a block fits only one transaction, then the gas limit per transaction is, in theory, the same as ...
3
votes
0answers
36 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 ...
0
votes
0answers
44 views

Geth automining includes only 1 transaction per block

I am trying to perform a heavy load and scalability tests on a smart contract. However, the test takes a lot of time because only 1 transaction is added per block. I read that this might be due to ...
1
vote
2answers
36 views

How can I find out the sender's gas limit?

Is there a way to check Sender's Gas Limit? If the sender sets too low, I will just accept whatever gas amount that he had set and return immediately without hitting the limit. I am trying to ...
0
votes
1answer
29 views

Send transaction with locked contract -> Error: insufficient funds for gas * price + value

I'm trying to send a transaction for a token with a locked contract. I'm doing this to find out when this contract will be open. So I'm expecting to get some kind of error like "ERC-20 Token Transfer ...
0
votes
0answers
20 views

Gas limit per block - Increasing or Decreasing the value of Gas limit in Go-Ethereum Source Code

My question is that is it possible to modify the value of Gas limit per block in go-ethereum source code. If yes, which part of GasLimit value could be affected on the Gaslimit per block in source ...
3
votes
1answer
30 views

Can I add an int32 to an int256?

I'm trying to reduce the storage size of my contracts by reducing the bytes required to store my int data types (among other things). Can I get the best practice for adding int256 and other smaller ...
1
vote
0answers
76 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 ...
2
votes
1answer
37 views

Can I estimate the total gas limit of several dependent transactions?

Assume two dependent transactions A and B. Transaction B depends on transaction A and will fail if transaction A has failed. I would like to estimate the gas limit required for the success of both ...
0
votes
0answers
46 views

Insufficients funds to Deploy Contract on Test Network

Here are my files on github, https://github.com/ArtieLadie/gas_limit https://github.com/ArtieLadie/gas_limit/blob/master/deploy.js sets gas limit here, async function deployContract(web3, contract, ...
1
vote
1answer
36 views

My private ethereum block gas limit decrease when mining

I set 'genesis.json' like this. ... "gasLimit":"0x30479e80", ... It's 810,000,000 at decimal. But when I run the blockchain and start mining, the block gas limit decrease. I'm using Geth/v1.9.7-...
0
votes
1answer
98 views

Size limit to number of items in a struct

If I loop over mapping into a struct the gas fee is very low. However, in trying to test its limits, the EVM often causes Remix to crash in creating edge cases, because I'm creating blocks of 50 new ...
0
votes
2answers
42 views

Internal contract-to-contract call

I am confused with the following sentence in the Solidity documentation: During the execution of the fallback function, the contract can only rely on the “gas stipend” it is passed (2300 gas) being ...
1
vote
1answer
22 views

Explanation for small variation in gasUsed while recursively deploying same contract

https://github.com/christianlundkvist/simple-multisig/blob/master/contracts/SimpleMultiSig.sol I'm deploying the above contract recursively and I find that the gasUsed varies by specifically 12 gas. ...
0
votes
1answer
225 views

ethers.js - estimating gas limit

Using the ethers.js library, how can I determine the gas limit when sending a transaction to a contract or deploying a new contract?
0
votes
2answers
39 views

handling block gas-limit in a large loop

I have a loop like this: struct User { string name; uint tokens; uint frozenTokens; bool isValid; } mapping(address => User) users; address[] public usersAddresses; function ...
1
vote
1answer
122 views

Defined GasLimit in genesis file and in web3j gasprovider

Im having issues when I try to implement a back end that generate smart-contract transaction calls using web3j. But I'm a lit confused with the gas limit concept. I have defined inside the genesis ...
0
votes
0answers
398 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, "...
1
vote
0answers
44 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
0answers
20 views

How can we increase block gasLimit without reinitialiting the genesis block? [duplicate]

Is it possible to increase block gas limit without reinitializing the blockchain ?
2
votes
3answers
253 views

gasLimit 5000 on private Ethereum geth node

Problem: I've upgraded my geth node to the latest version (1.9.0-unstable). The block gasLimit of the node is fixed at 5000: eth.getBlock("latest").gasLimit 5000 When I try to send a transaction, I ...
0
votes
1answer
70 views

Kovan contract creation gas limit behavior

I have a fairly large contract that I must create on Kovan network for testing. There is fairly weird behavior occurring when I am trying to create the said contract. Behavior being: whenever ...
2
votes
1answer
116 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(), ...
0
votes
0answers
71 views

“Out of Gas” while transferring ethereum from account to contract

I am using ganache to create 10 ethereum accounts. I want to transfer ethereum from one account to a smart contract. I am doing this by writing two following smart contracts in solidity; pragma ...
1
vote
1answer
29 views

divide ethers to current token holders only

My task is to divide the dividend sent by owner to the contract to the current token holders.The token holders can come later and redeem their pending amounts, the important point here is that, when a ...
0
votes
2answers
32 views

Does a transaction that consumes the block gas limit take an entire block by itself?

Does a transaction that requires the entire block gas limit to be executed (currently ~8M) take the entire block by itself? And if that's true, will that transaction take longer to get confirmed than ...
0
votes
1answer
20 views

When calling a contract from an other contract, what happends if the value of callgas argument is above availaible gas?

In such case, the value is replaced with available gas right ? Or Does an out of gas exception is thrown ?
0
votes
1answer
43 views

Get gas limit beforehand with Web3

I know that web3 exposes a function to estimate gas limit, but is it accurate when sending to a contract? AFAIK the amount of gas I'm gonna need if sending to a contract depends on the contract code, ...
0
votes
0answers
14 views

Can web3js accurately estimate a transaction that includes an external call?

Can web3js accurately estimate a transaction that includes an external call? For example, will it be accurate in estimating: (bool _success, bytes memory _response) = _to.call.value(_value)(_data); ...
3
votes
0answers
70 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-...
0
votes
1answer
52 views

What are the parameters for the ideal gas limit?

I am new to writing smart contracts, in recent times I am having trouble in deploying the smart contracts couple of times so I need a solution for that. I am using the truffle most of the time so ...
0
votes
0answers
44 views

Is gas limit constant for regular transfers? [duplicate]

Afaik the minimum amount of gas, required for a regular ETH transfer is 21000. Is 21000 specific to the protocol itself, or does it depend on the particular network? Does it depend on custom data, ...
1
vote
2answers
315 views

Error: gas required exceeds allowance or always failing transaction in Remix using Ropsten network

I am facing this error , My Contract is quite simple pragma solidity ^0.5.0; contract sendEther { address payable sender; function showReceiver() public view returns (address payable) { ...
2
votes
1answer
250 views

Kaleido private network transaction exited with an error (status 0) after consuming all gas

I've created a private PoA network with two geth nodes using Kaleido (release 1.0.13) and am trying to deploy some smart contracts to it using the drizzle-kaleido-box boilerplate from truffle. The ...
0
votes
1answer
256 views

What should gas prices be for sending out tokens?

I constantly get failed transactions when sending out tokens like USDT using metamask. I have my gwei set at 10 and the gas limit at 21000. I even tried gas limit set to 51000 and it still fails. ...
0
votes
1answer
30 views

Different between gas and gasLimit keys when executing transactions

Below is the code that I'm running. When I entered "gas" and "gasLimit" as the keys, both worked. Why is that? What does "gas" represent? And what is the optimum amount of gasLimit should I use (...

1
2 3 4 5 6