Zebra/zebra-consensus/src
Janito Vaqueiro Ferreira Filho fdeb6d5ec8
Refactor Sprout Join Split validation by transaction verifier (#2371)
* Refactor to create `verify_sprout_shielded_data`

Move the join split verification code into a new
`verify_sprout_shielded_data` helper method that returns an
`AsyncChecks` set.

* Test if signed V4 tx. join splits are accepted

Create a fake V4 transaction with a dummy join split, and sign it
appropriately. Check if the transaction verifier accepts the
transaction.

* Test if unsigned V4 tx. joinsplit data is rejected

Create a fake V4 transaction with a dummy join split. Do NOT sign this
transaction's join split data, and check that the verifier rejects the
transaction.

* Join tests to share Tokio runtime

Otherwise one of the tests might fail incorrectly because of a
limitation in the test environment. `Batch` services spawn a task in the
Tokio runtime, but separate tests can have separate runtimes, so sharing
a `Batch` service can lead to the worker task only being available for
one of the tests.
2021-06-25 00:47:39 +00:00
..
block Move network_upgrade check into zebra-chain (#2354) 2021-06-22 12:06:52 +10:00
chain Standardise clippy lints and require docs (#2238) 2021-06-04 08:48:40 +10:00
checkpoint Add and use a function for mandatory checkpoint (#2314) 2021-06-18 10:05:28 +10:00
parameters Replace smart quotes with ascii quotes 2021-03-15 03:18:10 -04:00
primitives Enable V5 transaction test vectors in the groth16 tests (#2383) 2021-06-24 16:28:23 +10:00
transaction Refactor Sprout Join Split validation by transaction verifier (#2371) 2021-06-25 00:47:39 +00:00
block.rs Validate nConsensusBranchId (#2100) 2021-05-10 01:31:45 +00:00
chain.rs Document required request timeouts due to data dependencies (#2337) 2021-06-18 14:43:05 -03:00
checkpoint.rs Clippy: remove needless borrows 2021-06-07 18:33:58 -04:00
config.rs Make sure the mandatory checkpoint includes Canopy activation (#2235) 2021-06-03 10:24:08 +10:00
error.rs Reject V5 transactions before NU5 activation (#2285) 2021-06-15 10:15:59 +10:00
lib.rs Standardise clippy lints and require docs (#2238) 2021-06-04 08:48:40 +10:00
parameters.rs move genesis parameters to zebra-chain (#1151) 2020-10-12 14:08:23 -07:00
primitives.rs Ed25519 async batch verification for JoinSplit signatures (#1952) 2021-03-31 09:08:19 +10:00
script.rs Make the state usage clearer in script::Verifier (#1733) 2021-02-16 05:53:12 +10:00
transaction.rs Refactor Sprout Join Split validation by transaction verifier (#2371) 2021-06-25 00:47:39 +00:00