Commit Graph

16567 Commits

Author SHA1 Message Date
str4d 03d4cb82e4
Merge pull request #5986 from str4d/5931-bosl-exception
Note dependence on BOSL in COPYING
2022-06-02 12:08:29 +01:00
Jack Grigg 3753b1c4bb Note dependence on BOSL in COPYING
Closes zcash/zcash#5931.
2022-06-01 20:23:28 +00:00
Jack Grigg 340b2c3a84 Update orchard license with current exception text
Source: 21ad1ea5cb
which was committed directly on top of the orchard 0.1.0 release commit,
and therefore can be applied to it.
2022-06-01 20:23:28 +00:00
sasha db3ace3a25
Merge pull request #5969 from buck54321/valuebalanceorchard-getrawtx
Add valueBalanceOrchard to getrawtransaction verbose output

Admin merge requested by @str4d
2022-06-01 12:54:09 -07:00
str4d e66f768e5d
Merge pull request #5976 from nuttycom/bug/block_wallet_init_on_reindex
Scan wallet from genesis when reindexing
2022-06-01 18:21:10 +01:00
Jack Grigg d8a8b30b61 Document that `-reindex` and `-salvagewallet` both imply `-rescan`
The latter soft-sets `-rescan` if corruption is detected, while the
former implicitly rescans as a side-effect of replaying the chain
history to the wallet.
2022-06-01 14:37:03 +00:00
Jack Grigg 22a284ceeb wallet: Clear witness caches on load if reindexing
The reindexing process will replay the chain history against the wallet
starting from genesis, so we can just rebuild the witness caches from
scratch to ensure consistency.
2022-06-01 14:30:28 +00:00
Jack Grigg c1343d1807 qa: Fix sprout_sapling_migration RPC test to handle wallet RPC change
Co-authored-by: ying tong <yingtong@z.cash>
2022-06-01 13:51:26 +00:00
Brian Stafford b2a12cc0e8 rpc: add valueBalanceOrchard to getrawtransaction output 2022-06-01 12:38:53 +00:00
Brian Stafford cafcc52695 rpc: Add missing fields to getrawtransaction help text
Co-authored-by: Jack Grigg <jack@z.cash>
2022-06-01 12:38:53 +00:00
str4d 9ba8a96a28
Merge pull request #5982 from str4d/5980-revert-csemaphore-boost-removal
Revert "Switched sync.{cpp,h} to std threading primitives."
2022-06-01 04:21:11 +01:00
Jack Grigg eb18044f02 Revert "Switched sync.{cpp,h} to std threading primitives."
This partially reverts commit 4ad38a45e5
to fix a deadlock introduced by that commit.

Part of zcash/zcash#5980.
2022-05-31 22:08:35 +00:00
Jack Grigg c85c5b5c12 depends: Vendor dependencies of native_cxxbuild 2022-05-27 23:16:17 +00:00
Jack Grigg df08281f25 Migrate BLAKE2b Rust FFI to `cxx` 2022-05-27 20:15:05 +00:00
Jack Grigg 54aeb2c408 Migrate Equihash Rust FFI to `cxx`
This integrates `cxxbridge` into the build system, adding its generated
source files to `libzcash`. We currently need to manually specify each
Rust file containing a bridge description.
2022-05-27 20:15:05 +00:00
Jack Grigg 21f1bbf4aa depends: Add `rust/cxx.h` header as a dependency
We could also generate this in the main build with `cxxbridge --header`,
but we have the source from vendoring `cxxbridge`, and this simplifies
the automake integration slightly.
2022-05-27 20:15:05 +00:00
Jack Grigg 7a46e8365f build: Add non-verbose output for `cargo build`
Now that we're passing a bunch of extra environment variables, it makes
more sense to have the same verbosity level as for C++ compilation.
2022-05-27 20:15:05 +00:00
Jack Grigg b91caeb5b5 build: Pass `CC` etc. flags through to `cargo build`
These are needed by cxx so that when it builds its internal C++ glue
logic, it uses the same C++ compiler and flags as our top-level build.
In particular, this ensures that it links against the libc++ symbols.
2022-05-27 20:15:05 +00:00
Jack Grigg ee23587268 depends: Add cxxbridge command to dependencies 2022-05-27 20:15:05 +00:00
sasha aad3da4d3a
Merge pull request #5975 from nuttycom/deprecation/disable_dumpwallet
Mark the `dumpwallet` RPC method as disabled.

