Commit Graph
100 Commits
Author SHA1 Message Date
Jack Grigg ee6220c0ed [Bitcoin-Tx] Adjust util-test test cases for Zcash 2018-04-12 19:36:48 -06:00
Jack Grigg abf5dd31af Add static asserts to ensure CONTINUE_EXECUTION doesn't collide 2018-04-12 18:11:46 -06:00
Jack Grigg 176fada24d Add Sapling to upgrade list 2018-04-12 12:13:05 -06:00
Jack Grigg 39ee63c876 When rewinding, reset pindexBestInvalid if it is pointing to a removed block 2018-04-11 21:46:58 -06:00
Jack Grigg 4d234cd2f8 Overwinter mainnet activation height 2018-04-11 20:21:45 -06:00
Jack Grigg 2141de16e8 make-release.py: Updated release notes and changelog for 1.1.0. 2018-04-11 20:15:29 -06:00
Jack Grigg 145ee79099 make-release.py: Updated manpages for 1.1.0. 2018-04-11 20:15:13 -06:00
Jack Grigg f64c346eca make-release.py: Versioning changes for 1.1.0. 2018-04-11 20:02:10 -06:00
Jack Grigg a560c24d6b depends: Update to latest librustzcash with sapling-crypto dependencies 2018-04-11 08:06:40 -06:00
Jack Grigg c63c9f20e4 depends: Add support for unpackaged Rust crates 2018-04-11 08:00:23 -06:00
Jack Grigg b123b9bb79 depends: Upgrade Rust to 1.26.0-beta.3 2018-04-11 07:59:46 -06:00
Jack Grigg 47fe5f72f4 Disable building libzcashconsensus by default
The library is not currently a supported build artifact; it needs work in
order to build on certain platforms (e.g. MacOS), and its dependencies need to
be narrowed down (Equihash is not a requirement for validating scripts).
2018-04-06 15:09:50 +01:00
Jack Grigg ecf544d062 Set Overwinter protocol version to 170005
170004 is the protocol version for the NODE_BLOOM change, which is being
"released" in this RC. The activation height is being set in the final release,
which means that we may end up with both RC and final release versions online
when Overwinter activates. Bumping the protocol version for Overwinter enables
RC nodes to be correctly disconnected.
2018-04-05 12:07:44 +01:00
Jack Grigg 776b494aec make-release.py: Updated release notes and changelog for 1.1.0-rc1. 2018-04-05 03:26:17 +01:00
Jack Grigg 13d491c7bf make-release.py: Updated manpages for 1.1.0-rc1. 2018-04-05 03:26:07 +01:00
Jack Grigg 5e11533408 make-release.py: Versioning changes for 1.1.0-rc1. 2018-04-05 03:08:20 +01:00
Jack Grigg 3fe2f3d143 Update -enforcenodebloom RPC test with filterclear vs filteradd 2018-04-05 01:30:38 +01:00
Jack Grigg 2b7fcab8fc Move bloom filter filtering logic back into command "switch" 2018-04-05 01:30:38 +01:00
Jack Grigg 0a284ecaf6 Fix NODE_BLOOM documentation errors 2018-04-05 01:30:38 +01:00
Jack Grigg b77e46fe01 Add RPC test for -enforcenodebloom 2018-04-05 01:30:38 +01:00
Jack Grigg 10e97b8f00 test: Add missing Overwinter fields to mininode's CTransaction 2018-04-04 22:49:49 +01:00
Jack Grigg 8a22734ec1 test: Check return value of snprintf 2018-04-04 19:18:23 +01:00
Jack Grigg 162cc4240e Fix typo 2018-04-04 14:59:07 +01:00
Jack Grigg 2d7bae5b33 Update CBlockTreeDB::EraseBatchSync for dbwrapper refactor 2018-04-03 21:38:34 +01:00
Jack Grigg 26cdb83add Update blockchain.py RPC test for Zcash 2018-04-03 20:40:54 +01:00
Jack Grigg 3a8e1d0cf4 Refactor Zcash changes to CCoinsViewDB
To match upstream changes.
2018-04-03 20:40:54 +01:00
Jack Grigg 6c44424322 Adjust deprecation message to work in both UI and -alertnotify 2018-04-03 12:17:30 +01:00
Jack Grigg f5007d8912 When rewinding, remove insufficiently-validated blocks
If a block is insufficiently-validated against a particular branch ID, then we
cannot guarantee that even the block header will be valid under the actual
consensus rules the node will want to apply. Instead require that the blocks are
completely re-validated, by removing them from the block index (which is
equivalent to reducing their validity to BLOCK_VALID_UNKNOWN).
2018-04-03 10:58:31 +01:00
Jack Grigg fe87fd2b36 Add RPC test of RewindBlockIndex 2018-04-03 10:58:27 +01:00
Jack Grigg 28915c30ca Fix z_importviewingkey startHeight parameter
Closes #2937.
2018-04-03 02:43:52 +01:00
Jack Grigg 0e400c8854 depends: Fix regex bugs in cargo-checksum.sh 2018-03-30 19:06:51 +01:00
Jack Grigg 9666cc912a Test calling z_mergetoaddress to merge notes while a note merge is ongoing 2018-03-29 15:38:26 -06:00
Jack Grigg b96f7d692d wallet: Cast size_t to uint64_t before passing to UniValue 2018-03-29 01:05:45 +02:00
Jack Grigg 4ff92bb6d8 rpcwallet.cpp: Cast size_t to uint64_t before passing to UniValue 2018-03-29 01:02:58 +02:00
Jack Grigg 8e95a12b63 Cast ZCIncrementalMerkleTree::size() to uint64_t before passing to UniValue
size_t is ambiguous for serialization, and UniValue doesn't have an API for
handling this internally.
2018-03-28 19:51:48 +02:00
Jack Grigg f0118aaa0b Add base case to CurrentEpoch() 2018-03-28 18:29:20 +02:00
Jack Grigg 792c05d8a9 Set PLATFORM flag when compiling libsnark 2018-03-28 18:29:19 +02:00
Jack Griggandkozyilmaz 381a79a909 libsnark: Don't set -static on Darwin
Co-authored-by: kozyilmaz <kazim@monolytic.com>
2018-03-28 18:29:19 +02:00
Jack Grigg 4fe053e6e8 Move explicit instantiation of IncrementalMerkleTree::emptyroots into header
Fixes a -Wundefined-var-template warning with clang.
2018-03-28 18:29:19 +02:00
Jack Grigg 6c7930f688 Use uint64_t instead of size_t for serialized indices into tx.vjoinsplit
size_t has no guarantee of uniform size, and thus far has been serialized as a
uint64_t on supported platforms.
2018-03-28 18:29:19 +02:00
Jack Grigg d58ed91af0 Optimise serialization of MerklePath, avoiding ambiguity of std::vector<bool>
The serialization enforces a maximum supported Merkle tree depth of 64.

