proposer settings updates for proposer preferences validator client side - #16762
Conversation
|
The example in PR desc asserts DELETE … gas_limit ==> 204 then GET … gas_limit ==> 40.000.000 (from file). With the current |
…per validator, and adding more unit test coverage
| return opt.BuilderConfig.GasLimit | ||
| } | ||
| if ps.DefaultConfig != nil && ps.DefaultConfig.BuilderConfig != nil { | ||
| return ps.DefaultConfig.BuilderConfig.GasLimit |
| // them. Deferred until gloas-active so the pre-gloas registration path still | ||
| // sees BuilderConfig. | ||
| func (v *validator) upgradeProposerSettingsToV2(ctx context.Context, currentEpoch primitives.Epoch) { | ||
| if currentEpoch < params.BeaconConfig().GloasForkEpoch { |
There was a problem hiding this comment.
The validator runtime upgrades v1 → v2 in place (Settings.UpgradeToV2) one epoch before the Gloas fork
Little bit confused at this point as it deviates with PR description: as the upgrade will take place when currentEpoch >= gloasForkEpoch.
There was a problem hiding this comment.
yeah let me update the note, instead of upgrading the file it only upgrades after gloas, we take the builder gas limit before. I wonder if it's better if I also allow for v2 before and just ignore builder configs afterwards.
There was a problem hiding this comment.
6846b55 updated to support v2 early migration
Co-authored-by: Jun Song <87601811+syjn99@users.noreply.github.com>
|
I need to open an updated docs pr for this , related to issue OffchainLabs/prysm-documentation#1187 |
What type of PR is this?
Bug fix
What does this PR do? Why is it needed?
New schema version:
ProposerSettingsPayload.version = 2. Existing v1/unset files keep working — the loader preserves them as-is, but a deprecation warning is logged at startup when gloas is scheduled on the network. The validator runtime upgrades v1 → v2 in place (Settings.UpgradeToV2) once gloas is active (currentEpoch >= GloasForkEpoch), viaupgradeProposerSettingsToV2called fromPushProposerSettings/submitProposerPreferences:builder.gas_limitis promoted to the top-levelgas_limit(default config and per-validator entries, unless a top-level value is already set), all builder blocks are dropped, and the upgraded settings are persisted to the DB. The upgrade is deliberately deferred until the fork — not earlier — because the pre-gloas relay-registration path still reads the builder block. Settings already on v2 are never rewritten.gas_limitis a new top-level field onProposerOptionPayload(v2): the target gas limit signed into gloas proposer preferences, honored per-validator and indefault_config. Resolution: per-validatorgas_limit→default_config.gas_limit→ chain default (zero values fall through).Two independent gas limit signals: relay registrations (mev-boost, pre-gloas) always read
builder.gas_limit; proposer preferences always read the top-levelgas_limit. A v2 file migrated before gloas can keep itsbuilderblock (enabled,relays,gas_limit) for registrations while declaring the preferences target at the top level — the two never mix.Keymanager gas-limit API is version-aware: on v1 settings it keeps managing the builder gas limit (registration signal); on v2 it manages the top-level gas limit (preferences signal).
ethereum/keymanager-APIs#86 updated herepeople did not favor thisBeacon-node changes are not in this PR.
Example files
v1 (legacy — unchanged, still supported):
{ "proposer_config": { "0xa057816155ad77931185101128655c0191bd0214c201ca48ed887f6c4c6adf334070efcd75140eada5ac83a92506dd7a": { "fee_recipient": "0x50155530FCE8a85ec7055A5F8b2bE214B3DaeFd3", "builder": { "enabled": true, "gas_limit": "45000000", "relays": ["https://example-relay.com"] } } }, "default_config": { "fee_recipient": "0x6e35733c5af9B61374A128e6F85f553aF09ff89A", "builder": { "enabled": true, "gas_limit": "40000000" } } }v2 (new format — the
builderblock is optional and keeps its registration meaning until gloas):{ "version": 2, "proposer_config": { "0xa057816155ad77931185101128655c0191bd0214c201ca48ed887f6c4c6adf334070efcd75140eada5ac83a92506dd7a": { "fee_recipient": "0x50155530FCE8a85ec7055A5F8b2bE214B3DaeFd3", "gas_limit": "45000000", "builder": { "enabled": true, "gas_limit": "45000000", "relays": ["https://example-relay.com"] } } }, "default_config": { "fee_recipient": "0x6e35733c5af9B61374A128e6F85f553aF09ff89A", "gas_limit": "40000000" } }Behavior matrix
"Registrations" = signed validator registrations to builder relays (pre-gloas only). "Preferences" = signed gloas proposer preferences (submission begins one epoch before the fork for next-epoch duties).
builder.gas_limit. Preferences (from gloas−1) use the chain default — the builder gas limit isn't consulted for preferences until the migration promotes it. Startup deprecation warning (when gloas is scheduled).builder.gas_limitpromoted to top-levelgas_limit(unless already set), builder blocks dropped, persisted to DB. Registrations stop; preferences carry the promoted gas limit.builder.gas_limit, exactly as on v1. Preferences use the top-levelgas_limit.gas_limit.gas_limit.test kurtosis
check that proposer preferences are updated correctly, snooper is enabled.
Note beacon node updates are not part of this pr.
Which issues(s) does this PR fix?
Fixes #
Other notes for review
Acknowledgements