Questions tagged [gas-price]

Questions dealing with the gas price of a transaction.

46 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
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 ...
3
votes
1answer
260 views

how to use web3j over infura to find exact gas price used for a successful transaction

my goal is to compute the cost of gas for a successful tx. I get a callback when a transaction succeeds and i retrieve gasUsed with transactionReceipt.getGasUsed(). Now I need to know the exact gas ...
3
votes
0answers
163 views

Denial attacks by submitting transactions with strategically calculated gas prices

As can be understood from the title, there is a specific form of denial attack where specific transactions are blocked by submitting transactions with strategically calculated gas prices. Example 1: ...
3
votes
0answers
241 views

Why are there pending TXs with high gas prices?

Rinkeby has pending transactions, some of which have gas prices of 100+ gwei and have been pending for over half an hour. Why is that? Are sending too little gas?
3
votes
0answers
564 views

The gas price on the Ropsten test net today rose from 0.211 ether per million gas to 1.8 ether per million gas, why?

Seems like Ethereum adjusts its gas price to meet demand. How does it do this?
2
votes
0answers
29 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
0answers
81 views

Early 2018 gas price volatility

What have caused the recent default gas price To go up (default was in some point near 100 GWei) To come down (now it seems to be 20 GWei) Specifically, was this because of Actual demand for ...
2
votes
0answers
43 views

Posted blocks on ethgasstation/Low gas price watchlist

Does anyone understand the posted blocks on ethgasstation/Low gas price watchlist? I would guess that posted block < mined block is always true - but this is not what I see there.
2
votes
0answers
162 views

what is the lowest gas price that clients (Geth / Parity) relay

I read here that nodes (at least Geth) only relay transactions that have a gas price above some limit. What is that default limit currently? As also mentioned there it is probably not zero as that ...
2
votes
0answers
133 views

Very big fee for token on testnet

