Skip to content

Commit c36a0c9

Browse files
committed
fix: rebase conflicts/updates
1 parent 222a000 commit c36a0c9

File tree

6 files changed

+13
-30
lines changed

6 files changed

+13
-30
lines changed

packages/beacon-node/src/chain/chain.ts

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import {ProcessShutdownCallback} from "@lodestar/validator";
3434
import {Logger, gweiToWei, isErrorAborted, pruneSetToMax, sleep, toHex} from "@lodestar/utils";
3535
import {ForkSeq, SLOTS_PER_EPOCH} from "@lodestar/params";
3636

37-
import {toHexString} from "@lodestar/utils";
3837
import {GENESIS_EPOCH, ZERO_HASH} from "../constants/index.js";
3938
import {IBeaconDb} from "../db/index.js";
4039
import {Metrics} from "../metrics/index.js";

packages/beacon-node/src/network/reqresp/handlers/beaconBlocksByRange.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ export async function* onBeaconBlocksByRange(
2222
// Finalized range of blocks
2323
if (startSlot <= finalizedSlot) {
2424
// Chain of blobs won't change
25-
for await (const {key, value} of db.finalized.binaryEntriesStream({gte: startSlot, lt: endSlot})) {
26-
const {name, seq} = chain.config.getForkInfo(db.finalized.decodeKey(key));
25+
for await (const {key, value} of finalized.binaryEntriesStream({gte: startSlot, lt: endSlot})) {
26+
const {name, seq} = chain.config.getForkInfo(finalized.decodeKey(key));
2727

2828
yield {
2929
data: await chain.blindedOrFullBlockToFullBytes(seq, value),

packages/beacon-node/test/mocks/block.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fs from "node:fs";
22
import {ssz, allForks} from "@lodestar/types";
33
import {ForkInfo, createChainForkConfig, defaultChainConfig} from "@lodestar/config";
4-
import {mainnetChainConfig} from "@lodestar/config/presets";
4+
import {mainnetChainConfig} from "@lodestar/config/configs";
55

66
const directory = "./__fixtures__/";
77

packages/beacon-node/test/unit/util/fullOrBlindedBlock.test.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {expect} from "chai";
1+
import {describe, it, expect} from "vitest";
22
import {ForkInfo} from "@lodestar/config";
33
import {allForks, capella} from "@lodestar/types";
44
import {isForkExecution} from "@lodestar/params";
@@ -9,7 +9,7 @@ import {
99
isBlindedBytes,
1010
serializeFullOrBlindedSignedBeaconBlock,
1111
} from "../../../src/util/fullOrBlindedBlock.js";
12-
import {chainConfig, mockBlocks} from "../../utils/mocks/block.js";
12+
import {chainConfig, mockBlocks} from "../../mocks/block.js";
1313
import {byteArrayEquals} from "../../../src/util/bytes.js";
1414

1515
type FullOrBlind = "full" | "blinded";
@@ -28,7 +28,7 @@ const fullOrBlindedBlocks = Object.values(mockBlocks)
2828
describe("isBlindedBytes", () => {
2929
for (const [fullOrBlinded, {seq, name}, , block] of fullOrBlindedBlocks) {
3030
it(`should return ${fullOrBlinded === "blinded"} for ${fullOrBlinded} ${name} blocks`, () => {
31-
expect(isBlindedBytes(seq, block)).to.equal(isForkExecution(name) && fullOrBlinded === "blinded");
31+
expect(isBlindedBytes(seq, block)).toEqual(isForkExecution(name) && fullOrBlinded === "blinded");
3232
});
3333
}
3434
});
@@ -37,7 +37,7 @@ describe("serializeFullOrBlindedSignedBeaconBlock", () => {
3737
for (const [fullOrBlinded, {name}, block, expected] of fullOrBlindedBlocks) {
3838
it(`should serialize ${fullOrBlinded} ${name} block`, () => {
3939
const serialized = serializeFullOrBlindedSignedBeaconBlock(chainConfig, block);
40-
expect(byteArrayEquals(serialized, expected)).to.be.true;
40+
expect(byteArrayEquals(serialized, expected)).toBeTruthy();
4141
});
4242
}
4343
});
@@ -50,7 +50,7 @@ describe("deserializeFullOrBlindedSignedBeaconBlock", () => {
5050
isForkExecution(name) && fullOrBlinded === "blinded"
5151
? chainConfig.getBlindedForkTypes(block.message.slot).SignedBeaconBlock
5252
: chainConfig.getForkTypes(block.message.slot).SignedBeaconBlock;
53-
expect(type.equals(deserialized as any, block as any)).to.be.true;
53+
expect(type.equals(deserialized as any, block as any)).toBeTruthy();
5454
});
5555
}
5656
});
@@ -69,15 +69,15 @@ describe("blindedOrFullBlockToBlinded", function () {
6969
chainConfig.getBlindedForkTypes(full.message.slot).SignedBeaconBlock.equals(result, blinded!)
7070
: // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
7171
chainConfig.getForkTypes(full.message.slot).SignedBeaconBlock.equals(result, isExecution ? blinded! : full);
72-
expect(isEqual).to.be.true;
72+
expect(isEqual).toBeTruthy();
7373
});
7474
if (!blinded) continue;
7575
it(`should convert blinded ${name} to blinded block`, () => {
7676
const result = blindedOrFullBlockToBlinded(chainConfig, blinded);
7777
const isEqual = isForkExecution(name)
7878
? chainConfig.getBlindedForkTypes(full.message.slot).SignedBeaconBlock.equals(result, blinded)
7979
: chainConfig.getForkTypes(full.message.slot).SignedBeaconBlock.equals(result, blinded);
80-
expect(isEqual).to.be.true;
80+
expect(isEqual).toBeTruthy();
8181
});
8282
}
8383
});
@@ -94,12 +94,12 @@ describe("blindedOrFullBlockToFull", function () {
9494
};
9595
it(`should convert full ${name} to full block`, () => {
9696
const result = blindedOrFullBlockToFull(chainConfig, seq, full, transactionsAndWithdrawals);
97-
expect(chainConfig.getForkTypes(full.message.slot).SignedBeaconBlock.equals(result, full)).to.be.true;
97+
expect(chainConfig.getForkTypes(full.message.slot).SignedBeaconBlock.equals(result, full)).toBeTruthy();
9898
});
9999
if (!blinded) continue;
100100
it(`should convert blinded ${name} to full block`, () => {
101101
const result = blindedOrFullBlockToFull(chainConfig, seq, blinded, transactionsAndWithdrawals);
102-
expect(chainConfig.getForkTypes(full.message.slot).SignedBeaconBlock.equals(result, full)).to.be.true;
102+
expect(chainConfig.getForkTypes(full.message.slot).SignedBeaconBlock.equals(result, full)).toBeTruthy();
103103
});
104104
}
105105
});

