@@ -1039,7 +1039,7 @@ func (cs *State) enterNewRound(height int64, round int32) {
1039
1039
logger .Debug ("need to set a buffer and log message here for sanity" , "start_time" , cs .StartTime , "now" , now )
1040
1040
}
1041
1041
1042
- logger . Debug ( "entering new round" , "current" , log . NewLazySprintf ( "%v/%v/%v" , cs .Height , cs .Round , cs .Step ))
1042
+ prevHeight , prevRound , prevStep := cs .Height , cs .Round , cs .Step
1043
1043
1044
1044
// increment validators if necessary
1045
1045
validators := cs .Validators
@@ -1055,13 +1055,19 @@ func (cs *State) enterNewRound(height int64, round int32) {
1055
1055
cs .Validators = validators
1056
1056
// If round == 0, we've already reset these upon new height, and meanwhile
1057
1057
// we might have received a proposal for round 0.
1058
+ propAddress := validators .GetProposer ().PubKey .Address ()
1058
1059
if round != 0 {
1059
- logger .Debug ("resetting proposal info" )
1060
+ logger .Info ("resetting proposal info" , "proposer" , propAddress )
1060
1061
cs .Proposal = nil
1061
1062
cs .ProposalBlock = nil
1062
1063
cs .ProposalBlockParts = nil
1063
1064
}
1064
1065
1066
+ logger .Debug ("entering new round" ,
1067
+ "previous" , log .NewLazySprintf ("%v/%v/%v" , prevHeight , prevRound , prevStep ),
1068
+ "proposer" , propAddress ,
1069
+ )
1070
+
1065
1071
cs .Votes .SetRound (cmtmath .SafeAddInt32 (round , 1 )) // also track next round (round+1) to allow round-skipping
1066
1072
cs .TriggeredTimeoutPrecommit = false
1067
1073
@@ -1864,7 +1870,8 @@ func (cs *State) defaultSetProposal(proposal *types.Proposal) error {
1864
1870
1865
1871
p := proposal .ToProto ()
1866
1872
// Verify signature
1867
- if ! cs .Validators .GetProposer ().PubKey .VerifySignature (
1873
+ pubKey := cs .Validators .GetProposer ().PubKey
1874
+ if ! pubKey .VerifySignature (
1868
1875
types .ProposalSignBytes (cs .state .ChainID , p ), proposal .Signature ,
1869
1876
) {
1870
1877
return ErrInvalidProposalSignature
@@ -1879,7 +1886,7 @@ func (cs *State) defaultSetProposal(proposal *types.Proposal) error {
1879
1886
cs .ProposalBlockParts = types .NewPartSetFromHeader (proposal .BlockID .PartSetHeader )
1880
1887
}
1881
1888
1882
- cs .Logger .Info ("received proposal" , "proposal" , proposal )
1889
+ cs .Logger .Info ("received proposal" , "proposal" , proposal , "proposer" , pubKey . Address () )
1883
1890
return nil
1884
1891
}
1885
1892
0 commit comments