Repository navigation
cmd: convert deposit sign withdrawal addresses to creds - #4804
Merged
Merged
Conversation
charon deposit sign hex-decoded --withdrawal-addresses straight into DepositMessage.WithdrawalCredentials. A 20 byte address (as documented) was zero-padded by SSZ hashing, so operators signed and the API stored malformed deposits. Addresses are now converted to 0x01 (or 0x02 for compounding clusters) withdrawal credentials. Mixed case addresses must match their EIP-55 checksum. Full 32 byte credentials are still accepted if the prefix matches the cluster's compounding setting. deposit fetch rejects credentials from the API that are not 32 bytes.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4804 +/- ##
==========================================
+ Coverage 67.61% 67.69% +0.08%
==========================================
Files 254 255 +1
Lines 33609 33698 +89
==========================================
+ Hits 22725 22813 +88
- Misses 10883 10884 +1
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
aly-obol
previously approved these changes
Oct 23, 2026
|
KaloyanTanev
approved these changes
Oct 30, 2026
obol-bulldozer Bot
pushed a commit
that referenced
this pull request
Nov 4, 2026
Validates fee recipient and withdrawal addresses the same way in `create cluster`, `create dkg` and `edit add-validators`, and stores them in EIP-55 checksummed form. Before this, `create cluster` without a definition file skipped the withdrawal address check entirely. A zero address on mainnet or gnosis is an error in `create dkg` and a warning elsewhere (where it's legitimate, e.g. splitting the keys of validators that are already active). The "all-lowercase or all-uppercase, otherwise it must match EIP-55" rule now lives in one place, `eth2util.ValidateChecksumAddress`. It's used by these commands, by `feerecipient sign` (which wrongly rejected all-uppercase addresses) and by `deposit.WithdrawalCredsFromAddrOrCreds` (#4804). category: bug ticket: none
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.



charon deposit signhex-decoded--withdrawal-addressesstraight intoDepositMessage.WithdrawalCredentials. A 20 byte address, as the alter withdrawal address docs show, was silently zero-padded by SSZ hashing, so operators signed, and the Obol API stored, deposits with malformed credentials (<address><12 zero bytes>).deposit.WithdrawalCredsFromAddrOrCreds: a 20 byte address becomes0x01credentials (0x02for compounding clusters). Mixed case addresses must match their EIP-55 checksum; all lower or all upper case is accepted. Full 32 byte credentials are still accepted if the prefix matches the cluster's compounding setting and bytes 1-11 are zero. Anything else is rejected.deposit signuses it and rejects the zero address on mainnet/gnosis, ascreate dkgdoes.deposit fetchrejects API credentials that are not 32 bytes, covering bad records already stored.Companion changes: obol-api
oisin/validate-withdrawal-creds, obol-sdkoisin/validate-withdrawal-creds-length, obol-docsoisin/deposit-sign-v1.11-credentialsandoisin/deposit-sign-withdrawal-addresses.category: bug
ticket: none