Commit Graph

9590 Commits

Author SHA1 Message Date
zkbot 4ee9d712b5 Auto merge of #1541 - str4d:upstream-gitian-updates, r=bitcartel
Upstream gitian updates

This PR pulls in all gitian-related PRs that have been merged upstream since 0.11.2. The only ones I left out were documentation-only PRs, because we removed `doc/gitian-building.md` at some point. Here are the commits applied here, in the order shown in `git log` (ie. last to first):

- bitcoin/bitcoin#7283
  - fa42a67
  - fa58c76
- bitcoin/bitcoin#8175
  - 74c1347
- bitcoin/bitcoin#8167
  - 7e7eb27
  - ad38204
  - b676f38
- bitcoin/bitcoin#7776
  - f063863
- bitcoin/bitcoin#7424
  - a81c87f ~ we already partly applied
  - a8ce872
  - f3d3eaf ~ we already partly applied
  - 475813b
  - ~~cd27bf5~~ X we already applied
- bitcoin/bitcoin#7060
  - 3b468a0 ~ we removed doc/gitian-building.md
  - ~~99fda26~~ X we removed doc/gitian-building.md
- bitcoin/bitcoin#7251
  - fa09562
- bitcoin/bitcoin#6900
  - ~~2cecb24~~ X we removed doc/gitian-building.md
  - 957c0fd
  - 2e31d74
  - ~~0b416c6~~ X we removed QT
  - 9f251b7
- bitcoin/bitcoin#6854
  - 579b863 ~ we already partly applied

Part of #540
2016-10-17 01:17:01 -04:00
zkbot e8d28a0acc Auto merge of #1448 - ageis:debian-package, r=bitcartel
Initial packaging for Debian

This adds some source files, a script and skeleton for building a Debian package that installs the zcash daemon and CLI tool.

To test it:

Check out my branch.
Build Zcash binaries: `./zcutil/build.sh`
Build the package: `./zcutil/build-debian-package.sh`
You now have a .deb in the source root folder, so install it: `sudo dpkg -i zcash-1.0.0-rc1-amd64.deb`
Now you can run `zcashd`, `zcash-cli`, and `zcash-fetch-params` from `$PATH`.

This pull request will need further refinement and review, so let's leave it open for a while.
2016-10-17 00:22:50 -04:00
Kevin Gallagher b53b5a63e1 Adds . to blank lines in Google license 2016-10-16 20:53:06 -07:00
Kevin Gallagher dc7db2029c Updates Zcash Core developers -> Zcash developers 2016-10-16 20:24:12 -07:00
Daira Hopwood 80181ffa0a Fix blank lines in DEBIAN/copyright license texts. 2016-10-16 20:10:00 -07:00
Kevin Gallagher 92833e9dd7 Adds additional licenses to Debian copyright file 2016-10-16 19:56:49 -07:00
zkbot ec8dc3a88a Auto merge of #1431 - bitcartel:master_1373_taddr_coinbase_error, r=bitcartel
Return a more informative error message when trying to spend coinbase; select non-coinbase inputs when sending to a transparent output if needed

For #1373 and #1519

Code change:
- Extra parameter added to AvailableCoins to include or exclude Coinbase coins.  Default value of parameter is 'true' as current behaviour is to include Coinbase coins.
- SelectCoins, used for sending taddr->taddr, will now exclude Coinbase coins.

Unit test:
Tried to write a test to focus on the extra parameter added to AvailableCoins but could not.

Empirical testing on Testnet:
Current behaviour is that upstream RPC commands sendfrom and sendtoaddress try to spend coinbase coins returned by AvailableCoins.  So the user will see:

```
./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 1000.0
error: {"code":-6,"message":"Insufficient funds"}

./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 0.00003000
error: {"code":-4,"message":"Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."}

./zcash-cli sendfrom "" mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 0.00003000
error: {"code":-4,"message":"Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."}
```

After fix is applied:

```
./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 1000.0
error: {"code":-6,"message":"Insufficient funds"}

./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 0.00003000
error: {"code":-4,"message":"Coinbase funds can only be sent to a zaddr"}
```

When non-coinbase UTXOs exist, they will now be selected and used:

