@@ -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 )
@@ -459,6 +462,8 @@ func TestThrottling65Full(t *testing.T) { testThrottling(t, eth.ETH65, FullSync)
459
462
func TestThrottling65Snap (t * testing.T ) { testThrottling (t , eth .ETH65 , SnapSync ) }
460
463
func TestThrottling66Full (t * testing.T ) { testThrottling (t , eth .ETH66 , FullSync ) }
461
464
func TestThrottling66Snap (t * testing.T ) { testThrottling (t , eth .ETH66 , SnapSync ) }
465
+ func TestThrottling67Full (t * testing.T ) { testThrottling (t , eth .ETH67 , FullSync ) }
466
+ func TestThrottling67Snap (t * testing.T ) { testThrottling (t , eth .ETH67 , SnapSync ) }
462
467
463
468
func testThrottling (t * testing.T , protocol uint , mode SyncMode ) {
464
469
tester := newTester (t )
@@ -542,6 +547,9 @@ func TestForkedSync65Light(t *testing.T) { testForkedSync(t, eth.ETH65, LightSyn
542
547
func TestForkedSync66Full (t * testing.T ) { testForkedSync (t , eth .ETH66 , FullSync ) }
543
548
func TestForkedSync66Snap (t * testing.T ) { testForkedSync (t , eth .ETH66 , SnapSync ) }
544
549
func TestForkedSync66Light (t * testing.T ) { testForkedSync (t , eth .ETH66 , LightSync ) }
550
+ func TestForkedSync67Full (t * testing.T ) { testForkedSync (t , eth .ETH67 , FullSync ) }
551
+ func TestForkedSync67Snap (t * testing.T ) { testForkedSync (t , eth .ETH67 , SnapSync ) }
552
+ func TestForkedSync67Light (t * testing.T ) { testForkedSync (t , eth .ETH67 , LightSync ) }
545
553
546
554
func testForkedSync (t * testing.T , protocol uint , mode SyncMode ) {
547
555
if testing .Short () {
@@ -576,6 +584,9 @@ func TestHeavyForkedSync65Light(t *testing.T) { testHeavyForkedSync(t, eth.ETH65
576
584
func TestHeavyForkedSync66Full (t * testing.T ) { testHeavyForkedSync (t , eth .ETH66 , FullSync ) }
577
585
func TestHeavyForkedSync66Snap (t * testing.T ) { testHeavyForkedSync (t , eth .ETH66 , SnapSync ) }
578
586
func TestHeavyForkedSync66Light (t * testing.T ) { testHeavyForkedSync (t , eth .ETH66 , LightSync ) }
587
+ func TestHeavyForkedSync67Full (t * testing.T ) { testHeavyForkedSync (t , eth .ETH67 , FullSync ) }
588
+ func TestHeavyForkedSync67Snap (t * testing.T ) { testHeavyForkedSync (t , eth .ETH67 , SnapSync ) }
589
+ func TestHeavyForkedSync67Light (t * testing.T ) { testHeavyForkedSync (t , eth .ETH67 , LightSync ) }
579
590
580
591
func testHeavyForkedSync (t * testing.T , protocol uint , mode SyncMode ) {
581
592
if testing .Short () {
@@ -612,6 +623,9 @@ func TestBoundedForkedSync65Light(t *testing.T) { testBoundedForkedSync(t, eth.E
612
623
func TestBoundedForkedSync66Full (t * testing.T ) { testBoundedForkedSync (t , eth .ETH66 , FullSync ) }
613
624
func TestBoundedForkedSync66Snap (t * testing.T ) { testBoundedForkedSync (t , eth .ETH66 , SnapSync ) }
614
625
func TestBoundedForkedSync66Light (t * testing.T ) { testBoundedForkedSync (t , eth .ETH66 , LightSync ) }
626
+ func TestBoundedForkedSync67Full (t * testing.T ) { testBoundedForkedSync (t , eth .ETH67 , FullSync ) }
627
+ func TestBoundedForkedSync67Snap (t * testing.T ) { testBoundedForkedSync (t , eth .ETH67 , SnapSync ) }
628
+ func TestBoundedForkedSync67Light (t * testing.T ) { testBoundedForkedSync (t , eth .ETH67 , LightSync ) }
615
629
616
630
func testBoundedForkedSync (t * testing.T , protocol uint , mode SyncMode ) {
617
631
if testing .Short () {
@@ -659,6 +673,15 @@ func TestBoundedHeavyForkedSync66Snap(t *testing.T) {
659
673
func TestBoundedHeavyForkedSync66Light (t * testing.T ) {
660
674
testBoundedHeavyForkedSync (t , eth .ETH66 , LightSync )
661
675
}
676
+ func TestBoundedHeavyForkedSync67Full (t * testing.T ) {
677
+ testBoundedHeavyForkedSync (t , eth .ETH67 , FullSync )
678
+ }
679
+ func TestBoundedHeavyForkedSync67Snap (t * testing.T ) {
680
+ testBoundedHeavyForkedSync (t , eth .ETH67 , SnapSync )
681
+ }
682
+ func TestBoundedHeavyForkedSync67Light (t * testing.T ) {
683
+ testBoundedHeavyForkedSync (t , eth .ETH67 , LightSync )
684
+ }
662
685
663
686
func testBoundedHeavyForkedSync (t * testing.T , protocol uint , mode SyncMode ) {
664
687
if testing .Short () {
@@ -693,6 +716,9 @@ func TestCancel65Light(t *testing.T) { testCancel(t, eth.ETH65, LightSync) }
693
716
func TestCancel66Full (t * testing.T ) { testCancel (t , eth .ETH66 , FullSync ) }
694
717
func TestCancel66Snap (t * testing.T ) { testCancel (t , eth .ETH66 , SnapSync ) }
695
718
func TestCancel66Light (t * testing.T ) { testCancel (t , eth .ETH66 , LightSync ) }
719
+ func TestCancel67Full (t * testing.T ) { testCancel (t , eth .ETH67 , FullSync ) }
720
+ func TestCancel67Snap (t * testing.T ) { testCancel (t , eth .ETH67 , SnapSync ) }
721
+ func TestCancel67Light (t * testing.T ) { testCancel (t , eth .ETH67 , LightSync ) }
696
722
697
723
func testCancel (t * testing.T , protocol uint , mode SyncMode ) {
698
724
tester := newTester (t )
@@ -723,6 +749,9 @@ func TestMultiSynchronisation65Light(t *testing.T) { testMultiSynchronisation(t,
723
749
func TestMultiSynchronisation66Full (t * testing.T ) { testMultiSynchronisation (t , eth .ETH66 , FullSync ) }
724
750
func TestMultiSynchronisation66Snap (t * testing.T ) { testMultiSynchronisation (t , eth .ETH66 , SnapSync ) }
725
751
func TestMultiSynchronisation66Light (t * testing.T ) { testMultiSynchronisation (t , eth .ETH66 , LightSync ) }
752
+ func TestMultiSynchronisation67Full (t * testing.T ) { testMultiSynchronisation (t , eth .ETH67 , FullSync ) }
753
+ func TestMultiSynchronisation67Snap (t * testing.T ) { testMultiSynchronisation (t , eth .ETH67 , SnapSync ) }
754
+ func TestMultiSynchronisation67Light (t * testing.T ) { testMultiSynchronisation (t , eth .ETH67 , LightSync ) }
726
755
727
756
func testMultiSynchronisation (t * testing.T , protocol uint , mode SyncMode ) {
728
757
tester := newTester (t )
@@ -750,6 +779,9 @@ func TestMultiProtoSynchronisation65Light(t *testing.T) { testMultiProtoSync(t,
750
779
func TestMultiProtoSynchronisation66Full (t * testing.T ) { testMultiProtoSync (t , eth .ETH66 , FullSync ) }
751
780
func TestMultiProtoSynchronisation66Snap (t * testing.T ) { testMultiProtoSync (t , eth .ETH66 , SnapSync ) }
752
781
func TestMultiProtoSynchronisation66Light (t * testing.T ) { testMultiProtoSync (t , eth .ETH66 , LightSync ) }
782
+ func TestMultiProtoSynchronisation67Full (t * testing.T ) { testMultiProtoSync (t , eth .ETH67 , FullSync ) }
783
+ func TestMultiProtoSynchronisation67Snap (t * testing.T ) { testMultiProtoSync (t , eth .ETH67 , SnapSync ) }
784
+ func TestMultiProtoSynchronisation67Light (t * testing.T ) { testMultiProtoSync (t , eth .ETH67 , LightSync ) }
753
785
754
786
func testMultiProtoSync (t * testing.T , protocol uint , mode SyncMode ) {
755
787
tester := newTester (t )
@@ -761,6 +793,7 @@ func testMultiProtoSync(t *testing.T, protocol uint, mode SyncMode) {
761
793
// Create peers of every type
762
794
tester .newPeer ("peer 65" , eth .ETH65 , chain .blocks [1 :])
763
795
tester .newPeer ("peer 66" , eth .ETH66 , chain .blocks [1 :])
796
+ tester .newPeer ("peer 67" , eth .ETH67 , chain .blocks [1 :])
764
797
765
798
// Synchronise with the requested peer and make sure all blocks were retrieved
766
799
if err := tester .sync (fmt .Sprintf ("peer %d" , protocol ), nil , mode ); err != nil {
@@ -769,7 +802,7 @@ func testMultiProtoSync(t *testing.T, protocol uint, mode SyncMode) {
769
802
assertOwnChain (t , tester , len (chain .blocks ))
770
803
771
804
// Check that no peers have been dropped off
772
- for _ , version := range []int {65 , 66 } {
805
+ for _ , version := range []int {65 , 66 , 67 } {
773
806
peer := fmt .Sprintf ("peer %d" , version )
774
807
if _ , ok := tester .peers [peer ]; ! ok {
775
808
t .Errorf ("%s dropped" , peer )
@@ -785,6 +818,9 @@ func TestEmptyShortCircuit65Light(t *testing.T) { testEmptyShortCircuit(t, eth.E
785
818
func TestEmptyShortCircuit66Full (t * testing.T ) { testEmptyShortCircuit (t , eth .ETH66 , FullSync ) }
786
819
func TestEmptyShortCircuit66Snap (t * testing.T ) { testEmptyShortCircuit (t , eth .ETH66 , SnapSync ) }
787
820
func TestEmptyShortCircuit66Light (t * testing.T ) { testEmptyShortCircuit (t , eth .ETH66 , LightSync ) }
821
+ func TestEmptyShortCircuit67Full (t * testing.T ) { testEmptyShortCircuit (t , eth .ETH67 , FullSync ) }
822
+ func TestEmptyShortCircuit67Snap (t * testing.T ) { testEmptyShortCircuit (t , eth .ETH67 , SnapSync ) }
823
+ func TestEmptyShortCircuit67Light (t * testing.T ) { testEmptyShortCircuit (t , eth .ETH67 , LightSync ) }
788
824
789
825
func testEmptyShortCircuit (t * testing.T , protocol uint , mode SyncMode ) {
790
826
tester := newTester (t )
@@ -836,6 +872,9 @@ func TestMissingHeaderAttack65Light(t *testing.T) { testMissingHeaderAttack(t, e
836
872
func TestMissingHeaderAttack66Full (t * testing.T ) { testMissingHeaderAttack (t , eth .ETH66 , FullSync ) }
837
873
func TestMissingHeaderAttack66Snap (t * testing.T ) { testMissingHeaderAttack (t , eth .ETH66 , SnapSync ) }
838
874
func TestMissingHeaderAttack66Light (t * testing.T ) { testMissingHeaderAttack (t , eth .ETH66 , LightSync ) }
875
+ func TestMissingHeaderAttack67Full (t * testing.T ) { testMissingHeaderAttack (t , eth .ETH67 , FullSync ) }
876
+ func TestMissingHeaderAttack67Snap (t * testing.T ) { testMissingHeaderAttack (t , eth .ETH67 , SnapSync ) }
877
+ func TestMissingHeaderAttack67Light (t * testing.T ) { testMissingHeaderAttack (t , eth .ETH67 , LightSync ) }
839
878
840
879
func testMissingHeaderAttack (t * testing.T , protocol uint , mode SyncMode ) {
841
880
tester := newTester (t )
@@ -865,6 +904,9 @@ func TestShiftedHeaderAttack65Light(t *testing.T) { testShiftedHeaderAttack(t, e
865
904
func TestShiftedHeaderAttack66Full (t * testing.T ) { testShiftedHeaderAttack (t , eth .ETH66 , FullSync ) }
866
905
func TestShiftedHeaderAttack66Snap (t * testing.T ) { testShiftedHeaderAttack (t , eth .ETH66 , SnapSync ) }
867
906
func TestShiftedHeaderAttack66Light (t * testing.T ) { testShiftedHeaderAttack (t , eth .ETH66 , LightSync ) }
907
+ func TestShiftedHeaderAttack67Full (t * testing.T ) { testShiftedHeaderAttack (t , eth .ETH67 , FullSync ) }
908
+ func TestShiftedHeaderAttack67Snap (t * testing.T ) { testShiftedHeaderAttack (t , eth .ETH67 , SnapSync ) }
909
+ func TestShiftedHeaderAttack67Light (t * testing.T ) { testShiftedHeaderAttack (t , eth .ETH67 , LightSync ) }
868
910
869
911
func testShiftedHeaderAttack (t * testing.T , protocol uint , mode SyncMode ) {
870
912
tester := newTester (t )
@@ -892,6 +934,7 @@ func testShiftedHeaderAttack(t *testing.T, protocol uint, mode SyncMode) {
892
934
// sure no state was corrupted.
893
935
func TestInvalidHeaderRollback65Snap (t * testing.T ) { testInvalidHeaderRollback (t , eth .ETH65 , SnapSync ) }
894
936
func TestInvalidHeaderRollback66Snap (t * testing.T ) { testInvalidHeaderRollback (t , eth .ETH66 , SnapSync ) }
937
+ func TestInvalidHeaderRollback67Snap (t * testing.T ) { testInvalidHeaderRollback (t , eth .ETH67 , SnapSync ) }
895
938
896
939
func testInvalidHeaderRollback (t * testing.T , protocol uint , mode SyncMode ) {
897
940
tester := newTester (t )
@@ -987,6 +1030,15 @@ func TestHighTDStarvationAttack66Snap(t *testing.T) {
987
1030
func TestHighTDStarvationAttack66Light (t * testing.T ) {
988
1031
testHighTDStarvationAttack (t , eth .ETH66 , LightSync )
989
1032
}
1033
+ func TestHighTDStarvationAttack67Full (t * testing.T ) {
1034
+ testHighTDStarvationAttack (t , eth .ETH67 , FullSync )
1035
+ }
1036
+ func TestHighTDStarvationAttack67Snap (t * testing.T ) {
1037
+ testHighTDStarvationAttack (t , eth .ETH67 , SnapSync )
1038
+ }
1039
+ func TestHighTDStarvationAttack67Light (t * testing.T ) {
1040
+ testHighTDStarvationAttack (t , eth .ETH67 , LightSync )
1041
+ }
990
1042
991
1043
func testHighTDStarvationAttack (t * testing.T , protocol uint , mode SyncMode ) {
992
1044
tester := newTester (t )
@@ -1002,6 +1054,7 @@ func testHighTDStarvationAttack(t *testing.T, protocol uint, mode SyncMode) {
1002
1054
// Tests that misbehaving peers are disconnected, whilst behaving ones are not.
1003
1055
func TestBlockHeaderAttackerDropping65 (t * testing.T ) { testBlockHeaderAttackerDropping (t , eth .ETH65 ) }
1004
1056
func TestBlockHeaderAttackerDropping66 (t * testing.T ) { testBlockHeaderAttackerDropping (t , eth .ETH66 ) }
1057
+ func TestBlockHeaderAttackerDropping67 (t * testing.T ) { testBlockHeaderAttackerDropping (t , eth .ETH67 ) }
1005
1058
1006
1059
func testBlockHeaderAttackerDropping (t * testing.T , protocol uint ) {
1007
1060
// Define the disconnection requirement for individual hash fetch errors
@@ -1055,6 +1108,9 @@ func TestSyncProgress65Light(t *testing.T) { testSyncProgress(t, eth.ETH65, Ligh
1055
1108
func TestSyncProgress66Full (t * testing.T ) { testSyncProgress (t , eth .ETH66 , FullSync ) }
1056
1109
func TestSyncProgress66Snap (t * testing.T ) { testSyncProgress (t , eth .ETH66 , SnapSync ) }
1057
1110
func TestSyncProgress66Light (t * testing.T ) { testSyncProgress (t , eth .ETH66 , LightSync ) }
1111
+ func TestSyncProgress67Full (t * testing.T ) { testSyncProgress (t , eth .ETH67 , FullSync ) }
1112
+ func TestSyncProgress67Snap (t * testing.T ) { testSyncProgress (t , eth .ETH67 , SnapSync ) }
1113
+ func TestSyncProgress67Light (t * testing.T ) { testSyncProgress (t , eth .ETH67 , LightSync ) }
1058
1114
1059
1115
func testSyncProgress (t * testing.T , protocol uint , mode SyncMode ) {
1060
1116
if testing .Short () {
@@ -1139,6 +1195,9 @@ func TestForkedSyncProgress65Light(t *testing.T) { testForkedSyncProgress(t, eth
1139
1195
func TestForkedSyncProgress66Full (t * testing.T ) { testForkedSyncProgress (t , eth .ETH66 , FullSync ) }
1140
1196
func TestForkedSyncProgress66Snap (t * testing.T ) { testForkedSyncProgress (t , eth .ETH66 , SnapSync ) }
1141
1197
func TestForkedSyncProgress66Light (t * testing.T ) { testForkedSyncProgress (t , eth .ETH66 , LightSync ) }
1198
+ func TestForkedSyncProgress67Full (t * testing.T ) { testForkedSyncProgress (t , eth .ETH67 , FullSync ) }
1199
+ func TestForkedSyncProgress67Snap (t * testing.T ) { testForkedSyncProgress (t , eth .ETH67 , SnapSync ) }
1200
+ func TestForkedSyncProgress67Light (t * testing.T ) { testForkedSyncProgress (t , eth .ETH67 , LightSync ) }
1142
1201
1143
1202
func testForkedSyncProgress (t * testing.T , protocol uint , mode SyncMode ) {
1144
1203
if testing .Short () {
@@ -1217,6 +1276,9 @@ func TestFailedSyncProgress65Light(t *testing.T) { testFailedSyncProgress(t, eth
1217
1276
func TestFailedSyncProgress66Full (t * testing.T ) { testFailedSyncProgress (t , eth .ETH66 , FullSync ) }
1218
1277
func TestFailedSyncProgress66Snap (t * testing.T ) { testFailedSyncProgress (t , eth .ETH66 , SnapSync ) }
1219
1278
func TestFailedSyncProgress66Light (t * testing.T ) { testFailedSyncProgress (t , eth .ETH66 , LightSync ) }
1279
+ func TestFailedSyncProgress67Full (t * testing.T ) { testFailedSyncProgress (t , eth .ETH67 , FullSync ) }
1280
+ func TestFailedSyncProgress67Snap (t * testing.T ) { testFailedSyncProgress (t , eth .ETH67 , SnapSync ) }
1281
+ func TestFailedSyncProgress67Light (t * testing.T ) { testFailedSyncProgress (t , eth .ETH67 , LightSync ) }
1220
1282
1221
1283
func testFailedSyncProgress (t * testing.T , protocol uint , mode SyncMode ) {
1222
1284
tester := newTester (t )
@@ -1286,6 +1348,9 @@ func TestFakedSyncProgress65Light(t *testing.T) { testFakedSyncProgress(t, eth.E
1286
1348
func TestFakedSyncProgress66Full (t * testing.T ) { testFakedSyncProgress (t , eth .ETH66 , FullSync ) }
1287
1349
func TestFakedSyncProgress66Snap (t * testing.T ) { testFakedSyncProgress (t , eth .ETH66 , SnapSync ) }
1288
1350
func TestFakedSyncProgress66Light (t * testing.T ) { testFakedSyncProgress (t , eth .ETH66 , LightSync ) }
1351
+ func TestFakedSyncProgress67Full (t * testing.T ) { testFakedSyncProgress (t , eth .ETH67 , FullSync ) }
1352
+ func TestFakedSyncProgress67Snap (t * testing.T ) { testFakedSyncProgress (t , eth .ETH67 , SnapSync ) }
1353
+ func TestFakedSyncProgress67Light (t * testing.T ) { testFakedSyncProgress (t , eth .ETH67 , LightSync ) }
1289
1354
1290
1355
func testFakedSyncProgress (t * testing.T , protocol uint , mode SyncMode ) {
1291
1356
if testing .Short () {
@@ -1441,6 +1506,11 @@ func TestCheckpointEnforcement66Snap(t *testing.T) { testCheckpointEnforcement(t
1441
1506
func TestCheckpointEnforcement66Light (t * testing.T ) {
1442
1507
testCheckpointEnforcement (t , eth .ETH66 , LightSync )
1443
1508
}
1509
+ func TestCheckpointEnforcement67Full (t * testing.T ) { testCheckpointEnforcement (t , eth .ETH67 , FullSync ) }
1510
+ func TestCheckpointEnforcement67Snap (t * testing.T ) { testCheckpointEnforcement (t , eth .ETH67 , SnapSync ) }
1511
+ func TestCheckpointEnforcement67Light (t * testing.T ) {
1512
+ testCheckpointEnforcement (t , eth .ETH67 , LightSync )
1513
+ }
1444
1514
1445
1515
func testCheckpointEnforcement (t * testing.T , protocol uint , mode SyncMode ) {
1446
1516
// Create a new tester with a particular hard coded checkpoint block
0 commit comments