validator: take the default target gas limit from GAS_LIMIT_SCHEDULE

Open
#795 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 6 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
rust, yaml
Domain
backend, cli

Research direction

Start in the validator client where DEFAULT_GAS_LIMIT (60000000) is applied when --gas-limit is absent, and in the beacon node config parsing that drops GAS_LIMIT_SCHEDULE and the /eth/v1/config/spec handler. Check the Config struct stored under Metadata["config"] before adding a field, since that touches DB_VERSION. Done when the validator uses the scheduled limit for the proposal epoch on Sepolia and Platåberget and falls back to 60000000 otherwise, with docs/cli.md and the README updated.

Written by the indexing model from the issue text.

Description

The validator client's default target gas limit is a fixed 60000000 (DEFAULT_GAS_LIMIT, overridden by --gas-limit or per validator through the keymanager API). From gloas it is signed into every proposer preference, and produceBlockV4 builds this client's own payload toward the preference's target_gas_limit. A validator left on the default therefore pulls the gas limit toward 60M on every gloas proposal, whatever the network targets.

Two built-in networks schedule something else in their config.yaml's GAS_LIMIT_SCHEDULE:

  • Sepolia: 200000000 from epoch 353024 (bin/ethlambda/assets/sepolia/config.yaml).
  • Platåberget: 200000000 from epoch 1566 (bin/ethlambda/assets/plataberget/config.yaml).

Lighthouse takes its default from the network config's GAS_LIMIT_SCHEDULE before falling back to a built-in value. This client cannot: the beacon node parses the key into nothing (it is one of the keys the ignored-keys warning names), and /eth/v1/config/spec does not serve it.

What it takes

  • Beacon node: parse GAS_LIMIT_SCHEDULE into Config and serve it from /eth/v1/config/spec. Config is stored SSZ-encoded under Metadata["config"], so a new field there is a DB_VERSION bump unless it is kept out of the stored struct.
  • Validator client: when --gas-limit is not given, default to the scheduled limit in force at the proposal's epoch, read from /config/spec, and fall back to 60000000 for a node that does not serve the key.

Until this lands, docs/cli.md and the README tell operators on Sepolia and Platåberget to pass --gas-limit 200000000.

Raised in the review of #707.

Dominant language
Rust
Stars
86
Forks
34
Avg merge
9d 20h
Merged PRs (30d)
77

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lambdaclass/ethlambda

All issues in lambdaclass/ethlambda

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.