Closes #2831.
2018-03-28 18:26:08 +02:00
Jack Grigg d9cd254e5e Make Rust compilation mandatory
The temporary integration check in CheckEquihashSolution() remains, until we
have "real" Rust code to integrate.

Closes #2688.
2018-03-28 17:55:45 +02:00
Jack Grigg 0adfdc99b2 depends: Explicitly download and vendor Rust dependencies
Closes #2231.
2018-03-28 15:46:51 +02:00
Jack Grigg 31afbcc5c9 Ignore -mempooltxinputlimit once Overwinter activates 2018-03-28 14:25:42 +02:00
Jack Grigg b466c1c90c cleanup: Ensure code is pyflakes-clean for CI 2018-03-27 02:47:57 +02:00
Jack Grigg 31e6dde842 snark: Remove -mt suffix from Boost library 2018-03-26 18:28:07 +02:00
Jack Grigg 1c4a74d40b depends: Remove -mt suffix from Boost libraries
Requires disabling --build-type=complete, because in Boost 1.66 it appears to be
broken (only the tagged libraries are built).
2018-03-26 16:33:27 +02:00
Jack Grigg e6e4b619a9 Use correct Boost::System linker flag for libzcash 2018-03-26 16:22:35 +02:00
Jack Grigg e6a34c283a Revert "remove -mt suffix from boost libraries built by depends"
This reverts commit 33ae5edd2c.
2018-03-26 16:20:55 +02:00
Jack Grigg 7346f09026 Only set multicore flags if OpenMP is available 2018-03-19 17:32:21 +01:00
Jack Grigg c64108d1a0 Don't require RELRO and BIND_NOW for Darwin
Xcode's ld (at least ld64-302.3) doesn't support -z
2018-03-19 17:32:21 +01:00
Jack Grigg b7caaf954b test: Move wait_and_assert_operationid_status debug output before asserts
Otherwise we don't see them for failed tests :)
2018-03-19 14:00:18 +01:00
Jack Grigg 7b4d0c7762 Notify users about auto-senescence via -alertnotify
Closes #2829.
2018-03-16 10:25:45 +01:00
Jack Grigg 132a255000 Add link to Overwinter info page 2018-03-13 00:47:10 +00:00
Jack Grigg a6ae8f55ae Split declaration and definition of SPROUT_BRANCH_ID constant
Fixes an initialization-order-fiasco error detected by ASan:
https://ci.z.cash/#/builders/7/builds/149
2018-03-09 09:42:20 +00:00
Jack GriggandRobert Seacord c4379e3a22 Add configure flags for enabling ASan/UBSan and TSan
Co-authored-by: Robert Seacord <rcseacord@gmail.com>
2018-03-01 16:04:42 +00:00
Jack Grigg 326fc65e66 Add environment variable for setting ./configure flags in zcutil/build.sh
Closes #2066.
2018-03-01 16:04:12 +00:00
Jack Grigg 25b080a33b make-release.py: Updated release notes and changelog for 1.0.15. 2018-02-28 16:58:19 +00:00
Jack Grigg f58b1536b4 make-release.py: Updated manpages for 1.0.15. 2018-02-28 16:58:10 +00:00
Jack Grigg 1d6f7acf4d make-release.py: Versioning changes for 1.0.15. 2018-02-28 16:44:07 +00:00
Jack Grigg 138cf77004 Overwinter release notes and testnet activation height
Closes #2957.
2018-02-28 13:19:36 +00:00
Jack GriggandBrad Miller 704b76358d Use block hash comparison for consistency check when loading block index
The Equihash check caused block index loading to take around 38x longer.
However, we don't need to check it directly, as the only paths to writing a
block header to disk already go through a proof-of-work check (e.g. receiving a
block over the network). By forcing the block header inside the CBlockIndex to
be re-serialized, we retain the benefits of the consistency check without the
overhead at startup.

