teor
120c7ef648
rfc: Parallel Verification ( #763 )
...
* rfc: Parallel Verification Draft
An initial draft RFC for parallel verification.
* rfc: Integrate the CheckpointVerifier design
Describe how the CheckpointVerifier interacts with chain state updates.
* rfc: Add a chain tips update service
* rfc: Add network upgrade context changes
* rfc: Add main chain tip section
* rfc: Clarify and expand genesis block rules
* rfc: More genesis special cases
* Add another chain tips edge case
* Remove the final tie-breaker for tip ties
Instead, change the design to make them impossible.
* rfc: add a definitions section to parallel verification
* rfc: Split parallel verification into two RFCs
This is the semantic verification RFC.
* rfc: Add guide and examples for parallel verification
* rfc: Fix GitHub markdown
* rfc: Fix parallel function design
We don't need separate functions, we can just do the awaits as late as
possible.
* rfc: Fix typo
* rfc: Stop assigning responsibilities to modules
* rfc: Add more parallel verification definitions
* rfc: Say "block height consensus rule"
* rfc: Tidy some of the TODOs
* rfc: Expand rationale and alternatives
* rfc: Delete "try to depend on older blocks"
* rfc: Delete coinbase checks which are unrelated to BlockHeight
And remove some duplicate references to BlockHeight checks.
* rfc: Focus on verification stages
And rewrite some stages for clarity.
* rfc: Remove reference to zebra-network
2020-08-14 11:04:17 -07:00
Deirdre Connolly
616d82faaf
Use the jubjub::AffinePoint in the canonical, encoded little-endian byte form in
...
Pedersen tests
Keeps the librustzcash test vectors with their big-endian byte order
as comments, for greppability.
2020-08-14 02:04:12 -04:00
Deirdre Connolly
a2c9011e06
Impl ZcashDeserialize for jubjub::Fq, use in transaction deserialization
2020-08-14 02:04:12 -04:00
Deirdre Connolly
1255cec6a4
Serialize Amount to bytes using byteorder::LittleEndian
2020-08-14 02:04:12 -04:00
Deirdre Connolly
646b506e7a
Whoops forgot to add sprout::NoteTreeRootHash
2020-08-14 02:04:12 -04:00
Deirdre Connolly
4914b80cdb
Add a TODO about caching Pedersen hash generator points
2020-08-14 02:04:12 -04:00
Deirdre Connolly
f753e63f3b
Clarify docstring on NoteCommitment::new()
2020-08-14 02:04:12 -04:00
Deirdre Connolly
437f40d3c8
Refine JoinSplit::anchor to be a sprout::NoteTreeRootHash type
2020-08-14 02:04:12 -04:00
Deirdre Connolly
5a5882700c
Tidy JoinSplit nullifiers deserialization
2020-08-14 02:04:12 -04:00
Deirdre Connolly
6b13ce3e83
Add Sapling EphemeralPublicKey type that wraps jubjub::AffinePoint
2020-08-14 02:04:12 -04:00
Deirdre Connolly
52a10d2837
Add note about whether sign checks in Amount -> Fr conversion matter
...
Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>
2020-08-14 02:04:12 -04:00
Deirdre Connolly
75cad3bb0a
Impl TryFrom's for Diversifier and use those to construct Sapling NoteCommitments
2020-08-14 02:04:12 -04:00
Deirdre Connolly
c8771ef620
Defer to From/Into [u8; 32] vs Zcash(De)Serialize for sprout::NoteCommitments
2020-08-14 02:04:12 -04:00
Deirdre Connolly
619afffa16
Use convenience Reader/Writer methods to only use From/Into for nullifer serialization
...
And thus remove duplicative Zcash(De)Serialization impls
2020-08-14 02:04:12 -04:00
Deirdre Connolly
13b6ff1c65
Add 32byte and 64 bytes convenience writer methods to WriteExt
2020-08-14 02:04:12 -04:00
Deirdre Connolly
e8fdd0e1f3
Impl TryFrom for Commitments, call from impl ZcashDeserialize
2020-08-14 02:04:12 -04:00
Deirdre Connolly
5d13880461
Remove Zcash(De)Serialize impls for *Commitments
2020-08-14 02:04:12 -04:00
Deirdre Connolly
014afd8e4a
Move Pedersen hash functions to their own submodule
2020-08-14 02:04:12 -04:00
Deirdre Connolly
be7ea200c8
Accept an Amount<NonNegative> for the value arg of a ValueCommitment constructor
2020-08-14 02:04:12 -04:00
Deirdre Connolly
e024e43896
Support nullifier derivation from borrowed Spending, NullifierDeriving keys
2020-08-14 02:04:12 -04:00
Deirdre Connolly
40b5a73a15
impl From<&NullifierDerivingKey>, use that to derive Sapling Nullifier
2020-08-14 02:04:12 -04:00
Deirdre Connolly
a8625b7b84
Remove empty doc comment
2020-08-14 02:04:12 -04:00
Deirdre Connolly
a3530b0eed
Move pedersen_hash() to go with the other Sapling hash functions, for now
2020-08-14 02:04:12 -04:00
Deirdre Connolly
0242df30cb
A space
2020-08-14 02:04:12 -04:00
Deirdre Connolly
9d9491c4e8
Index at 1, not 0, the main loop of PedersenHashToPoint, to match spec math
2020-08-14 02:04:12 -04:00
Deirdre Connolly
e5c07721b4
Typo fix
...
Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>
2020-08-14 02:04:12 -04:00
Deirdre Connolly
ca81e48843
Remove an extra line
2020-08-14 02:04:12 -04:00
Deirdre Connolly
60ae9d74e7
Typo
...
Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>
2020-08-14 02:04:12 -04:00
Deirdre Connolly
fe45c6402a
Remove clippy::unit_arg allowance
2020-08-14 02:04:12 -04:00
Deirdre Connolly
2942bad6ff
Make diversify_hash() private again
2020-08-14 02:04:12 -04:00
Deirdre Connolly
5a249f8da5
A space
...
Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>
2020-08-14 02:04:12 -04:00
Deirdre Connolly
5ba453c2a1
Remove unused SaplingNoteTreeRootHash types re: Heartwood
2020-08-14 02:04:12 -04:00
Deirdre Connolly
68871c5bd4
From<Nullifier> for [u8; 32]
2020-08-14 02:04:12 -04:00
Deirdre Connolly
b2584c4a8f
A space
2020-08-14 02:04:12 -04:00
Deirdre Connolly
0c299972ec
Clarify docstring about the Jubjub prime-order subgroup on generate_trapdoor()
2020-08-14 02:04:12 -04:00
Deirdre Connolly
f816761a5c
The pedersen hash to point test vectors now pass
2020-08-14 02:04:12 -04:00
Deirdre Connolly
425275ad35
Fix exclusive range, shift up enumerate() indexes with map()
2020-08-14 02:04:12 -04:00
Deirdre Connolly
be22ef64e5
At least fewer M_i() rounds for test cases
2020-08-14 02:04:12 -04:00
Deirdre Connolly
41c8076dab
Add test vectors that aren't being consumed right now
2020-08-14 02:04:12 -04:00
Deirdre Connolly
14d502a54b
Compute pedersen hash to point in scalar field
2020-08-14 02:04:12 -04:00
Deirdre Connolly
8ececebea7
A space
...
Co-authored-by: teor <teor@riseup.net>
2020-08-14 02:04:12 -04:00
Deirdre Connolly
3b01dc50ef
Use unicode scalar field characters instead of LaTeX
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-08-14 02:04:12 -04:00
Deirdre Connolly
1d494a2b7a
Docstring wrap
2020-08-14 02:04:12 -04:00
Deirdre Connolly
e22afa3c8f
Generate uniformly random scalar w/ Fr::from_bytes_wide()
...
Which reduces mod r always.
2020-08-14 02:04:12 -04:00
Deirdre Connolly
8f15ed8140
Cargo.lock
2020-08-14 02:04:12 -04:00
Deirdre Connolly
c46cda920f
Add primitive merkle_crh_sapling function
2020-08-14 02:04:12 -04:00
Deirdre Connolly
10a9aa5844
Add prf_nf and use in From impl to derive Sapling Nullifier
2020-08-14 02:04:12 -04:00
Deirdre Connolly
eb731a6e2f
Add note commitment tree Position type
2020-08-14 02:04:12 -04:00
Deirdre Connolly
65f8f2c613
Add mixing_pedersen_hash
...
Tidy constructors for NoteCommitment
2020-08-14 02:04:12 -04:00
Deirdre Connolly
ed888b38ef
Correctly generate a sapling NoteCommitment from the NoteCommitmentRandomness
2020-08-14 02:04:12 -04:00