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

Adjust zebra-consensus Buffer sizes, and document Buffer hang risks #1675

Closed
6 tasks
teor2345 opened this issue Feb 3, 2021 · 2 comments
Closed
6 tasks
Labels
A-docs Area: Documentation A-rust Area: Updates to Rust code C-cleanup Category: This is a cleanup

Comments

@teor2345
Copy link
Contributor

teor2345 commented Feb 3, 2021

Is your feature request related to a problem? Please describe.

zebra-consensus uses a lot of Buffered and Batched services, but we haven't really checked that their bounds are high enough.

The underlying issues are:

  • If lots of tasks with data dependencies use a Buffer or Batch with a small bound, Zebra can hang.
  • Buffers or Batches with small bounds can also limit concurrency, particularly if the underlying service does a lot of work in its call.

Describe the solution you'd like

  • Review Buffer and Batch bounds across zebra-consensus

Document the Buffer and Batch constraints in:

  • ChainVerifier
  • BlockVerifier
  • TransactionVerifier - 1 per transaction?
  • CheckpointVerifier
  • transaction::Verifier

See #1593 for details.

Describe alternatives you've considered

Do nothing: the code might hang if future changes break the poll_ready/call invariants.

Additional context

This issue was discovered during the review in #1593. It is a routine cleanup.

@teor2345 teor2345 added C-bug Category: This is a bug A-docs Area: Documentation A-rust Area: Updates to Rust code C-cleanup Category: This is a cleanup S-needs-triage Status: A bug report needs triage P-Medium labels Feb 3, 2021
@teor2345 teor2345 changed the title Use ServiceExt::oneshot in BlockVerifier Use ServiceExt::oneshot in zebra-consensus Feb 3, 2021
@teor2345 teor2345 changed the title Use ServiceExt::oneshot in zebra-consensus Adjust the zebra-consensus Buffer size, and document Buffer hang risks Feb 15, 2021
@teor2345 teor2345 removed the C-bug Category: This is a bug label Feb 15, 2021
@teor2345
Copy link
Contributor Author

This task has been revised based on the fixes to the underlying Buffer issue, see #1593 for details.

@teor2345 teor2345 changed the title Adjust the zebra-consensus Buffer size, and document Buffer hang risks Adjust zebra-consensus Buffer sizes, and document Buffer hang risks Feb 15, 2021
@mpguerra mpguerra removed the S-needs-triage Status: A bug report needs triage label Feb 18, 2021
@teor2345
Copy link
Contributor Author

The current settings seem fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation A-rust Area: Updates to Rust code C-cleanup Category: This is a cleanup
Projects
None yet
Development

No branches or pull requests

2 participants