Co-authored-by: Brad Miller <brad@z.cash>
2018-02-27 00:47:56 +00:00
Jack Grigg 34ce29b3ee make-release.py: Updated release notes and changelog for 1.0.15-rc1. 2018-02-24 04:20:05 +00:00
Jack Grigg 7d0c1df409 make-release.py: Updated manpages for 1.0.15-rc1. 2018-02-24 04:17:59 +00:00
Jack Grigg 1dd95be4a9 make-release.py: Versioning changes for 1.0.15-rc1. 2018-02-24 04:08:36 +00:00
Jack Grigg 15ced9b153 wallet_mergetoaddress: Add additional syncs to prevent race conditions 2018-02-23 04:28:04 +00:00
Jack Grigg 713b366231 Regenerate sighash tests 2018-02-23 01:40:08 +00:00
Jack Grigg 50a90615af Document that consensus.chaintip != consensus.nextblock just before an upgrade 2018-02-22 14:01:43 +00:00
Jack Grigg 4c3d2b3bbe Check upgrade status in wallet_overwintertx RPC test 2018-02-22 13:44:40 +00:00
Jack Grigg 2bda6a9b22 Add z_mergetoaddress to release notes 2018-02-22 13:23:25 +00:00
Jack Grigg 553a5c1ab2 Gate z_mergetoaddress as an experimental feature 2018-02-22 13:23:25 +00:00
Jack Grigg 6e9c7629af Implement z_mergetoaddress for combining UTXOs and notes
Closes #2493.
2018-02-22 13:23:18 +00:00
Jack Grigg 44488400c1 Check Equihash solution when loading block index 2018-02-21 22:37:19 +00:00
Jack Grigg ed9aa2b62a Add branch IDs for current and next block to getblockchaininfo
Closes #2974.
2018-02-21 21:18:03 +00:00
Jack Grigg bdbe8e8591 Extend CWallet::GetFilteredNotes to enable filtering on a set of addresses 2018-02-20 13:19:07 +00:00
Jack Grigg 4553901850 Use v3 transactions with caching for validatelargetx benchmark 2018-02-20 04:22:22 +00:00
Jack Grigg 818b94f94f Make number of inputs configurable in validatelargetx test 2018-02-20 04:22:22 +00:00
Jack Grigg a3353b4e01 Regenerate SignatureHash tests 2018-02-20 04:22:21 +00:00
Jack Grigg d55e5e778b Cleanup: Wrap function arguments 2018-02-20 04:22:21 +00:00
Jack Grigg be12669982 Add consensus branch ID parameter to SignatureHash, remove SigVersion parameter
We do not need to be able to calculate multiple SignatureHash versions for a
single transaction format; instead, we use the transaction format to determine
the SigVersion.

