Mini-Epic: Stop tokio tasks running for a long time and blocking other tasks #4747
Closed
16 of 18 tasks
Labels
C-bug
Category: This is a bug
C-security
Category: Security issues
C-tracking-issue
Category: This is a tracking issue for other tasks
Epic
Zenhub Label. Denotes a theme of work under which related issues will be grouped
I-consensus
Zebra breaks a Zcash consensus rule
I-hang
A Zebra component stops responding to requests
I-integration-fail
Continuous integration fails, including build and test failures
Motivation
At the moment, Zebra can't sync all the way to the tip, because some tokio tasks run for a long time, and block other tasks.
(It's also possible there are some deadlocks, livelocks, or missed task exits.)
We should discover the specific bugs using
tokio-console
, and then open a ticket for each one.Tasks
Issues that need investigation
CPU usage analysis
1. fix(state): Stop reading redundant blocks for every FindHashes and FindHeaders request #4825 & 2. fix(state): Make FindHeaders and FindHashes run concurrently with state updates #4826
Move zebra-state writes to blocking threads #4779
Deserialization (in
zebra-network
orzebra-state
):sapling::output::OutputPrefixInTransactionV5::zcash_deserialize()
(Move network transaction deserialization to a dedicated blocking and CPU-heavy thread #4787)sapling::committment::ValueCommitment::try_from::<[u8; 32]>()
bellman::groth16::Proof::read()
jubjub::AffinePoint::from_bytes_inner()
bls12_381::scalar::square()
bls12_381::scalar::sqrt()
finalized_state::ZebraDb::block()
(Move database block and transaction fetches to a dedicated blocking and CPU-heavy thread #4788)headers
to peers, only deserialize the header data from disk #4792Verification (in
zebra-consensus
):groth16::DescriptionWrapper::try_from()
(Move CPU-heavy proof preparation into the batch cryptography thread #4789)transaction::Verifier::verify_v5_transaction()
Note commitment tree updates (in
zebra-state
, either finalized or non-finalized):non_finalized_state::chain::UpdateWith
sapling::tree::merkle_crh_sapling()
sapling::commitment::pedersen_hashes::pedersen_hash()
sapling::commitment::pedersen_hashes::pedersen_hash_to_point()
incrementalmerkletree::bridgetree::Frontier::append()
Fixed Issues
Fixed by #4750:
Worker
panics intower_batch::Batch
#4738Fixed by #4752 and #4726:
The text was updated successfully, but these errors were encountered: