Questions tagged [gas-limit]

Question related to either the transaction or block gas limit.

Filter by
Sorted by
Tagged with
-1
votes
0answers
10 views

Transaction ran out of gas after adding gas and nonce in signedtx

When i called method from my test erc20 contract on private dev chain. it always gives me error that Transaction ran out of gas. but in parity event list it shows me that event occurred. i get ...
0
votes
1answer
18 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
14 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
17 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 ...
0
votes
0answers
33 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
1answer
19 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
39 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
21 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
25 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
29 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
18 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
42 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
26 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 ...
0
votes
1answer
36 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
83 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
42 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
151 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
26 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 ...
1
vote
1answer
36 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
33 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
20 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
25 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
17 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
21 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
43 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
31 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
30 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
54 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
152 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
73 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
25 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 (...
0
votes
0answers
11 views

Is there works to get rid of the GAS fee system for Ethereum 2.0?

Making transactions and constantly getting it failed due to gas limit settings is a hindrance to ETH adoption especially for newbies coming to the platform. Has there been any dev talks about getting ...
0
votes
0answers
142 views

Why is my metamask transaction failing even if I set a high gas limit?

Below is a failed transaction. i set the gas limit to double of what it normally is, but it still failed. How can one figure out the correct gas limit, if the auto settings don't even work. Why does ...
1
vote
1answer
22 views

Where can one get token fee calculations instead of it keep eating up my ETH for gas for guessing the gas limit?

This is kind of ridiculous, every time I try to send out tokens to another address from metamask, it fails. I doubled my GAS limit from 20K to 70K and it still fails. Where can one even find the ...
1
vote
2answers
76 views

Gas usage for same contract is constantly growing

Here is the smart contract. The gas usage for this contract is constantly growing. All state variables are initialized at deployment and never changed. Signers array is about 2-3 in size no more. And ...
1
vote
1answer
25 views

Block Gas Limit Doubt

Suppose i have a loop. Here user is a struct of which player is an address. address[] memory addrs = new address[](n); for(uint i=0;i<n;i++){ addrs[i] = user.player; } return addrs; This is a ...
0
votes
1answer
67 views

Is there a drawback of setting a too high gas limit for a transaction?

Say, I want to send a transaction that consumes around ~40,000 gas. Could I just set the gas limit of the transaction to 1 million or is there some disadvantage and I should set a more realistic gas ...
0
votes
1answer
72 views

What is the meaning of “Gas Used” on ethgasstation.info?

It's rather confusing cos when I googled "gas used" I don't get any exact result, NOT even from ethgasstation.info and most people are talking about transaction price, gas limit, etc. So, does "gas ...
1
vote
1answer
134 views

How to charge percentage of transaction cost?

Example: uint public createPostCost = 0.0003 ether; function createPost(bytes32 _post) public payable { require(msg.value >= createPostCost); Post memory newPost; ...
1
vote
1answer
494 views

Error set address/adding data, error: “gas required exceeds allowance or always failing transaction and the function doesn't work”

I'm trying to do a data access control system with smart contract. I have 3 entity: Client: who can get data and set address of Oracle Oracle: who can add data and have getData() function RBAC: Role ...
0
votes
1answer
20 views

Understand the potential issue of miner controlled gaslimit

I am aware that smart contracts running on top of EVM can access certain system properties such as timestamp, block number, and gas limit. I am also aware that such properties can be controlled by ...
0
votes
0answers
104 views

Test requires block gas limit much higher than deployment cost

Im testing a really big smart contract using Truffle and Ganache-cli for my test blockchain. The Ganache-cli configuration im using is this: ganache-cli --allowUnlimitedContractSize -l 471238800 -d ...
0
votes
0answers
43 views

JSON RPC get this error “Request have return error: gas required exceeds allowance or always failing transaction”

i'm trying to do a simple transaction for a token but i keep getting following error for estimate gas limit : "Request have return error: gas required exceeds allowance or always failing transaction" ...
1
vote
1answer
122 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: ...
0
votes
1answer
51 views

remix - gas limit exceeded, but contract is running on blockchain

i studying remix and ethereum, and create my local blockchain. and create contract with remix.the contract just print simple word. pragma solidity ^0.4.8; contract HelloWorld{ string public ...
5
votes
2answers
662 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 ...
2
votes
0answers
96 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 ...
0
votes
1answer
374 views

Truffle and Ganache - do I need to set the same gas-price and gas-limit in both of them?

Or can I set different values? If I can set different values, then how will they be used in the system (i.e., what gas-price and gas-limit will apply in every transaction that I execute)? Here is my ...