Commit Graph

17353 Commits

Author SHA1 Message Date
Russell Yanofsky 79e13d571a depends: Set CMAKE_INSTALL_RPATH for native packages
After #19685 started setting LDFLAGS, the INSTALL_RPATH_USE_LINK_PATH cmake
option used in the libmultiprocess build no longer works, so it is neccessary
to set CMAKE_INSTALL_RPATH as a fallback.

It's unclear currently whether the bad interaction between
INSTALL_RPATH_USE_LINK_PATH and LDFLAGS is a bug, but the issue is reported:

  https://github.com/bitcoin/bitcoin/issues/19981#issuecomment-696680877
  https://discourse.cmake.org/t/install-rpath-use-link-path-not-working-when-cmake-exe-linker-flags-ldflags-is-set/1892

Commands useful for building / testing this change

  make -C depends MULTIPROCESS=1 print-libmultiprocess_cmake
  make -C depends MULTIPROCESS=1 print-native_libmultiprocess_cmake
  make -C depends MULTIPROCESS=1 HOST=x86_64-apple-darwin16 print-libmultiprocess_cmake

  rm -rvf depends/x86_64-pc-linux-gnu/native depends/work/staging depends/work/build
  make -C depends MULTIPROCESS=1 V=1 native_libmultiprocess_staged
  for f in `find -name mpgen`; do echo == $f ==; readelf -d $f | grep -i path; done

  make -C depends MULTIPROCESS=1 V=1 native_libmultiprocess_built
  find -name CMakeCache.txt

Fixes #19981

(cherry picked from commit bitcoin/bitcoin@7d0271b5c3)
2023-01-11 20:54:37 +00:00
Carl Dong 0502af1bca depends: Specify LDFLAGS to cmake as well
(cherry picked from commit bitcoin/bitcoin@b893688357)
2023-01-11 20:54:37 +00:00
Carl Dong 34dc8df2e3 depends: Prepend CPPFLAGS to C{,XX}FLAGS for CMake
This is similar to how we do it for qt.mk.

(cherry picked from commit bitcoin/bitcoin@b3f541f618)
2023-01-11 20:54:37 +00:00
Carl Dong 737478475f depends: Cleanup CMake invocation
(cherry picked from commit bitcoin/bitcoin@8e121e5509)
2023-01-11 20:54:37 +00:00
Carl Dong ea3360c847 depends: More robust cmake invocation
Specify well-known env vars instead of using a workaround to split up CC
and CXX.

