Gas - Reading Assignment

  • How do we calculate the total gas cost for a transaction?
    all transactions require operations to perform. each operation costs some amount of gas. The gas cost of a transaction equals the cumulative sum of all operation costs.
  • What is gas limit?
    Maximum amount of gas one is willing to spend on a transaction
  • What happens if we specify a gas limit that is too low?
    results in a failed transaction
  • What happens if we specify a gas limit that is too high and therefore not consumed fully?
    extra amount is refunded
  • What is a gwei?
    a unit of ether. Gwei is the standard unit of ether which the gas cost is expressed.
1 Like
  1. How do we calculate the total gas cost for a transaction?
    By adding up the total cost of each transaction in the contract.
  2. What is gas limit?
    It’s the maximum amount allotted to the transaction.
  3. What happens if we specify a gas limit that is too low?
    Your transaction will start running but will eventually run out of gas and the transaction will stop.
  4. What happens if we specify a gas limit that is too high and therefore not consumed fully?
    The excess will be refunded to the contract
  5. What is a gwei?
    It is a measurment of an ether. ‘gwei’: ‘1000000000’,
1 Like
  1. How do we calculate the total gas cost for a transaction?
    The total gas cost for a transaction is the sum of the cost of all operations executed in the transaction on the Ethereum Virtual Machine.

  2. What is gas limit?
    The gas limit is the maximum amount of gas you are willing to pay for the transaction fees.

  3. What happens if we specify a gas limit that is too low?
    If you specifiy a gas limit that is too low your transaction will eventually fail and the gas fees will be kept my the miner.

  4. What happens if we specify a gas limit that is too high and therefore not consumed fully?
    If you specify a gas limit that is greater than that which is required to exeecutee the transaction, the unspent gas will be automatically refunded. The miner only keeps the gas that it rewuired to process the trnsaction.

  5. What is a gwei?
    A gwei is a unit of Ether with 1 billion qwei equalling 1 wei, the smallest unit of Ether. This unit is used to indicate gas prices on the Etherum network.

1 Like
  1. Gas is calculated by the task you are asking the nodes to do
  2. That is how much you are willing to spend on a transaction
  3. You will essentially run out of gas and your transaction will not be on the block chain but your gas will be spent
  4. Gets sent back automatically
    5.Gwei is the measurement of gas prices
1 Like
  1. How do we calculate the total gas cost for a transaction? You must multiply the amount of gas used by the gas price which is measured in gwei. You can check the current gas price on Etherscan or EthGasStation. The Gas Limit for things other that simple transfers can be checked by looking at the smart contract code or by looking at what the organization behind the IEC/smart contract indicates is appropriate for their smart contract.

  2. What is gas limit? Gas Limit is the maximum amount of gas allotted to the transaction, 21000 being sufficient for simple transfers and much higher amounts for transfers to smart contracts like those in ICOs.

  3. What happens if we specify a gas limit that is too low? Providing too little gas will result in a failed transaction, the fees are kept by the miner. The transaction will start and then stop.

  4. What happens if we specify a gas limit that is too high and therefore not consumed fully? The gas fee will be refunded. There is a gas limit that specifies the maximum amount of gas all transactions in a block can consume. If you exceed that gas limit the transaction cannot be processed.

  5. What is a gwei? It is a unit of measure of gas. It is 1000000000 wei and wei is the smallest unit of ether.

1 Like

Gas Reading Assignment Answers

  1. The cumulative sum of all operations is the total gas cost a transaction.

  2. Gas Limit is the maximum amount of gas a user is willing to spend on a transaction

  3. Providing too low of a gas limit results in a failed transaction, and the minor keeps the associated fees.

  4. Miners can increase and decrease the gas limits of blocks. A user setting high gas limits will indeed fill up the blocks gas limit, but miners only get paid for gas that’s consumed by the transaction and the remainder is sent back to the user. So although you can set high gas limits and fill the blocks gas limit, it is computationally-dense enough for a minor to want.

  5. Wei is the smallest unit of Ether and 1000000000 wei is 1 gwei.

