Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trigger next round without waiting for the constant blockProposal dur… #1415

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

charithabandi
Copy link
Contributor

@charithabandi charithabandi commented Feb 25, 2025

This PR does 2 things:

  • Don't download / request the block upon receiving blkAnn messages, if we already downloaded it during blkProp message
  • bypass the idle wait timeout of blockProposal timeout, if leader has enough transactions to fill the mempool.

…ation if mempool has enough transactions to fill the block

for {
select {
case <-ctx.Done():
ce.log.Info("Context cancelled, stopping the new block round")
return
case <-ce.mempoolReadyChan:
ce.log.Info("received mempoolReady signal, proposing a new block")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably reset the ticker?

case <-ticker.C:
// check for the availability of transactions in the mempool or
// if the leader has any new events to broadcast a voteID transaction
if ce.mempool.TxsAvailable() || ce.blockProcessor.HasEvents() {
ce.log.Info("Mempool has atleast 1 transaction, proposing a new block")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least

@@ -251,6 +257,8 @@ func (ce *ConsensusEngine) processBlockProposal(ctx context.Context, blkPropMsg
ce.stateInfo.mtx.Lock()
ce.stateInfo.status = Proposed
ce.stateInfo.blkProp = blkPropMsg
// record that the block is available with the consensus engine
// ce.stateInfo.hasBlock.Store(blkPropMsg.height)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants