@@ -553,6 +553,9 @@ func TestAccountParticipationInfo(t *testing.T) {
553553 firstRound := basics .Round (params .LastRound + 1 )
554554 lastRound := basics .Round (params .LastRound + 1000 )
555555 dilution := uint64 (100 )
556+ var stateproof merklesignature.Verifier
557+ stateproof [0 ] = 1 // change some byte so the stateproof is not considered empty (required since consensus v31)
558+
556559 randomVotePKStr := randomString (32 )
557560 var votePK crypto.OneTimeSignatureVerifier
558561 copy (votePK [:], []byte (randomVotePKStr ))
@@ -576,6 +579,7 @@ func TestAccountParticipationInfo(t *testing.T) {
576579 VoteKeyDilution : dilution ,
577580 VoteFirst : firstRound ,
578581 VoteLast : lastRound ,
582+ StateProofPK : stateproof ,
579583 },
580584 }
581585 txID , err := testClient .SignAndBroadcastTransaction (wh , nil , tx )
@@ -590,6 +594,7 @@ func TestAccountParticipationInfo(t *testing.T) {
590594 a .Equal (uint64 (firstRound ), account .Participation .VoteFirst , "API must print correct first participation round" )
591595 a .Equal (uint64 (lastRound ), account .Participation .VoteLast , "API must print correct last participation round" )
592596 a .Equal (dilution , account .Participation .VoteKeyDilution , "API must print correct key dilution" )
597+ // TODO: should we update the v1 API to support state proof? Currently it does not return this field.
593598}
594599
595600func TestSupply (t * testing.T ) {
@@ -1063,9 +1068,6 @@ func TestStateProofInParticipationInfo(t *testing.T) {
10631068 var localFixture fixtures.RestClientFixture
10641069
10651070 proto := config .Consensus [protocol .ConsensusCurrentVersion ]
1066- // TODO: remove these 2 lines when CurrentVersion contains them already
1067- proto .EnableStateProofKeyregCheck = true
1068- proto .MaxKeyregValidPeriod = config .Consensus [protocol .ConsensusFuture ].MaxKeyregValidPeriod
10691071 localFixture .SetConsensus (config.ConsensusProtocols {protocol .ConsensusCurrentVersion : proto })
10701072
10711073 localFixture .Setup (t , filepath .Join ("nettemplates" , "TwoNodes50Each.json" ))
@@ -1168,22 +1170,7 @@ func TestNilStateProofInParticipationInfo(t *testing.T) {
11681170 a := require .New (fixtures .SynchronizedTest (t ))
11691171 var localFixture fixtures.RestClientFixture
11701172
1171- // currently, the genesis creator uses the EnableStateProofKeyregCheck flag on the future
1172- // version to write a statproof to the genesis file.
1173- // we want to create a gensis file without state proof.
1174- // + need to revert this change if other tests use that
1175- tmp := config .Consensus [protocol .ConsensusFuture ]
1176- tmp .EnableStateProofKeyregCheck = false
1177- config .Consensus [protocol .ConsensusFuture ] = tmp
1178-
1179- defer func () {
1180- tmp := config .Consensus [protocol .ConsensusFuture ]
1181- tmp .EnableStateProofKeyregCheck = true
1182- config .Consensus [protocol .ConsensusFuture ] = tmp
1183- }()
1184-
1185- localFixture .SetConsensus (config .Consensus )
1186- localFixture .Setup (t , filepath .Join ("nettemplates" , "TwoNodes50Each.json" ))
1173+ localFixture .Setup (t , filepath .Join ("nettemplates" , "TwoNodes50EachV30.json" ))
11871174 defer localFixture .Shutdown ()
11881175
11891176 testClient := localFixture .LibGoalClient
@@ -1226,7 +1213,6 @@ func TestNilStateProofInParticipationInfo(t *testing.T) {
12261213 VotePK : votePK ,
12271214 SelectionPK : selPK ,
12281215 VoteFirst : firstRound ,
1229- StateProofPK : merklesignature.Verifier {},
12301216 VoteLast : lastRound ,
12311217 VoteKeyDilution : dilution ,
12321218 Nonparticipation : false ,
0 commit comments