(cherry picked from commit bitcoin/bitcoin@8c7cd0c6d9)
2023-01-11 20:54:37 +00:00
Russell Yanofsky 135dbd01fc depends: Add CMake helper for building packages
(Adapted from commit bitcoin/bitcoin@603fd6a2e7)
2023-01-11 20:54:37 +00:00
str4d 6cf12411bf
Merge pull request #6316 from sellout/remove-outdated-sprout-tests
Remove outdated Sprout tests
2023-01-11 20:47:45 +00:00
str4d d766de5e67
Merge pull request #6337 from str4d/update-rust-deps
Update Rust dependencies
2023-01-11 17:45:39 +00:00
Jack Grigg 7b57138b92 clearscreen 2.0 2023-01-11 01:01:30 +00:00
Jack Grigg 7cf42562d3 zcash_primitives 0.9 2023-01-11 00:56:29 +00:00
Jack Grigg 34add5589d cargo update
The audit exemptions were adjusted to make best use of the imported
audits.
2023-01-11 00:46:19 +00:00
Greg Pfeil 86c019fdfb
Update overwinter test to not shield to Sprout 2023-01-10 15:22:50 -07:00
Greg Pfeil 1c2a406f32
Use cached sprout addresses rather than funding 2023-01-10 15:22:50 -07:00
Greg Pfeil 1951a1fc46
No longer test_received_sprout 2023-01-10 15:22:49 -07:00
Kris Nuttycombe 8f3083c7f6
Update `mergetoaddress_mixednotes.py` to no longer send to Sprout. 2023-01-10 15:22:49 -07:00
Kris Nuttycombe f31370a15b
Remove wallet_shieldcoinbase_sprout test.
Shielding coinbase outputs to Sprout is no longer supported.
2023-01-10 15:22:49 -07:00
Kris Nuttycombe 819db74cea
Remove mergetoaddress_sprout test as sending to Sprout is no longer supported. 2023-01-10 15:22:49 -07:00
str4d 8dbba8e109
Merge pull request #6311 from sandakersmann/patch-2
Add some more historical checkpoints
2023-01-10 21:56:17 +00:00
Jack Grigg af92e3f449 qa: Remove audit-as-crates-io for non-third-party crates
We only need these lines when we have a git dependency on our Rust
crates.
2023-01-10 15:21:49 +00:00
Jack Grigg 172ac8516f qa: Import Rust crate audits from Embark Studios 2023-01-10 14:57:04 +00:00
Jack Grigg ea9dab68e4 qa: Import Rust crate audits from the Bytecode Alliance 2023-01-10 14:56:06 +00:00
Jack Grigg 3ed999c397 qa: Import Rust crate audits from Firefox 2023-01-10 14:54:54 +00:00
str4d 164e090a1b
Merge pull request #6310 from str4d/6307-backport-mempool-packages
Backport mempool package tracking
2023-01-09 17:06:04 +00:00
Jack Grigg 73a43638b1 qa: Update mempool_packages RPC test after deprecation ratcheting 2023-01-09 10:30:33 +00:00
Jack Grigg a33b8529ff Merge branch 'master' into 6307-backport-mempool-packages 2023-01-06 23:55:37 +00:00
Kris Nuttycombe 20996b4eb7
Merge pull request #6282 from str4d/ratchet-feature-deprecation
Ratchet feature deprecation
2023-01-06 11:58:27 -07:00
Jack Grigg 5cc15a881a qa: Change show_help RPC test to print out differences 2023-01-05 22:32:19 +00:00
Jack Grigg 0ff86213ce Deprecate old hash fields of `getblocktemplate` 2023-01-05 22:32:19 +00:00
Jack Grigg 09cd65327b Disable previously-deprecated features by default
These features were deprecated at least 3 minor releases ago. I found
one mistake which was that `z_validateaddress` had not been placed
behind the `addrtype` deprecated feature; this has been fixed.
2023-01-05 22:32:19 +00:00
str4d 7b1fce45d6
Merge pull request #6314 from str4d/6306-fix-iterator-type
txdb: Remove const annotation from blockinfo iterator type
2023-01-03 23:08:59 +00:00
Jack Grigg a31252a8d8 txdb: Clean up for loop syntax in `WriteBatchSync` 2023-01-03 19:55:05 +00:00
Jack Grigg 37921677e9 Remove `zcraw*` RPC methods 2023-01-03 12:35:53 +00:00
Jack Grigg ad8bd0d254 qa: Refactor `wallet_deprecation` test to simplify deprecation changes 2023-01-03 12:35:53 +00:00
Jack Grigg 2651451454 Remove `dumpwallet` RPC method
The RPC method handler is left in as a tombstone, to redirect callers to
the replacement method (as this is an upstream Bitcoin Core RPC method
that users may expect to be present).
2023-01-03 12:35:52 +00:00
Jack Grigg fb7eb1dad6 txdb: Remove const annotation from blockinfo iterator type
The const annotation was removed from the blockinfo type in
zcash/zcash#6192, but not from the type of its iterator. Recent Clang
versions are able to handle this, but GCC 11 (and it appears older Clang
versions) raise an error.

Closes zcash/zcash#6306.
2023-01-03 12:07:47 +00:00
Jack Grigg c16b1e8c24 test: Improve CreateNewBlock_validity exception checks 2022-12-20 11:41:04 +00:00
Alex Morcos 45355e85d0 Rewrite CreateNewBlock
Use the score index on the mempool to only add sorted txs in order.  Remove much of the validation while building the block, relying on mempool to be consistent and only contain txs that can be mined.
The mempool is assumed to be consistent as far as not containing txs which spend non-existent outputs or double spends, and scripts are valid.  Finality of txs is still checked (except not coinbase maturity, assumed in mempool).
Still TestBlockValidity in case mempool consistency breaks and return error state if an invalid block was created.
Unit tests are modified to realize that invalid blocks can now be constructed if the mempool breaks its consistency assumptions and also updated to have the right fees, since the cached value is now used for block construction.

Conflicts:
	src/miner.cpp

(cherry picked from commit bitcoin/bitcoin@553cad94e2)