I'm new here and try to make my own token. I kinda made it actually, but fee for it is very big(cheapest one is 0.65 eth). Here's my code: pragma solidity ^0.4.13; library SafeMath { function mul(...
2
votes
0answers
533 views

Why is there a difference between eth.estimateGas and the real cost in testRPC?

When I want to deploy a smart contract, I use the eth.estimateGas before deploying my smart contract. This gave me 688180 Gas. let bytecode = compiledContract.contracts['Document'].bytecode; let ...
1
vote
0answers
30 views

Gas usage difference between Remix and Ganache/public networks

I'm trying to integrate a contract into a front end with MetaMask and getting different gas amounts depending on the network and compile options I use. Remix ("Enable Optimization" checked): 90,410 ...
1
vote
0answers
23 views

Most precise website to estimate gas price for volatile days

I am trying to understand which website is the best way to estimate the gasprice for volatile days. There are some sites but they do not work out so well on a volatile day like today. I compared and ...
1
vote
0answers
90 views

Image and file storage in block chain

Is it possible to store a base64 image code as string in block chain? I know we can use IPFS or Swarm as a tool to store an image or a document, but if someone gets to know about the hash anyone can ...
1
vote
0answers
24 views

function gas calculator and function gas padding

not sure if this is possible, but I was wondering if one function can calculate the gas cost of another function? Also can a function run a series of computations to match the gas cost of the ...
1
vote
1answer
232 views

Transaction dropped. How to increase gas fee?

I sent some ether using Ledger Live, but the gas fee was too low. Id like to increase the gas fee. I was told I can do this via Ledger Etherum Wallet for Chrome. However, when I open Ledger Etherum ...
1
vote
1answer
326 views

How to get the historical Gas (Gwei) Price

I would like to get the historical Gas (Gwei) price in hourly or minutely with safelow, Standard, fast and fastest. I am aware of the etherscan.io which gives avg gas price for a day and also ...
1
vote
0answers
29 views

Does pooling make sense?

It seems that allocating storage elements is 4x as expensive in terms of gas cost than changing them. Does that mean it would make sense to pool structs and arrays, and maybe also strings, rather ...
1
vote
0answers
41 views

Why is my transaction not included into blocks with smaller gas prices in them?

I created a transaction with gas price 1.1 GWEI. It has been pending for 3 hours, and yet - during just the last 75 blocks - several 1 GWEI transactions have been included. In other words, gas price ...
1
vote
0answers
97 views

Gas SafeLow historical data

I am doing some gas analysis work and I really want to find or generate a dataset for historical SafeLow gas prices as defined by EthGasStation: “A price that at least 5% of the network hashpower ...
1
vote
0answers
30 views

Miss aligned state loading/storing gas costs

For a smart contract idea that spins around in my head, I have the situation where I have to conserve the old values of a variable (no storage refund or cheaper SSTORE updates). As the value I write ...
1
vote
0answers
68 views

Estimating gas costs for large batch of transactions

I noticed on EthGasStation the following below the estimated gas prices: Note: Estimates not valid when multiple transactions are batched from the same address or for transactions sent to addresses ...
1
vote
1answer
375 views

Etereum tx pending - gas price

I made an ethereum tx with 21 gwei gas price. It is now pending since more then one hour. Theoretically when adoption increases and therefore more txs happen and everybody must set enough gas to be ...
1
vote
0answers
89 views

Solidity — refactor simple contracts to fix gas limit and avoid Checks-Effects-Interaction warning

The following pattern is something that recurs a lot in the contracts I am develping and when I run an analyser over it I get a couple of warning. Say I have two contracts as follows: pragma ...
1
vote
0answers
134 views

What are the alternative methods of specifying gas price for contract execution?

This is possibly a rhetoric question, but I didn't find an answer to it. There are excellent answers to similar questions from @eth How much does it cost to use a contract? and When calling a smart ...
1
vote
0answers
156 views

How do I specify a lower gas price in the Ethereum Wallet when creating a wallet contract?

I'm trying out the Ethereum Wallet Dapp (which may or may not also be called Mist, I'm a little confused about the naming. But the About screen says "Ethereum Wallet 0.8.10"). This wallet app seems ...
1
vote
0answers
100 views

What would be the probability for miners having very low gas price to deploy a transaction?

Here is guide for the Gas price in ETH unit Calculation: If 1 ETH is $10, 1 gas will cost 0.00000002 * 10 dollars. If ETH is $10, 21000 gas will cost 0.00000002 * 10 * 21000 = 0.0042 ...
0
votes
0answers
8 views

Is there same offical article about how Ethereum Gas Tracker calcluate price?

Is there same offical article about the approach how ethscan.io's gas tracker get price and time? I think it calculate form the transaction hisotry in last 1000 block.But no article or code can be ...
0
votes
0answers
13 views

How Gas Cost is defined in EVM gas table?

i was checking into EVM gas table (https://docs.google.com/spreadsheets/d/1n6mRqkBz3iWcOlRem_mO09GtSKEKrAsfO7Frgx18pNU/edit#gid=0) (even though it is old sheet) Have few question: On what basis for ...
0
votes
1answer
13 views

What's the best way to get gas price in next block

our wallet project is requried some update about gas price 1 not set gasprice by user 2 auto choose the best gas price Current, I am using rpc method eth_gasPrice in my wallet's code to get gas ...
0
votes
0answers
21 views

Is Gas consumed in boolean operations that do not change contract state?

Imagine I've created a voting contract, and I'm the owner of this contract. I'm going to deploy it and create a front end to interact with it. Within my contract i've everything secured to add ...
0
votes
0answers
14 views

How can I distribute funds to present stakers efficiently?

I am building a smart contract which keep the token holder's eths for a while and give them rewards when they withdraw. The reward is given from the ethers collected by early withdraw of people. If ...
0
votes
1answer
123 views

Ethers js estimate gas offline?

Looking here in the docs it mentions I need to have the provider attached to estimate gas. But for formatting a transaction offline, I dont have access to the provider. Is there a way to estimate the ...
0
votes
0answers
45 views

How Geth classify transaction as local or non-local? txpool validateTx skips gasPrice validation for local transactions

I see geth code skips the validation of the local transactions https://github.com/ethereum/go-ethereum/blob/master/core/tx_pool.go#L528 // Drop non-local transactions under our own minimal accepted ...
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
48 views

Issue in setting GasPrice when sending raw transaction

I am using web3 and infura node to send my raw transaction but I am having difficulty in setting gasprice. I constructed rawtransaction as follows web3js.eth.getTransactionCount(myAddress, 'pending')...
0
votes
0answers
55 views

How to create an ethereum private network with proof of authtority without gas cost or gas price zero?

I want to create a private network but I don't need to use ether or gas, only I want to run smart contracts and the blockchain using ethereum technology. I find this tutorial Private proof of ...
0
votes
0answers
32 views

Why I can use a lower gasPrice than the node I set in --gasPrice

I established a private network recently and I use web3.eth.sendTransaction({from:"0x14ca04ff85747def87d6c6c566db84cc24e4643b",to:"0xa04fce8906c870a47a8a7f5f7547dfc4a62cae7a",value:"1000000000",...
0
votes
1answer
135 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
1answer
23 views

Function not marked as View and Pure but read only

I have a function: function test(uint value) { if (balances[msg.sender] < value) return; balances[msg.sender] -= value; } *note: the above is for illustrative purposes only. ...
0
votes
2answers
712 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 ...
0
votes
1answer
115 views

Question about Gas and Gas Price

In my transaction: gasPrice: 210000 blockHash: "0x69bd71736f2a5d2c83919a0de81a7de0b6b690bb6bdda3acff254d5c68f634bc", blockNumber: 3178, from: "0xc8caa71c16299b40b8579742a27ee53162886040", gas: ...
0
votes
1answer
86 views

Error with wrong calculation of gas price and value after lots of iterations

I am trying to code something that empties an address and sends that amount to my main-wallet. In order to get familiar with sending raw transactions and manually setting the eth-amount, I've tried ...
0
votes
1answer
185 views

Can't send ether to crowdsale contract (fail) + infinite gas bug on Remix

I'm a newbie trying to make a crowdsale contract in Ropsten (deployed a token contract very well before) but i meet some problems : I can't send ether to crowdsale contract, returning a fail status ...
0
votes
2answers
117 views

Sending ETH to ICO

How much ETH should I deposit in a wallet to send 1 ETH nett to an ICO considering gas and fees. I have already viewed an answer which confirms that it needs to be more than 1 ETH but the answer ...
0
votes
0answers
267 views

Obtaining Gas and Gas Price Solidity

I added the following two lines of code to my function: uint gas_remaining = msg.gas; //irrelevant code.... refund = refund + ((gas_remaining - msg.gas) * tx.gasprice); For some reason this is ...