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

fix(consensus): improve block fullness when tx rate is high #916

Merged

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Jan 25, 2024

Description

Remove calls to beat when receiving a local proposal
Only call beat on new transactions when there no transactions pending execution
Reduced some info log noisiness

Motivation and Context

beat was called when receiving a local proposal, however this is not necessary unless you are the leader. beat is called when receiving votes (including from self) as the next leader so this PR essentially only calls beat on reciept of a proposal if it is the next leader.

If there is only a single transaction, we avoid waiting for the block time by allowing the mempool to send how many transactions are awaiting execution allowing consensus to process the single transaction immediately, or wait for multiple transactions to finish executing before proposing.

How Has This Been Tested?

Manually, stess test and single transactions.

250 stress test with 2 shards:
image

What process can a PR reviewer use to test or verify this change?

Stress test and check how many commands are proposed in a block

Breaking Changes

  • None
  • Requires data directory to be deleted
  • Other - Please specify

@sdbondi sdbondi added this pull request to the merge queue Jan 25, 2024
Merged via the queue into tari-project:development with commit dc84898 Jan 25, 2024
13 checks passed
@sdbondi sdbondi deleted the consensus-improve-block-fill branch January 25, 2024 13:46
sdbondi added a commit to sdbondi/tari-dan that referenced this pull request Jan 26, 2024
* development:
  fix(consensus): improve block fullness when tx rate is high (tari-project#916)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants