Skip to content

Commit e85a143

Browse files
authored
Merge branch 'main' into fix/remove-decoding-bundle
2 parents 5a09c8c + 6479897 commit e85a143

25 files changed

+702
-1914
lines changed

consensus/cp_decide.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ type cpDecideState struct {
1111

1212
func (s *cpDecideState) enter() {
1313
s.decide()
14+
s.cpStrongTermination(s.round, s.cpRound)
1415
}
1516

1617
func (s *cpDecideState) decide() {

consensus/cp_mainvote.go

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ type cpMainVoteState struct {
1111

1212
func (s *cpMainVoteState) enter() {
1313
s.decide()
14+
s.cpStrongTermination(s.round, s.cpRound)
1415
}
1516

1617
func (s *cpMainVoteState) decide() {

consensus/prepare.go

+4
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ func (s *prepareState) onTimeout(ticker *ticker) {
6868
if s.isProposer() {
6969
s.queryVote()
7070
}
71+
72+
// Schedule another timeout to retry querying for the proposal or votes.
73+
// This ensures that delayed or missing data doesn't cause the process to stall.
74+
s.scheduleTimeout(ticker.Duration*2, s.height, s.round, tickerTargetQueryProposal)
7175
} else if ticker.Target == tickerTargetChangeProposer {
7276
s.startChangingProposer()
7377
}

www/grpc/gen/dart/blockchain.pbenum.dart

+6-2
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,17 @@ class VoteType extends $pb.ProtobufEnum {
3030
static const VoteType VOTE_UNKNOWN = VoteType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_UNKNOWN');
3131
static const VoteType VOTE_PREPARE = VoteType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_PREPARE');
3232
static const VoteType VOTE_PRECOMMIT = VoteType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_PRECOMMIT');
33-
static const VoteType VOTE_CHANGE_PROPOSER = VoteType._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_CHANGE_PROPOSER');
33+
static const VoteType VOTE_CP_PRE_VOTE = VoteType._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_CP_PRE_VOTE');
34+
static const VoteType VOTE_CP_MAIN_VOTE = VoteType._(4, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_CP_MAIN_VOTE');
35+
static const VoteType VOTE_CP_DECIDED = VoteType._(5, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_CP_DECIDED');
3436

3537
static const $core.List<VoteType> values = <VoteType> [
3638
VOTE_UNKNOWN,
3739
VOTE_PREPARE,
3840
VOTE_PRECOMMIT,
39-
VOTE_CHANGE_PROPOSER,
41+
VOTE_CP_PRE_VOTE,
42+
VOTE_CP_MAIN_VOTE,
43+
VOTE_CP_DECIDED,
4044
];
4145

4246
static final $core.Map<$core.int, VoteType> _byValue = $pb.ProtobufEnum.initByValue(values);

www/grpc/gen/dart/blockchain.pbjson.dart

+4-2
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ const VoteType$json = const {
2929
const {'1': 'VOTE_UNKNOWN', '2': 0},
3030
const {'1': 'VOTE_PREPARE', '2': 1},
3131
const {'1': 'VOTE_PRECOMMIT', '2': 2},
32-
const {'1': 'VOTE_CHANGE_PROPOSER', '2': 3},
32+
const {'1': 'VOTE_CP_PRE_VOTE', '2': 3},
33+
const {'1': 'VOTE_CP_MAIN_VOTE', '2': 4},
34+
const {'1': 'VOTE_CP_DECIDED', '2': 5},
3335
],
3436
};
3537

3638
/// Descriptor for `VoteType`. Decode as a `google.protobuf.EnumDescriptorProto`.
37-
final $typed_data.Uint8List voteTypeDescriptor = $convert.base64Decode('CghWb3RlVHlwZRIQCgxWT1RFX1VOS05PV04QABIQCgxWT1RFX1BSRVBBUkUQARISCg5WT1RFX1BSRUNPTU1JVBACEhgKFFZPVEVfQ0hBTkdFX1BST1BPU0VSEAM=');
39+
final $typed_data.Uint8List voteTypeDescriptor = $convert.base64Decode('CghWb3RlVHlwZRIQCgxWT1RFX1VOS05PV04QABIQCgxWT1RFX1BSRVBBUkUQARISCg5WT1RFX1BSRUNPTU1JVBACEhQKEFZPVEVfQ1BfUFJFX1ZPVEUQAxIVChFWT1RFX0NQX01BSU5fVk9URRAEEhMKD1ZPVEVfQ1BfREVDSURFRBAF');
3840
@$core.Deprecated('Use getAccountRequestDescriptor instead')
3941
const GetAccountRequest$json = const {
4042
'1': 'GetAccountRequest',

www/grpc/gen/docs/grpc.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1829,7 +1829,9 @@ committee.
18291829
<li>VOTE_UNKNOWN = 0 (Unknown vote type.)</li>
18301830
<li>VOTE_PREPARE = 1 (Prepare vote type.)</li>
18311831
<li>VOTE_PRECOMMIT = 2 (Precommit vote type.)</li>
1832-
<li>VOTE_CHANGE_PROPOSER = 3 (Change proposer vote type.)</li>
1832+
<li>VOTE_CP_PRE_VOTE = 3 (Change-proposer:pre-vote vote type.)</li>
1833+
<li>VOTE_CP_MAIN_VOTE = 4 (change-proposer:main-vote vote type.)</li>
1834+
<li>VOTE_CP_DECIDED = 5 (change-proposer:decided vote type.)</li>
18331835
</ul>
18341836
</td>
18351837
</tr>

www/grpc/gen/docs/json-rpc.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1880,7 +1880,9 @@ committee.
18801880
<li>VOTE_UNKNOWN = 0 (Unknown vote type.)</li>
18811881
<li>VOTE_PREPARE = 1 (Prepare vote type.)</li>
18821882
<li>VOTE_PRECOMMIT = 2 (Precommit vote type.)</li>
1883-
<li>VOTE_CHANGE_PROPOSER = 3 (Change proposer vote type.)</li>
1883+
<li>VOTE_CP_PRE_VOTE = 3 (Change-proposer:pre-vote vote type.)</li>
1884+
<li>VOTE_CP_MAIN_VOTE = 4 (change-proposer:main-vote vote type.)</li>
1885+
<li>VOTE_CP_DECIDED = 5 (change-proposer:decided vote type.)</li>
18841886
</ul>
18851887
</td>
18861888
</tr>

0 commit comments

Comments
 (0)