Commit Graph

85 Commits

Author SHA1 Message Date
jl777
92e89669cd test 2017-01-25 09:49:32 +02:00
Eran Tromer
894a0b3295 CreateJoinSplit: add start_profiling() call
This solves the problem of profiling output displaying nonsensical large time values.
2017-01-05 11:30:23 -05:00
zkbot
57a0725ae1 Auto merge of #1946 - str4d:blockchain-stats-num-commitments, r=ebfull
Add total number of commitments to getblockchaininfo
2016-12-16 21:47:53 +00:00
Jack Grigg
d0ce704abe Add a tool for profiling the creation of JoinSplits 2016-12-17 02:43:43 +13:00
Jack Grigg
5d6e1aa60f Add total number of commitments to getblockchaininfo 2016-12-15 15:50:26 +13:00
Sean Bowe
c4fce3fc81 Check that E' points are actually in G2 by ensuring they are of order r. 2016-12-12 19:14:42 -07:00
Sean Bowe
eb82238dd0 Rename Dummy to Disabled. 2016-12-08 12:32:39 -07:00
Sean Bowe
53dc6a41eb Ensure ProofVerifier cannot be accidentally copied. 2016-12-06 18:42:31 -07: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
Simon
19bec4d9bb Fixes CID 1352715 uninitialized scalar field. 2016-10-20 11:25:36 -07:00
Simon
b7727d8b3b Fixes CID 1352687 uninitialized scalar field. 2016-10-20 11:19:36 -07:00
Sean Bowe
0a958ae7f6 Write R1CS output to file in GenerateParams. 2016-09-14 15:57:54 -06:00
Jack Grigg
3a15b1637e Move serialized Zcash address length constants into zcash/Address.hpp 2016-09-13 14:21:49 +12:00
Jack Grigg
16d140f4a2 Add support for encrypting spending keys 2016-09-13 14:21:49 +12: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
5abaca1af6 Fix the failing test! 2016-09-01 13:00:02 +12:00
Jack Grigg
ac91ebbe92 Add test showing that the witness cache isn't being serialised 2016-09-01 12:47:44 +12:00
Jack Grigg
32a103aab7 Changes after review 2016-09-01 11:48:15 +12:00
Jack Grigg
be86b6c332 Add test for GetNoteDecryptor() 2016-08-31 18:57:32 +12:00
Jack Grigg
02e674555e Add wallet method for finding spendable notes in a CTransaction 2016-08-30 00:29:49 +12: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
Daira Hopwood
ea92aba9fe Move bigint arithmetic implementations to libsnark. 2016-08-22 15:46:58 -06:00
Sean Bowe
f0dab51cf3 Implement zkSNARK compression. 2016-08-22 00:36:12 -06:00
zkbot
365845216b Auto merge of #1268 - ThisIsNotOfficialCodeItsJustForks:t1130-upgrade-libsodium, r=ebfull
Upgrade libsodium for AVX2-detection bugfix.

Upgrades libsodium to bring in an AVX2-detection bugfix (to help with #1130).
2016-08-22 02:34:30 +00:00
zkbot
7e556172d9 Auto merge of #1236 - tomrittervg:tomrittervg-comments-1, r=ebfull
Clarify comment about nonce space for Note Encryption
2016-08-18 23:38:36 +00:00
Taylor Hornby
2902ac7ce8 Use libsodium's s < L check, instead checking that libsodium checks that. 2016-08-18 16:38:20 -06:00
Tom Ritter
36d5f42948 Update NoteEncryption.hpp 2016-08-18 16:51:15 -05:00
zkbot
28a30f7801 Auto merge of #1254 - ebfull:tx-structure-changes, r=bitcartel
Change memo field size and relocate `ciphertexts` field of JoinSplit description

Closes #1190
Closes #1187
2016-08-18 16:49:47 +00:00
ebfull
2ee6ed64eb Add parenthesis around macro value definition 2016-08-18 10:43:58 -06:00
Sean Bowe
f5e5707d4c Change memo field size and relocate ciphertexts field of JoinSplit description. 2016-08-15 09:39:14 -06:00
Tom Ritter
2dd950ecae Clarify comment about nonce space for Note Encryption 2016-08-11 13:48:47 -05:00
Jack Grigg
7c929cf5bc Add support for spending keys to the basic key store 2016-08-09 17:38:25 +12: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
1fad6b87e5 Initialize libsodium in this routine, which is now necessary because libsnark uses its PRNG. 2016-07-15 10:45:22 -06:00
zkbot
6caacc892e Auto merge of #1058 - ebfull:coin-cache, r=ebfull
Flush to disk more consistently by accounting memory usage of serials/anchors in cache.

Closes #626.

It's important that this at least *approximates* the memory usage, so that we flush the cache to disk as expected. It's okay that we overestimate. The serials are stored in keys in the `boost::unordered_map`, so we can simply use that map's `DynamicMemoryUsage`. The anchors are another story.
2016-07-11 17:23:19 +00:00
Sean Bowe
2668a1bc13 Remove the rest of libzerocash. 2016-07-10 20:25:02 -06:00
Sean Bowe
7f3c7a683b Flush to disk more consistently by accounting memory usage of serials/anchors in cache. 2016-06-27 10:52:34 -06:00
zkbot
62a2d12672 Auto merge of #1026 - ebfull:address-serialization, r=ebfull
Zcash address encoding

We need to encode Zcash addresses so they aren't as large and unweildy. We're using Base58Check just like upstream does, and to ensure the first character is "z" in our addresses we must use two bytes for the version string. Two bytes gives us an extra character for free, so this PR targets the beginning of addresses to have "zc".

```
$ ./src/zcash-cli zcrawkeygen
{
    "zcaddress" : "tnvaj4ZbZG83tj4RwZcFeLgJoSt8nw1ZvSCG8EMyowAsXTQgJPat77Y43BVdVCrwrbLy7GG9msJDYdn5hmreHmkXAkX17hb",
    "zcsecretkey" : "SKzkxCRWvscKnroSFyhCqhY332KcDMH4LLNdK2TsSvbmr3CGAB8B",
    "zcviewingkey" : "10aa74046f31cbe5eaa8965d1e104853234c3d6c6e45f9c497ca3a025d159755"
}
```

This PR also encodes the spending keys with a prefix that targets "SK". The spec needs to be updated with these changes.

Testnet addresses will start with "tn".

Closes #572
2016-06-16 18:52:30 +00:00
Sean Bowe
62b7cd6173 Do not encode leading bytes in PaymentAddress serialization; this is a task for a higher-level API. 2016-06-15 14:58:30 -06:00
Sean Bowe
c5f766b9b1 Change merkle tree depth to 29. 2016-06-03 20:42:15 -06:00