Skip to content

Commit 29f066b

Browse files
nflaigg11tech
authored andcommitted
fix: update withdrawal request container to match consensus spec (ChainSafe#6797)
1 parent 22a2980 commit 29f066b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

packages/beacon-node/src/execution/engine/types.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ export function serializeExecutionLayerWithdrawalRequest(
419419
): ExecutionLayerWithdrawalRequestRpc {
420420
return {
421421
sourceAddress: bytesToData(withdrawalRequest.sourceAddress),
422-
validatorPublicKey: bytesToData(withdrawalRequest.validatorPublicKey),
422+
validatorPublicKey: bytesToData(withdrawalRequest.validatorPubkey),
423423
amount: numToQuantity(withdrawalRequest.amount),
424424
};
425425
}
@@ -429,7 +429,7 @@ export function deserializeExecutionLayerWithdrawalRequest(
429429
): electra.ExecutionLayerWithdrawalRequest {
430430
return {
431431
sourceAddress: dataToBytes(withdrawalRequest.sourceAddress, 20),
432-
validatorPublicKey: dataToBytes(withdrawalRequest.validatorPublicKey, 48),
432+
validatorPubkey: dataToBytes(withdrawalRequest.validatorPublicKey, 48),
433433
amount: quantityToNum(withdrawalRequest.amount),
434434
};
435435
}

packages/state-transition/src/block/processExecutionLayerWithdrawalRequest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function processExecutionLayerWithdrawalRequest(
3232

3333
// bail out if validator is not in beacon state
3434
// note that we don't need to check for 6110 unfinalized vals as they won't be eligible for withdraw/exit anyway
35-
const validatorIndex = pubkey2index.get(executionLayerWithdrawalRequest.validatorPublicKey);
35+
const validatorIndex = pubkey2index.get(executionLayerWithdrawalRequest.validatorPubkey);
3636
if (validatorIndex === undefined) {
3737
return;
3838
}

packages/types/src/electra/sszTypes.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export const DepositReceipts = new ListCompositeType(DepositReceipt, MAX_DEPOSIT
128128
export const ExecutionLayerWithdrawalRequest = new ContainerType(
129129
{
130130
sourceAddress: ExecutionAddress,
131-
validatorPublicKey: BLSPubkey,
131+
validatorPubkey: BLSPubkey,
132132
amount: UintNum64,
133133
},
134134
{typeName: "ExecutionLayerWithdrawalRequest", jsonCase: "eth2"}

0 commit comments

Comments
 (0)