Open
Description
openedon Nov 13, 2023
Motivation
Zebra's transaction deserialization does a lot of CPU-heavy cryptography for shielded transactions.
Since we know that transactions in our database are valid, we can deserialize them without checking the validity of curve points.
API Reference
TODO: which methods are causing this CPU usage, and what can they be replaced with?
Detailed Analysis
See #4583 (comment)
Designs
In zebra-chain
:
- split out transaction deserialisation methods that optionally do validation
- do validation by default in ZcashDeserialize (with transactions and blocks from the network and RPCs)
In zebra-state
:
- skip validation for transactions and blocks when reading from the state in FromBytes
Related Work
- Move database block and transaction fetches to a dedicated blocking and CPU-heavy thread #4788 (which didn't end up improving performance)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
Type
Projects
Status
New