The named requirements for Allocator are here:
https://en.cppreference.com/w/cpp/named_req/Allocator
It gives the following requirements for `a.deallocate(p, n)`:
> Deallocates storage pointed to `p`, which must be a value returned by
> a previous call to `allocate` that has not been invalidated by an
> intervening call to `deallocate`. `n` must match the value previously
> passed to `allocate`. Does not throw exceptions.
This explicitly excludes both calling `secure_allocator::deallocate` on
`nullptr`, and throwing exceptions of any kind. We address the former by
asserting that `p != nullptr` (because `LockedPool::free` does support
`nullptr`), and we address the latter by adding the `noexcept` keyword
(which the example C++11 allocator on the page above also uses).
Remove reference to cargo-checksum.sh
Leftover after merging https://github.com/zcash/zcash/pull/4743.
Caused compilation warnings of the form:
```
shasum: cargo-checksum.sh: No such file or directory
```
build: Remove Rust staticlib naming workaround
The bug this was working around was fixed in Rust 1.44.0. We now pin
Rust 1.44.1, so we no longer need the workaround (and in fact, it is
necessary to make this change, as rustc no longer generates the old
filename, causing our Windows cross-compile to fail).
The bug this was working around was fixed in Rust 1.44.0. We now pin
Rust 1.44.1, so we no longer need the workaround (and in fact, it is
necessary to make this change, as rustc no longer generates the old
filename).
Some consumers were relying on the libsodium behaviour that the output
length was not checked against the configured hash output length.
blake2b_simd::Hash::as_bytes returns a correctly-sized slice, which we
were then failing to copy into the consumer's buffer. Instead of
requiring the consumer to provide a full-length buffer and then truncate
the output themselves (likely causing a double-copy, as we don't have
nice slices in C++), we instead allow the consumer to consume up to the
maximum output.
Flush witness data when consistent (part 2)
Closes#4680. 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).
Make some conversions explicit to reduce sanitizer warnings
The warnings eliminated by this PR are of the forms, for example:
```
src/chain.h:591:16: runtime error: implicit conversion from type 'unsigned long' of value 18446744073709551615 (64-bit, unsigned) to type 'int' changed the value to -1 (32-bit, signed)
src/scalar_4x64_impl.h:130:110: runtime error: implicit conversion from type 'uint64_t' (aka 'unsigned long') of value 533633915002 (64-bit, unsigned) to type 'unsigned char' changed the value to 122 (8-bit, unsigned)
src/zcash/util.cpp:9:25: runtime error: implicit conversion from type 'uint64_t' (aka 'unsigned long') of value 1000000000 (64-bit, unsigned) to type 'std::vector<unsigned char, std::allocator<unsigned char> >::value_type' (aka 'unsigned char') changed the value to 0 (8-bit, unsigned)
```
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
Address some performance regressions
@str4d identified and fixed some performance regressions in our elliptic curve and proving crates, and we also changed to complete formulas in `bls12_381` to get some better performance in some cases. The result:
```
v3.1.0
"runningtime": 0.59883
before upgrading rust:
"runningtime": 0.823932
after upgrading rust:
"runningtime": 0.83004
after upgrading rust packages:
"runningtime": 0.763065
```
which gets us some of the way back to where we were.
f545dfabf Merge #18: Use utf-8 to decode filename
f8e797a05 Use utf-8 to decode filename
2fc114812 Merge #14: Fixes to allow building with msvc.
d6eab9313 Fixes to allow building with msvc.
git-subtree-dir: src/leveldb
git-subtree-split: f545dfabff4c2e9836efed094dba99a34fbc6b88
524b7e36a Merge #19: Increase maximum read-only mmap()s used from 1000 to 4096 on 64-bit systems
4874cb8d3 Increase maximum number of read-only mmap()s used from 1000 to 4096 on 64 bit systems.
git-subtree-dir: src/leveldb
git-subtree-split: 524b7e36a8e3bce6fcbcd1b5df09024283f325ba
A few "a->an" and "an->a".
"Shows, if the supplied default SOCKS5 proxy" -> "Shows if the supplied default SOCKS5 proxy". Change made on 3 occurrences.
"without fully understanding the ramification of a command" -> "without fully understanding the ramifications of a command".
Removed duplicate words such as "the the".
Zcash: Only the changes to files and code that we have.