Output Equihash solution in RPC results as a hex string
When the Equihash solution was changed to a compact form in #1175, the block header changed from storing a vector of indices to a vector of chars. `blockToJSON()` was not updated, which meant that RPC calls like `getblock` returned the solution as a list of 1344 integers.
This PR changes `blockToJSON()` to output the Equihash solution as a hex string, identical to how it appears in the block header.
Undo debugging change from 5be6abbf84
This was unintentionally committed, and caused Equihash verification of blocks
without parents to be skipped. This only affects the genesis block on the test
network, but also causes the "time verifyequihash" benchmark to incorrectly
appear instantaneous.
This was unintentionally committed, and caused Equihash verification of blocks
without parents to be skipped. This only affects the genesis block on the test
network, but also causes the "time verifyequihash" benchmark to incorrectly
appear instantaneous.
RPC calls to manage zkey creation, management and backup
Rebased on PR #1205 for keystore functionality.
For #1197, implements:
z_getnewaddress
z_importkey
z_exportkey
For #1198, spending key support added to:
z_exportwallet
z_importwallet
Example dump file containing zkeys:
https://gist.github.com/bitcartel/d7013b30b19419c6a550bc5d6ff6cc47
Also adds:
z_listaddresses
Tests in:
gtest/test_wallet_zkeys
test/rpc_wallet_tests
Fix formatting of first paragraph of payment API document
The description of taddr and zaddr were bunched up one line. This PR fixes the issue.
Self-ACK. Please merge.
Fix inconsistent -O1/-O2, fix libzcash flags, add -fwrapv -fno-strict-aliasing
Closes#1168. In that ticket I decided the optimization flags for dependencies are out of scope, i.e. we go with whatever the upstream package maintainer chose.
Implement zkSNARK compression
Implement zkSNARK compression.
The serialization format of zkSNARKs has now been specified in our protocol specification. G1/G2 elements are now compressed into 33 byte and 65 byte formats, repsectively. `MONTGOMERY_OUTPUT` is enabled everywhere to make proving/verifying keys load faster and be consistent with the MPC.
Proofs are now 296 bytes. This PR also updates the proving and verifying keys.
Closes#1103. Closes#471.
See also https://github.com/zcash/libsnark/pull/3 and https://github.com/zcash/libsnark/pull/4