Deirdre Connolly
1ca55846eb
Little test to exercise sha256dWriter::flush()
2020-02-04 18:04:53 -05:00
dependabot-preview[bot]
73463c33f4
Bump ed25519-zebra from 0.1.0 to 0.2.0
...
Bumps [ed25519-zebra](https://github.com/ZcashFoundation/ed25519-zebra ) from 0.1.0 to 0.2.0.
- [Release notes](https://github.com/ZcashFoundation/ed25519-zebra/releases )
- [Changelog](https://github.com/ZcashFoundation/ed25519-zebra/blob/main/CHANGELOG.md )
- [Commits](https://github.com/ZcashFoundation/ed25519-zebra/compare/0.1.0...0.2.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-30 20:51:20 -08:00
Deirdre Connolly
359a7dc5eb
Add some proptest shrinkage
2020-01-28 03:48:23 -05:00
Deirdre Connolly
46fa30a66a
Don't use Utc::now() in our LockTime strategy
2020-01-28 03:48:23 -05:00
Deirdre Connolly
ac3c31b1c2
Rearrange and tidy imports
2020-01-28 03:48:23 -05:00
Deirdre Connolly
157add149a
Note that shielded_data::EncryptedCiphertext should move as part of note encryption work
...
Co-Authored-By: Henry de Valence <hdevalence@hdevalence.ca>
2020-01-28 03:48:23 -05:00
Deirdre Connolly
101f0a5c0a
Remove commented out asserts in serialize
...
Co-Authored-By: Henry de Valence <hdevalence@hdevalence.ca>
2020-01-28 03:48:23 -05:00
Deirdre Connolly
cdeaeaa3d6
Remove commented out asserts
...
Co-Authored-By: Henry de Valence <hdevalence@hdevalence.ca>
2020-01-28 03:48:23 -05:00
Deirdre Connolly
09e34f258f
Note that joinsplit::EncryptedCiphertext structs should move as part of note encryption work
...
Co-Authored-By: Henry de Valence <hdevalence@hdevalence.ca>
2020-01-28 03:48:23 -05:00
Deirdre Connolly
283d06bb08
Add (de)serialization roundtrip proptext for shielded_data::(Encrypted,Out)Ciphertext
2020-01-28 03:48:23 -05:00
Deirdre Connolly
2df20b9e6c
Add (de)serialization roundtrip proptext for joinsplit::EncryptedCiphertext
2020-01-28 03:48:23 -05:00
Deirdre Connolly
f379b36208
Add v4 transaction proptest shrinkage
2020-01-28 03:48:23 -05:00
Deirdre Connolly
a259a6b4b1
Add and use v4_strategy()
2020-01-28 03:48:23 -05:00
Deirdre Connolly
a93e2db44b
Add and use OutCiphertext
...
Instead of [u64; 10].
2020-01-28 03:48:23 -05:00
Deirdre Connolly
289f8ec9ca
impl Arbitrary for SpendDescription and refine impl for ShieldedData
2020-01-28 03:48:23 -05:00
Deirdre Connolly
f8781c3415
Refine Arbitrary impl for JoinSplitData<P>
2020-01-28 03:48:23 -05:00
Deirdre Connolly
90086d4d2d
derive(Arbitrary) on Sapling*Note*Tree types
2020-01-28 03:48:23 -05:00
Deirdre Connolly
100c5b15ec
Impl Arbitrary for ShieldedData and derive it for other types
...
Wraps the construction of redjubjub Signature so we don't
need an explicit impl for it.
2020-01-28 03:48:23 -05:00
Deirdre Connolly
7632863454
Impl Arbitrary for JoinSplitData<P>
...
Wraps the construction of ed25519 PublicKeyBytes and Signature so we don't
need an explicit impl for ed25519 types.
2020-01-28 03:48:23 -05:00
Deirdre Connolly
7e34a543ff
Impl Arbitrary for Groth16Proof
2020-01-28 03:48:23 -05:00
Deirdre Connolly
b47e886eed
Add transaction v3 proptest strategy
2020-01-28 03:48:23 -05:00
Deirdre Connolly
b786e1e19c
derive Arbitrary on BlockHeight
2020-01-28 03:48:23 -05:00
Deirdre Connolly
9cbc60a2d7
Proptest v1 and v2 transaction variants
2020-01-28 03:48:23 -05:00
Deirdre Connolly
31b759a924
Update (de)serialization to use EncryptedCiphertext types
2020-01-28 03:48:23 -05:00
Deirdre Connolly
ffd64d4b71
Add shielded_data::EncryptedCiphertext
2020-01-28 03:48:23 -05:00
Deirdre Connolly
95f3c61e53
Add joinsplit::EncryptedCiphertext and derive(Arbitrary) on JoinSplit*
2020-01-28 03:48:23 -05:00
Deirdre Connolly
7d520f8133
Impl Arbitrary for Bctv14Proof
2020-01-28 03:48:23 -05:00
Deirdre Connolly
f4df61eb47
Remove commented out extra Arbitrary impl for Locktime
2020-01-28 03:48:23 -05:00
Deirdre Connolly
b0c0055915
Transaction::V1 round trip proptest
2020-01-28 03:48:23 -05:00
Deirdre Connolly
dfb28b7854
Stubbing out an Arbitrary impl for variant V1 of the Transaction enum
2020-01-28 03:48:23 -05:00
Deirdre Connolly
1ee79b79d3
Add proptest-regressions for transaction/tests.rs
2020-01-28 03:48:23 -05:00
Deirdre Connolly
eb5b3dfefc
Add zcash_[de]serialize roundtrip proptest for Script type
2020-01-28 03:48:23 -05:00
Deirdre Connolly
86f631f9b7
Truncate LockTime::Time datetimes to only seconds for proptests
2020-01-28 03:48:23 -05:00
Deirdre Connolly
71d5571e39
Add roundtrip proptest for LockTime serialization/deserialization
...
Relates to #150
2020-01-28 03:48:23 -05:00
Henry de Valence
60f3f35d89
Refine Ed25519 byte arrays to ed25519-zebra types.
2020-01-24 16:43:31 -05:00
Henry de Valence
2e04610be3
Fix doc errors (missing links, etc).
2020-01-24 13:38:23 -08:00
Henry de Valence
4d5c8c7940
Clarify Transaction docs to point to iterator methods.
...
Closes #191 .
2020-01-24 13:38:23 -08:00
Henry de Valence
41021c65ad
Implement transaction (de)serialization.
2019-12-31 02:46:39 -05:00
Henry de Valence
53cae4647e
Make invalid ShieldedData unrepresentable.
...
ShieldedData objects must have at least one spend or output; using Either
ensures that at least one must be present. This is similar to the
JoinSplitData case, but slightly more complicated: rather than enforcing that
one list has at least one element (which can be done as `(first, rest)`), here
we need to use Either. This has the downside that it is possible to construct
multiple equivalent internal representations (choosing whether a spend or
output goes in the `first` slot), but this easily fixed with a custom PartialEq
implementation.
2019-12-31 02:46:39 -05:00
Henry de Valence
3a7ddbad2d
Add another convenience method for arrays, this time 64 bytes.
2019-12-31 02:46:39 -05:00
Henry de Valence
049998c751
Fix publicity for SaplingNoteTreeRootHash
2019-12-31 02:46:39 -05:00
Henry de Valence
8ff4139c1f
Use Groth16Proof in ShieldedData, not just JoinSplits.
2019-12-31 02:46:39 -05:00
Henry de Valence
92ddf0542f
Provide impl Zcash[De]Serialize for Vec<T: Zcash[De]Serialize>.
...
This replaces the read_list function and makes the code significantly cleaner.
The only downside is that it loses exact preallocation, but this is probably not a big deal.
2019-12-31 02:46:39 -05:00
Henry de Valence
1199cfa23e
impl Zcash[De]Serialize for Script
2019-12-31 02:46:39 -05:00
Henry de Valence
392825c4cb
Add Zcash[De]Serialize bound to ZkSnarkProof.
2019-12-31 02:46:39 -05:00
Henry de Valence
fa1e168fb5
Ensure that invalid JoinSplitDatas are unrepresentable.
...
All JoinSplitDatas must contain at least one JoinSplit.
2019-12-31 02:46:39 -05:00
Henry de Valence
c26304d983
Correct an error in transaction modeling.
...
In the previous transaction modeling I defined the structs so that the number
of old and new commitments for a JoinSplit were variable, when in fact the
Sprout design fixes both to be 2. So now they are hardcoded as 2 in the source
code as well. This commit also fixes some missing `pub` fields on the
`JoinSplit` struct.
2019-12-31 02:46:39 -05:00
Henry de Valence
056127dc94
Copy a transaction test vector from librustzcash.
2019-12-31 02:46:39 -05:00
Henry de Valence
2965187b91
Upgrade tokio, futures, hyper to released versions.
2019-12-13 17:42:15 -05:00
Henry de Valence
4315235d52
Use RedJubjub types in zebra-chain. ( #142 )
2019-12-12 14:23:19 -05:00