Skip to content

Commit

Permalink
Small workaround to enable using the DAS light client again
Browse files Browse the repository at this point in the history
See code comment of why this makes sense
  • Loading branch information
liamsi committed Jun 12, 2021
1 parent 09d3c3b commit be03758
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions consensus/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -1122,8 +1122,17 @@ func (cs *State) defaultDecideProposal(height int64, round int32) {
}

// cancel ctx for previous proposal block to ensure block putting/providing does not queues up
if cs.proposalCancel != nil {
cs.proposalCancel()
if cs.proposalCancel != nil { //nolint:staticcheck
// FIXME(ismail): below commented out cancel tries to prevent block putting
// and providing no to queue up endlessly.
// But in a real network proposers should have enough time in between.
// And even if not, queuing up to a problematic extent will take a lot of time:
// Even on the Cosmos Hub the largest validator only proposes every 15 blocks.
// With an average block time of roughly 7.5 seconds this means almost
// two minutes between two proposals by the strongest validator.
// In our case block interval times will likely be larger.
//
// cs.proposalCancel()
}
cs.proposalCtx, cs.proposalCancel = context.WithCancel(context.TODO())
go func(ctx context.Context) {
Expand Down

0 comments on commit be03758

Please sign in to comment.