@@ -437,6 +437,9 @@ func assertOwnChain(t *testing.T, tester *downloadTester, length int) {
437
437
func TestCanonicalSynchronisation66Full (t * testing.T ) { testCanonSync (t , eth .ETH66 , FullSync ) }
438
438
func TestCanonicalSynchronisation66Snap (t * testing.T ) { testCanonSync (t , eth .ETH66 , SnapSync ) }
439
439
func TestCanonicalSynchronisation66Light (t * testing.T ) { testCanonSync (t , eth .ETH66 , LightSync ) }
440
+ func TestCanonicalSynchronisation67Full (t * testing.T ) { testCanonSync (t , eth .ETH67 , FullSync ) }
441
+ func TestCanonicalSynchronisation67Snap (t * testing.T ) { testCanonSync (t , eth .ETH67 , SnapSync ) }
442
+ func TestCanonicalSynchronisation67Light (t * testing.T ) { testCanonSync (t , eth .ETH67 , LightSync ) }
440
443
441
444
func testCanonSync (t * testing.T , protocol uint , mode SyncMode ) {
442
445
tester := newTester (t )
@@ -457,6 +460,8 @@ func testCanonSync(t *testing.T, protocol uint, mode SyncMode) {
457
460
// until the cached blocks are retrieved.
458
461
func TestThrottling66Full (t * testing.T ) { testThrottling (t , eth .ETH66 , FullSync ) }
459
462
func TestThrottling66Snap (t * testing.T ) { testThrottling (t , eth .ETH66 , SnapSync ) }
463
+ func TestThrottling67Full (t * testing.T ) { testThrottling (t , eth .ETH67 , FullSync ) }
464
+ func TestThrottling67Snap (t * testing.T ) { testThrottling (t , eth .ETH67 , SnapSync ) }
460
465
461
466
func testThrottling (t * testing.T , protocol uint , mode SyncMode ) {
462
467
tester := newTester (t )
@@ -537,6 +542,9 @@ func testThrottling(t *testing.T, protocol uint, mode SyncMode) {
537
542
func TestForkedSync66Full (t * testing.T ) { testForkedSync (t , eth .ETH66 , FullSync ) }
538
543
func TestForkedSync66Snap (t * testing.T ) { testForkedSync (t , eth .ETH66 , SnapSync ) }
539
544
func TestForkedSync66Light (t * testing.T ) { testForkedSync (t , eth .ETH66 , LightSync ) }
545
+ func TestForkedSync67Full (t * testing.T ) { testForkedSync (t , eth .ETH67 , FullSync ) }
546
+ func TestForkedSync67Snap (t * testing.T ) { testForkedSync (t , eth .ETH67 , SnapSync ) }
547
+ func TestForkedSync67Light (t * testing.T ) { testForkedSync (t , eth .ETH67 , LightSync ) }
540
548
541
549
func testForkedSync (t * testing.T , protocol uint , mode SyncMode ) {
542
550
tester := newTester (t )
@@ -564,6 +572,9 @@ func testForkedSync(t *testing.T, protocol uint, mode SyncMode) {
564
572
func TestHeavyForkedSync66Full (t * testing.T ) { testHeavyForkedSync (t , eth .ETH66 , FullSync ) }
565
573
func TestHeavyForkedSync66Snap (t * testing.T ) { testHeavyForkedSync (t , eth .ETH66 , SnapSync ) }
566
574
func TestHeavyForkedSync66Light (t * testing.T ) { testHeavyForkedSync (t , eth .ETH66 , LightSync ) }
575
+ func TestHeavyForkedSync67Full (t * testing.T ) { testHeavyForkedSync (t , eth .ETH67 , FullSync ) }
576
+ func TestHeavyForkedSync67Snap (t * testing.T ) { testHeavyForkedSync (t , eth .ETH67 , SnapSync ) }
577
+ func TestHeavyForkedSync67Light (t * testing.T ) { testHeavyForkedSync (t , eth .ETH67 , LightSync ) }
567
578
568
579
func testHeavyForkedSync (t * testing.T , protocol uint , mode SyncMode ) {
569
580
tester := newTester (t )
@@ -593,6 +604,9 @@ func testHeavyForkedSync(t *testing.T, protocol uint, mode SyncMode) {
593
604
func TestBoundedForkedSync66Full (t * testing.T ) { testBoundedForkedSync (t , eth .ETH66 , FullSync ) }
594
605
func TestBoundedForkedSync66Snap (t * testing.T ) { testBoundedForkedSync (t , eth .ETH66 , SnapSync ) }
595
606
func TestBoundedForkedSync66Light (t * testing.T ) { testBoundedForkedSync (t , eth .ETH66 , LightSync ) }
607
+ func TestBoundedForkedSync67Full (t * testing.T ) { testBoundedForkedSync (t , eth .ETH67 , FullSync ) }
608
+ func TestBoundedForkedSync67Snap (t * testing.T ) { testBoundedForkedSync (t , eth .ETH67 , SnapSync ) }
609
+ func TestBoundedForkedSync67Light (t * testing.T ) { testBoundedForkedSync (t , eth .ETH67 , LightSync ) }
596
610
597
611
func testBoundedForkedSync (t * testing.T , protocol uint , mode SyncMode ) {
598
612
tester := newTester (t )
@@ -627,6 +641,15 @@ func TestBoundedHeavyForkedSync66Snap(t *testing.T) {
627
641
func TestBoundedHeavyForkedSync66Light (t * testing.T ) {
628
642
testBoundedHeavyForkedSync (t , eth .ETH66 , LightSync )
629
643
}
644
+ func TestBoundedHeavyForkedSync67Full (t * testing.T ) {
645
+ testBoundedHeavyForkedSync (t , eth .ETH67 , FullSync )
646
+ }
647
+ func TestBoundedHeavyForkedSync67Snap (t * testing.T ) {
648
+ testBoundedHeavyForkedSync (t , eth .ETH67 , SnapSync )
649
+ }
650
+ func TestBoundedHeavyForkedSync67Light (t * testing.T ) {
651
+ testBoundedHeavyForkedSync (t , eth .ETH67 , LightSync )
652
+ }
630
653
631
654
func testBoundedHeavyForkedSync (t * testing.T , protocol uint , mode SyncMode ) {
632
655
tester := newTester (t )
@@ -654,6 +677,9 @@ func testBoundedHeavyForkedSync(t *testing.T, protocol uint, mode SyncMode) {
654
677
func TestCancel66Full (t * testing.T ) { testCancel (t , eth .ETH66 , FullSync ) }
655
678
func TestCancel66Snap (t * testing.T ) { testCancel (t , eth .ETH66 , SnapSync ) }
656
679
func TestCancel66Light (t * testing.T ) { testCancel (t , eth .ETH66 , LightSync ) }
680
+ func TestCancel67Full (t * testing.T ) { testCancel (t , eth .ETH67 , FullSync ) }
681
+ func TestCancel67Snap (t * testing.T ) { testCancel (t , eth .ETH67 , SnapSync ) }
682
+ func TestCancel67Light (t * testing.T ) { testCancel (t , eth .ETH67 , LightSync ) }
657
683
658
684
func testCancel (t * testing.T , protocol uint , mode SyncMode ) {
659
685
tester := newTester (t )
@@ -681,6 +707,9 @@ func testCancel(t *testing.T, protocol uint, mode SyncMode) {
681
707
func TestMultiSynchronisation66Full (t * testing.T ) { testMultiSynchronisation (t , eth .ETH66 , FullSync ) }
682
708
func TestMultiSynchronisation66Snap (t * testing.T ) { testMultiSynchronisation (t , eth .ETH66 , SnapSync ) }
683
709
func TestMultiSynchronisation66Light (t * testing.T ) { testMultiSynchronisation (t , eth .ETH66 , LightSync ) }
710
+ func TestMultiSynchronisation67Full (t * testing.T ) { testMultiSynchronisation (t , eth .ETH67 , FullSync ) }
711
+ func TestMultiSynchronisation67Snap (t * testing.T ) { testMultiSynchronisation (t , eth .ETH67 , SnapSync ) }
712
+ func TestMultiSynchronisation67Light (t * testing.T ) { testMultiSynchronisation (t , eth .ETH67 , LightSync ) }
684
713
685
714
func testMultiSynchronisation (t * testing.T , protocol uint , mode SyncMode ) {
686
715
tester := newTester (t )
@@ -705,6 +734,9 @@ func testMultiSynchronisation(t *testing.T, protocol uint, mode SyncMode) {
705
734
func TestMultiProtoSynchronisation66Full (t * testing.T ) { testMultiProtoSync (t , eth .ETH66 , FullSync ) }
706
735
func TestMultiProtoSynchronisation66Snap (t * testing.T ) { testMultiProtoSync (t , eth .ETH66 , SnapSync ) }
707
736
func TestMultiProtoSynchronisation66Light (t * testing.T ) { testMultiProtoSync (t , eth .ETH66 , LightSync ) }
737
+ func TestMultiProtoSynchronisation67Full (t * testing.T ) { testMultiProtoSync (t , eth .ETH67 , FullSync ) }
738
+ func TestMultiProtoSynchronisation67Snap (t * testing.T ) { testMultiProtoSync (t , eth .ETH67 , SnapSync ) }
739
+ func TestMultiProtoSynchronisation67Light (t * testing.T ) { testMultiProtoSync (t , eth .ETH67 , LightSync ) }
708
740
709
741
func testMultiProtoSync (t * testing.T , protocol uint , mode SyncMode ) {
710
742
tester := newTester (t )
@@ -715,7 +747,7 @@ func testMultiProtoSync(t *testing.T, protocol uint, mode SyncMode) {
715
747
716
748
// Create peers of every type
717
749
tester .newPeer ("peer 66" , eth .ETH66 , chain .blocks [1 :])
718
- // tester.newPeer("peer 65 ", eth.ETH67, chain.blocks[1:)
750
+ tester .newPeer ("peer 67 " , eth .ETH67 , chain .blocks [1 :] )
719
751
720
752
// Synchronise with the requested peer and make sure all blocks were retrieved
721
753
if err := tester .sync (fmt .Sprintf ("peer %d" , protocol ), nil , mode ); err != nil {
@@ -724,7 +756,7 @@ func testMultiProtoSync(t *testing.T, protocol uint, mode SyncMode) {
724
756
assertOwnChain (t , tester , len (chain .blocks ))
725
757
726
758
// Check that no peers have been dropped off
727
- for _ , version := range []int {66 } {
759
+ for _ , version := range []int {66 , 67 } {
728
760
peer := fmt .Sprintf ("peer %d" , version )
729
761
if _ , ok := tester .peers [peer ]; ! ok {
730
762
t .Errorf ("%s dropped" , peer )
@@ -737,6 +769,9 @@ func testMultiProtoSync(t *testing.T, protocol uint, mode SyncMode) {
737
769
func TestEmptyShortCircuit66Full (t * testing.T ) { testEmptyShortCircuit (t , eth .ETH66 , FullSync ) }
738
770
func TestEmptyShortCircuit66Snap (t * testing.T ) { testEmptyShortCircuit (t , eth .ETH66 , SnapSync ) }
739
771
func TestEmptyShortCircuit66Light (t * testing.T ) { testEmptyShortCircuit (t , eth .ETH66 , LightSync ) }
772
+ func TestEmptyShortCircuit67Full (t * testing.T ) { testEmptyShortCircuit (t , eth .ETH67 , FullSync ) }
773
+ func TestEmptyShortCircuit67Snap (t * testing.T ) { testEmptyShortCircuit (t , eth .ETH67 , SnapSync ) }
774
+ func TestEmptyShortCircuit67Light (t * testing.T ) { testEmptyShortCircuit (t , eth .ETH67 , LightSync ) }
740
775
741
776
func testEmptyShortCircuit (t * testing.T , protocol uint , mode SyncMode ) {
742
777
tester := newTester (t )
@@ -785,6 +820,9 @@ func testEmptyShortCircuit(t *testing.T, protocol uint, mode SyncMode) {
785
820
func TestMissingHeaderAttack66Full (t * testing.T ) { testMissingHeaderAttack (t , eth .ETH66 , FullSync ) }
786
821
func TestMissingHeaderAttack66Snap (t * testing.T ) { testMissingHeaderAttack (t , eth .ETH66 , SnapSync ) }
787
822
func TestMissingHeaderAttack66Light (t * testing.T ) { testMissingHeaderAttack (t , eth .ETH66 , LightSync ) }
823
+ func TestMissingHeaderAttack67Full (t * testing.T ) { testMissingHeaderAttack (t , eth .ETH67 , FullSync ) }
824
+ func TestMissingHeaderAttack67Snap (t * testing.T ) { testMissingHeaderAttack (t , eth .ETH67 , SnapSync ) }
825
+ func TestMissingHeaderAttack67Light (t * testing.T ) { testMissingHeaderAttack (t , eth .ETH67 , LightSync ) }
788
826
789
827
func testMissingHeaderAttack (t * testing.T , protocol uint , mode SyncMode ) {
790
828
tester := newTester (t )
@@ -811,6 +849,9 @@ func testMissingHeaderAttack(t *testing.T, protocol uint, mode SyncMode) {
811
849
func TestShiftedHeaderAttack66Full (t * testing.T ) { testShiftedHeaderAttack (t , eth .ETH66 , FullSync ) }
812
850
func TestShiftedHeaderAttack66Snap (t * testing.T ) { testShiftedHeaderAttack (t , eth .ETH66 , SnapSync ) }
813
851
func TestShiftedHeaderAttack66Light (t * testing.T ) { testShiftedHeaderAttack (t , eth .ETH66 , LightSync ) }
852
+ func TestShiftedHeaderAttack67Full (t * testing.T ) { testShiftedHeaderAttack (t , eth .ETH67 , FullSync ) }
853
+ func TestShiftedHeaderAttack67Snap (t * testing.T ) { testShiftedHeaderAttack (t , eth .ETH67 , SnapSync ) }
854
+ func TestShiftedHeaderAttack67Light (t * testing.T ) { testShiftedHeaderAttack (t , eth .ETH67 , LightSync ) }
814
855
815
856
func testShiftedHeaderAttack (t * testing.T , protocol uint , mode SyncMode ) {
816
857
tester := newTester (t )
@@ -837,6 +878,7 @@ func testShiftedHeaderAttack(t *testing.T, protocol uint, mode SyncMode) {
837
878
// for various failure scenarios. Afterwards a full sync is attempted to make
838
879
// sure no state was corrupted.
839
880
func TestInvalidHeaderRollback66Snap (t * testing.T ) { testInvalidHeaderRollback (t , eth .ETH66 , SnapSync ) }
881
+ func TestInvalidHeaderRollback67Snap (t * testing.T ) { testInvalidHeaderRollback (t , eth .ETH67 , SnapSync ) }
840
882
841
883
func testInvalidHeaderRollback (t * testing.T , protocol uint , mode SyncMode ) {
842
884
tester := newTester (t )
@@ -923,6 +965,15 @@ func TestHighTDStarvationAttack66Snap(t *testing.T) {
923
965
func TestHighTDStarvationAttack66Light (t * testing.T ) {
924
966
testHighTDStarvationAttack (t , eth .ETH66 , LightSync )
925
967
}
968
+ func TestHighTDStarvationAttack67Full (t * testing.T ) {
969
+ testHighTDStarvationAttack (t , eth .ETH67 , FullSync )
970
+ }
971
+ func TestHighTDStarvationAttack67Snap (t * testing.T ) {
972
+ testHighTDStarvationAttack (t , eth .ETH67 , SnapSync )
973
+ }
974
+ func TestHighTDStarvationAttack67Light (t * testing.T ) {
975
+ testHighTDStarvationAttack (t , eth .ETH67 , LightSync )
976
+ }
926
977
927
978
func testHighTDStarvationAttack (t * testing.T , protocol uint , mode SyncMode ) {
928
979
tester := newTester (t )
@@ -937,6 +988,7 @@ func testHighTDStarvationAttack(t *testing.T, protocol uint, mode SyncMode) {
937
988
938
989
// Tests that misbehaving peers are disconnected, whilst behaving ones are not.
939
990
func TestBlockHeaderAttackerDropping66 (t * testing.T ) { testBlockHeaderAttackerDropping (t , eth .ETH66 ) }
991
+ func TestBlockHeaderAttackerDropping67 (t * testing.T ) { testBlockHeaderAttackerDropping (t , eth .ETH67 ) }
940
992
941
993
func testBlockHeaderAttackerDropping (t * testing.T , protocol uint ) {
942
994
// Define the disconnection requirement for individual hash fetch errors
@@ -987,6 +1039,9 @@ func testBlockHeaderAttackerDropping(t *testing.T, protocol uint) {
987
1039
func TestSyncProgress66Full (t * testing.T ) { testSyncProgress (t , eth .ETH66 , FullSync ) }
988
1040
func TestSyncProgress66Snap (t * testing.T ) { testSyncProgress (t , eth .ETH66 , SnapSync ) }
989
1041
func TestSyncProgress66Light (t * testing.T ) { testSyncProgress (t , eth .ETH66 , LightSync ) }
1042
+ func TestSyncProgress67Full (t * testing.T ) { testSyncProgress (t , eth .ETH67 , FullSync ) }
1043
+ func TestSyncProgress67Snap (t * testing.T ) { testSyncProgress (t , eth .ETH67 , SnapSync ) }
1044
+ func TestSyncProgress67Light (t * testing.T ) { testSyncProgress (t , eth .ETH67 , LightSync ) }
990
1045
991
1046
func testSyncProgress (t * testing.T , protocol uint , mode SyncMode ) {
992
1047
tester := newTester (t )
@@ -1064,6 +1119,9 @@ func checkProgress(t *testing.T, d *Downloader, stage string, want ethereum.Sync
1064
1119
func TestForkedSyncProgress66Full (t * testing.T ) { testForkedSyncProgress (t , eth .ETH66 , FullSync ) }
1065
1120
func TestForkedSyncProgress66Snap (t * testing.T ) { testForkedSyncProgress (t , eth .ETH66 , SnapSync ) }
1066
1121
func TestForkedSyncProgress66Light (t * testing.T ) { testForkedSyncProgress (t , eth .ETH66 , LightSync ) }
1122
+ func TestForkedSyncProgress67Full (t * testing.T ) { testForkedSyncProgress (t , eth .ETH67 , FullSync ) }
1123
+ func TestForkedSyncProgress67Snap (t * testing.T ) { testForkedSyncProgress (t , eth .ETH67 , SnapSync ) }
1124
+ func TestForkedSyncProgress67Light (t * testing.T ) { testForkedSyncProgress (t , eth .ETH67 , LightSync ) }
1067
1125
1068
1126
func testForkedSyncProgress (t * testing.T , protocol uint , mode SyncMode ) {
1069
1127
tester := newTester (t )
@@ -1135,6 +1193,9 @@ func testForkedSyncProgress(t *testing.T, protocol uint, mode SyncMode) {
1135
1193
func TestFailedSyncProgress66Full (t * testing.T ) { testFailedSyncProgress (t , eth .ETH66 , FullSync ) }
1136
1194
func TestFailedSyncProgress66Snap (t * testing.T ) { testFailedSyncProgress (t , eth .ETH66 , SnapSync ) }
1137
1195
func TestFailedSyncProgress66Light (t * testing.T ) { testFailedSyncProgress (t , eth .ETH66 , LightSync ) }
1196
+ func TestFailedSyncProgress67Full (t * testing.T ) { testFailedSyncProgress (t , eth .ETH67 , FullSync ) }
1197
+ func TestFailedSyncProgress67Snap (t * testing.T ) { testFailedSyncProgress (t , eth .ETH67 , SnapSync ) }
1198
+ func TestFailedSyncProgress67Light (t * testing.T ) { testFailedSyncProgress (t , eth .ETH67 , LightSync ) }
1138
1199
1139
1200
func testFailedSyncProgress (t * testing.T , protocol uint , mode SyncMode ) {
1140
1201
tester := newTester (t )
@@ -1201,6 +1262,9 @@ func testFailedSyncProgress(t *testing.T, protocol uint, mode SyncMode) {
1201
1262
func TestFakedSyncProgress66Full (t * testing.T ) { testFakedSyncProgress (t , eth .ETH66 , FullSync ) }
1202
1263
func TestFakedSyncProgress66Snap (t * testing.T ) { testFakedSyncProgress (t , eth .ETH66 , SnapSync ) }
1203
1264
func TestFakedSyncProgress66Light (t * testing.T ) { testFakedSyncProgress (t , eth .ETH66 , LightSync ) }
1265
+ func TestFakedSyncProgress67Full (t * testing.T ) { testFakedSyncProgress (t , eth .ETH67 , FullSync ) }
1266
+ func TestFakedSyncProgress67Snap (t * testing.T ) { testFakedSyncProgress (t , eth .ETH67 , SnapSync ) }
1267
+ func TestFakedSyncProgress67Light (t * testing.T ) { testFakedSyncProgress (t , eth .ETH67 , LightSync ) }
1204
1268
1205
1269
func testFakedSyncProgress (t * testing.T , protocol uint , mode SyncMode ) {
1206
1270
tester := newTester (t )
@@ -1347,6 +1411,11 @@ func TestCheckpointEnforcement66Snap(t *testing.T) { testCheckpointEnforcement(t
1347
1411
func TestCheckpointEnforcement66Light (t * testing.T ) {
1348
1412
testCheckpointEnforcement (t , eth .ETH66 , LightSync )
1349
1413
}
1414
+ func TestCheckpointEnforcement67Full (t * testing.T ) { testCheckpointEnforcement (t , eth .ETH67 , FullSync ) }
1415
+ func TestCheckpointEnforcement67Snap (t * testing.T ) { testCheckpointEnforcement (t , eth .ETH67 , SnapSync ) }
1416
+ func TestCheckpointEnforcement67Light (t * testing.T ) {
1417
+ testCheckpointEnforcement (t , eth .ETH67 , LightSync )
1418
+ }
1350
1419
1351
1420
func testCheckpointEnforcement (t * testing.T , protocol uint , mode SyncMode ) {
1352
1421
// Create a new tester with a particular hard coded checkpoint block
0 commit comments