Skip to content

Commit 299ddaa

Browse files
nflaigg11tech
authored andcommitted
fix: update withdrawal request container to match consensus spec (#6797)
1 parent 23119da commit 299ddaa

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
@@ -437,7 +437,7 @@ export function serializeExecutionLayerWithdrawalRequest(
437437
): ExecutionLayerWithdrawalRequestRpc {
438438
return {
439439
sourceAddress: bytesToData(withdrawalRequest.sourceAddress),
440-
validatorPublicKey: bytesToData(withdrawalRequest.validatorPublicKey),
440+
validatorPublicKey: bytesToData(withdrawalRequest.validatorPubkey),
441441
amount: numToQuantity(withdrawalRequest.amount),
442442
};
443443
}
@@ -447,7 +447,7 @@ export function deserializeExecutionLayerWithdrawalRequest(
447447
): electra.ExecutionLayerWithdrawalRequest {
448448
return {
449449
sourceAddress: dataToBytes(withdrawalRequest.sourceAddress, 20),
450-
validatorPublicKey: dataToBytes(withdrawalRequest.validatorPublicKey, 48),
450+
validatorPubkey: dataToBytes(withdrawalRequest.validatorPublicKey, 48),
451451
amount: quantityToNum(withdrawalRequest.amount),
452452
};
453453
}

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)