@@ -609,9 +609,9 @@ describe('e2e_synching', () => {
609
609
) ;
610
610
} ) ;
611
611
612
- it . skip ( 'node following prunes and can extend chain' , async ( ) => {
613
- // @todo This test is to be activated when we can unwind the world state
614
- // It will currently stall forever as the state will never match.
612
+ it ( 'node following prunes and can extend chain (fresh pxe) ' , async ( ) => {
613
+ // @todo this should be rewritten slightly when the PXE can handle re-orgs
614
+ // such that it does not need to be run "fresh" Issue #9327
615
615
if ( AZTEC_GENERATE_TEST_DATA ) {
616
616
return ;
617
617
}
@@ -628,6 +628,11 @@ describe('e2e_synching', () => {
628
628
const pendingBlockNumber = await rollup . read . getPendingBlockNumber ( ) ;
629
629
await rollup . write . setAssumeProvenThroughBlockNumber ( [ pendingBlockNumber - BigInt ( variant . blockCount ) / 2n ] ) ;
630
630
631
+ const aztecNode = await AztecNodeService . createAndSync ( opts . config ! , new NoopTelemetryClient ( ) ) ;
632
+ const sequencer = aztecNode . getSequencer ( ) ;
633
+
634
+ const blockBeforePrune = await aztecNode . getBlockNumber ( ) ;
635
+
631
636
const timeliness = ( await rollup . read . EPOCH_DURATION ( ) ) * 2n ;
632
637
const [ , , slot ] = await rollup . read . blocks ( [ ( await rollup . read . getProvenBlockNumber ( ) ) + 1n ] ) ;
633
638
const timeJumpTo = await rollup . read . getTimestampForSlot ( [ slot + timeliness ] ) ;
@@ -641,16 +646,14 @@ describe('e2e_synching', () => {
641
646
) ;
642
647
await watcher . start ( ) ;
643
648
644
- const aztecNode = await AztecNodeService . createAndSync ( opts . config ! , new NoopTelemetryClient ( ) ) ;
645
- const sequencer = aztecNode . getSequencer ( ) ;
646
-
647
- const blockBeforePrune = await aztecNode . getBlockNumber ( ) ;
648
-
649
- await rollup . write . prune ( ) ;
649
+ await opts . deployL1ContractsValues ! . publicClient . waitForTransactionReceipt ( {
650
+ hash : await rollup . write . prune ( ) ,
651
+ } ) ;
650
652
651
653
await sleep ( 5000 ) ;
652
654
expect ( await aztecNode . getBlockNumber ( ) ) . toBeLessThan ( blockBeforePrune ) ;
653
655
656
+ // We need to start the pxe after the re-org for now, because it won't handle it otherwise
654
657
const { pxe } = await setupPXEService ( aztecNode ! ) ;
655
658
variant . setPXE ( pxe ) ;
656
659
0 commit comments