Skip to content

Commit

Permalink
wip: REPLACE THIS COMMIT
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewkeil committed Jun 21, 2024
1 parent 71183e4 commit 74fdc78
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/beacon-node/test/e2e/network/mdns.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe.skip("mdns", function () {

const opts = await getOpts(peerId);

const modules: Omit<NetworkInitModules, "opts" | "peerId" | "logger"> = {
const modules: Omit<NetworkInitModules, "opts" | "peerId" | "logger" | "nodeId"> = {
config,
chain,
db,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe.skip("data serialization through worker boundary", function () {

// Defining tests in this notation ensures that any event data is tested and probably safe to send
const networkEventData = filterByUsedEvents<NetworkEventData>(networkEventDirection, {
[NetworkEvent.peerConnected]: {peer, status: statusZero},
[NetworkEvent.peerConnected]: {peer, status: statusZero, dataColumns: []},
[NetworkEvent.peerDisconnected]: {peer},
[NetworkEvent.reqRespRequest]: {
request: {method: ReqRespMethod.Status, body: statusZero},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import crypto from "node:crypto";
import {fromHexString} from "@chainsafe/ssz";
import {itBench} from "@dapplion/benchmark";
import {config} from "@lodestar/config/default";
Expand Down Expand Up @@ -38,6 +39,7 @@ describe("produceBlockBody", () => {
minSameMessageSignatureSetsToBatch: 32,
},
{
nodeId: Buffer.alloc(32, crypto.randomBytes(32)),
config: state.config,
db,
logger,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import crypto from "node:crypto";
import {itBench, setBenchOpts} from "@dapplion/benchmark";
import {config} from "@lodestar/config/default";
import {SAFE_SLOTS_TO_IMPORT_OPTIMISTICALLY, SLOTS_PER_EPOCH} from "@lodestar/params";
Expand Down Expand Up @@ -94,6 +95,7 @@ describe.skip("verify+import blocks - range sync perf test", () => {
minSameMessageSignatureSetsToBatch: 32,
},
{
nodeId: Buffer.alloc(32, crypto.randomBytes(32)),
config: state.config,
db,
logger,
Expand Down
2 changes: 2 additions & 0 deletions packages/beacon-node/test/spec/presets/fork_choice.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import path from "node:path";
import crypto from "node:crypto";
import {expect} from "vitest";
import {toHexString} from "@chainsafe/ssz";
import {BeaconStateAllForks, isExecutionStateType, signedBlockToSignedHeader} from "@lodestar/state-transition";
Expand Down Expand Up @@ -99,6 +100,7 @@ const forkChoiceTest =
assertCorrectProgressiveBalances,
},
{
nodeId: Buffer.alloc(32, crypto.randomBytes(32)),
config: createBeaconConfig(config, state.genesisValidatorsRoot),
db: getMockedBeaconDb(),
logger,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ describe("SeenGossipBlockInput", () => {
});
const genesisValidatorsRoot = Buffer.alloc(32, 0xaa);
const config = createBeaconConfig(chainConfig, genesisValidatorsRoot);
const seenGossipBlockInput = new SeenGossipBlockInput();
const seenGossipBlockInput = new SeenGossipBlockInput({
custodyColumns: [],
custodyColumnsIndex: [],
custodyColumnsLen: 0,
});

// array of numBlobs, events where events are array of
// [block|blob11|blob2, pd | bp | null | error string reflecting the expected result]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ describe("block archive repository", function () {
singedBlock.message.body.blobKzgCommitments.push(commitment);
singedBlock.message.body.blobKzgCommitments.push(commitment);
singedBlock.message.body.blobKzgCommitments.push(commitment);
const dataColumnSidecars = computeDataColumnSidecars(config, singedBlock, {blobs: [blob, blob, blob]});
const dataColumnSidecars = computeDataColumnSidecars(config, singedBlock, {
blobs: [blob, blob, blob],
kzgProofs: [commitment, commitment, commitment],
});
for (let j = 0; j < dataColumnSidecars.length; j++) {
dataColumnSidecars[j].index = j;
}
Expand Down
2 changes: 2 additions & 0 deletions packages/beacon-node/test/utils/networkWithMockDb.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import crypto from "node:crypto";
import {createSecp256k1PeerId} from "@libp2p/peer-id-factory";
import {ChainForkConfig, createBeaconConfig} from "@lodestar/config";
import {ssz} from "@lodestar/types";
Expand Down Expand Up @@ -56,6 +57,7 @@ export async function getNetworkForTest(
minSameMessageSignatureSetsToBatch: 32,
},
{
nodeId: Buffer.alloc(32, crypto.randomBytes(32)),
config: beaconConfig,
db,
logger,
Expand Down

0 comments on commit 74fdc78

Please sign in to comment.