The consensus branch ID *does* need to be passed in from the outside, as only
the caller knows the context in which the SignatureHash is being calculated
(ie. mempool acceptance vs. block validation).

JoinSplit signature verification has been moved into ContextualCheckTransaction,
where the consensus branch ID can be obtained.

The argument to the sign command for zcash-tx has been modified to take a height
in addition to the optional sigtype flags.
2018-02-20 04:22:20 +00:00
Jack Grigg e005ff83ab Remove P2WPKH and P2WSH from signing logic
Separated from the previous commit for ease of review.
2018-02-20 04:22:19 +00:00
Jack Grigg 34a64fe0a2 Remove mempool transactions which commit to an unmineable branch ID 2018-02-20 02:57:44 +00:00
Jack Grigg cb580c7241 Add rollback limit to block index rewinding
This will prevent users from starting their nodes if they switch between
software versions that implement different network upgrades. It will also
prevent users from using the testnet if they have more than MAX_REORG_LIMIT
post-upgrade blocks, and the upgrade point is shifted in a newer software
version.
2018-02-19 16:32:45 +00:00
Jack Grigg 57e6ecda5a Implement roll-back limit for reorganisation
Closes #713.
2018-02-19 16:32:42 +00:00
Jack Grigg 46d3762a90 Update SignatureHash tests for transaction format changes
The test uses randomly-generated transactions, some of which fell outside the
actual consensus rules.
2018-02-16 10:10:35 -08:00
Jack Grigg cad27eb77f Update quote from ZIP 200 2018-02-06 23:18:56 +00:00
Jack Grigg 5009136dc3 Change UI/log status message for block rewinding 2018-02-06 22:49:08 +00:00
Jack Grigg 828940b163 Use a boost::optional for nCachedBranchId
This enables us to distinguish between it being unset vs. being set to zero.
2018-02-06 22:42:18 +00:00
Jack Grigg 149d69e36b Add method for fetching the next activation height after a given block height 2018-02-04 22:58:42 +00:00
Jack Grigg 548683767c Add Overwinter to upgrade list 2018-02-04 22:58:42 +00:00
Jack Grigg 9e851450ab Adjust rewind logic to use the network upgrade mechanism 2018-02-04 22:58:42 +00:00
Jack Grigg f52da91139 Test network upgrade logic
Also demonstrates how to specify a network upgrade.
2018-02-04 22:58:39 +00:00
Jack Grigg b174b7e330 Allow changing network upgrade parameters on regtest
Derived from upstream commit 56c87e92110f05d7452f1e85bf755246ffc77206:
    Allow changing BIP9 parameters on regtest
2018-02-04 22:57:59 +00:00
Jack Grigg 780f526bc9 Network upgrade activation mechanism 2018-02-04 22:57:56 +00:00
Jack Grigg 35d64c1fde Use JoinSplitTestingSetup for Boost sighash tests
Symptom: When running all tests, the test suite passed. But when running the
sighash tests on their own, the test suite segfaulted.

Cause: The sighash tests depend on the proving parameters being accessible, but
BasicTestingSetup doesn't load them.
2018-01-31 15:31:51 +00:00
Jack Grigg 9e8f1d09ca zkey_import_export: Synchronize mempools before mining
Resolves a race condition that caused the RPC test to intermittently fail.

Closes #2892.
2018-01-22 21:10:57 +00:00
Jack Grigg 40ebf08ff8 Add viewing key prefix to regtest parameters 2018-01-22 15:32:52 +00:00
Jack Grigg ff145dfe32 Add missing namespace for boost::get 2018-01-22 10:30:41 -05:00
Jack Grigg 6bfa0fb79d make-release.py: Updated release notes and changelog for 1.0.14. 2018-01-03 23:54:16 +01:00
Jack Grigg d3c1949cf1 make-release.py: Updated manpages for 1.0.14. 2018-01-03 23:54:00 +01:00