Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions yarn-project/end-to-end/src/e2e_synching.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -609,9 +609,9 @@ describe('e2e_synching', () => {
);
});

it.skip('node following prunes and can extend chain', async () => {
// @todo This test is to be activated when we can unwind the world state
// It will currently stall forever as the state will never match.
it('node following prunes and can extend chain (fresh pxe)', async () => {
// @todo this should be rewritten slightly when the PXE can handle re-orgs
// such that it does not need to be run "fresh" Issue #9327
if (AZTEC_GENERATE_TEST_DATA) {
return;
}
Expand All @@ -628,6 +628,11 @@ describe('e2e_synching', () => {
const pendingBlockNumber = await rollup.read.getPendingBlockNumber();
await rollup.write.setAssumeProvenThroughBlockNumber([pendingBlockNumber - BigInt(variant.blockCount) / 2n]);

const aztecNode = await AztecNodeService.createAndSync(opts.config!, new NoopTelemetryClient());
const sequencer = aztecNode.getSequencer();

const blockBeforePrune = await aztecNode.getBlockNumber();

const timeliness = (await rollup.read.EPOCH_DURATION()) * 2n;
const [, , slot] = await rollup.read.blocks([(await rollup.read.getProvenBlockNumber()) + 1n]);
const timeJumpTo = await rollup.read.getTimestampForSlot([slot + timeliness]);
Expand All @@ -641,16 +646,14 @@ describe('e2e_synching', () => {
);
await watcher.start();

const aztecNode = await AztecNodeService.createAndSync(opts.config!, new NoopTelemetryClient());
const sequencer = aztecNode.getSequencer();

const blockBeforePrune = await aztecNode.getBlockNumber();

await rollup.write.prune();
await opts.deployL1ContractsValues!.publicClient.waitForTransactionReceipt({
hash: await rollup.write.prune(),
});

await sleep(5000);
expect(await aztecNode.getBlockNumber()).toBeLessThan(blockBeforePrune);

// We need to start the pxe after the re-org for now, because it won't handle it otherwise
const { pxe } = await setupPXEService(aztecNode!);
variant.setPXE(pxe);

Expand Down