Skip to content

Commit

Permalink
fix: debug broken test:sim:deneb
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewkeil committed Jun 14, 2024
1 parent 2d00248 commit 16ece98
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/beacon-node/src/execution/engine/mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class ExecutionEngineMockBackend implements JsonRpcBackend {
private getPayloadBodiesByHash(
_blockHex: EngineApiRpcParamTypes["engine_getPayloadBodiesByHashV1"][0]
): EngineApiRpcReturnTypes["engine_getPayloadBodiesByHashV1"] {
return [] as ExecutionPayloadBodyRpc[];
return [{transactions: [], withdrawals: []}] as ExecutionPayloadBodyRpc[];
}

private getPayloadBodiesByRange(
Expand Down
16 changes: 16 additions & 0 deletions packages/cli/test/sim/deneb.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ import {connectAllNodes, waitForSlot} from "../utils/crucible/utils/network.js";
import {createBlobsAssertion} from "../utils/crucible/assertions/blobsAssertion.js";
import {assertCheckpointSync, assertRangeSync} from "../utils/crucible/utils/syncing.js";

const genesisDelaySeconds = 20 * SIM_TESTS_SECONDS_PER_SLOT;
const altairForkEpoch = 1;
const bellatrixForkEpoch = 2;
const capellaForkEpoch = 3;
const denebForkEpoch = 4;
// Make sure bellatrix started before TTD reach
const additionalSlotsForTTD = activePreset.SLOTS_PER_EPOCH - 2;
const runTillEpoch = 6;
const syncWaitEpoch = 2;

Expand All @@ -24,8 +31,17 @@ const env = await Simulation.initWithDefaults(
{
id: "deneb",
logsDir: path.join(logFilesDir, "deneb"),
// TODO: (@matthewkeil) this may be a merge conflict
forkConfig,
trustedSetup: true,
chainConfig: {
ALTAIR_FORK_EPOCH: altairForkEpoch,
BELLATRIX_FORK_EPOCH: bellatrixForkEpoch,
CAPELLA_FORK_EPOCH: capellaForkEpoch,
DENEB_FORK_EPOCH: denebForkEpoch,
GENESIS_DELAY: genesisDelaySeconds,
TERMINAL_TOTAL_DIFFICULTY: ttd,
},
},
[
{
Expand Down
1 change: 1 addition & 0 deletions packages/cli/test/utils/crucible/simulation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ export class Simulation {
genesisState: this.genesisState,
engineUrls,
paths: getNodePaths({id, logsDir: this.options.logsDir, client: beaconType, root: this.options.rootDir}),
engineMock: executionType === ExecutionClient.Mock,
});

if (keys.type === "no-keys") {
Expand Down

0 comments on commit 16ece98

Please sign in to comment.