@@ -437,6 +437,9 @@ func assertOwnChain(t *testing.T, tester *downloadTester, length int) {
437437func TestCanonicalSynchronisation66Full (t * testing.T ) { testCanonSync (t , eth .ETH66 , FullSync ) }
438438func TestCanonicalSynchronisation66Snap (t * testing.T ) { testCanonSync (t , eth .ETH66 , SnapSync ) }
439439func 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 ) }
440443
441444func testCanonSync (t * testing.T , protocol uint , mode SyncMode ) {
442445 tester := newTester (t )
@@ -457,6 +460,8 @@ func testCanonSync(t *testing.T, protocol uint, mode SyncMode) {
457460// until the cached blocks are retrieved.
458461func TestThrottling66Full (t * testing.T ) { testThrottling (t , eth .ETH66 , FullSync ) }
459462func 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 ) }
460465
461466func testThrottling (t * testing.T , protocol uint , mode SyncMode ) {
462467 tester := newTester (t )
@@ -537,6 +542,9 @@ func testThrottling(t *testing.T, protocol uint, mode SyncMode) {
537542func TestForkedSync66Full (t * testing.T ) { testForkedSync (t , eth .ETH66 , FullSync ) }
538543func TestForkedSync66Snap (t * testing.T ) { testForkedSync (t , eth .ETH66 , SnapSync ) }
539544func 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 ) }
540548
541549func testForkedSync (t * testing.T , protocol uint , mode SyncMode ) {
542550 tester := newTester (t )
@@ -564,6 +572,9 @@ func testForkedSync(t *testing.T, protocol uint, mode SyncMode) {
564572func TestHeavyForkedSync66Full (t * testing.T ) { testHeavyForkedSync (t , eth .ETH66 , FullSync ) }
565573func TestHeavyForkedSync66Snap (t * testing.T ) { testHeavyForkedSync (t , eth .ETH66 , SnapSync ) }
566574func 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 ) }
567578
568579func testHeavyForkedSync (t * testing.T , protocol uint , mode SyncMode ) {
569580 tester := newTester (t )
@@ -593,6 +604,9 @@ func testHeavyForkedSync(t *testing.T, protocol uint, mode SyncMode) {
593604func TestBoundedForkedSync66Full (t * testing.T ) { testBoundedForkedSync (t , eth .ETH66 , FullSync ) }
594605func TestBoundedForkedSync66Snap (t * testing.T ) { testBoundedForkedSync (t , eth .ETH66 , SnapSync ) }
595606func 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 ) }
596610
597611func testBoundedForkedSync (t * testing.T , protocol uint , mode SyncMode ) {
598612 tester := newTester (t )
@@ -627,6 +641,15 @@ func TestBoundedHeavyForkedSync66Snap(t *testing.T) {
627641func TestBoundedHeavyForkedSync66Light (t * testing.T ) {
628642 testBoundedHeavyForkedSync (t , eth .ETH66 , LightSync )
629643}
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+ }
630653
631654func testBoundedHeavyForkedSync (t * testing.T , protocol uint , mode SyncMode ) {
632655 tester := newTester (t )
@@ -654,6 +677,9 @@ func testBoundedHeavyForkedSync(t *testing.T, protocol uint, mode SyncMode) {
654677func TestCancel66Full (t * testing.T ) { testCancel (t , eth .ETH66 , FullSync ) }
655678func TestCancel66Snap (t * testing.T ) { testCancel (t , eth .ETH66 , SnapSync ) }
656679func 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 ) }
657683
658684func testCancel (t * testing.T , protocol uint , mode SyncMode ) {
659685 tester := newTester (t )
@@ -681,6 +707,9 @@ func testCancel(t *testing.T, protocol uint, mode SyncMode) {
681707func TestMultiSynchronisation66Full (t * testing.T ) { testMultiSynchronisation (t , eth .ETH66 , FullSync ) }
682708func TestMultiSynchronisation66Snap (t * testing.T ) { testMultiSynchronisation (t , eth .ETH66 , SnapSync ) }
683709func 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 ) }
684713
685714func testMultiSynchronisation (t * testing.T , protocol uint , mode SyncMode ) {
686715 tester := newTester (t )
@@ -705,6 +734,9 @@ func testMultiSynchronisation(t *testing.T, protocol uint, mode SyncMode) {
705734func TestMultiProtoSynchronisation66Full (t * testing.T ) { testMultiProtoSync (t , eth .ETH66 , FullSync ) }
706735func TestMultiProtoSynchronisation66Snap (t * testing.T ) { testMultiProtoSync (t , eth .ETH66 , SnapSync ) }
707736func 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 ) }
708740
709741func testMultiProtoSync (t * testing.T , protocol uint , mode SyncMode ) {
710742 tester := newTester (t )
@@ -715,7 +747,7 @@ func testMultiProtoSync(t *testing.T, protocol uint, mode SyncMode) {
715747
716748 // Create peers of every type
717749 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 :] )
719751
720752 // Synchronise with the requested peer and make sure all blocks were retrieved
721753 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) {
724756 assertOwnChain (t , tester , len (chain .blocks ))
725757
726758 // Check that no peers have been dropped off
727- for _ , version := range []int {66 } {
759+ for _ , version := range []int {66 , 67 } {
728760 peer := fmt .Sprintf ("peer %d" , version )
729761 if _ , ok := tester .peers [peer ]; ! ok {
730762 t .Errorf ("%s dropped" , peer )
@@ -737,6 +769,9 @@ func testMultiProtoSync(t *testing.T, protocol uint, mode SyncMode) {
737769func TestEmptyShortCircuit66Full (t * testing.T ) { testEmptyShortCircuit (t , eth .ETH66 , FullSync ) }
738770func TestEmptyShortCircuit66Snap (t * testing.T ) { testEmptyShortCircuit (t , eth .ETH66 , SnapSync ) }
739771func 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 ) }
740775
741776func testEmptyShortCircuit (t * testing.T , protocol uint , mode SyncMode ) {
742777 tester := newTester (t )
@@ -785,6 +820,9 @@ func testEmptyShortCircuit(t *testing.T, protocol uint, mode SyncMode) {
785820func TestMissingHeaderAttack66Full (t * testing.T ) { testMissingHeaderAttack (t , eth .ETH66 , FullSync ) }
786821func TestMissingHeaderAttack66Snap (t * testing.T ) { testMissingHeaderAttack (t , eth .ETH66 , SnapSync ) }
787822func 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 ) }
788826
789827func testMissingHeaderAttack (t * testing.T , protocol uint , mode SyncMode ) {
790828 tester := newTester (t )
@@ -811,6 +849,9 @@ func testMissingHeaderAttack(t *testing.T, protocol uint, mode SyncMode) {
811849func TestShiftedHeaderAttack66Full (t * testing.T ) { testShiftedHeaderAttack (t , eth .ETH66 , FullSync ) }
812850func TestShiftedHeaderAttack66Snap (t * testing.T ) { testShiftedHeaderAttack (t , eth .ETH66 , SnapSync ) }
813851func 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 ) }
814855
815856func testShiftedHeaderAttack (t * testing.T , protocol uint , mode SyncMode ) {
816857 tester := newTester (t )
@@ -837,6 +878,7 @@ func testShiftedHeaderAttack(t *testing.T, protocol uint, mode SyncMode) {
837878// for various failure scenarios. Afterwards a full sync is attempted to make
838879// sure no state was corrupted.
839880func TestInvalidHeaderRollback66Snap (t * testing.T ) { testInvalidHeaderRollback (t , eth .ETH66 , SnapSync ) }
881+ func TestInvalidHeaderRollback67Snap (t * testing.T ) { testInvalidHeaderRollback (t , eth .ETH67 , SnapSync ) }
840882
841883func testInvalidHeaderRollback (t * testing.T , protocol uint , mode SyncMode ) {
842884 tester := newTester (t )
@@ -923,6 +965,15 @@ func TestHighTDStarvationAttack66Snap(t *testing.T) {
923965func TestHighTDStarvationAttack66Light (t * testing.T ) {
924966 testHighTDStarvationAttack (t , eth .ETH66 , LightSync )
925967}
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+ }
926977
927978func testHighTDStarvationAttack (t * testing.T , protocol uint , mode SyncMode ) {
928979 tester := newTester (t )
@@ -937,6 +988,7 @@ func testHighTDStarvationAttack(t *testing.T, protocol uint, mode SyncMode) {
937988
938989// Tests that misbehaving peers are disconnected, whilst behaving ones are not.
939990func TestBlockHeaderAttackerDropping66 (t * testing.T ) { testBlockHeaderAttackerDropping (t , eth .ETH66 ) }
991+ func TestBlockHeaderAttackerDropping67 (t * testing.T ) { testBlockHeaderAttackerDropping (t , eth .ETH67 ) }
940992
941993func testBlockHeaderAttackerDropping (t * testing.T , protocol uint ) {
942994 // Define the disconnection requirement for individual hash fetch errors
@@ -987,6 +1039,9 @@ func testBlockHeaderAttackerDropping(t *testing.T, protocol uint) {
9871039func TestSyncProgress66Full (t * testing.T ) { testSyncProgress (t , eth .ETH66 , FullSync ) }
9881040func TestSyncProgress66Snap (t * testing.T ) { testSyncProgress (t , eth .ETH66 , SnapSync ) }
9891041func 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 ) }
9901045
9911046func testSyncProgress (t * testing.T , protocol uint , mode SyncMode ) {
9921047 tester := newTester (t )
@@ -1064,6 +1119,9 @@ func checkProgress(t *testing.T, d *Downloader, stage string, want ethereum.Sync
10641119func TestForkedSyncProgress66Full (t * testing.T ) { testForkedSyncProgress (t , eth .ETH66 , FullSync ) }
10651120func TestForkedSyncProgress66Snap (t * testing.T ) { testForkedSyncProgress (t , eth .ETH66 , SnapSync ) }
10661121func 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 ) }
10671125
10681126func testForkedSyncProgress (t * testing.T , protocol uint , mode SyncMode ) {
10691127 tester := newTester (t )
@@ -1135,6 +1193,9 @@ func testForkedSyncProgress(t *testing.T, protocol uint, mode SyncMode) {
11351193func TestFailedSyncProgress66Full (t * testing.T ) { testFailedSyncProgress (t , eth .ETH66 , FullSync ) }
11361194func TestFailedSyncProgress66Snap (t * testing.T ) { testFailedSyncProgress (t , eth .ETH66 , SnapSync ) }
11371195func 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 ) }
11381199
11391200func testFailedSyncProgress (t * testing.T , protocol uint , mode SyncMode ) {
11401201 tester := newTester (t )
@@ -1201,6 +1262,9 @@ func testFailedSyncProgress(t *testing.T, protocol uint, mode SyncMode) {
12011262func TestFakedSyncProgress66Full (t * testing.T ) { testFakedSyncProgress (t , eth .ETH66 , FullSync ) }
12021263func TestFakedSyncProgress66Snap (t * testing.T ) { testFakedSyncProgress (t , eth .ETH66 , SnapSync ) }
12031264func 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 ) }
12041268
12051269func testFakedSyncProgress (t * testing.T , protocol uint , mode SyncMode ) {
12061270 tester := newTester (t )
@@ -1347,6 +1411,11 @@ func TestCheckpointEnforcement66Snap(t *testing.T) { testCheckpointEnforcement(t
13471411func TestCheckpointEnforcement66Light (t * testing.T ) {
13481412 testCheckpointEnforcement (t , eth .ETH66 , LightSync )
13491413}
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+ }
13501419
13511420func testCheckpointEnforcement (t * testing.T , protocol uint , mode SyncMode ) {
13521421 // Create a new tester with a particular hard coded checkpoint block
0 commit comments