Commit Graph

16333 Commits

Author SHA1 Message Date
Kris Nuttycombe 254122f9d2 Update the release notes to describe consensus changes since v4.6.0 2022-04-13 12:28:36 -06:00
Charlie O'Keefe cf579c2e4f
Merge pull request #5869 from superbaud/fix-taddr-2
fix smoke_tests.py accounting math to remove the warning before test 4r
2022-04-13 10:13:03 -06:00
Kris Nuttycombe 9ca0a41cf7 Update protocol version to 170050 for v4.7.0 release. 2022-04-13 08:22:56 -06:00
sasha d153f27f52 fix smoke_tests.py accounting math to remove the warning before test 4r
the warning before test 4r is generated by the check_z_mergetoaddress
at line 459, which moves all the sapling funds into taddr_2 and thus
expects (sapling_balance - DEFAULT_FEE) to show up into taddr_2.

However, the check_z_mergetoaddress_parallel at line 418 had already
funded taddr_2 (with the sum of taddr_1 and taddr_3), and so we need to
add that to the amount of money that check_z_mergetoaddress at line 459
expects to find.
2022-04-12 23:21:38 -07:00
Kris Nuttycombe 40487c079d Set NU5 testnet reactivation height. 2022-04-12 21:42:47 -06:00
sasha c07a4ab08c
Merge pull request #5862 from nuttycom/bug/reindex_wait
Don't advance the wallet init timer until we're done reindexing. merge requested by @nuttycom
2022-04-12 11:16:27 -07:00
Kris Nuttycombe 0b02d66bba Defensively check for a null pindex in `FindFork` 2022-04-12 09:39:45 -06:00
Kris Nuttycombe 72fc17ffc7 Don't advance the wallet init timer until past reindex. 2022-04-12 09:39:45 -06:00
Charlie O'Keefe 6205075970
Merge pull request #5866 from daira/revert-span-reload
Partially revert #4909, in order to avoid a use-after-free after calling setlogfilter
2022-04-12 09:00:26 -06:00
Charlie O'Keefe f46c64565c
Merge pull request #5861 from superbaud/smoketests-walletrequirebackup
add walletrequirebackup=false to the zcash argument list in smoke_tests.py
2022-04-12 09:00:03 -06:00
Daira Hopwood 9aed2a9f11 Revert "rpc: Reload CNode spans after reloading the log filter".
fixes #5863

The span reloading was causing a use-after-free bug at the point
the old span was exited.