Admin merge requested by @str4d
2022-05-26 17:31:02 -07:00
Kris Nuttycombe f3a9dcc0cf Mark the `dumpwallet` RPC method as disabled.
Fixes #5513
2022-05-26 14:31:26 -06:00
Kris Nuttycombe f403f00017 Guard map accesses.
During testing of the previous fixes, the node entered a state where it
was possible to incorrectly dereference a map entry and crashed. These
changes address the most likely locations of the failed check.
2022-05-26 14:01:41 -06:00
Kris Nuttycombe e5745ed801 Disable wallet commands that are unavailable in safe mode during -reindex
Fixes #5962
2022-05-26 14:01:41 -06:00
Kris Nuttycombe 726f221062 Do not attempt to begin a rescan if reindexing.
The progress of the reindexing operation will ensure that the wallet
database is reconstructed.

Fixes #5974
2022-05-26 13:25:03 -06:00
Kris Nuttycombe 822ab78edc Revert "Make `-reindex` and `-reindex-chainstate` imply `-rescan`"
This reverts commit af7d883854.
2022-05-26 12:45:22 -06:00
Kris Nuttycombe 1b5ab4a06e
Merge pull request #5967 from nuttycom/feature/prefer_V4_tx_creation
Add a CLI flag to preferentially send V4 tx.
2022-05-26 09:11:47 -06:00
Kris Nuttycombe 9691d86047 Add a CLI flag to preferentially send V4 tx.
Since the wallet ecosystem may not be fully updated to handle
v5 transaction parsing at the point of NU5 activation, some
nodes may prefer to construct V4 transactions when not including
Orchard transaction components.

This change adds a CLI flag that allows node users to specify
that preference.
2022-05-26 07:26:38 -06:00
Jack Grigg b31b1211cd depends: Add cxx crate to dependencies 2022-05-26 03:14:21 +00:00
sasha 01d5576a97
Merge pull request #5951 from str4d/book-platform-policy
book: Add platform support information and tier policy.

Admin merge requested by @str4d
2022-05-24 17:50:53 -07:00
Kris Nuttycombe cecd228fed
Merge pull request #5965 from nuttycom/bug/orchard_final_root_before_nu5_active
Revert "Only return active protocol components from z_gettreestate."
2022-05-24 10:48:08 -06:00
Kris Nuttycombe de934950c3 Only return `skipHash` for Orchard & Sapling roots at heights >= activation. 2022-05-24 07:53:29 -06:00
Jack Grigg dd51f0995e book: Add FreeBSD to tier 3 platforms list 2022-05-24 13:40:15 +00:00
Jack Grigg a94b26f029 book: Capitalize key words in platform tier policy 2022-05-24 13:11:12 +00:00
Kris Nuttycombe 00c0c03912 Revert "Only return active protocol components from z_gettreestate."
This reverts commit c44e58ea51.
2022-05-17 13:04:36 -06:00
Steven a45c2a2d4e
Merge pull request #5963 from nuttycom/bug/orchard_final_root_before_nu5_active
Do not return Orchard components from z_gettreestate before NU5 activation.
2022-05-17 07:10:07 -07:00
Kris Nuttycombe c44e58ea51 Only return active protocol components from z_gettreestate.
This adds checks that exclude both the Sapling and Orchard
portions of the result if the associated network upgrades
are not yet active.

