Skip to content

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

Choose a tag to compare

@barnabasbusa barnabasbusa released this 11 Aug 13:32
· 2 commits to master since this release
8fc1d3e
## Summary

Adds support for an array of GPO (Gas Parameter Only) values per
[EIP-8261](https://eips.ethereum.org/EIPS/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:
  ```bash
export GAS_LIMIT_SCHEDULE='[{"epoch": 256, "gas_limit": 100000000},
{"epoch": 512, "gas_limit": 150000000}]'
  ```
  rendered into the CL config as:
  ```yaml
  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