Skip to content

feat: add EIP-8261 GAS_LIMIT_SCHEDULE (GPO) support - #315

Merged
barnabasbusa merged 1 commit into
masterfrom
feat/gas-limit-schedule
Aug 11, 2026
Merged

feat: add EIP-8261 GAS_LIMIT_SCHEDULE (GPO) support#315
barnabasbusa merged 1 commit into
masterfrom
feat/gas-limit-schedule

Conversation

@barnabasbusa

Copy link
Copy Markdown
Contributor

Summary

Adds support for an array of GPO (Gas Parameter Only) values per EIP-8261: an optional GAS_LIMIT_SCHEDULE field in the generated CL config.yaml that gives CL clients a per-fork default/recommended-max gas limit.

Changes

  • New GAS_LIMIT_SCHEDULE env var taking a JSON array of GPO entries:
    export GAS_LIMIT_SCHEDULE='[{"epoch": 256, "gas_limit": 100000000}, {"epoch": 512, "gas_limit": 150000000}]'
    rendered into the CL config as:
    GAS_LIMIT_SCHEDULE:
      - EPOCH: 256
        GAS_LIMIT: 100000000
      - EPOCH: 512
        GAS_LIMIT: 150000000
  • Entries are validated (JSON array of numeric epoch/gas_limit) and sorted by epoch; invalid input fails genesis generation with a clear error instead of emitting a broken config.
  • Empty/unset schedule emits GAS_LIMIT_SCHEDULE: [] (same convention as BLOB_SCHEDULE), so clients without support simply ignore it.
  • config-example/cl/config.yaml gains the placeholder section; the existing awk substitution in entrypoint.sh is generalized to handle both schedule blocks in place.
  • GAS_LIMIT_SCHEDULE is excluded from the consensus-spec value check since it is an optional field not present in the upstream spec config.

A single JSON-array env var is used instead of the numbered BPO_N_* pattern so any number of GPO entries can be passed without reserving slots.

Testing

Exercised the schedule builder + in-place substitution locally: unset/empty input, unsorted multi-entry input (sorted correctly), invalid JSON (fails with error), and full substitution into config-example/cl/config.yaml alongside a BPO blob schedule.

https://claude.ai/code/session_017jVHwwK1C3h1caJFyabeVm

Adds an optional GAS_LIMIT_SCHEDULE env var that takes a JSON array of
GPO entries ([{"epoch": N, "gas_limit": N}, ...]) and renders them as
the EIP-8261 GAS_LIMIT_SCHEDULE block in the generated CL config.yaml.
Entries are sorted by epoch; an empty/unset value emits
GAS_LIMIT_SCHEDULE: [] to keep the field present but inert.

Claude-Session: https://claude.ai/code/session_017jVHwwK1C3h1caJFyabeVm
@barnabasbusa
barnabasbusa merged commit 8fc1d3e into master Aug 11, 2026
7 checks passed
@barnabasbusa
barnabasbusa deleted the feat/gas-limit-schedule branch August 11, 2026 12:32
barnabasbusa added a commit to ethpandaops/ethereum-package that referenced this pull request Aug 11, 2026
## Summary

Adds a `gas_limit_schedule` network param — an array of GPO (Gas
Parameter Only) entries per
[EIP-8261](https://eips.ethereum.org/EIPS/eip-8261) — wired through to
the genesis generator, which renders it into the CL `config.yaml` as the
optional `GAS_LIMIT_SCHEDULE` field (per-fork default + recommended max
gas limit for CL clients).

```yaml
network_params:
  gas_limit_schedule:
    - epoch: 256
      gas_limit: 100000000
    - epoch: 512
      gas_limit: 150000000
```

## Changes

- `input_parser.star`: new `gas_limit_schedule` param (default `[]`)
with parse-time validation that every entry is an object with exactly
integer `epoch` and `gas_limit` keys.
- `el_cl_genesis_generator.star` + `values.env.tmpl`: the schedule is
JSON-encoded and exported as the `GAS_LIMIT_SCHEDULE` env var for the
genesis generator.
- `sanity_check.star`: allow the new key.
- README: document the param.

## Dependency

Rendering the field requires ethpandaops/ethereum-genesis-generator#315.
Until the pinned generator image (currently `6.1.6`) includes it, the
env var is exported but ignored by the generator, so this change is a
no-op — the image pin should be bumped once a release containing #315 is
cut.

## Testing

`kurtosis lint` passes. Default `[]` keeps behavior identical for all
existing test configs.

https://claude.ai/code/session_017jVHwwK1C3h1caJFyabeVm
barnabasbusa added a commit to ethpandaops/ethereum-package that referenced this pull request Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants