Hot answers tagged

60

Wow this is such an interesting question! TL;DR: the transaction size limit, at the time of writing, is about 780kB (about 3 million gas). But read on. There is no direct or fixed limit neither for transaction sizes nor for block sizes. This is a strength of the Etherem network, it does scale. That does not mean that there are no limits. There is the block ...


38

Every computation on the Ethereum network cost gas, so do value transfers like on the bitcoin blockchain. Every computational step, or OPCODE requires a specific amount of gas (which is hardcoded). You pay for gas using ether. To determine the fee you pay you calculate: required gas * gas price = fee For example a simple value transfer cost 21000 gas, the ...


27

There is no fixed gas price that transactions must have. You can specify the gas price, and if you set a gas price within certain bounds, the transaction will be accepted by miners using their default values and oracle. The default gas price is now 0.02 microether which is equivalent to: 0.00000002 Ether (.02 * 1e-6) 0.02e12 wei 20000000000 wei 20e9 wei ...


18

What is Gas? If you are unclear on what gas is, I recommend reading the answers to the StackOverflow question "what is gas?" before going any further. Calculating the Transaction Fee The total cost of a transaction is the product of the gas limit and gas price: (gas limit x gas price) = transaction fee In web3js the following methods are available: ...


17

It is not really true at the moment that you can pay fees in anything except ETH, although there is some discussion about changing this. The way things normally work, you have to pay the fee in ETH. When you sent REP to the exchange you probably used ETH in your own account to deposit tokens in the exchange, and the exchange would have paid for the ...


15

Can I set the gas price to what ever I want? Yes, you can. But miners have a default strategy for determining gas price to charge and if the amount you're willing to pay is below that, your transaction will be rejected. (Try setting the slider all the way to the left in Mist and try to send a transaction.) What are these limits actually? Completely ...


14

As of 12/08/2017, the gas limit as detailed on EthStats.net is 6,700,314. The gas limit was 'stuck' at 4.7 million. It was recommended that miners change their settings such that the gas limit could be raised. As outlined in this article, this happened. Each hexadecimal character is 4 bits. 2 characters is a byte. The yellow paper outlines the fees for ...


14

Using etherscan blockchain explorer In etherscan, look for the TxReceipt Status which will have Fail in red, or Success in green. Example of a failure: https://ropsten.etherscan.io/tx/0x67a5f6442f49a5da6ff8682250a8eef899d9dc0c5adf20b683709433902b5956 Using the receipt eth.getTransactionReceipt(transactionHash) will return a status field that has a value ...


12

In short, in Ethereum the fees are paid in gas and calculated based on contract code execution complexity, in bitcoin the're based solely on transaction size. See the these Ethereum gas fees tables ( table1, table2 ) for the complete gas costs for executing contract code. The fee for a value transfer is 21000 gas, you need to check the current gas price on ...


12

web3.eth.getTransaction has an input property, which is the /payload for a given transaction. The cost of a transaction is gasUsed multiplied by gasPrice. web3.eth.getTransactionReceipt has the gasUsed property. web3.eth.getTransaction has gasPrice. Since the unit for gasPrice is wei, divide by 1e18 to get the Ether cost of a transaction.


12

"Call" is an overloaded term because it is one form of invoking a contract (see What is the difference between a transaction and a call?) and it depends where the invocation is performed, in relation to the Ethereum Virtual Machine (EVM). Outside the EVM (eg web3.js) The question's contract.method.call({gas: 1000000000}) deals with web3.js, which is ...


11

Highlighting: Every time a user signs a transaction, that transaction is factored into their own individual moving average. Any time a user’s moving average exceeds the current network limit their transaction is delayed until their average falls below the limit. Rate limiting based upon balances implies that there exist unique accounts with publicly ...


11

No. You cannot send the entire balance because the fees are deducted from your account's balance, not from the value being sent. To sweep an account you need to send balance-gas*price ETH as the value, and also manually set the gas and gasPrice to ensure that you exactly zero your account. E.g. If you have 5ETH and want to sweep it: A plain account-to-...


11

With Geth, you can rebroadcast with a higher fee (gas price), but you cannot change the destination address. eth.resend(tx, optional gas price, optional gas limit) Example: eth.sendTransaction({from: eth.accounts[0], to: "...", gasPrice: "1000"}) var tx = eth.pendingTransactions[0] eth.resend(tx, web3.toWei(10, "szabo"))


8

