Questions tagged [gas-price]

Questions dealing with the gas price of a transaction.

Filter by
Sorted by
Tagged with
20
votes
1answer
61k views

Gas price in ETH unit

I am wondering if there's a website that provides the price of the standard gas limit (21000 Gas, transaction cost for sending ETH) in ETH unit. I checked Ether.Fund site, but it provides the gas ...
20
votes
1answer
3k views

What were the key assumptions and analyses that went into setting Ethereum's gas price?

Frontier was launched with a default gas price of 0.05e12 wei. In Homestead, the default was reduced to 0.02e12 wei. If this gas price is too low and operations on Ethereum are too cheap, for ...
18
votes
2answers
21k views

Can I set the gas price to whatever I want?

The default gas price is 0.02e12 Wei. But while creating transactions on the command line or Geth's Javascript console you can define your own gasPrice: web3.eth.sendTransaction({/* ... */, gasPrice: ...
16
votes
2answers
3k views

Where does the consumed ether/gas go?

I'm a bit new to ethereum and I'm finding it a bit difficult to understand how gas and Ether relate. So every call we do to a smart contract costs gas. Where does the gas that the user pay goes to? ...
16
votes
1answer
6k views

How much does it cost to use a contract?

Still new to ethereum and would like to know the price for a contract.
15
votes
1answer
1k views

How does “Gas Price Oracle” work?

How does "Gas Price Oracle" work? "Gas Price Oracle" is explained here in go-ethereum wiki, but it doesn't explain how it works. Where does it get the data from? How does it do its calculations?
12
votes
2answers
13k 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 ...
11
votes
2answers
516 views

Can I send gas to another user?

Gas is purchased using Ether, does that mean I can send gas as a separate coin?
10
votes
6answers
4k views

Why not mine my own transactions?

I have a contract which needs to be updated occasionally. So I create a transaction, sign it and send it to the network. When I do that, I state a gas-price. The higher the gas-price is, the faster ...
10
votes
1answer
1k views

Geth Gas price too low for acceptance

Why is geth not letting me post a transaction with a low gasPrice? > ./geth console > eth.sendTransaction({ "from": "...", "to": "...", "gas": "30000", "gasPrice": "10", "value": "0.1" }) Gas ...
8
votes
4answers
6k views

How to get the actual Gas price?

Is there a way to get the lowest and average price miners are asking for gas? Some statistics sites seem to have prices but they are outdated.
8
votes
3answers
862 views

trouble matching gas used in transaction with difference in account balance

I've fired up my testrpc and deployed a simple HelloWorld contract using truffle. I send a simple transaction to my contract and I log my account balance before and after the transaction. ...
7
votes
4answers
3k views

How are miners minimum acceptable gas price determined?

In section 5 of the yellow paper, it states "there will be a (weighted) dustribution of minimum acceptable gas prices.." My question is what, if any, is the enforcement mechanism that ensures this ...
7
votes
1answer
327 views

eth.gasPrice is returning less value than expected

As mentioned in documentation eth.gasPrice returns the current gas price. The gas price is determined by the x latest blocks median gas price. I was relying on this method to estimate current gas ...
6
votes
1answer
689 views

Should I use the default gas price?

I see that there is a default gas price, but does everyone use it? Do people get away with paying much less for gas? Are there any websites that track how long transactions take at different gas ...
6
votes
1answer
1k views

Is there a 'default' gas price and does it change when price of ether relative to fiat rises?