2 Likes
  1. How do we calculate the total gas cost for a transaction?
    The total gas cost is the cumulative sum of all the operations in a transaction.

  2. What is gas limit?
    The maximum amount of gas you are willing to spend on a transaction.

  3. What happens if we specify a gas limit that is too low?
    The transaction will be executed but will be incomplete and the ether spent will not be returned.

  4. What happens if we specify a gas limit that is too high and therefore not consumed fully?
    The blocks have a gas limit that specify the maximum amount of gas all the transactions in the block can consume so putting a high value for the gas limit fills up the block gas limit, but isn’t computationally-dense enough for miners to want.

  5. What is a gwei?
    Wei is the smallest unit of Ether therefore gwei is 1000000000 wei.

1 Like
  1. How do we calculate the total gas cost for a transaction?
    by getting the sum of the cumulative operations

  2. What is gas limit?
    This is the maximum amount of gas you are willing to spend on the transaction.

  3. What happens if we specify a gas limit that is too low?
    Your transaction will start to be executed, but will run out of gas and be stopped before it is finished and you will loose your gas.

  4. What happens if we specify a gas limit that is too high and therefore not consumed fully?
    We only get paid for the actual gas consumed by a transaction and automatically get back the unspent gas.

  5. What is a gwei?
    gwei is 1000000000 wei on Ethereum network. And wei is the smallest unit of ether.

1 Like

1. How do we calculate the total gas cost for a transaction?
Each operation has an associated cost in gas. The cumulative sum of all the operations is the total gas cost for the transaction. The minimum gas limit for transaction is 21000+

2. What is gas limit?
Gas limit is the amount of ether you are willing to spend.

3. What happens if we specify a gas limit that is too low?
It will result in a failed transaction, the fee paid will be lost, but the ether transferred never leaves the wallet.

4. What happens if we specify a gas limit that is too high and therefore not consumed fully?
The unspent gas is refunded automatically.

5. What is a gwei?
Wei are also called gwei, is the smallest unit of ether, and gwei is simply 1000000000 wei.

1 Like
  1. The total cost in gas for a transaction on the Ethereum network is the sum of the all the individual operations, which have a predetermined price in gas.

  2. Gas limit is the maximum amount of gas you are willing to spend on a transaction.

  3. If you specify a gas limit that is too low, the transaction will run out of gas part way through and will not be completed, so will not be on the blockchain. You will not get back the ETH spent on gas.

  4. If you specify a high gas limit and it is not all used, the extra will be refunded to you.

  5. Wei is the smallest denomination of ether, and gwei is 1 billion wei.

2 Likes

1.The value of gas is driven by the market and the nodes that prioritize higher gas prices when mining transactions.
2. The minimum gas limit for transaction is 21000 + the amount to execute.
3.Your transaction will start to be executed, but will eventually run out of gas and be stopped
4. The actual blocks have a gas limit that specifies the maximum amount of gas all transactions in the block can consume, and refunds any excess sent
5. Gwei is simply 1000000000

2 Likes
  1. Total gas cost for a transaction is calculated based on how simple or complex the operation it includes. The total cost of all the operations within a transaction is the cost for that transaction.

  2. “Gas limit” is the maximum amount of gas allowed to be spent to execute the transaction.

  3. When gas limit is too low, the transaction will fail and the miner will keep the associated fees.

  4. The unspent portion will not be consumed but since miners limit the maximum gas limit due to the limitations of block size, it is not practical to set a maximum gas limit beyond reason. Any transactions containing a gas limit that exceed the size of the block will not be processed.

  5. “gwei” is the denomination for ethereum gas price. 1 gwei = 1000000000 wei.

2 Likes
  1. How do we calculate the total gas cost for a transaction? add up all the individual operations that have a predetermined price in gas.
  2. What is gas limit? is the maximum amount of gas you are willing to spend on the transaction.
  3. What happens if we specify a gas limit that is too low? transaction fails but you still pay.
  4. What happens if we specify a gas limit that is too high and therefore not consumed fully? the extra spent on the transaction is returned
  5. What is a gwei? is a measurement of gas prices