Creating An Account In Ethereum Wallet Start up Ethereum Wallet. Make sure that you are on testnet by selecting the menu Develop -> Network -> Testnet(Morden). On the main page, click on Add Account, and enter your password (and remember it). Getting Some Coins On Testnet To get some coins to test with on testnet (from Morden), Getting Ether One ...


8

dApp usually have a frontend written in JS/HTML, which runs in your browser. It is the associated smart contract, written in Solidity, which runs on every node of the Ethereum network. In general, you need to pay gas fees only if your interactions with smart contracts are changing either some of the data it contains or the value, in ether, it contains. ...


8

I wrote the following script to calculate the results: #!/bin/sh # ------------------------------------------------------------------------------ # Find Daily Transactions On The Ethereum Blockchain # # Works on Linux and OS/X. May work on Windows with Cygwin. # # Usage: # 1. Download this script to findDailyTransactions # 2. `chmod 700 ...


8

I see what happened. 1ETH was transferred: from 0x2bF0011e4da5a841CE9459c0995Bb2646c4f1D21 (coinbase) to 0xd08436533f63b1342fB89198F963acD8589657AE (intermediary address) with a gas cost of (21000 * 0.00000002)ETH https://etherscan.io/tx/0x3d2218451e3b77218d1be91589b8be6832faa0a53d55f40ebd6f58d72e63d26c then, from this intermediary address, there was a ...


8

This post contains several questions. Let's address them one by one. Before answering the questions, there is an error in the post's assumption: it doesn't consider the transaction fees. If Alice has one Ether or one BTC, Bob won't be able to receive the full amount (maybe he could, back in the days of zero transaction fees for BTC, but certainly not now), ...


8

in a nutshell : gas is the cost unit gas price is a single gas unit's price and Fee= gas*gas price why using gas instead wei? because we need a fixed value (unit) for expressing the operations cost. then this initial cost is "translated" in wei/ether which may vary according to the market. "y operation"= x gas => x gas * market gas price= your fee ...


7

Imagine a social network Dapp. You've got a lot of friends on it. You won't have to pay anything to read each of your friends messages as reading don't need to propagate any transaction to the blockchain and is only reading on your local node. But once you want to write a message or add a comment or "like" a post, you will pay gas fees to make the new state ...


7

The short answer is: it depends, for some transactions state changes might change the pre calculated gas costs. It is possible to calculate the gas costs of every transaction given the current state. However - since the state can change until the transaction is finally executed the state can change. Consider the following code: if a = true: cheap ...


7

The default gas price is 50 shannon on frontier, 20 on Homestead. (remember to upgrade) Vitalik recently ran a test to see how long it took for transactions with different gas prices to be included, finding: Hence, if you are fine with a ~2 minute extra confirmation time, you can start sending transactions with a 20 shannon gas price now,


7

There could be several possible ways: For Serenity version, there are plans to allow contracts themselves to pay for transactions, if, let's say, the owners of the contract monetise it indirectly. Something approximate can already be implemented now - contract can refund the caller because it knows the callers address (this, however, still requires some ...


7

Everytime you make a transaction on ethereum you need to pay a fee to the miner of the block that will calculate the result of your smart contract. While this might change in the future, for the moment fees can only be paid in ether and therefore all users of your tokens need it. Tokens in accounts with a balance smaller than the fee are stuck until the ...


7

There are two main reasons: to prioritize one transactions over others and to adjust to the price. In Bitcoin, there is a limit on how many transactions you can put inside a block (the limit is on the size of the block). The way to prioritize some transactions over others is paying more transaction fees so you can be sure your transaction gets added to the ...


7

I can reproduce this with compiler version 0.4.12+commit.194ff033.Emscripten.clang (but, in my case, the other way round - file1.sol has a deployment cost of 68990, file2.sol has a deployment cost of 68926.) There is a 64 gas difference in the cost between the two deployments. The reason for this is that, although the deployment code is exactly the same ...


6

The calculation is gas*gascost, so a simple transaction will cost 21,000 gas * 20 GWei/gas = .00042 ETH


6

In brief, I deploy the contract do I need to provide gas to it? Can I somehow force clients to do that? By the way, this.balance of contract is used as gas storage? When deploying what you have to pay is the fee of the transaction that was used to put the contract in the blockchain. Whenever someone wants to use your contract (invoke a function), he ...


5

So you transaction did went trough in the sense that it was broadcasted to the network and included in a block. However - as you have already suggested the gas you payed was not sufficient for this transaction. To prevent corrupted states in this case all the effects a transaction has will be rolled back. The only effect is that costs for the gas (in Ether) ...


Only top voted, non community-wiki answers of a minimum length are eligible