Zcash: Merged in our changes.
2022-12-20 11:41:04 +00:00
Alex Morcos f18c96d7ae Expose FormatStateMessage
(cherry picked from commit bitcoin/bitcoin@5f12263302)
2022-12-20 08:57:33 +00:00
Alex Morcos 0d9a5442eb Make accessing mempool parents and children public
(cherry picked from commit bitcoin/bitcoin@1f09287c66)
2022-12-20 08:57:33 +00:00
Mark Friedenbach 38e319a88f Prevent block.nTime from decreasing
Under some circumstances it is possible for there to be a significant,
discontinuous jump in a node's clock value. On mining nodes, this can
result in block templates which are no longer valid due to time-based
nLockTime constraints. UpdateTime() is modified so that it will never
decrease a block's nLockTime, thereby preventing such invalidations.

(cherry picked from commit bitcoin/bitcoin@ef8dfe41d1)

Zcash: Updated CreateNewBlock_validity test and wallet_1941 RPC test to
ensure we satisfy the future timestamp soft fork rule.
2022-12-20 08:56:15 +00:00
Jack Grigg 1018ebd002 test: Handle mining slow start inside `CreateNewBlock_validity`
This partially reverts zcash/zcash@4f4a8c3c88
and correctly handles the mining slow start without repeatedly calling
CreateNewBlock.
2022-12-20 08:06:39 +00:00
str4d ca85cfbab3
Merge pull request #6244 from sellout/txbuilder-std-fee
Modify TransactionBuilder to use the standard default fee.
2022-12-19 21:03:38 +00:00
Suhas Daftuar ca514c655c Fix mempool package tracking edge case
CalculateMemPoolAncestors was always looping over a transaction's inputs
to find in-mempool parents.  When adding a new transaction, this is the
correct behavior, but when removing a transaction, we want to use the
ancestor set that would be calculated by walking mapLinks (which should
in general be the same set, except during a reorg when the mempool is
in an inconsistent state, and the mapLinks-based calculation would be the
correct one).

(cherry picked from commit bitcoin/bitcoin@60de0d5826)
2022-12-19 05:38:49 +00:00
Suhas Daftuar ef14b8ba60 Add test showing bug in mempool packages
(cherry picked from commit bitcoin/bitcoin@598b25d5ee)
2022-12-19 05:38:49 +00:00
Suhas Daftuar b63c58500a Track transaction packages in CTxMemPoolEntry
Associate with each CTxMemPoolEntry all the size/fees of descendant
mempool transactions.  Sort mempool by max(feerate of entry, feerate
of descendants).  Update statistics on-the-fly as transactions enter
or leave the mempool.

Also add ancestor and descendant limiting, so that transactions can
be rejected if the number or size of unconfirmed ancestors exceeds
a target, or if adding a transaction would cause some other mempool
entry to have too many (or too large) a set of unconfirmed in-
mempool descendants.

(cherry picked from commit bitcoin/bitcoin@5add7a74a6)

Zcash:
- Mempool methods were adapted to our mempool changes.
- Default ancestor and descendant size limits were double to account for
  our larger block size.
- The mempool_packages RPC test fee was adapted to account for our
  emissions curve (which results in a smaller per-block reward that
  needs to be split into smaller shards for sequential transactions.
- Includes some modifications to account for us backporting
  bitcoin/bitcoin@f3fe83673e early in
  zcash/zcash#5269.
2022-12-19 05:38:43 +00:00
Marius Kjærstad 2f8303617c
Add some more historical checkpoints
Add some more historical checkpoints i.a.w: https://github.com/zcash/zcash/issues/6224
2022-12-19 03:14:07 +01:00
str4d 3ea9989414
Merge pull request #6249 from sellout/fetch-params-lock
Scope the fetch-params lock file to the user
2022-12-15 19:57:31 +00:00
str4d 1f7553d753
Merge pull request #6228 from sandakersmann/patch-1
Hardened checkpoint update at block 1860000 for mainnet
2022-12-15 19:40:00 +00:00
Greg Pfeil 3a7433b844
Merge pull request #6303 from sellout/missing-newline
Fix a missing newline in the RPC docs
2022-12-12 19:12:48 -07:00
Greg Pfeil 1f401b39cc Fix a missing newline in the RPC docs 2022-12-12 15:01:21 -10:00