2 Likes
  1. How do we calculate the total gas cost for a transaction?

The total gas cost for a transaction is the sum of all the gas costs of the individual operations that make up the final transaction.

  1. What is gas limit?

With regard to a specific transaction, the gas limit represents the maximum amount of gas to be used when executing this transaction.

With regard to mining/validating, the gas limit represents the maximum amount of gas a specific block can contain. The miner/validator can only include those transactions whose combined amount of gas is below the block’s gas limit.

  1. What happens if we specify a gas limit that is too low?

If the gas amount is not sufficient to execute the whole transaction (gas limit is too low), the execution of the transaction will be stopped at the point when the transaction runs out of gas.

  1. What happens if we specify a gas limit that is too high and therefore not consumed fully?

If the gas limit is higher than what is actually necessary to fully execute the transaction, the amount of unspent gas will be refunded automatically.

  1. What is gwei?

Gwei is the unit of Ether that is used to price gas fees.

2 Likes

1)The amount of operations and the current gas price.

2)The maximum amount of gas you are willing to spend on the transaction.

3)The transaction will start but eventually you will run out of gas and be stopped.

4)The unspent amount will be returned.

5)Gwei is 1 000 000 000 Wei, Wei being the smallest unit of Ether.

2 Likes
  1. We calculate the total gas cost for a transaction by summing up the gas per operation.
  2. Gas limit is the maximum amount of gas allotted for a transaction.
  3. If we specify a gas limit that is too low, the transaction will execute, using up the gas, but it will fail, thus gas used will not be returned… but ether to be transferred remains in the wallet because the blockchain is never updated.
  4. Miners will not likely to pick up the transaction with a gas limit that is too high because it is not computationally dense, and they get paid only with the actual gas used.
  5. gwei is giga wei, that is, 1 billion wei which is the smallest unit of ether.
2 Likes
  1. How do we calculate the total gas cost for a transaction?
    Add up the cost of executing each instruction required to complete the transaction
  2. What is gas limit?
    The maximum amount of gas allotted to a transaction. e.g. 21000 for a simple transfer transaction.
  3. What happens if we specify a gas limit that is too low?
    The transaction will fail and the ledger will not be updates.
  4. What happens if we specify a gas limit that is too high and therefore not consumed fully?
    Balance is returned to you
  5. What is a gwei?
    1,000,000,000 wei
2 Likes
  1. How do we calculate the total gas cost for a transaction?
    All operations require fees in the form of gas to perform. Therefore, combining up each cost of those operations will result in the final price of a transaction.

  2. What is gas limit?
    Gas limit is the “maximum” amount of gas that we are willing to spend on a particular transaction; 21000 is sufficient for simple transactions, and the amount can be higher for other transfers.

  3. What happens if we specify a gas limit that is too low?
    The execution of the transaction will run out of gas and be stopped, and the blockchain won’t reflect it. As a result, all the fees paid will be lost.

  4. What happens if we specify a gas limit that is too high and therefore not consumed fully?
    *The extra spent gas will be refunded. *

  5. What is a gwei?
    It is a unit of Ether to measure gas price, and one Gwei is 1000000000 Wei.

2 Likes
  1. It is the summary of all the gas costs for executing each part of a transaction and use of a smart contrac
  2. Gas Limit is the maximum amount of gas allotted to the transaction
  3. The transaction will not be completed and the transaction fees that used so far will be lost
  4. It will returned
  5. 1 gwei is 1 billion wei. A wei is one unit or Ether.
2 Likes
  1. The cumulative sum of all the operations is the total gas cost of the transaction.
  2. The maximum amount of gas you are willing to spend on the transaction.
  3. The transaction will start to be executed and eventually run out of gas and be stopped.
  4. The actual block have a gas limit that specifies the maximum amount that it can consume.
    Cannot exceed this amount if you want your transaction to be completed.
  5. gwei is 1 billionth of an Ether that is used to measure the cost of a transaction on the
    Ethereum network.
1 Like