Commit Graph

50 Commits

Author SHA1 Message Date
Duke Leto
d0dade1d2c desprout 2020-06-17 10:13:57 -04:00
Duke Leto
3cb215e39a more desprout, ugh 2020-06-05 12:17:41 -04:00
Duke Leto
86a98587a1 desprout 2020-06-05 10:14:52 -04:00
Duke Leto
4a3a7acc90 Remove more libsnark stuff 2020-01-24 05:43:11 -05:00
Duke Leto
447ec28997 Delete a lot of libsnark stuff 2020-01-23 18:45:41 -05:00
miketout
9feb4b9e08 Major updates integration from all upstreams 2018-09-18 14:33:53 -07:00
Eirik Ogilvie-Wigley
4fc309f0f5 Rename Merkle Trees to include sprout or sapling 2018-08-01 10:31:09 -06:00
Ariel Gabizon
e1a3461cc2 Improve/Fix variable names
ZCProof was too general. pubKeyHash was actually the JoinSplit pubkey
itself.
2018-06-09 20:27:35 -07:00
Jack Grigg
a6bbb26e08 Replace boost::array with std::array 2018-05-26 00:12:57 +12:00
Sean Bowe
b7a6c32178 Integrate Groth16 verification and proving. 2018-05-14 16:26:23 -06:00
Jack Grigg
e5eab182b5 Use boost::variant to represent shielded addresses and keys
libzcash::PaymentAddress has been renamed to libzcash::SproutPaymentAddress,
and a new typedef boost::variant is now libzcash::PaymentAddress. Similarly
for ViewingKey and SpendingKey.

A new class InvalidEncoding is introduced as the default boost::variant
option for each address and key type; it is used during decoding instead
of boost::optional.

All address and key storage functions in the wallet have been modified to
refer specifically to the Sprout types, as they are used very precisely.
In most other cases, the more general type is leveraged as much as possible,
and we convert to the Sprout type when necessary. This will be subsequently
wrapped in, or replaced with, context-specific functions once Sapling
types are implemented.
2018-05-11 17:14:49 -04:00
Homu
8ef1d333b5 Auto merge of #2894 - per-gron:dont-export-unless-needed, r=str4d
Make some globals static that can be

I wrote this patch as part of making a Bazel build system but it really is independent from that so I'm putting this as a separate PR.

External linkage does not help and just encourages sloppy dependencies (ie using symbols only declared in a cpp file in some other cpp file) and can lead to weird issues when there are name collisions.
2018-05-04 15:05:43 -07:00
Simon
5020a93631 Refactoring: rename NotePlaintext --> SproutNotePlaintext
Also renames:
CNotePlaintextEntry --> CSproutNotePlaintextEntry
CUnspentNotePlaintextEntry --> CUnspentSproutNotePlaintextEntry
2018-04-26 15:05:30 -07:00
Simon
5d99e3e92f Refactoring: SproutNote member variable value moved to BaseNote.
All notes have a value, so the member variable has been moved to the
base class, and direct member access has been replaced with a getter.
2018-04-26 15:05:19 -07:00
Simon
b230fe6836 Refactoring: Rename class libzcash::Note to libzcash::SproutNote. 2018-04-25 11:33:24 -07:00
jl777
12b1a8af4c Extern MAX_MONEY 2018-04-16 07:56:48 +03:00
jl777
1abdb0de13 MAX_MONEY declare 2018-04-16 07:55:06 +03:00
Per Grön
39d2e9e0cb Make some globals static that can be
External linkage does not help and just encourages sloppy dependencies
and can lead to weird issues when there are name collisions.
2018-01-22 18:20:47 +01:00
Jack Grigg
fee8835388 Mark libsnark includes as library includes 2017-11-15 16:49:10 +00:00
Homu
c8ecd49574 Auto merge of #2159 - bitcartel:1.0.7_payment_disclosure, r=str4d
Payment disclosure (experimental feature)
2017-11-14 14:06:22 -08:00
Simon
45232b1961 Add payment disclosure as experimental feature. 2017-11-14 13:29:05 -08:00
Ariel Gabizon
4305a56221 boost::format -> tinyformat 2017-11-01 02:11:49 +13:00
Sean Bowe
394f41853b Integrate low memory prover. 2017-11-01 02:11:49 +13:00
Sean Bowe
1a9543d064 Remove crusty old "loadVerifyingKey"/"loadProvingKey" APIs and associated invariants. 2017-10-21 15:42:41 +03:00
Sean Bowe
bc59f53722 Isolate verification to a ProofVerifier context object that allows verification behavior to be tuned by the caller. 2016-12-05 12:40:06 -07:00
Simon
13e9a639b7 Fix threading issue when initializing public params. 2016-11-17 15:36:26 -07:00
zkbot
54218ea05c Auto merge of #1797 - ebfull:improve-joinsplit-diagnostics, r=bitcartel
Improve joinsplit diagnostics

