[Ethereum] How Geth and Parity knows the global gas limit

gas-limit

As said in Péter Szilágyi post DAO Wars: Your voice on the soft-fork dilemma:

Miners supporting the DAO soft-fork can do so by starting Geth 1.4.8
with –dao-soft-fork. This will cause the block gas limits to be
lowered towards Pi million until the deciding block 1800000 (approx. 6
days from now) is reached. If the gas limit of this block is below or
equal 4M, the soft-fork goes into effect and (all updating) miners
will start blocking DAO transactions that release funds.

How does the Geth (or Parity) client knows the current global network gas limit ? I can't see any explorer that shows it except https://ethstats.net/ that only shows some voluntary nodes.

Best Answer

The block gasLimit is in each block. Example:

eth.getBlock(1500000)

{
  difficulty: 34982465665323,
  extraData: "0xd783010305844765746887676f312e352e31856c696e7578",
  gasLimit: 4712388,
  ...
}
Related Topic