Commit Graph

14255 Commits

Author SHA1 Message Date
MarcoFalke f204f575aa Add extra LevelDB source to Makefile 2020-09-23 00:07:48 +01:00
Cory Fields f261701265 leveldb: enable runtime-detected crc32 instructions 2020-09-23 00:07:48 +01:00
Pieter Wuille c333e99eca Update to LevelDB 1.20 2020-09-23 00:07:10 +01:00
Jack Grigg f67e496552 Squashed 'src/leveldb/' changes from a31c8aa40..196962ff0
196962ff0 Add AcceleratedCRC32C to port_win.h
1bdf1c34c Merge upstream LevelDB v1.20
d31721eb0 Merge #17: Fixed file sharing errors
fecd44902 Fixed file sharing error in Win32Env::GetFileSize(), Win32SequentialFile::_Init(), Win32RandomAccessFile::_Init() Fixed error checking in Win32SequentialFile::_Init()
5b7510f1b Merge #14: Merge upstream LevelDB 1.19
0d969fd57 Merge #16: [LevelDB] Do no crash if filesystem can't fsync
c8c029b5b [LevelDB] Do no crash if filesystem can't fsync
a53934a3a Increase leveldb version to 1.20.
f3f139737 Separate Env tests from PosixEnv tests.
eb4f0972f leveldb: Fix compilation warnings in port_posix_sse.cc on x86 (32-bit).
d0883b600 Fixed path to doc file: index.md.
7fa20948d Convert documentation to markdown.
ea175e28f Implement support for Intel crc32 instruction (SSE 4.2)
95cd743e5 Including <limits> for std::numeric_limits.
646c3588d Limit the number of read-only files the POSIX Env will have open.
d40bc3fa5 Merge #13: Typo
ebbd772d3 Typo
a2fb086d0 Add option for max file size. The currend hard-coded value of 2M is inefficient in colossus.