I don't advocate merging this for the hotfix release (to fix #1779) but this PR can be used to diagnose the real issue and should be merged ASAP afterward.

~I still need to add tests for `last()` and `element()` though.~ Done.
2016-11-16 01:06:37 +00:00
Sean Bowe
78df9f0211 Process verification keys to perform online verification. 2016-11-14 10:24:07 -07:00
Sean Bowe
5f0a73ce11 Improve accuracy of constraint system violation diagnostics. 2016-11-05 11:27:23 -06:00
zkbot
c73122db7b Auto merge of #1399 - ebfull:write-r1cs, r=ebfull
Write R1CS output to file in GenerateParams.

Not urgent. This is how the constraint system is communicated to the MPC.
2016-11-04 16:57:43 +00:00
Sean Bowe
c4643bd949 Throw more descriptive exceptions when the constraint system is violated. 2016-11-01 14:52:03 -06:00
Sean Bowe
0a958ae7f6 Write R1CS output to file in GenerateParams. 2016-09-14 15:57:54 -06:00
Simon
4eb1a96f9a Add public field 'memo' to JSOutput to enable creation of notes with custom memos. 2016-09-08 21:46:13 -07:00
zkbot
485ace0a1b Auto merge of #1311 - ebfull:cleanup-pp, r=ebfull
Deallocate the public parameters during Shutdown.

This also has it deallocated in `GenerateParams` and `test_bitcoin`. The virtual destructor probably isn't necessary but I added it just in case we need it some other time.
2016-09-02 03:03:45 +00:00
Jack Grigg
5db5e42ec3 Add optional bool to disable computation of proof in JSDescription constructor 2016-08-30 00:29:49 +12:00
Sean Bowe
7ee82c4361 Deallocate the public parameters during Shutdown. 2016-08-26 16:55:43 -06:00
Sean Bowe
f0dab51cf3 Implement zkSNARK compression. 2016-08-22 00:36:12 -06:00
Simon
d81c31f5fb Extend try catch block around calls to libsnark, per discussion in #1126. 2016-07-29 00:02:22 -07:00
Sean Bowe
25d2197043 Remove more from libsnark, and fix potential remote-DoS. 2016-07-21 18:34:59 -06:00
Sean Bowe
bf76024eb7 Pass our constraint system to libsnark, so that it doesn't need to (de)serialize it in the proving key. 2016-07-15 10:45:59 -06:00
Sean Bowe
2668a1bc13 Remove the rest of libzerocash. 2016-07-10 20:25:02 -06:00
Taylor Hornby
6aae9d1a55 Sign JoinSplit transactions 2016-05-30 11:05:31 -06:00
zkbot
8ff7c0752e Auto merge of #954 - ebfull:fix-cpourtx-structure, r=ebfull
CPourTx structural changes

* Enable binary serialization of proofs and the proving key (closes #799) and make the proofs fixed-size.
* Reorder fields of CPourTx to match the spec (closes #927)
2016-05-25 16:33:31 +00:00
Sean Bowe
9285bba885 Enable binary serializations of proofs and r1cs keys, and make the CPourTx proof field fixed-size. 2016-05-24 11:08:31 -06:00
Sean Bowe
defe37a6d4 Enforce first four bits are zero for all spending keys and phi. 2016-05-24 11:07:09 -06:00
Sean Bowe
81469bbb83 Note values should be little-endian byte order. 2016-05-12 16:45:12 -06:00
Sean Bowe
032164d5d5 Rename hmac -> mac in circuit. 2016-05-12 16:45:12 -06:00
Sean Bowe
5e61a78fec zkSNARK: Enforce disclosure of commitments to output notes. 2016-05-12 16:44:30 -06:00
Sean Bowe
074eb3a2cf zkSNARK: Foundations of circuit design and verification logic. 2016-05-12 16:44:30 -06:00
Sean Bowe
369df06583 Introduce new libzcash Zcash protocol API and crypto constructions surrounding the zkSNARK circuit. 2016-05-12 16:44:27 -06:00