-1

How does Ethereum verify GAS price stated within transaction, to be high enough for transactions stored in past blocks? Does each block include an average GAS-bid experienced by miner at the moment the block was formed?

Is the GAS price in old blocks verified at all?

Scenario: Miner receives a transaction with a declared GAS_PRICE; it needs to check if the value is satisfactory; and generate a receipt. It certainly wont process transactions at any arbitrary GAS price. how is the threshold defined (by miner or is there some automatic computation based on the average of received GAS bids etc,), then how do other nodes know what was the threshold value when they verify the block.

or are just transactions with GAS Price not high enough silently dropped and not included into the Block chain at all? If so, then what about receipts. Are receipts verified by the consensus? If they are then they would need to see that transaction.

1

GAS_PRICE is not the property of a block. It is the property of a transaction. Each transaction in a block is verified when the block is downloaded by a node. Which means it validates the transaction fees to be given to the miner too.

GAS_PRICE is user determined. i.e the sender of the transaction decides how much to keep the GAS_PRICE as. So there is no verification done by anyone on the value as such.

The blockchain is not concerned with the historic gas price or current gas price. It is recorded with the transaction to determine the transaction fees associated with that particular transaction. The GAS_PRICE at a time is guided by the demand and supply of mining power in the network.

The miner decides on what transaction she shall add to her block. So he can choose the transactions coming with higher GAS_PRICE. Or he can choose any arbitrary transaction. The threshold he sets is not of any concern. There might be another miner who accepts a lower price. Or one who processes all transactions. The transaction that a miner does not choose to process might eventually get added to another block by another miner. A transaction that is not at all chosen by or perhaps not noticed by a miner will not get added to the blockchain.

The GAS_PRICE threshold of the miner or for that matter any criteria that miner used to choose transactions does not matter to anyone verifying the block. All transactions are relayed to all connected nodes. The miner selects transactions he likes and adds it into his block computes proof of work and broadcasts. Other nodes just verify whether the transactions are valid and the block has enough proof of work.

  • Sanjay; that's what I ask; Miner receives a transaction with a declared GAS_PRICE; it needs to check if the value is satisfactory; and generate a receipt. It certainly wont process transactions at any arbitrary GAS price. how is the threshold defined (by miner or is there some automatic computation), then how do other nodes know what was the threshold value when they verify the block. or are just transactions with GAS Price not high enough silently dropped? – Vega4 Jul 31 at 12:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.