Fixes #5957
2022-05-16 18:33:27 -06:00
Kris Nuttycombe 46c41f531f
Merge pull request #5961 from ebfull/fix-wallet-doc
Fix "transparent" example that should be "p2pkh"
2022-05-16 14:28:34 -06:00
Sean Bowe bb9518b1b4
Fix "transparent" example that should be "p2pkh" 2022-05-16 08:19:59 -06:00
str4d 09b02bedc9
Merge pull request #5057 from str4d/sync-backports
Sync backports
2022-05-14 04:36:37 +01:00
str4d 202203a3fa
Merge pull request #5959 from str4d/improve-thread-names
Improve thread names
2022-05-14 02:27:24 +01:00
MarcoFalke 31522012c2 doc: Add comment to cs_main and mempool::cs
(cherry picked from commit bitcoin/bitcoin@fa5c346c5a)
2022-05-14 01:25:08 +00:00
MarcoFalke d12488d694 sync: Add RecursiveMutex type alias
(cherry picked from commit bitcoin/bitcoin@fac4558462)
2022-05-14 01:25:08 +00:00
Russell Yanofsky fcd0b28616 scripted-diff: Small locking rename
Call sync.h primitives "locks" and "mutexes" instead of "blocks" and "waitable
critical sections" to match current coding conventions and c++11 standard
names.

This PR does not rename the "CCriticalSection" class (though this could be done
as a followup) because it is used everywhere and would swamp the other changes
in this PR. Plain mutexes should mostly be preferred instead of recursive
mutexes in new code anyway.

-BEGIN VERIFY SCRIPT-
set -x
set -e
ren() { git grep -l $1 | xargs sed -i s/$1/$2/; }
ren CCriticalBlock           UniqueLock
ren CWaitableCriticalSection Mutex
ren CConditionVariable       std::condition_variable
ren cs_GenesisWait           g_genesis_wait_mutex
ren condvar_GenesisWait      g_genesis_wait_cv
perl -0777 -pi -e 's/.*typedef.*condition_variable.*\n\n?//g' src/sync.h
-END VERIFY SCRIPT-

(cherry picked from commit bitcoin/bitcoin@190bf62be1)
2022-05-14 01:25:08 +00:00
Russell Yanofsky f17e43d61e Use LOCK macros for non-recursive locks
Instead of std::unique_lock.

Zcash: Excluding locks in code we haven't backported yet.

(cherry picked from commit bitcoin/bitcoin@9c4dc597dd)
2022-05-14 01:25:08 +00:00
Russell Yanofsky 28adc47fcd Make LOCK, LOCK2, TRY_LOCK work with CWaitableCriticalSection
They should also work with any other mutex type which std::unique_lock
supports.

There is no change in behavior for current code that calls these macros with
CCriticalSection mutexes.

(cherry picked from commit bitcoin/bitcoin@1382913e61)
2022-05-14 01:25:08 +00:00
Russell Yanofsky 016c139c80 MOVEONLY Move AnnotatedMixin declaration
Move AnnotatedMixin closer to where it's used, and after the DEBUG_LOCKORDER
function declarations so it can call them.

(cherry picked from commit bitcoin/bitcoin@ba1f095aad)
2022-05-14 01:25:08 +00:00
Russell Yanofsky 9ff8ae6419 Add unit test for DEBUG_LOCKORDER code
(cherry picked from commit bitcoin/bitcoin@41b88e9337)
2022-05-14 01:25:08 +00:00
Jesse Cohen 336ed85f65 Annotate AssertLockHeld() with ASSERT_CAPABILITY() for thread safety analysis
(cherry picked from commit bitcoin/bitcoin@f393a533be)
2022-05-14 01:25:08 +00:00
MarcoFalke 130871cb4f qa: Initialize lockstack to prevent null pointer deref
(cherry picked from commit bitcoin/bitcoin@fa9da85b7c)
2022-05-14 01:25:08 +00:00
Chun Kuan Lee 1c255a2fd6 break circular dependency: random/sync -> util -> random/sync
(cherry picked from commit bitcoin/bitcoin@84f41946b9)
2022-05-14 01:25:08 +00:00