Questions tagged [gas-limit]

Question related to either the transaction or block gas limit.

Filter by
Sorted by
Tagged with
1
vote
1answer
24 views

Loop with upper bound of iterations / loop variant

Is it possible somehow to create a loop that solidity will recognize as having an upper bound of iterations for gas estimations? Something like a loop variant in Eiffel (https://www.eiffel.org/doc/...
0
votes
1answer
32 views

Sending funds to a possible smart-contract

When sending funds to an Ethereum address, Should my wallet check in the blockchain whether the address is associated with a smart contract? In order to choose the gas limit automatically. If someone ...
0
votes
1answer
14 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
1answer
102 views

What is the unit of measurement used in GasPrice and GasLimit?

I did a check, in ethgasstation the current safeLow = 15GWei, which is equal = 15,000,000,000 wei However, when I issue eth.getBlock("latest") what I get was: > eth.getBlock("latest") { ...
0
votes
0answers
23 views

Is gas limit constant for regular transfers?

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, ...
0
votes
1answer
449 views

Error: Transaction:exited with an error (status 0) after consuming all gas

New to Ethereum and learning unit testing with Truffle. Here in smart contract function; function createAgreement( bytes32 _id, address _owner, string _fileHash, ...
1
vote
2answers
19 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
31 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
54 views

Reverted tx on Ropsten but gas limit not reached

This is a timed crowed sale contract https://ropsten.etherscan.io/tx/0xaa3fa69a32060ad578cb9bc2a94fcc4cf7109f4e743f54c527c18f764f634ebb Error encountered, bailing. Network state unknown. Review ...
0
votes
1answer
27 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
2answers
47 views

Infinite gas on assigning struct

I have this code and it gives me infinite gas. please help me improve it. pragma solidity ^0.4.23; // v6 contract owned { constructor() public { owner = msg.sender; } address owner; ...
0
votes
1answer
65 views

Locked ERC20 paid out as tx-fees to DAO holders

I'm creating a contract where people transact by using locked ERC20 tokens. For example - you'd have 500 of token A locked in the DAO contract. You decide to send 100 of token A to some other ...
0
votes
1answer
22 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
1answer
196 views

Can't invoke SC function: Error: gas required exceeds allowance or always failing transaction

I've deployed my smart contract to Rinkeby test net. The "addProject" function works fine. But when I try the "addProjectFile" function I got error. "Error: gas required exceeds allowance or ...
0
votes
0answers
10 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
26 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
17 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 ...
0
votes
1answer
140 views

Deploy Smart Contract to Mainnet using Truffle

I was able to deploy the contract successfully to Kovan with gas limit 350000. When i set the gas in truffle.js to 500000 for deployment to Mainnet, i get the below error: Error: Transaction cost ...
1
vote
2answers
65 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
20 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 ...
1
vote
1answer
308 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 ...
0
votes
2answers
168 views

Finding gas to be used by a transaction

Is there a way to find the total gas that will be used by the transaction before a tx actually takes place? Does the gas used depend on the amount of tx size in kb?
3
votes
1answer
144 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 ...
0
votes
1answer
171 views

Increase gas limit to allow larget contracts to be deployed

I'm working on a private blockchain and I found out that I cannot deploy a contract larger than 34Kb which is pretty limiting for me. For comparision, cryptokitties are 40-47Kb so I cannot even deploy ...
0
votes
1answer
164 views

change gasLimit parameter into the genesis.json file on azure priavte blockchain

I am trying to deploy a smart contract to an azure blockchain. The contract is deployed without errors but i can't submit transaction to the blockchain through this contract. I guess this is an issue ...
0
votes
1answer
132 views

Deploying Crowdsale in Ropsten Network givin Gas Limit issue

Below is the Code of My CrowdSale , which is giving The contract code couldn't be stored, please check your gas amount. pragma solidity ^0.4.18; import "./TorCoin.sol"; import "zeppelin-solidity/...
0
votes
1answer
146 views

Infinite gas estimate for almost all the functions. Is it normal?

When I deploy contract test net, it shows an error that gas limit exceeds: 3000000 What's the solution? Github Link to the smart contract. And is it normal to have the infinite gas estimate of ...
1
vote
1answer
205 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 ...
0
votes
1answer
41 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
267 views

infinite gas required of simple external function call

I have minimized the following solidity code generated in remix to demonstrate the issue. This code warns the test001.regester function requires infinite gas which obviously by the code cannot be. ...
3
votes
2answers
136 views

Can i compel miners to privilege my transaction by setting a high gas limit?

I'm trying to send ether to a contract that has a fixed gas price, so I want to know if I can incentive miners to accept my transaction before someone else's by setting a high gas limit. Do miners ...
1
vote
1answer
89 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
318 views

Why do my FAILED transactions get charged the max gas price?

I tried buying TEL on EtherDelta and had two failed transactions in a row, both charged at the max gas price, one after like 15 mins and the other instantly. How come I get charged for a failed ...
0
votes
1answer
18 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 ...
0
votes
2answers
59 views

Minimum Gas limit and how can it be reduced?

Why does this minimum exist and what can we do to to reduce it further. This line of thought was spurred by this tweet from Vitalik: "And there are layer 2's without data availability tradeoffs or ...
1
vote
1answer
106 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; ...
0
votes
2answers
597 views

Recommended Gas Limit for Single Transaction

Current mainnet gas limit per block is 8M (7.99), that of Ropsten is 9M (which is actually rather surprising as it was 4.7M two months ago and I did complain about it...). Given the above, what's the ...
1
vote
1answer
158 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 ...
1
vote
2answers
49 views

Analize gas usage and contract design

Suppose that I've the following contract code: pragma solidity ^0.4.23; contract pensCollection{ struct Pen{ uint productCode; address ownerAddress; } address public ...
0
votes
1answer
39 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 ...
0
votes
1answer
16 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
1answer
38 views

Can anyone tell me how I can improve gas requirement?

Below is my smart contract. Remix gives warnings on each of the following functions: Gas requirement of function MedicalRecord.addNote(bytes32,bytes32) high: infinite. Gas requirement of function ...
0
votes
0answers
66 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
28 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" ...
0
votes
0answers
86 views

About gas limit and gas

I'm developing Dapp, In that app one function consuming a gas but I am providing sufficient ether at the time of initiating transaction by web3 for the Dapp Users,Then also it is showing out of gas ...
5
votes
2answers
545 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
82 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
176 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 ...
0
votes
3answers
1k views

Truffle - test - how to get more than 10 accounts?

I want to test gas limits of the block. Currently in my tests: console.log(accounts); console.log(accounts.length); I have 10 accounts, what to do if I want more? Related: https://github.com/...
0
votes
2answers
701 views

“The transaction execution will likely fail. Do you want to force sending? VM Exception while processing transaction: out of gas”

When I want to deploy a contract using testRPC and remix, I receive the following error message: Gas estimation errored with the following message (see below). The transaction execution will ...