```
./zcash-cli z_sendmany tnPJZHeVxegCg91utaquBRPEDBGjozfz9iLDHt7zvphFbZdspNgkTVLCGjDcadQBKNyUwKs8pNjDXuEZKrE1aNLpFwHgz4t '[{"address":"mx5fTRhLZwbYE7ZqhAPueZgQGSnwTbdvKU", "amount":0.01}]'

./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 1000.0
error: {"code":-6,"message":"Insufficient funds"}

./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 0.00003000
9818e543ac2f689d4ce8b52087607d73fecd771d45d316a1d9db092f0485aff2

./zcash-cli sendfrom "" mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 0.00003000
899f2894823f51f15fc73b5e0871ac943edbe0ff88e1635f86906087b72caf30
```
2016-10-16 22:08:07 -04:00
Simon 2b1cda3b6a Return improved error message when trying to spend Coinbase coins (#1373).
Extra parameter added to AvailableCoins to include or exclude Coinbase coins.
SelectCoins, used for sending taddr->taddr, will exclude Coinbase coins.

Added qa rpc test and a runtime parameter -regtestprotectcoinbase to enforce
the coinbase->zaddr consensus rule in regtest mode.
2016-10-16 19:05:56 -07:00
zkbot 67ec04e6f4 Auto merge of #1520 - str4d:1502-cache-nullifiers-on-wallet-unlock, r=str4d
Cache nullifiers on wallet unlock

Closes #1502
2016-10-16 17:28:48 -04:00
Jack Grigg 6e263a5fd3
Address review comments 2016-10-16 16:26:51 -05:00
Jack Grigg de064bab95
Update libsnark to include determinism fix 2016-10-16 12:27:01 -05:00
Jack Grigg 7d1c2d0b72
[gitian] Don't call "make check-symbols"
Currently it does not recognise any of the C++11 symbols. We can re-enable this
when either we update it, or upstream migrates to C++11 and does so.
2016-10-15 15:55:28 -05:00
MarcoFalke e2d16e0a86
[gitian] hardcode datetime for depends 2016-10-15 14:16:49 -05:00
MarcoFalke 82f8b4899a
[gitian] Default reference_datetime to commit author date 2016-10-15 14:16:45 -05:00
Wladimir J. van der Laan bf5b79510a
gitian: Add --disable-bench to config flags for windows
Forgot to do this in #7776.
2016-10-15 14:13:16 -05:00
Cory Fields 2e43dcec21
gitian: create debug packages for linux/windows
The -debug tarballs/zips contain detached debugging symbols. To use them, place
in the same dir as the target binary, and invoke gdb as usual.

Also, because the debug symbols add a substantial space requirement, the build
dirs are now deleted when they're no longer needed.
2016-10-15 14:12:55 -05:00
Cory Fields acfb4cf7c5
gitian: use CONFIG_SITE rather than hijacking the prefix 2016-10-15 14:12:53 -05:00
Cory Fields e6fa787a62
depends: allow for CONFIG_SITE to be used rather than stealing prefix
This does not break any existing prefix behavior, only makes new behavior work.

For example:
CONFIG_SITE=$PWD/depends/x86_64-pc-linux-gnu/share/config.site ./configure --prefix=/
2016-10-15 14:12:41 -05:00
Wladimir J. van der Laan 2762638a01
build: Remove unnecessary executables from gitian release
This removes the following executables from the binary gitian release:

- test_bitcoin-qt[.exe]
- bench_bitcoin[.exe]

@jonasschnelli and me discussed this on IRC a few days ago - unlike the
normal `bitcoin_tests` which is useful to see if it is safe to run
bitcoin on a certain OS/environment combination, there is no good reason
to include these. Better to leave them out to reduce the download
size.

Sizes from the 0.12 release:
```
2.4M bitcoin-0.12.0/bin/bench_bitcoin.exe
 22M bitcoin-0.12.0/bin/test_bitcoin-qt.exe
```
2016-10-15 14:09:44 -05:00
Cory Fields 8ef3b1b934
release: add security/symbol checks to gitian 2016-10-15 14:05:04 -05:00
Cory Fields d68e211173
release: always link librt for glibc back-compat builds
glibc absorbed clock_gettime in 2.17. librt (its previous location) is safe to
link in anyway for back-compat.

Fixes #7420
2016-10-15 14:03:23 -05:00
Cory Fields a5e918a07f
release: add check-symbols and check-security make targets
These are not added to the default checks because some of them depend on
release-build configs.

[Zcash: See 56734f4b27 for check-security]
2016-10-15 14:02:29 -05:00
Cory Fields 3797182d51
release: add _IO_stdin_used to ignored exports
For details see: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634261#109
2016-10-15 13:57:41 -05:00
Wladimir J. van der Laan 5494f303a4
gitian: Need `ca-certificates` and `python` for LXC builds
[Zcash: removed doc/gitian-building.md]
2016-10-15 13:54:52 -05:00
MarcoFalke 752a0848f2
[gitian] Set reference date to something more recent 2016-10-15 13:49:49 -05:00
Wladimir J. van der Laan db57ce9d3f
gitian: make windows build deterministic 2016-10-15 13:48:59 -05:00
Wladimir J. van der Laan bdb3f2ce3e
gitian: use trusty for building 2016-10-15 13:48:58 -05:00
Wladimir J. van der Laan 3599031edc
devtools: add libraries for bitcoin-qt to symbol check
Forgot to add these.
Also add a short description for each required library.
2016-10-15 13:48:56 -05:00
Jack Grigg 85fe644139
Remaining changes from bitcoin/bitcoin#6854
Add a check to symbol-check.py that checks that only the subset of
allowed libraries is imported (to avoid incompatibilities).

See 56734f4b27 for the earlier changes.
2016-10-15 13:47:10 -05:00
Jack Grigg a581fe2aae
Only ignore runtime errors caused by failed note decryption 2016-10-14 17:16:09 -05:00
Jack Grigg ddea44a27e
Update comments 2016-10-14 17:16:09 -05:00
Jack Grigg 1a62587e9a
Delay caching of nullifiers when wallet is locked
Closes #1502
2016-10-14 17:16:09 -05:00
Jack Grigg 8f445ee774
Break the RPC test by encrypting the mirroring wallet 2016-10-14 17:14:13 -05:00
Jack Grigg 52fdce985f
Add RPC test showing correct handling of JS txns from blockchain
For unencrypted wallets, the wallet correctly tracks JoinSplits made for their
zkey in a different wallet.
2016-10-14 17:14:13 -05:00
Jack Grigg fb2653ed0e
Add unit test that fails when calling FindMyNotes on a locked wallet 2016-10-14 17:14:13 -05:00
zkbot cc10005247 Auto merge of #1486 - str4d:1456-writewitnesscache-exception-safety, r=bitcartel
WriteWitnessCache: Catch errors and abort transaction

Closes #1452
2016-10-14 17:37:53 -04:00
zkbot 3fceaca3a1 Auto merge of #1506 - bitcartel:master_1478_fix_testnet3_test_issue, r=bitcartel
Stop some wallet tests creating ~/.zcash/testnet3 folder by setting -datadir environment

Closes #1478
2016-10-14 17:03:11 -04:00
Simon b13a87c6d7 Reorder gtests in zcash-gtest.
There is an issue where checktransaction_tests will output errors to ~/.zcash/testnet3/debug.log
because other tests which run before it select the testnet chain parameters.
2016-10-14 13:36:53 -07:00
Simon 6be367ea6d Fix test so that the encrypted wallet is output to the test_bitcoin -datadir folder. 2016-10-14 12:44:22 -07:00
Kevin Gallagher 80eabf2b66 Adds copyright file back to Debian package 2016-10-14 10:37:41 -07:00
4ZEC cc6c9ec05e Correct line swap
Pretty clear the author wanted these two lines in other order.
2016-10-14 13:35:22 -04:00
Kevin Gallagher 1888d3d1bb Adds newline between source and package definition
Also updates doc/release-process.md instructions for the
Debian package and Gitian descriptor.
2016-10-14 09:57:58 -07:00
zkbot 27bc01a05b Auto merge of #1523 - bitcartel:master_1504_z_logging, r=bitcartel
Refine LogPrint debugging for z_* rpc calls

For #1504 ZCA011
2016-10-14 11:11:26 -04:00
Jack Grigg 6da46b692a
Refactor test to clarify expectations 2016-10-14 09:31:26 -05:00
zkbot 6432b8c453 Auto merge of #1499 - arcalinea:document-coinbase-maturity-security, r=bitcartel
Note that Coinbase maturity interval does not protect JoinSplits

Changed wording of Block Chain Reorganization section in security-warnings.md to note that we did not change Coinbase maturity #1387, but that this also does not protect JoinSplits from becoming invalidated in the case of a block chain reorg #953
2016-10-13 23:52:37 -04:00
Kevin Gallagher 3327ef3df0 Moves zcash-fetch-params to /usr/bin
Since the file is managed by the package manager, this is a more appropriate
location for that script. Also updates the timestamp in the changelog.
2016-10-13 20:13:37 -07:00
zkbot bb25bd4bc1 Auto merge of #1533 - bitcartel:master_1447_document_getfilterednotes, r=bitcartel
Document CWallet::GetFilteredNotes

Also fixes return type of method which should be void.

Part of #1447
2016-10-13 20:25:19 -04:00
Simon cb0d208f6b Document CWallet::GetFilteredNotes and fix return type which should be
void.
2016-10-13 17:01:54 -07:00
zkbot 2b29970e28 Auto merge of #1531 - str4d:1447-document-findmynotes, r=bitcartel
Document CWalletTx::FindMyNotes

Part of #1447
2016-10-13 19:51:06 -04:00
Jay Graber 4f61aa6a6a Reword joinsplit anchor paragraph 2016-10-13 16:33:26 -07:00