Skip to content

Commit

Permalink
Merge branch 'main' into fix/remove-decoding-bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
Ja7ad authored Mar 10, 2025
2 parents 5a09c8c + 6479897 commit e85a143
Show file tree
Hide file tree
Showing 25 changed files with 702 additions and 1,914 deletions.
1 change: 1 addition & 0 deletions consensus/cp_decide.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type cpDecideState struct {

func (s *cpDecideState) enter() {
s.decide()
s.cpStrongTermination(s.round, s.cpRound)
}

func (s *cpDecideState) decide() {
Expand Down
1 change: 1 addition & 0 deletions consensus/cp_mainvote.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ type cpMainVoteState struct {

func (s *cpMainVoteState) enter() {
s.decide()
s.cpStrongTermination(s.round, s.cpRound)
}

func (s *cpMainVoteState) decide() {
Expand Down
4 changes: 4 additions & 0 deletions consensus/prepare.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ func (s *prepareState) onTimeout(ticker *ticker) {
if s.isProposer() {
s.queryVote()
}

// Schedule another timeout to retry querying for the proposal or votes.
// This ensures that delayed or missing data doesn't cause the process to stall.
s.scheduleTimeout(ticker.Duration*2, s.height, s.round, tickerTargetQueryProposal)
} else if ticker.Target == tickerTargetChangeProposer {
s.startChangingProposer()
}
Expand Down
8 changes: 6 additions & 2 deletions www/grpc/gen/dart/blockchain.pbenum.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ class VoteType extends $pb.ProtobufEnum {
static const VoteType VOTE_UNKNOWN = VoteType._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_UNKNOWN');
static const VoteType VOTE_PREPARE = VoteType._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_PREPARE');
static const VoteType VOTE_PRECOMMIT = VoteType._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_PRECOMMIT');
static const VoteType VOTE_CHANGE_PROPOSER = VoteType._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_CHANGE_PROPOSER');
static const VoteType VOTE_CP_PRE_VOTE = VoteType._(3, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_CP_PRE_VOTE');
static const VoteType VOTE_CP_MAIN_VOTE = VoteType._(4, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_CP_MAIN_VOTE');
static const VoteType VOTE_CP_DECIDED = VoteType._(5, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'VOTE_CP_DECIDED');

static const $core.List<VoteType> values = <VoteType> [
VOTE_UNKNOWN,
VOTE_PREPARE,
VOTE_PRECOMMIT,
VOTE_CHANGE_PROPOSER,
VOTE_CP_PRE_VOTE,
VOTE_CP_MAIN_VOTE,
VOTE_CP_DECIDED,
];

static final $core.Map<$core.int, VoteType> _byValue = $pb.ProtobufEnum.initByValue(values);
Expand Down
6 changes: 4 additions & 2 deletions www/grpc/gen/dart/blockchain.pbjson.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ const VoteType$json = const {
const {'1': 'VOTE_UNKNOWN', '2': 0},
const {'1': 'VOTE_PREPARE', '2': 1},
const {'1': 'VOTE_PRECOMMIT', '2': 2},
const {'1': 'VOTE_CHANGE_PROPOSER', '2': 3},
const {'1': 'VOTE_CP_PRE_VOTE', '2': 3},
const {'1': 'VOTE_CP_MAIN_VOTE', '2': 4},
const {'1': 'VOTE_CP_DECIDED', '2': 5},
],
};

/// Descriptor for `VoteType`. Decode as a `google.protobuf.EnumDescriptorProto`.
final $typed_data.Uint8List voteTypeDescriptor = $convert.base64Decode('CghWb3RlVHlwZRIQCgxWT1RFX1VOS05PV04QABIQCgxWT1RFX1BSRVBBUkUQARISCg5WT1RFX1BSRUNPTU1JVBACEhgKFFZPVEVfQ0hBTkdFX1BST1BPU0VSEAM=');
final $typed_data.Uint8List voteTypeDescriptor = $convert.base64Decode('CghWb3RlVHlwZRIQCgxWT1RFX1VOS05PV04QABIQCgxWT1RFX1BSRVBBUkUQARISCg5WT1RFX1BSRUNPTU1JVBACEhQKEFZPVEVfQ1BfUFJFX1ZPVEUQAxIVChFWT1RFX0NQX01BSU5fVk9URRAEEhMKD1ZPVEVfQ1BfREVDSURFRBAF');
@$core.Deprecated('Use getAccountRequestDescriptor instead')
const GetAccountRequest$json = const {
'1': 'GetAccountRequest',
Expand Down
4 changes: 3 additions & 1 deletion www/grpc/gen/docs/grpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -1829,7 +1829,9 @@ committee.
<li>VOTE_UNKNOWN = 0 (Unknown vote type.)</li>
<li>VOTE_PREPARE = 1 (Prepare vote type.)</li>
<li>VOTE_PRECOMMIT = 2 (Precommit vote type.)</li>
<li>VOTE_CHANGE_PROPOSER = 3 (Change proposer vote type.)</li>
<li>VOTE_CP_PRE_VOTE = 3 (Change-proposer:pre-vote vote type.)</li>
<li>VOTE_CP_MAIN_VOTE = 4 (change-proposer:main-vote vote type.)</li>
<li>VOTE_CP_DECIDED = 5 (change-proposer:decided vote type.)</li>
</ul>
</td>
</tr>
Expand Down
4 changes: 3 additions & 1 deletion www/grpc/gen/docs/json-rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -1880,7 +1880,9 @@ committee.
<li>VOTE_UNKNOWN = 0 (Unknown vote type.)</li>
<li>VOTE_PREPARE = 1 (Prepare vote type.)</li>
<li>VOTE_PRECOMMIT = 2 (Precommit vote type.)</li>
<li>VOTE_CHANGE_PROPOSER = 3 (Change proposer vote type.)</li>
<li>VOTE_CP_PRE_VOTE = 3 (Change-proposer:pre-vote vote type.)</li>
<li>VOTE_CP_MAIN_VOTE = 4 (change-proposer:main-vote vote type.)</li>
<li>VOTE_CP_DECIDED = 5 (change-proposer:decided vote type.)</li>
</ul>
</td>
</tr>
Expand Down
Loading

0 comments on commit e85a143

Please sign in to comment.