diff --git a/packages/beacon-node/src/execution/engine/types.ts b/packages/beacon-node/src/execution/engine/types.ts index f957722c0955..9db6717c4749 100644 --- a/packages/beacon-node/src/execution/engine/types.ts +++ b/packages/beacon-node/src/execution/engine/types.ts @@ -419,7 +419,7 @@ export function serializeExecutionLayerWithdrawalRequest( ): ExecutionLayerWithdrawalRequestRpc { return { sourceAddress: bytesToData(withdrawalRequest.sourceAddress), - validatorPublicKey: bytesToData(withdrawalRequest.validatorPublicKey), + validatorPublicKey: bytesToData(withdrawalRequest.validatorPubkey), amount: numToQuantity(withdrawalRequest.amount), }; } @@ -429,7 +429,7 @@ export function deserializeExecutionLayerWithdrawalRequest( ): electra.ExecutionLayerWithdrawalRequest { return { sourceAddress: dataToBytes(withdrawalRequest.sourceAddress, 20), - validatorPublicKey: dataToBytes(withdrawalRequest.validatorPublicKey, 48), + validatorPubkey: dataToBytes(withdrawalRequest.validatorPublicKey, 48), amount: quantityToNum(withdrawalRequest.amount), }; } diff --git a/packages/beacon-node/test/spec/presets/ssz_static.test.ts b/packages/beacon-node/test/spec/presets/ssz_static.test.ts index 3c81bd823e82..e99e5f7bada1 100644 --- a/packages/beacon-node/test/spec/presets/ssz_static.test.ts +++ b/packages/beacon-node/test/spec/presets/ssz_static.test.ts @@ -1,6 +1,6 @@ import fs from "node:fs"; import path from "node:path"; -import {expect, it, vi} from "vitest"; +import {it, vi} from "vitest"; import {Type} from "@chainsafe/ssz"; import {ssz} from "@lodestar/types"; import {ACTIVE_PRESET, ForkName, ForkLightClient, ForkExecution} from "@lodestar/params"; @@ -58,24 +58,22 @@ const sszStatic = (ssz.phase0 as Types)[typeName]; if (!sszType) { - expect.fail( - `Missing SSZ type definition for ${typeName}; this will prevent associated ssz_static tests to be executed` - ); - } else { - const sszTypeNoUint = replaceUintTypeWithUintBigintType(sszType); + throw Error(`Missing SSZ type ${typeName} for fork ${fork}`); + } + + const sszTypeNoUint = replaceUintTypeWithUintBigintType(sszType); - for (const testCase of fs.readdirSync(testSuiteDirpath)) { - // Do not manually skip tests here, do it in packages/beacon-node/test/spec/presets/index.test.ts - it(testCase, function () { - // Mainnet must deal with big full states and hash each one multiple times - if (ACTIVE_PRESET === "mainnet") { - vi.setConfig({testTimeout: 30 * 1000}); - } + for (const testCase of fs.readdirSync(testSuiteDirpath)) { + // Do not manually skip tests here, do it in packages/beacon-node/test/spec/presets/index.test.ts + it(testCase, function () { + // Mainnet must deal with big full states and hash each one multiple times + if (ACTIVE_PRESET === "mainnet") { + vi.setConfig({testTimeout: 30 * 1000}); + } - const testData = parseSszStaticTestcase(path.join(testSuiteDirpath, testCase)); - runValidSszTest(sszTypeNoUint, testData); - }); - } + const testData = parseSszStaticTestcase(path.join(testSuiteDirpath, testCase)); + runValidSszTest(sszTypeNoUint, testData); + }); } }; diff --git a/packages/state-transition/src/block/processExecutionLayerWithdrawalRequest.ts b/packages/state-transition/src/block/processExecutionLayerWithdrawalRequest.ts index 935acd522da1..e02129a09d05 100644 --- a/packages/state-transition/src/block/processExecutionLayerWithdrawalRequest.ts +++ b/packages/state-transition/src/block/processExecutionLayerWithdrawalRequest.ts @@ -32,7 +32,7 @@ export function processExecutionLayerWithdrawalRequest( // bail out if validator is not in beacon state // note that we don't need to check for 6110 unfinalized vals as they won't be eligible for withdraw/exit anyway - const validatorIndex = pubkey2index.get(executionLayerWithdrawalRequest.validatorPublicKey); + const validatorIndex = pubkey2index.get(executionLayerWithdrawalRequest.validatorPubkey); if (validatorIndex === undefined) { return; } diff --git a/packages/types/src/electra/sszTypes.ts b/packages/types/src/electra/sszTypes.ts index 0a0c0f6aeefb..a8249156c7b9 100644 --- a/packages/types/src/electra/sszTypes.ts +++ b/packages/types/src/electra/sszTypes.ts @@ -128,7 +128,7 @@ export const DepositReceipts = new ListCompositeType(DepositReceipt, MAX_DEPOSIT export const ExecutionLayerWithdrawalRequest = new ContainerType( { sourceAddress: ExecutionAddress, - validatorPublicKey: BLSPubkey, + validatorPubkey: BLSPubkey, amount: UintNum64, }, {typeName: "ExecutionLayerWithdrawalRequest", jsonCase: "eth2"}