Expand description
Zcash transparent script implementations.
Re-exports§
pub use interpreter::CallbackTransactionSignatureChecker;
pub use interpreter::DefaultStepEvaluator;
pub use interpreter::HashType;
pub use interpreter::SighashCalculator;
pub use interpreter::SignedOutputs;
pub use interpreter::VerificationFlags;
Modules§
- cxx
- Rust bindings for Zcash transparent scripts.
- interpreter
- script_
error
Structs§
- Comparison
Interpreter - A tag to indicate that both the C++ and Rust implementations of zcash_script should be used, with their results compared.
- Comparison
Step Evaluator - This compares two
ZcashScript
implementations in a deep way – checking the entireState
step by step. Note that this has some tradeoffs: one is performance. Another is that it doesn’t run the entire codepath of either implementation. The setup/wrapup code is specific to this definition, but any differences there should be caught very easily by other testing mechanisms (likecheck_verify_callback
). - CxxInterpreter
- Step
Results - A payload for comparing the results of two steppers.
- Stepwise
Interpreter
Enums§
- Error
- This maps to
zcash_script_error_t
, but most of those cases aren’t used any more. This only replicates the still-used cases, and then anUnknown
bucket for anything else that might happen.
Traits§
- Zcash
Script - The external API of zcash_script. This is defined to make it possible to compare the C++ and Rust implementations.
Functions§
- check_
verify_ callback - Runs two implementations of
ZcashScript::verify_callback
with the same arguments and returns both results. This is more useful for testing than the impl that logs a warning if the results differ and always returns theT
result. - cxx_
rust_ comparison_ interpreter - normalize_
error - Convert errors that don’t exist in the C++ code into the cases that do.
- rust_
interpreter - stepwise_
verify