What is the function of Gas Limit parameter in Ethereum? Is it involved in mining or something else?
locked by Andrew Chow♦ Aug 4 at 0:09
This question exists because it has historical significance, but it is not considered a good, on-topic question for this site so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. See the help center for guidance on writing a good question.
Read more about locked posts here.
In Ethereum, gas is a measure of computational effort. To each operation, a fixed amount of gas is assigned (e.g. adding two numbers costs 3 gas, calculating a hash costs 30 gas, sending a transaction costs 21000 gas ).
Since computation is expensive (mind that it has to be done by every full node in the network), excessive consumption of gas needs to be discouraged. Therefore, each unit of gas must be paid for (in Ether) by the sender of the transaction that triggered the computation.
Unfortunately, it is often not easy and in general even impossible to know in advance how much gas a transaction will need eventually. Therefore, transactions have a gas limit field to specify the maximum amount of gas the sender is willing to buy. If the gas used exceeds this limit during execution, processing is stopped. The sender still has to pay for the performed computation, but they are protected from running completely out of funds.
The transaction gas limit also protects full nodes from attackers, who could, without a gas limit, make them execute effective infinity loops. If such a transaction would take longer than one block to process, it could never be included in a block, and, thus, the attacker wouldn't need to pay for it. 
Additionally, blocks, too, have a field called gas limit. It defines the maximum amount of gas all transactions in the whole block combined are allowed to consume. Similar to the maximum block size in Bitcoin (measured in bytes), its purpose is to keep block propagation and processing time low, thereby allowing for a sufficiently decentralized network. In contrast to Bitcoin, it is however not a constant. Instead, miners have the option to increase or decrease it every block by a certain factor. 
-  See the Yellow Paper for a breakdown of operations and the respective gas costs (Appendices G and H)
-  https://github.com/ethereum/wiki/wiki/Design-Rationale#gas-and-fees
-  See the Yellow Paper Equations 40 to 42 for the exact rules
The current gas limit can be checked on the network stats page.
It's currently 3,141,592 (pi million). The gas limit per block is not fixed, though. The number of contract calls and standard transactions is limited by the gas limit, which is 1.2x of the exponential moving average. So there's only so much gas that can be expended per block, even though it can grow, of course.
Note that each call to the contract to the caller cost an amount of Ether defined by
(gas sent to contract)*(price of gas as defined by caller) so sending 10 thousend transactions per block could end up quite a pricey endeavour.