Skip to content

Comments

feat: support 0x02 compounding withdrawal credentials (EIP-7251)#27

Merged
olegshmuelov merged 4 commits intomainfrom
feat/0x02-withdrawal-credentials
Feb 23, 2026
Merged

feat: support 0x02 compounding withdrawal credentials (EIP-7251)#27
olegshmuelov merged 4 commits intomainfrom
feat/0x02-withdrawal-credentials

Conversation

@olegshmuelov
Copy link
Contributor

@olegshmuelov olegshmuelov commented Feb 16, 2026

Summary

  • Add 0x02 compounding withdrawal credentials support (EIP-7251)
  • Unified WithdrawalCredentials(prefix, addr) constructor replaces separate per-prefix functions
  • ValidateWithdrawalCredentials() enforces 32-byte length and valid prefix (0x01/0x02)
  • Remove implicit 0x01 wrapping — callers pass pre-built 32-byte credentials

@GalRogozinski
Copy link

Codex

[High] Backward-incompatible credential format change can break mixed-version clients/operators

The PR changes behavior from “accept raw address and wrap internally” to “must provide full 32-byte credentials” and enforces it in multiple paths. That is an API/protocol behavior break: existing callers still sending 20-byte values now fail hard. If rolling upgrades are expected, this can cause cross-version ceremony failures. At minimum this needs explicit migration/versioning handling (or a temporary compatibility path).

@y0sher @olegshmuelov
So everyone will upgrade a the same time

[Medium] Validation policy is inconsistent across message validators

Init now validates withdrawal credentials at message-validation time, but ValidateReshareMessage and ValidateResignMessage do not. Invalid credentials in those flows are rejected later (during result building/verification), which is later than expected and gives inconsistent failure semantics across operations.

@olegshmuelov this is a recommended fix

@olegshmuelov
Copy link
Contributor Author

Codex

[High] Backward-incompatible credential format change can break mixed-version clients/operators

The PR changes behavior from “accept raw address and wrap internally” to “must provide full 32-byte credentials” and enforces it in multiple paths. That is an API/protocol behavior break: existing callers still sending 20-byte values now fail hard. If rolling upgrades are expected, this can cause cross-version ceremony failures. At minimum this needs explicit migration/versioning handling (or a temporary compatibility path).

@y0sher @olegshmuelov So everyone will upgrade a the same time

dkg-spec is an internal library used only by ssv-dkg - we control both and release together. Additionally, ssv-dkg operators enforce a strict version check on every incoming message (see ssv-dkg/pkgs/operator/instances_manager.go): if the initiator's version doesn't match the operator's version, the request is rejected with "wrong version".
So mixed-version ceremonies are impossible by design. The wire protocol (SSZ ssz-max:"32") already supports 32 bytes, and the --compounding flag defaults to false, preserving existing behavior.

[Medium] Validation policy is inconsistent across message validators

Init now validates withdrawal credentials at message-validation time, but ValidateReshareMessage and ValidateResignMessage do not. Invalid credentials in those flows are rejected later (during result building/verification), which is later than expected and gives inconsistent failure semantics across operations.

@olegshmuelov this is a recommended fix

This was a pre-existing gap, not something introduced by this PR - the validation didn't exist before.
Added ValidateWithdrawalCredentials to ValidateReshareMessage and ValidateResignMessage in 3c49b2c.

GalRogozinski
GalRogozinski previously approved these changes Feb 19, 2026
y0sher
y0sher previously approved these changes Feb 19, 2026
Copy link

@MatheusFranco99 MatheusFranco99 left a comment

Choose a reason for hiding this comment

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

Looks good!

@olegshmuelov olegshmuelov merged commit 34d5638 into main Feb 23, 2026
2 checks passed
@olegshmuelov olegshmuelov deleted the feat/0x02-withdrawal-credentials branch February 23, 2026 11:12
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.

5 participants