Skip to content

cluster/proposerconfig: add revisioned proposer config file - #4829

Open
KaloyanTanev wants to merge 10 commits into
mainfrom
kalo/revisioned-proposer-config
Open

KaloyanTanev wants to merge 10 commits into
mainfrom
kalo/revisioned-proposer-config

Conversation

@KaloyanTanev

@KaloyanTanev KaloyanTanev commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Adds the cluster/proposerconfig package: 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 run writes 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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread app/app.go Resolved
Comment thread app/proposerconfig.go Resolved
Comment thread app/proposerconfig.go Resolved
Comment thread cluster/proposerconfig/delta.go Resolved
Comment thread cluster/proposerconfig/diff.go Resolved
@codecov

codecov Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.75862% with 71 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.11%. Comparing base (beea8ba) to head (b257d42).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cluster/proposerconfig/file.go 82.63% 25 Missing ⚠️
app/app.go 29.41% 12 Missing ⚠️
cluster/proposerconfig/seed.go 78.57% 9 Missing ⚠️
cluster/proposerconfig/verify.go 87.67% 9 Missing ⚠️
cluster/proposerconfig/delta.go 91.35% 7 Missing ⚠️
app/builderconfig.go 75.00% 4 Missing ⚠️
app/proposerconfig.go 98.00% 2 Missing ⚠️
cluster/proposerconfig/proposerconfig.go 96.77% 2 Missing ⚠️
app/vmock.go 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Comma-splitting before URL redaction can expose complete credentials in drift and override warnings when a URL contains a comma.

1 open issue
5 resolved since last review

Review effort: Balanced

Comment thread cluster/proposerconfig/diff.go Resolved
@sonarqubecloud

sonarqubecloud Bot commented Nov 9, 2026

Copy link
Copy Markdown

@KaloyanTanev
KaloyanTanev marked this pull request as ready for review November 9, 2026 18:00
@KaloyanTanev
KaloyanTanev added this pull request to stack #4832 November 10, 2026 10:03
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