This reverts commit b517be4334.
As a result, `setlogfilter` will not be able to change whether
the peer tracing span is enabled (or whether IP addresses are
logged) for existing peers. That can be fixed later (#5867).

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-04-12 14:01:08 +01:00
sasha af36f184ab
Merge pull request #5859 from nuttycom/bug/pindexlasttip_null_init
Fix missing null initialization of `pindexLastTip` pointer in ThreadStartWalletNotifier; merged as requested by @nuttycom
2022-04-11 13:35:22 -07:00
sasha ce6e8fd5f4 add walletrequirebackup=false to the zcash argument list in smoke_tests.py 2022-04-11 13:16:41 -07:00
Kris Nuttycombe 21de7f1108 Fix uninitialized sleep variable. 2022-04-11 12:39:52 -06:00
Kris Nuttycombe 7ede9af587 Fix missing null initialization of `pindexLastTip` pointer in ThreadStartWalletNotifier 2022-04-11 11:36:15 -06:00
Charlie O'Keefe 327f61b5a8
Merge pull request #5851 from oxarbitrage/getaddresstxids_error_msg
Change error message in getHeightRange
2022-04-10 10:51:06 -06:00
Kris Nuttycombe 2fdff822f0
Merge pull request #5855 from str4d/update-deps-4.7.0
Update dependencies for 4.7.0
2022-04-09 12:46:30 -06:00
Jack Grigg 8e805f5d75 depends: Remove direct `tokio` dependency
We still depend on it indirectly, but we don't use it directly anymore
since we upstreamed our patch to `metrics-exporter-prometheus`.

`thiserror` is also only used by the wallet tool, so has been reordered
accordingly.
2022-04-09 15:06:29 +00:00
Jack Grigg c784d7f480 depends: Remove `hyper 0.14.2` pin
`hyper 0.14.18` stops building the C libraries by default (after opt-in
support was added via a new flag in nightly Cargo), which means we no
longer have the problem of the `cdylib` build requiring a linker to be
hooked up to the Rust build when all we want is a `staticlib`.
2022-04-09 14:57:49 +00:00
Alfredo Garcia aef9f2b2ac
remove final dot from error msg 2022-04-09 11:54:21 -03:00
Jack Grigg 18d3b79202 cargo update 2022-04-09 14:44:38 +00:00
Jack Grigg b01fe74161 qa: Update Berkeley DB release listener regex
Oracle have altered their downloads page to not list the actual download
filename, so we now extract the version from the changelog URL.
2022-04-09 14:43:32 +00:00
str4d 1a79983a56
Merge pull request #5854 from nuttycom/nu5-consensus_merge-master
Merge current master to the nu5-consensus branch.
2022-04-09 15:33:51 +01:00
Kris Nuttycombe 866b3c7900 Merge remote-tracking branch 'upstream/master' into nu5-consensus_merge-master 2022-04-08 21:08:39 -06:00
Kris Nuttycombe 0f9868ef14
Merge pull request #5852 from nuttycom/bug/consistent_finalstate_encoding
Make Orchard finalState serialization format match Sapling.
2022-04-08 21:07:37 -06:00
Kris Nuttycombe f86a65d7cb Make Orchard `finalState` serialization format match Sapling.
For consistency, we serialize the `finalState` field in the
same (sparse) encoding as Sapling and Sprout use. In the future
we may want to update this to the dense encoding that
incrementalmerkletree::bridgetree::Frontier uses, but that's not
necessary for the moment.
2022-04-08 19:48:40 -06:00
Charlie O'Keefe d0a30cd0d2
Merge pull request #5853 from nuttycom/bug/miner_guard_chainactive
Ensure pindexPrev is not null before mining against it.
2022-04-08 18:38:07 -06:00
Marshall Gaucher a660b95032
Merge pull request #5849 from therealyingtong/acct-counter-overflow
Check for overflow in IncrementAccountCounter().
2022-04-08 16:12:29 -07:00
Alfredo Garcia 6e054687c2
fix grammar in message
Co-authored-by: Kris Nuttycombe <kris.nuttycombe@gmail.com>
2022-04-08 19:17:28 -03:00
str4d 06d0f04388
Merge pull request #5793 from str4d/5766-print-test-logs-on-failure
test: Capture gtest log output and only print on error
2022-04-08 23:11:20 +01:00
Kris Nuttycombe b38189adcd
Merge pull request #5791 from therealyingtong/z_listaccounts
Add z_listaccounts API.
2022-04-08 15:30:57 -06:00
Kris Nuttycombe cc8b3f9657 Ensure pindexPrev is not null before mining against it. 2022-04-08 14:54:23 -06:00
Jack Grigg 753412c5b3 test: Capture gtest log output and only print on error
In zcash/zcash#5762 we altered the gtest runner to turn on logging to
stdout instead of dropping the logs, to make figuring out test failures
easier. However, this also meant the logs would be displayed for tests
that succeeded, and it was confusing to see `ERROR` log lines present.

We now have a test-specific initialization method for tracing that uses
synchronous logging instead of a background thread, and only logs to a
file. In the gtests, we initialize this with a new temporary file, and
add a gtest event listener that clears the file at the start of each
test, and then prints its contents if the test fails.

Example test output:

```
[ RUN      ] ChecktransactionTests.CheckVpubNotBothNonzero
gtest/test_checktransaction.cpp:39: Failure
Expected equality of these values:
  state.GetRejectReason()
    Which is: "bad-txns-vpubs-both-nonzero"
  "bad-txns-vpubs-both-nonzer"

--- Logs:
  ERROR main: CheckTransaction(): joinsplit.vpub_new and joinsplit.vpub_old both nonzero
---
[  FAILED  ] ChecktransactionTests.CheckVpubNotBothNonzero (0 ms)
```

Closes zcash/zcash#5766.
2022-04-08 20:57:57 +01:00
Kris Nuttycombe f98b2393a1 Fix error in z_listaccounts help text. 2022-04-08 13:06:41 -06:00
str4d a638e938bd
Merge pull request #5823 from str4d/add-orchard-wallet-tracing
Add trace-level logging to the Orchard wallet
2022-04-08 18:47:06 +01:00
Alfredo Garcia a4f563f2ab change error message 2022-04-08 13:24:11 -03:00
Jack Grigg 70167dd2aa rpc: Document that enabling trace-level logging is unsafe 2022-04-08 15:48:02 +00:00
Jack Grigg a06406d087 wallet: Bump a trace log message to error in `Wallet::checkpoint`
If we hit this error, the node is going to end up with an assertion
failure, so there's no verbosity harm in logging here.
2022-04-08 15:43:44 +00:00
Kris Nuttycombe 1fb153a333 Apply suggestions from code review
Co-authored-by: Jack Grigg <jack@electriccoin.co>
2022-04-08 15:41:34 +00:00
Kris Nuttycombe a4aba7cb91
Merge pull request #5830 from therealyingtong/orchard-z_listreceivedbyaddress
Support Orchard addresses in `z_listreceivedbyaddress`
2022-04-08 07:55:10 -06:00
Kris Nuttycombe c342e7d712
Merge pull request #5847 from nuttycom/bug/wallet_bestchain_init
Fix assertion in wallet initialization when wallet best block is ahead of the main chain.
2022-04-08 07:48:19 -06:00
therealyingtong 0da6bcef72 Check for overflow in IncrementAccountCounter(). 2022-04-08 14:27:51 +08:00
Kris Nuttycombe f553ae3320 Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
Co-authored-by: ying tong <yingtong@z.cash>
2022-04-07 23:05:05 -06:00
str4d 0c32c988fc
Merge pull request #5834 from nuttycom/bug/sendmany_privacy_policy_violations
Fix privacy policy violations when sending between unified addresses.
2022-04-08 04:00:31 +01:00
str4d 5f60f33daf
Merge pull request #5832 from therealyingtong/miner-latest-height
Use height of latest network upgrade in -mineraddress validation.
2022-04-08 03:01:20 +01:00
str4d 175dc4bc4a
Merge pull request #5841 from str4d/lint-cargo-patches
Add lints for Cargo patches
2022-04-08 02:01:02 +01:00
Kris Nuttycombe 773c2b515a Fix assertion in wallet initialization when wallet best block is ahead of the main chain.
In #5809, we attempted to fix the assumption that on startup, the
wallet's best chain was at the same position as the node's chain tip.
This did not account for a condition where the node's block index
might not contain the block corresponding to the wallet's best chain,
because the node had crashed before the block index containing that
block could be written to disk.

This commit adds handling so that the `ThreadNotifyWallets` thread
will not start until the wallet's best block has been restored
to the node's block index and we're able to obtain a pointer to
that state.
2022-04-07 17:23:13 -06:00
Kris Nuttycombe cb64997216 Never consider transactions that pay the default fee to be free. 2022-04-07 13:51:08 -06:00
str4d 2c13a41334
Merge pull request #5844 from str4d/postpone-rust-1.60
qa: Postpone update to Rust 1.60
2022-04-07 17:31:04 +01:00
Jack Grigg c4006a7f24 qa: Postpone update to Rust 1.60
Rust 1.60 migrates to LLVM 14, and we want to keep our Clang and Rust
compilers on matching LLVM versions.
2022-04-07 15:01:26 +00:00