packages/cli/test/sim/deneb.test.ts

-16
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ import {connectAllNodes, waitForSlot} from "../utils/crucible/utils/network.js";
77
import {createBlobsAssertion} from "../utils/crucible/assertions/blobsAssertion.js";
88
import {assertCheckpointSync, assertRangeSync} from "../utils/crucible/utils/syncing.js";
99

10-
const genesisDelaySeconds = 20 * SIM_TESTS_SECONDS_PER_SLOT;
11-
const altairForkEpoch = 1;
12-
const bellatrixForkEpoch = 2;
13-
const capellaForkEpoch = 3;
14-
const denebForkEpoch = 4;
15-
// Make sure bellatrix started before TTD reach
16-
const additionalSlotsForTTD = activePreset.SLOTS_PER_EPOCH - 2;
1710
const runTillEpoch = 6;
1811
const syncWaitEpoch = 2;
1912

@@ -31,17 +24,8 @@ const env = await Simulation.initWithDefaults(
3124
{
3225
id: "deneb",
3326
logsDir: path.join(logFilesDir, "deneb"),
34-
// TODO: (@matthewkeil) this may be a merge conflict
3527
forkConfig,
3628
trustedSetup: true,
37-
chainConfig: {
38-
ALTAIR_FORK_EPOCH: altairForkEpoch,
39-
BELLATRIX_FORK_EPOCH: bellatrixForkEpoch,
40-
CAPELLA_FORK_EPOCH: capellaForkEpoch,
41-
DENEB_FORK_EPOCH: denebForkEpoch,
42-
GENESIS_DELAY: genesisDelaySeconds,
43-
TERMINAL_TOTAL_DIFFICULTY: ttd,
44-
},
4529
},
4630
[
4731
{

packages/light-client/test/unit/webEsmBundle.browser.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-call */
1+
/* eslint-disable @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access */
22
import {expect, describe, it, vi} from "vitest";
33
import {Lightclient, LightclientEvent, utils, transport} from "../../dist/lightclient.min.mjs";
44

0 commit comments

Comments
 (0)