From 70b7bffdb410a6bd987a5d34e726f890dccb1c99 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Mon, 6 Jul 2026 10:45:12 +0200 Subject: [PATCH] change early-onboarding withdrawal prefix from 0x03 to 0xB0 BUILDER_WITHDRAWAL_PREFIX changed to 0xB0 in ethereum/consensus-specs#5416 (v1.7.0-alpha.12). Pre-Gloas early-onboarding deposits through the validator deposit contract must carry the new prefix to be onboarded as builders at the fork. The EIP-8282 contract path (0x00 credentials) and deposit request type 0x03 are unaffected. --- pkg/lifecycle/contract.go | 6 +++--- pkg/lifecycle/contract_test.go | 4 ++-- pkg/lifecycle/early_deposit.go | 4 ++-- pkg/signer/bls.go | 2 +- pkg/signer/bls_test.go | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pkg/lifecycle/contract.go b/pkg/lifecycle/contract.go index 1a361e1..e9d3320 100644 --- a/pkg/lifecycle/contract.go +++ b/pkg/lifecycle/contract.go @@ -46,8 +46,8 @@ const ( builderWithdrawalPrefix = 0x00 // validatorWithdrawalPrefix is the withdrawal-credential prefix used for the // pre-Gloas early-onboarding deposit, which goes through the regular validator - // deposit contract (execution-address / 0x03-style credentials). - validatorWithdrawalPrefix = 0x03 + // deposit contract (builder-prefix / 0xB0 credentials). + validatorWithdrawalPrefix = 0xB0 ) // excessInhibitor is the EXCESS_INHIBITOR (2^256-1) stored in slot 0 of the @@ -174,7 +174,7 @@ func BuilderWithdrawalCredentials(walletAddress common.Address) [32]byte { // ValidatorWithdrawalCredentials builds the withdrawal credentials for the pre-Gloas // early-onboarding deposit, which is submitted through the regular validator deposit -// contract. Format: 0x03 + 00...00 (11 zero bytes) + wallet_address (20 bytes). +// contract. Format: 0xB0 + 00...00 (11 zero bytes) + wallet_address (20 bytes). func ValidatorWithdrawalCredentials(walletAddress common.Address) [32]byte { return buildWithdrawalCredentials(validatorWithdrawalPrefix, walletAddress) } diff --git a/pkg/lifecycle/contract_test.go b/pkg/lifecycle/contract_test.go index 3d536d0..2576036 100644 --- a/pkg/lifecycle/contract_test.go +++ b/pkg/lifecycle/contract_test.go @@ -38,7 +38,7 @@ func TestBuildBuilderDepositCalldata(t *testing.T) { } var wc [32]byte - wc[0] = 0x03 + wc[0] = 0xB0 sig := make([]byte, 96) for i := range sig { @@ -95,7 +95,7 @@ func TestWithdrawalCredentials(t *testing.T) { wantPrefix byte }{ {"builder uses 0x00 prefix", BuilderWithdrawalCredentials(addr), 0x00}, - {"validator uses 0x03 prefix", ValidatorWithdrawalCredentials(addr), 0x03}, + {"validator uses 0xB0 prefix", ValidatorWithdrawalCredentials(addr), 0xB0}, } for _, tt := range tests { diff --git a/pkg/lifecycle/early_deposit.go b/pkg/lifecycle/early_deposit.go index f6cf801..3dd86b9 100644 --- a/pkg/lifecycle/early_deposit.go +++ b/pkg/lifecycle/early_deposit.go @@ -31,7 +31,7 @@ const depositContractABI = `[{"name":"deposit","type":"function","stateMutabilit // EarlyDepositService submits a pre-Gloas builder onboarding deposit via the regular // validator deposit contract. Unlike the post-fork builder deposit (EIP-8282 predeploy, -// 0x00 withdrawal prefix, DOMAIN_BUILDER_DEPOSIT), an early deposit uses 0x03 withdrawal +// 0x00 withdrawal prefix, DOMAIN_BUILDER_DEPOSIT), an early deposit uses 0xB0 withdrawal // credentials and is signed with the validator deposit domain — i.e. it is an ordinary // validator deposit that sits in the beacon state's pending_deposits queue and is // converted into a builder at the Gloas fork boundary. @@ -87,7 +87,7 @@ func (s *EarlyDepositService) HasPendingDeposit() bool { } // CreateEarlyDeposit builds, signs and sends a validator deposit for this builder via -// the regular deposit contract. The deposit uses 0x03 (execution-address) withdrawal +// the regular deposit contract. The deposit uses 0xB0 (BUILDER_WITHDRAWAL_PREFIX) withdrawal // credentials pointing at the funding wallet and is signed with the validator deposit // domain over GENESIS_FORK_VERSION. func (s *EarlyDepositService) CreateEarlyDeposit(ctx context.Context, amountGwei uint64) error { diff --git a/pkg/signer/bls.go b/pkg/signer/bls.go index 3dddca7..4c24a9e 100644 --- a/pkg/signer/bls.go +++ b/pkg/signer/bls.go @@ -22,7 +22,7 @@ var ( // DomainDeposit is the standard domain for validator deposit signatures, and for // the genesis builder-onboarding path (a pre-fork deposit to the validator deposit - // contract with a 0x03 credential, per the Gloas spec). + // contract with a 0xB0 credential, per the Gloas spec). DomainDeposit = phase0.DomainType{0x03, 0x00, 0x00, 0x00} // DomainBuilderDeposit is DOMAIN_BUILDER_DEPOSIT (Gloas, 0x0E000000): the dedicated diff --git a/pkg/signer/bls_test.go b/pkg/signer/bls_test.go index 3ff8228..e995eb8 100644 --- a/pkg/signer/bls_test.go +++ b/pkg/signer/bls_test.go @@ -18,7 +18,7 @@ func TestDepositRootComputation(t *testing.T) { } var wc [32]byte - wc[0] = 0x03 + wc[0] = 0xB0 for i := 12; i < 32; i++ { wc[i] = byte(i) }