*: harden feerecipient sign and fetch#4571
Open
pinebit wants to merge 2 commits into
Open
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4571 +/- ##
==========================================
+ Coverage 57.22% 57.27% +0.05%
==========================================
Files 245 245
Lines 33449 33531 +82
==========================================
+ Hits 19140 19205 +65
- Misses 11885 11887 +2
- Partials 2424 2439 +15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Always verify builder registration signatures: mainnet's genesis fork version equals the zero value, so the previous non-zero gate silently disabled verification for mainnet clusters. Move merge logic into app.MergeBuilderRegistrationOverrides shared by the CLI fetch and runtime paths. Load existing overrides leniently in fetch (corrupt files are rebuilt, invalid entries skipped) and warn when a fetched registration is discarded as not newer. Write the overrides file atomically via temp file and rename. Reject the zero fee recipient address and mixed-case addresses failing EIP-55 checksum in sign. Reject new registrations whose timestamp is not later than the current quorum registration. Resolve the default gas limit from the most recent of lock, overrides and remote quorum, and warn when explicit --timestamp/--gas-limit flags are overridden by adopted in-progress values. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
dc499ea to
becd79b
Compare
|
KaloyanTanev
approved these changes
Jul 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Hardening feerecipient behavior
Docs PR: ObolNetwork/obol-gitbook#159
Summary
Fetch
feerecipient fetchmerges newly fetched, quorum-aggregated builder registrations into the existing overrides file instead of replacing it, keeping the entry with the latest timestamp per validator pubkey. Existing entries win ties, and a warning is logged when a fetched registration is discarded as not newer.app.MergeBuilderRegistrationOverrides, shared by the CLI fetch and the runtime--fetch-feerecipient-updatespaths so their semantics cannot drift.verifyRegistrationSignaturestays unexported.charon runat startup.Signature verification
0x00000000) equals the zero fork version value, so the previous "verify only when the fork version is non-zero" gate silently disabled all verification for mainnet clusters, inLoadBuilderRegistrationOverrides, the background fetch, and the CLI fetch.Sign
--timestampor--gas-limitflags.Test plan
go test -race ./cmd/... ./app/...pre-commit run --from-ref origin/main --to-ref HEAD— all hooks passcategory: refactor
ticket: none