I understand how gas pricing works, so that is not my question. My question is, as the price of ether relative to fiat (US $) rises, does the 'default' gas price lower (if there is such a thing as ...
6
votes
1answer
473 views

Is it possible to mine my own txs with no fees?

It seems like minimum tx fee is around .001$ in Ethereum (maybe a little bit less) but I was wondering about the possibility of performing zero fee transactions, mining them by myself. Obviously, ...
6
votes
2answers
312 views

Deploying contract with no cost (gasPrice 0) on private network

In order to achieve a no-coin bootstrapping of my private network I'm trying to deploy a first special contract having zero funds in owner wallet (every wallet of this private network should have zero ...
6
votes
1answer
572 views

Since the price of ETH has gone up 10x in 6 months, should I be lowering the gas price for my transactions?

The price of ETH has gone from ~8 USD/ETH to ~90 ETH/USD in 6 months, but when I view transactions on the blockchain (example), I see that most people are still using the default gas price of 2e10 wei/...
5
votes
2answers
2k views

How to get the transaction cost in a Truffle unit test?

How can I get the actual gas consumed by a sendTransaction inside a truffle test? In the following test, buyer sends an amount of 50 ETH to a contract: const EmptyContract = artifacts.require("...
5
votes
1answer
921 views

Disable mining/gas/ether or set really low

When building a private ethereum network, with trusted Nodes (companies, investors, etc.) who all contribute to verifying the transactions. Three related questions/options: Would it be better/...
5
votes
1answer
7k views

Gas cost of different computations [duplicate]

Is there somewhere a list showing the different cost of different calculations?For example: Perform transaction: 21'000 gas calculate a hash: 30 gas addition of two numbers: 3 gas cycle in a loop: 1 ...
5
votes
2answers
1k views

With the rising Ether price to $9, doesn't this mean gas costs more?

With the increase in the ether price, doesn't gas cost more, hence higher price to execute a contract? What is the current gas price today to execute a typical contract or send a transaction?
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 ...
5
votes
1answer
4k views

Gas, gas price, gas cost

I have read in the documentation that the miner set the gas cost. Does this means that gas cost varies miner to miner ? If not, how it is determined ? Moreover, when a contract is referred in geth we ...
5
votes
1answer
323 views

Is the transaction fee reduced from the transaction value?

Address A holds 1 ether and address B holds 0 ethers. Lets create a transaction to transfer all balance from A to B. This transaction will consume roughly gas_price * gas_used = 20 gwei * 21000 = 0....
5
votes
1answer
6k views

What is the relationship between Gwei and gas?

I know that a Gwei means 1000000000 wei, but when we send a transaction with 21000 gas, is that mean we send 21000 Gwei? please explain Gwei for me
5
votes
1answer
101 views

Why does gas cost explode with more than 7 variables in a struct

I'm assuming this has to do with Ethereum's 7 variable stack limit but in the following code test struct TestStruct5 { uint8 m_nOther1; uint8 m_nOther2; uint8 m_nOther3; uint8 ...
4
votes
3answers
1k views

How much gas and gasPrice to set when signing a transaction?

const params = { to: '0xdbC0d76Fb1f2399b618FB29922dBC5cf763dd3d7', from: dbDeposit.depositAddress, value: balance, gas: 2000000, gasPrice: '234567897654321', nonce: 0 }; ...
4
votes
2answers
3k views

How can I estimate price of data storage? [duplicate]

I'd like to make estimations of the cost of an application, and one of the things I need is the price to store n kB of data on a contract. In ether and in USD. Where could I find rates or prices of ...
4
votes
2answers
2k views

How much does it cost to upload a smart contract?

I'm using a local Ethereum testnet and it seems to me that the price of uploading a smart contract is a bit too high. This is the code for the smart contract: contract Transfer { address owner; ...
4
votes
2answers
2k views

What gives ether it's intrinsic value? [duplicate]

Trying to understand how ethereum and blockchain work. I keep hearing that miners are needed to do the computations to unlock a block (don't know if that's the correct term). My question is this: ...
4
votes
1answer
960 views

Need help filling in GASPRICE and STARTGAS fields

I want to create my first transaction. There are several fields I need to fill in. From ethdocs.org: Transactions contain: ... STARTGAS value, representing the maximum number of ...
4
votes
2answers
2k views

Simple example for gas cost

I'm totally new when it comes to Ethereum and have a few questions when it comes to gas costs (I know of the 1.0 table but it doesn't really help me to find out what I need) If I simply want to ...
4
votes
1answer
3k views

Why “Insufficient funds” error?

I'm trying to send a transaction into testnet from an account having a balance of 516,561,000 Babbages. According to my calculations, this is exactly the cost of the transaction to perform. ...
4
votes
2answers
386 views

web3.eth.getGasPrice() always return 1GWei

For estimate transaction cost, I use web3.eth.getGasPrice() function. The return callback value always 1Gwei(1,000,000,000) in ROPSTEN. web3.eth.getGasPrice(function(error, result){ console.log(...
4
votes
2answers
2k views

Are smart contracts expensive?

I have a Python program using stack operations and string concatenations. It runs in less than a minute on a particular input, doing about 100 million string operations. Doing this number of ...
4
votes
1answer
760 views

Setting gasPrice not working on private network

I'm running geth with the following option: --gasprice 21000 But if I execute the following command: > eth.gasPrice It gives me 20000000000.
4
votes
1answer
171 views

How does gas price / deployment cost scale with network size?

Holding ether/usd price constant, how does the amount of gas for a transaction scale as more ethereum nodes are added? Does it become more expensive to execute the same transaction, since there are ...
4
votes
1answer
523 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
3answers
4k views

How can I set the gas price while deploying a contract with web3.js?

I set up a Geth node on the Rinkeby network recently. And while I can send ordinary transactions in seconds without a problem, I can't seem to get a contract creation to happen in less than an hour. ...
3
votes
1answer
680 views

what is difference between “gas” “gas price” and “fee”?

Can we say that gas is the unit of transaction fee ? And gas price is the same transaction fee ? If so, why we do not use ether and wei instead of gas ?
3
votes
2answers
2k views

What is maximum limit of GAS in a smart contract

Can you please explain the concept GAS in smart contract properly if possible with example. And what is the max limit of GAS in a contract? It is clear if i use more gas i have to pay more...so ...
3
votes
2answers
1k views

Unaffordable gas limit for my Ethereum based crypto-coin

The gas limit for single send transaction is about 21000 gas. Now I am creating my own Ethereum based crypto-coin, and I want to keep its conversion rate as 1 coin = 1 US$ and about 0.02 US$ as ...
3
votes
2answers
519 views

Would a minimal gas price tx ever be mined?

I want to mine and charge a minimal gas price (like the minimum required to prevent infinite loops and such), to enable many smaller transactions to be confirmed super cheaply and to lower the cost of ...
3
votes
1answer
146 views

Transaction fee restrictions with solidity

Can I restrict transaction fee (gas price) for the payable method of the crowdsale contract. And if I can, how? And one more question, if I restrict fee and call revert() - this transaction will be ...
3
votes
2answers
87 views

How to determine transaction fees using web3.py

I am using web3py to transfer tokens and ether. I need to track the transaction fees for each transaction. Given a transaction hash, how do I determine the total fee paid?
3
votes
2answers
426 views

Why do miners not always “vote” to increase the block gas limit?

Miners can increase/decrease the block gas limit. I read that they can increase/decrease for about 0.01% per block. Why do miners not always want to increase the block limit? This would lead in more ...
3
votes
1answer
5k views

Can gas price be fixed under 2 gwei?

I see that 20 gwei is the default gas price. A simple token exchange fee is around 0.5$ at the current price (230$). Reducing gas to 2 gwei takes more time to confirm transaction but reduce the fee. ...
3
votes
1answer
183 views

Determine network congestion, min required gas/gas price based on current conditions

Say I have an application that is making some low priority transactions. I'd like to keep them as low priority as possible without having them take 20+ minutes or poof and disappear. What's the best ...