git-subtree-dir: src/leveldb
git-subtree-split: 196962ff01c39b4705d8117df5c3f8c205349950
2020-09-23 00:06:36 +01:00
Pieter Wuille 8dbec779e1 Merge in LevelDB 1.19 changes 2020-09-23 00:05:47 +01:00
Jack Grigg b4be0846d5 Squashed 'src/leveldb/' changes from 20ca81f08..a31c8aa40
a31c8aa40 Add NewAppendableFile for win32 environment
1913d718e Merge upstream LevelDB 1.19
3080a45b6 Increase leveldb version to 1.19.
fa6dc010a A zippy change broke test assumptions about the size of compressed output. Fix the tests by allowing more slop in zippy's behavior. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=123432472
06a191b8d fix problems in LevelDB's caching code
a7bff697b Fix LevelDB build when asserts are enabled in release builds. (#367)
ea992b467 Change std::uint64_t to uint64_t (#354)
e84b5bdb5 This CL fixes a bug encountered when reading records from leveldb files that have been split, as in a [] input task split.
321134390 Deleted redundant null ptr check prior to delete.
7306ef856 Merge pull request #348 from randomascii/master
6b18316d0 Fix signed/unsigned mismatch on VC++ builds
adbe3eb07 Putting build artifacts in subdirectory.
2d0320a45 Merge pull request #329 from ralphtheninja/travis-badge
dd1c3c357 add travis build badge
43fcf23af Merge pull request #328 from cmumford/master
9fcae6164 Added a Travis CI build file.
dac40d25f Merge pull request #284 from ideawu/master
8ec241a3b Merge pull request #317 from falvojr/patch-1
5d36bedd1 Merge pull request #272 from vapier/master
4753c9b61 Added a contributors section to README.md
e2446d084 Merge pull request #275 from paulirish/patch-1
706b7f8d4 Resolve race when getting approximate-memory-usage property
3c9ff3c69 Only compiling TrimSpace on linux.
f8d205cf8 Including atomic_pointer.h in port_posix
889de31a5 Let LevelDB use xcrun to determine Xcode.app path instead of using a hardcoded path.
528c2bc6a Add "approximate-memory-usage" property to leveldb::DB::GetProperty
359b6bcec Add leveldb::Cache::Prune
50e77a826 Fix size_t/int comparison/conversion issues in leveldb.
5208e7952 Added leveldb::Status::IsInvalidArgument() method.
ce45404bb Suppress error reporting after seeking but before a valid First or Full record is encountered.
b9afa1f2e include <assert> -> <cassert>
edf2939c0 Update README.md
65190ac48 Will not reuse manifest if reuse_logs options is false.
ac1d69da3 LevelDB now attempts to reuse the preceding MANIFEST and log file when re-opened.
76bba139c fix indent
8fcceb2a6 log compaction output file's level along with number
0e0f07417 documentation. improved link
c85addcdf readme: improved documentation link
ceff6f121 Fix Android/MIPS build.
77948e7ee Add benchmark that measures cost of repeatedly opening the database.
34ad72e3e Move header guard below copyright banner.
a75d435d1 Clean up layering of storage/leveldb/...
b234f65b3 Added a new fault injection test.
c4c38f9c1 Add arm64 support to leveldb.
cea9b10e5 Fixed incorrect comment wording for Iterator::Seek.
c00c569f2 Deleted old README file.

git-subtree-dir: src/leveldb
git-subtree-split: a31c8aa408d5594830f7cb20ead1ef1dff51b79e
2020-09-23 00:04:47 +01:00
Pavel Janík 1e66c822c3 Do not include env_win.cc on non-Windows systems 2020-09-22 23:08:42 +01:00
Luke Dashjr 7bf4f0b7e7 Add MIT license to Makefiles 2020-09-22 23:08:01 +01:00
Cory Fields 9cc7497692 build: out-of-tree fixups
Don't glob the leveldb for dist. That means we need to enumerate the headers.
2020-09-22 23:05:50 +01:00
Cory Fields a0336af870 build: No need to check for leveldb atomics
They're guaranteed with c++11
2020-09-22 23:03:22 +01:00
Cory Fields 58d1bbfe6f leveldb: integrate leveldb into our buildsystem
leveldb's buildsystem causes us a few problems:
- breaks out-of-tree builds
- forces flags used for some tools
- limits cross builds

Rather than continuing to add wrappers around it, simply integrate it into our
build.
2020-09-22 23:01:06 +01:00
Sean Bowe 52777e6d74
Update to latest zcash_* and zkcrypto crates. 2020-09-22 15:15:25 -06:00
Sean Bowe 16e91b0534
cargo update 2020-09-22 15:07:27 -06:00
Sean Bowe 03ce24013a
Update Rust to 1.44.1. 2020-09-22 15:06:01 -06:00
Homu c9672a49c2 Auto merge of #4696 - str4d:3640-z_sendmany-any-taddr, r=str4d
wallet: Add ANY_TADDR special string to z_sendmany

When using this special string as the from address, non-coinbase UTXOs
from any transparent addresses within the wallet will be used to fund the
transaction. Change outputs will be sent to a new transparent address,
as with any other spend of transparent funds.

Closes zcash/zcash#3640.
2020-09-22 18:09:58 +00:00
Jack Grigg 3311a85dbe rpc: Fix comma spacing in example z_sendmany commands 2020-09-22 17:45:09 +01:00
Jack Grigg e33f530a65 wallet: Ignore coinbase UTXOs with z_sendmany ANY_TADDR
Coinbase UTXOs from multiple transparent addresses may be shielded
together using z_shieldcoinbase.
2020-09-22 17:45:09 +01:00
Homu 8dcab5ee3b Auto merge of #4737 - nathan-at-least:link-to-read-the-docs-build-instructions, r=daira
Link README.md to readthedocs.io page for building on Debian/Ubuntu.
2020-09-22 07:14:13 +00:00
Daira Hopwood fbca35e9df
Line-wrap addition to README.md 2020-09-22 08:12:30 +01:00
Nate Wilcox 933e841a7a Link the README.md to the specific readthedocs.io page for building on Debian/Ubuntu. 2020-09-22 01:22:58 +00:00
Homu 35bb61be39 Auto merge of #4725 - str4d:cargo-vendor, r=str4d
depends: Switch to `cargo vendor` for Rust dependencies

When we first integrated Rust into our build system, we had two
limitations:

- We were building the `librustzcash` FFI library as a dependency, and
  therefore needed access to its crate dependencies in the depends
  system.
- Gitian builds happen offline, so we needed to fetch any crate
  dependencies ahead of time, and then configure cargo to use these in
  an offline environment.

At the time, `cargo` already had support for "Source Replacement", but
there was no easy way to package the dependencies in the necessary way.
What we implemented was effectively the `cargo-vendor` tool, built using
Makefiles. A noticeable downside was that we were pinning dependencies
twice: once in the `Cargo.lock` for the FFI library, and again in our
depends system.

Since then, `cargo-vendor` has been upstreamed into `cargo` itself, and
we have moved `librustzcash` into this repository. We can therefore use
`cargo vendor` directly from our pinned Rust compiler to fetch the
dependencies, and rely on our local `Cargo.lock` to pin the specific
crates we are relying on.
2020-09-19 12:37:51 +00:00
Jack Grigg 2449349882 depends: Ensure that SOURCES_PATH exists before vendoring crates
During Gitian builds, SOURCES_PATH is set to a path within the Gitian
cache. Normally this path is created as part of creating a particular
dependency's source directory, but in some situations we may vendor Rust
crates before this folder exists.
2020-09-19 13:35:36 +01:00
Jack Grigg c36ad21e74 QA: Comment out Rust crate checks in updatecheck.py
https://github.com/zcash/zcash/issues/4726 has been opened to track
fixing this.
2020-09-19 13:35:36 +01:00
Jack Grigg 549bf2dfa8 depends: Switch to `cargo vendor` for Rust dependencies
When we first integrated Rust into our build system, we had two
limitations:

- We were building the `librustzcash` FFI library as a dependency, and
  therefore needed access to its crate dependencies in the depends
  system.
- Gitian builds happen offline, so we needed to fetch any crate
  dependencies ahead of time, and then configure cargo to use these in
  an offline environment.

At the time, `cargo` already had support for "Source Replacement", but
there was no easy way to package the dependencies in the necessary way.
What we implemented was effectively the `cargo-vendor` tool, built using
Makefiles. A noticeable downside was that we were pinning dependencies
twice: once in the `Cargo.lock` for the FFI library, and again in our
depends system.

Since then, `cargo-vendor` has been upstreamed into `cargo` itself, and
we have moved `librustzcash` into this repository. We can therefore use
`cargo vendor` directly from our pinned Rust compiler to fetch the
dependencies, and rely on our local `Cargo.lock` to pin the specific
crates we are relying on.
2020-09-18 22:55:57 +01:00
Homu b8650d6f41 Auto merge of #4732 - zcash:3786_review_dependencies, r=str4d
Postponed dependency updates, refer to core team sync meeting.
2020-09-18 11:13:49 +00:00
zebambam 0314ad1a53 Postponed dependency updates, refer to core team sync meeting. 2020-09-16 09:48:55 -07:00
Homu 6f9b281ef7 Auto merge of #4706 - str4d:4705-nuparams-config-file, r=daira
Allow multiple nuparams options in config file

We didn't add this in zcash/zcash#4583 because `-nuparams` is only ever
used as a CLI argument in our testing infrastructure. It turns out that
there are external developers using regtest mode with `nuparams` in
their config files instead. Neat!

Closes zcash/zcash#4705.
2020-09-06 12:49:47 +00:00
Larry Ruane 81db0a2fc7 Flush witness data when consistent (part 2)
After CWallet::ChainTipAdded() updates the witness data, it
may flush it to disk (SetBestChain()); make sure the locator
part is consistent with the witnesses (height).
2020-09-05 07:21:11 -06:00
Jack Grigg 566e0d38b4 Allow multiple nuparams options in config file
We didn't add this in zcash/zcash#4583 because `-nuparams` is only ever
used as a CLI argument in our testing infrastructure. It turns out that
there are external developers using regtest mode with `nuparams` in
their config files instead. Neat!

Closes zcash/zcash#4705.
2020-09-04 19:00:38 +01:00
Homu f8e1a02bbe Auto merge of #4561 - oxarbitrage:issue1873, r=daira
Allow full and relative path wallet database location

Closes https://github.com/zcash/zcash/issues/1873
2020-09-04 14:49:50 +00:00
Daira Hopwood fbe68913bd Ensure that the absolute path used in the test definitely does not exist.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-09-04 14:52:11 +01:00
Daira Hopwood 21fee305a2 Fix grammar in error messages.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-09-04 14:52:05 +01:00
Alfredo Garcia dc9c95b705 Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
2020-09-04 14:50:17 +01:00
Alfredo Garcia 6a7cfdea54 allow wallet file to be outside datadir 2020-09-04 14:50:17 +01:00
Homu 7e958be2cb Auto merge of #4300 - oxarbitrage:issue3939, r=nuttycom
add shielded balance to getwalletinfo

Closes zcash/zcash#3939

It is based on the definition that unconfirmed balance has 0 confirmations; anything else is regular balance.

Implementation:

1. `getBalanceZaddr` uses one version of `GetFilteredNotes`, we want to use the other version that allow us to get balances inside min and max confirmations.
2. `shielded_unconfirmed_balance`, and `shielded_balance` are obtained by calling `getBalanceZaddr` with different min and max confirmations according to the definitions from above.
2020-09-04 13:29:58 +00:00
Kris Nuttycombe 9d8555cf1b Fix forward declaration. 2020-09-04 07:29:24 -06:00
Homu 443954580d Auto merge of #4687 - defuse:fix-cscript-test-buffer-overflows, r=daira
Fix buffer overflows in P2PKH tests
2020-09-03 22:16:23 +00:00
Homu af6ca1406c Auto merge of #4357 - oxarbitrage:issue2880, r=daira
Add null check to feof

Closes https://github.com/zcash/zcash/issues/2880
2020-09-03 18:51:37 +00:00
Homu cf8cd09ae1 Auto merge of #4349 - oxarbitrage:issue3996, r=daira
Prevent creation of shielded transactions when chain is not synced up

Part of zcash/zcash#3996.

Inspired by jl777/komodo#1486 and jl777/komodo#1493, but takes a different approach:

- Uses a function `ThrowIfInitialBlockDownload()` that checks `IsInitialBlockDownload()`, instead of macros.
- Added `initial_block_download_complete` output only to `getblockchaininfo`.
2020-09-03 16:21:51 +00:00
Homu 3caa784970 Auto merge of #2778 - syd0:add-python-assert, r=daira
Add assert_raises_message to the python test framework.
2020-09-03 14:26:54 +00:00
Daira Hopwood bd4469339a
Rename z_*_balance fields of getwalletinfo output to shielded_*_balance 2020-09-03 14:43:10 +01:00
Kris Nuttycombe 4c4a1c4d68 Revert the move of the `getBalanceZaddr` block for ease of review. 2020-09-03 07:34:01 -06:00
Kris Nuttycombe 48149defab Prevent creation of shielded transactions in initial block download.
Author: Alfredo Garcia <oxarbitrage@gmail.com>
Co-authored-by: Jack Grigg <jack@z.cash>
Co-authored-by: Duke Leto <duke@leto.net>
2020-09-03 07:13:50 -06:00
Homu ef62a1c5e4 Auto merge of #4688 - defuse:fix-rpc-test-string-interpolation, r=daira
Add a missing % to a string interpolation in rpc test framework
2020-09-03 13:06:45 +00:00
Homu 5e7e9687fc Auto merge of #4702 - ebfull:release-v4.0.0, r=ebfull
Release v4.0.0

This release activates [Canopy](https://z.cash/upgrade/canopy/) on the 4 year anniversary of the launch of the Zcash network!
2020-09-01 20:58:51 +00:00
Sean Bowe 02c5f089cf
minor: Add backticks to avoid formatting in 4.0.0 release notes. 2020-09-01 14:58:04 -06:00
Sean Bowe 505495a73d
make-release.py: Updated release notes and changelog for 4.0.0. 2020-09-01 13:31:19 -06:00
Sean Bowe eedd28599b
make-release.py: Updated manpages for 4.0.0. 2020-09-01 13:31:19 -06:00
Sean Bowe 01d1ea5f0f
make-release.py: Versioning changes for 4.0.0. 2020-09-01 13:28:51 -06:00
Sean Bowe 539e487a31
Postpone updates for dependencies until after 4.0.0 release. 2020-09-01 13:24:08 -06:00