An xOneRS producer sets the gas limit of a new block the way geth-XDC's xdcGasLimit does. On a chain with the DynamicGasLimitBlock fork row, a block below the row gets the producer's ceiling as its limit, and from the row the limit steps toward the ceiling by at most parent/1024 - 1 per block. On mainnet, which has no such row, a plateau rule toward 420,000,000 applies and --miner.gaslimit is not read. The ceiling defaults to 60,000,000, and xOne checks that it lies between 5,000 and 420,000,000; geth-XDC does not check that range.
For the producer as a whole, see the net2040 validator guide.
What are the three cases?
From spec/producer/gas-limit.md, for block n whose parent has gas limit P, with ceil the producer's ceiling:
DynamicGasLimitBlock row |
Block n |
Gas limit |
|---|---|---|
| absent (mainnet) | any | CalcGasLimit(P, max(P, 420,000,000)): the plateau rule, never aiming below the parent |
| set, or unscheduled | below the row | ceil |
| set | at or above the row | CalcGasLimit(P, ceil) |
CalcGasLimit(P, d) steps from P toward d by at most delta = P / 1024 - 1, with d at least 5,000. The source is geth-XDC miner/xdpos_worker.go:320-338 and core/block_validator.go:266-287.
What does --miner.gaslimit do?
It sets the ceiling (geth Config.GasCeil). On a chain with the row, below the row the block limit is that value itself; from the row the limit steps toward it. On mainnet the flag is not read (flags.md). The default is 60,000,000, geth-XDC's default (miner/miner.go:70).
The value must lie between 5,000 and 420,000,000. That range is an xOne check; geth-XDC accepts any value. PR #1030 (merged 2026-11-15) corrected the flag's help text, which had described the rule below the row wrongly; the producer code did not change.
Why is the default 60,000,000 and not 420,000,000?
The default was once 420,000,000. The spec records why it changed: on a chain with the row, a V2 block below the row then got a 420M limit, which is outside the 1/1024 bound of a parent built by geth-XDC, so the next header check failed (engine_v2/verifyHeader.go:117-123; seen in a devnet rehearsal at block 34).
What base fee does the block carry?
The fixed tier of the block's own number: 12.5 gwei from Eip1559Block, 625 gwei (the 2500x tier) from Gas2500xBlock, none before (gas-limit.md). A producer that read the tier at the parent's number would be one block late; a mutant test covers that mistake.
How is the rule tested?
conformance/vectors/producer/oracle.json holds 630 cases made by the real geth-XDC xdcGasLimit and CalcBaseFee at the pinned commit: five chains (Apothem, mainnet, net2040's rows, an unscheduled row, no row), the row minus 1, at and plus 1, seven parent limits and three ceilings. Mutants that must fail: the row read at the parent's number, the plateau rule aiming at the ceiling, and the base fee tier of the parent. PR #1030 adds the test the_ceiling_is_the_limit_below_the_row_a_target_from_it_and_unread_without_it for the three cases.
The collected competitor articles mention Ethereum gas limit targets, which follow other rules, so this post has no comparison table.
Frequently asked questions
Does --miner.gaslimit change the gas limit on XDC mainnet?
No. Mainnet has no DynamicGasLimitBlock row, so the plateau rule toward 420,000,000 applies and the flag is not read.
What gas limit does an xOne producer use by default?
A ceiling of 60,000,000. Below the row it is the limit; from the row the limit steps toward it by at most parent/1024 - 1 per block.
What values does --miner.gaslimit accept?
5,000 to 420,000,000. This is an xOne check; geth-XDC accepts any value.
How does xOne know it matches geth-XDC?
630 recorded cases from the real geth-XDC functions at the pinned commit, plus mutants that must fail.
Sources
- spec/producer/gas-limit.md
- docs/cli/flags.md (
--miner.gaslimit) - PR #1030; conformance/vectors/producer/oracle.json
This article describes the source and evidence at its review date. Check the linked repository for current implementation and qualification status.
Explore the engineering evidenceEdit this page on GitHub opens the Markdown source (content/blog/xdc-gas-limit-rule/index.md). GitHub may ask you to sign in. Report a correction opens a prefilled GitHub issue for this page.