Repository navigation
cluster/proposerconfig: add revisioned proposer config file - #4829
KaloyanTanev wants to merge 10 commits into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Critical issues leave loaded configuration unapplied at runtime, expose builder credentials in warning logs, and silently discard per-validator overrides during config updates.
5 open issues
What changed in this PR
Adds revisioned proposer configuration to support cluster-agreed validator settings for Gloas, separating the shared configuration from each node’s on-disk validator identities.
Changes:
- Introduces canonical hashing, operator signatures, configuration edits, and atomic file writing and archiving.
- Adds startup loading, verification, drift warnings, and revision/validation metrics.
- Replaces builder and gas-limit seed flags with
--proposer-config-*flags and updates tests and documentation.
| File | Description |
|---|---|
testutil/integration/simnet_test.go |
Migrates simnet builder settings to the seed structure. |
docs/metrics.md |
Documents proposer-config gauges. |
docs/configuration.md |
Updates the CLI flag reference. |
cmd/run.go |
Binds proposer-config path and seed flags. |
cmd/run_internal_test.go |
Tests validation and explicitly supplied seed flags. |
cmd/cmd_internal_test.go |
Tests defaults, flag migration, and redaction. |
cluster/proposerconfig/verify.go |
Implements revision and operator-signature verification. |
cluster/proposerconfig/verify_internal_test.go |
Tests valid and invalid signatures and metadata. |
cluster/proposerconfig/testdata/TestWriteLoadRoundTrip.golden |
Records the node-specific on-disk format. |
cluster/proposerconfig/testdata/TestMarshalRoundTrip.golden |
Records the shared document format. |
cluster/proposerconfig/testdata/TestHashGolden.golden |
Pins the canonical revision hash. |
cluster/proposerconfig/testdata/TestHashGolden_signing_data.golden |
Pins canonical signing bytes. |
cluster/proposerconfig/seed.go |
Defines and validates initial configuration seeds. |
cluster/proposerconfig/seed_internal_test.go |
Tests seed validation and builder conversion. |
cluster/proposerconfig/proposerconfig.go |
Defines document types, hashing, and configuration helpers. |
cluster/proposerconfig/proposerconfig_internal_test.go |
Tests canonicalization and sparse settings. |
cluster/proposerconfig/file.go |
Adds serialization, key translation, atomic writes, and archives. |
cluster/proposerconfig/file_internal_test.go |
Tests persistence, compatibility errors, and archives. |
cluster/proposerconfig/diff.go |
Reports configuration differences. |
cluster/proposerconfig/diff_internal_test.go |
Tests difference reporting and large configurations. |
cluster/proposerconfig/delta.go |
Applies fee-recipient, gas-limit, and builder edits. |
cluster/proposerconfig/delta_internal_test.go |
Tests edits, validation, and no-change detection. |
app/vmock.go |
Reads mock builder URLs from the seed structure. |
app/proposerconfig.go |
Handles startup loading, generation, warnings, and gauges. |
app/proposerconfig_internal_test.go |
Tests startup loading and failure handling. |
app/metrics.go |
Defines revision and invalid-config gauges. |
app/builderconfig.go |
Migrates builder helpers to seed fields. |
app/builderconfig_internal_test.go |
Updates builder-helper tests. |
app/app.go |
Integrates loading and current-epoch calculation. |
app/app_internal_test.go |
Tests current-epoch calculation. |
Review effort: Balanced
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4829 +/- ##
==========================================
+ Coverage 67.77% 68.11% +0.34%
==========================================
Files 255 261 +6
Lines 33749 34190 +441
==========================================
+ Hits 22873 23289 +416
- Misses 10875 10900 +25
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|





Adds the
cluster/proposerconfigpackage: a revisioned proposer config file keyed by DV pubkeys in memory and by the node's pubshares on disk, with a canonical revision hash, operator signatures, and load/write/archive.charon runwrites an unsigned revision 0 file from the lock and the new--proposer-config-*seed flags (replacing--builder-*and--proposer-gas-limit), loads and verifies an existing one, and warns where it differs from the flags.This breaks the proposer config file written by earlier versions: an existing file fails to load and must be deleted to regenerate. That's intentional, the old format has only shipped in a release candidate and the fix is trivial.
category: feature
ticket: #4324