Wladimir J. van der Laan
a500df5561
http: Change boost::scoped_ptr to std::unique_ptr in HTTPRequest
...
No need for boost here.
2020-09-30 12:48:35 +01:00
Wladimir J. van der Laan
1f106fa803
http: Add log message when work queue is full
...
More useful error reporting.
2020-09-30 12:48:35 +01:00
Wladimir J. van der Laan
fc9ce9e766
http: Do a pending c++11 simplification
...
Use std::unique_ptr for handling work items.
This makes the code more RAII and, as mentioned in the comment, is what
I planned when I wrote the code in the first place.
2020-09-30 12:48:35 +01:00
Daira Hopwood
b165ead16a
Minor additional OpenSSL scouring.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-09-30 10:44:42 +01:00
Jack Grigg
bab853748e
QA: Remove OpenSSL from updatecheck.py
2020-09-30 00:40:12 +01:00
Jack Grigg
ab35a260d5
Remove remaining OpenSSL references
2020-09-30 00:40:12 +01:00
Jack Grigg
ce1b5491db
util: Remove OpenSSL multithreading infrastructure
2020-09-30 00:40:12 +01:00
Wladimir J. van der Laan
fe49dc5282
build: remove libcrypto as internal dependency in libbitcoinconsensus.pc
2020-09-30 00:40:12 +01:00
fanquake
4526ecf9b2
doc: remove OpenSSL from build instructions and licensing info
2020-09-30 00:40:12 +01:00
fanquake
f477932d38
depends: remove OpenSSL package
2020-09-30 00:40:12 +01:00
fanquake
0ad49bca44
build: remove OpenSSL detection and libs
2020-09-30 00:40:12 +01:00
fanquake
8993f1f708
build: remove SSL lib detection
2020-09-30 00:40:12 +01:00
practicalswift
c28c9b96a1
tests: Remove OldSetKeyFromPassphrase/OldEncrypt/OldDecrypt
2020-09-30 00:40:12 +01:00
Wladimir J. van der Laan
7b3cb48232
Replace scriptnum_test's normative ScriptNum implementation
...
Compare against the scriptnum from Bitcoin Core 0.10 instead of OpenSSL.
Closes #7086 .
2020-09-30 00:40:12 +01:00
Jonas Schnelli
220e166e47
Move uiInterface.NotifyBlockTip signal above the core/wallet signal
...
- This will keep getbestblockhash more in sync with blocknotify callbacks
2020-09-30 00:35:32 +01:00
Jonas Schnelli
66515b0628
NotifyBlockTip signal: switch from hash (uint256) to CBlockIndex*
...
- also adds a boolean for indication if the tip update was happening during initial sync
- emit notification also during initial sync
2020-09-30 00:35:32 +01:00
Wladimir J. van der Laan
23556e690e
http: Restrict maximum size of request line + headers
...
Prevent memory exhaustion by sending lots of data.
Also add a test to `httpbasics.py`.
Closes #6425
2020-09-30 00:35:32 +01:00
Homu
7d94064616
Auto merge of #4643 - str4d:locked-memory-manager, r=str4d
...
Locked memory manager
Add a pool for locked memory chunks, replacing `LockedPageManager`.
Cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#8321
- bitcoin/bitcoin#8753
- bitcoin/bitcoin#9063
- bitcoin/bitcoin#9070
- bitcoin/bitcoin#11385
- bitcoin/bitcoin#12048
- Excludes change to benchmark.
- bitcoin/bitcoin#15117
- bitcoin/bitcoin#16161
- Excludes Travis CI changes.
- Includes change from bitcoin/bitcoin#13163
- bitcoin/bitcoin#15600
- bitcoin/bitcoin#18443
- Assorted small changes from:
- bitcoin/bitcoin#9233
- bitcoin/bitcoin#10483
- bitcoin/bitcoin#10645
- bitcoin/bitcoin#10969
- bitcoin/bitcoin#11351
- bitcoin/bitcoin#19111
- Excludes change to `src/rpc/server.cpp`
- bitcoin/bitcoin#9804
- Only the commit for `src/key.cpp`
- bitcoin/bitcoin#9598
2020-09-29 22:18:48 +00:00
Homu
9245388bbc
Auto merge of #4749 - str4d:update-config-guess-and-sub, r=str4d
...
depends: Update to latest config.guess & config.sub
2020-09-29 02:17:39 +00:00
Homu
94cf4a4946
Auto merge of #4558 - linuxion:master, r=str4d
...
[RPC] Add transaction size to JSON output
Cherry-picked from upstream PR https://github.com/bitcoin/bitcoin/pull/7072 .
2020-09-28 22:40:09 +00:00
Nick
abcce56fe1
[RPC] Add transaction size to JSON output
...
This may be useful for blockchain explorers.
2020-09-28 23:12:21 +01:00
Jack Grigg
f43e3833f3
gitian: Switch from x86_64-unknown-linux-gnu to x86_64-linux-gnu
...
This will work regardless of how config.sub behaves, and matches what
upstream currently uses.
2020-09-28 21:36:46 +01:00
Jack Grigg
bd87bcf1b4
build: Switch to x86_64-pc-linux-gnu for codecov filtering
2020-09-28 21:36:02 +01:00
Jack Grigg
f52793d0d0
QA: Switch to x86_64-pc-linux-gnu for hard-coded Linux HOST
...
The change to config.guess for x86_64:Linux was made here:
http://git.savannah.gnu.org/cgit/config.git/commit/?id=ca9bfb8cc75a2be1819d89c664a867785c96c9ba
2020-09-28 21:28:43 +01:00
Jack Grigg
9384b78c0f
depends: Update map of GCC canonical hosts to Rust targets
...
The updated files now output x86_64-pc-linux-gnu on some platforms where
they previously output x86_64-unknown-linux-gnu.
2020-09-28 18:20:47 +01:00
Jack Grigg
55acaf4bc5
allocators: Apply Allocator named requirements to secure_allocator::deallocate
...
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).
2020-09-28 16:22:43 +01:00
Jack Grigg
66ac442da8
LockedPool: Make Arena::free and LockedPool::free noexcept
...
Attempting to free a detectably invalid pointer should terminate, as
this would be a programming error.
2020-09-28 16:20:06 +01:00
Jack Grigg
fa6921c480
LockedPool: Fix LockedPool::free(nullptr) to be a no-op
...
It was documented as such, but nullptr is never an address within an
Arena, so it would fall through and trigger the std::runtime_error.
2020-09-28 15:46:00 +01:00
str4d
b2b5cccf39
test: Fix LFSR period in comments
...
Verified using a Python implementation.
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-09-26 00:56:20 +01:00
str4d
b5ddac4b71
LockedPool: Switch to HTTPS URLs in licenses and comments
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-09-26 00:30:45 +01:00
Homu
514d868179
Auto merge of #4739 - str4d:update-leveldb, r=str4d
...
Update LevelDB to upstream commit f545dfabf
Cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#7911
- bitcoin/bitcoin#7982
- bitcoin/bitcoin#8133
- bitcoin/bitcoin#8784
- Only the missing changes.
- bitcoin/bitcoin#8826
- bitcoin/bitcoin#8613
- bitcoin/bitcoin#10544
- bitcoin/bitcoin#10633
- Only the changes to files and code we have.
- bitcoin/bitcoin#10806
- bitcoin/bitcoin#10958
- bitcoin/bitcoin#12451
- bitcoin/bitcoin#13925
- bitcoin/bitcoin#15270
This upgrades LevelDB in the exact same commit progression as upstream, up to January 2019.
2020-09-25 16:16:37 +00:00
str4d
f4c78c45b5
leveldb: Fix typo
...
Co-authored-by: Dimitris Apostolou <dimitris.apostolou@icloud.com>
2020-09-25 16:02:52 +01:00
str4d
e2eeabe9e0
Update license headers
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-09-25 16:02:25 +01:00
Jack Grigg
f5582677a6
leveldb: Assert that ssize_t is the same size as size_t on Windows
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-09-25 15:59:05 +01:00
Jack Grigg
3d79da1beb
build: out-of-tree fixups
...
Accidentally excluded from 9cc7497692
when
backporting upstream commit 0cb0f2626e1553426e16a52fc6928d35824827f5.
2020-09-25 15:39:08 +01:00
practicalswift
a3fbfe4efc
Improve readability by removing redundant casts to same type (on all platforms)
2020-09-25 14:56:20 +01:00
Jeremy Rubin
94f7ae6ce8
Fix subscript[0] potential bugs in key.cpp
2020-09-25 14:54:17 +01:00
Homu
e886263547
Auto merge of #4748 - rex4539:fix-typos, r=daira
...
Fix typos
2020-09-25 13:42:27 +00:00
Jack Grigg
8e55824119
depends: Update to latest config.guess & config.sub
2020-09-25 14:11:58 +01:00
Homu
d8ab28426e
Auto merge of #4747 - rex4539:fix-cargo-checksum, r=str4d
...
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
```
2020-09-25 10:29:01 +00:00
Dimitris Apostolou
67ffb189b7
Fix typos
2020-09-25 10:49:57 +03:00
Dimitris Apostolou
4e1d3856ee
Remove reference to cargo-checksum.sh
2020-09-25 07:15:04 +03:00
Homu
8f15f5fcce
Auto merge of #4734 - str4d:2-sodium-2-oxide, r=str4d
...
Replace libsodium BLAKE2b usage with blake2b_simd crate
Extracted from zcash/zcash#4654 .
Also fixes a bug in the `tracing::Span` C++ class.
2020-09-24 23:41:48 +00:00
Homu
9ef15a8415
Auto merge of #4746 - str4d:remove-rust-mingw-workaround, r=ebfull
...
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).
2020-09-24 19:37:22 +00:00
Homu
256d6e33eb
Auto merge of #4743 - str4d:cargo-vendor-cleanups, r=str4d
...
depends: Remove cargo-checksum.sh
Now that we are using `cargo vendor`, the checksum files are computed
automatically.
2020-09-24 16:07:18 +00:00
Jack Grigg
7169cfc0d8
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).
2020-09-24 16:27:42 +01:00
Jack Grigg
0f3baaba71
tracing: Correctly override tracing::Span move constructors
2020-09-24 15:58:19 +01:00
Jack Grigg
02b7d2afa2
blake2b: Allow consuming partial BLAKE2b output
...
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.
2020-09-24 15:58:19 +01:00
Jack Grigg
2d172e121f
Replace libsodium's crypto_generichash_blake2b with blake2b_simd
2020-09-24 15:58:14 +01:00
Homu
31f48caf0e
Auto merge of #4690 - LarryRuane:CopyPreviousWitnessesPart2, r=str4d
...
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).
2020-09-24 13:31:31 +00:00