Commit Graph

16807 Commits

Author SHA1 Message Date
str4d 050133358b
Merge pull request #6059 from superbaud/smoketest-minconf
Update smoke_test.py to compensate for changes in minimum confirmations required
2022-07-08 20:08:02 +01:00
Kris Nuttycombe ee3055f596
Merge pull request #6064 from zcash/version-5.1.0
Merge 5.1.0 stablilization branch back into the main branch
2022-07-08 08:14:59 -06:00
str4d f8e9fa4b9e
Merge pull request #6063 from zcash/release-v5.1.0
Release v5.1.0
2022-07-08 13:49:51 +01:00
Jack Grigg dda0f79277 doc: Add `decoderawtransaction` to 5.1.0 release notes 2022-07-08 10:27:04 +00:00
Jack Grigg 4d7ce75ef1 make-release.py: Updated release notes and changelog for 5.1.0. 2022-07-08 03:01:54 +00:00
Jack Grigg d79b6ca209 make-release.py: Updated manpages for 5.1.0. 2022-07-08 03:01:54 +00:00
Jack Grigg 13d1a3fc6a make-release.py: Versioning changes for 5.1.0. 2022-07-08 02:52:02 +00:00
Jack Grigg 884c149c64 qa: Postpone latest `cxx` update 2022-07-08 02:51:43 +00:00
Jack Grigg c1b40ec2a8 Add missing release note entries for 5.1.0 2022-07-08 02:47:34 +00:00
str4d b5e3c0b3fe
Merge pull request #6060 from str4d/comment-out-slow-assertion
wallet: Comment out slow assertion
2022-07-08 03:29:13 +01:00
Jack Grigg acfd757e58 wallet: Comment out slow assertion
This particular assertion has a large fixed cost per block on current
mainnet (and has done since shortly after NU5 activation), but we
haven't figured out what is causing the performance hit. It is only a
consistency check, and commenting it out decreases single-account rescan
times by around 6% on a Ryzen 9 5950X.

Part of zcash/zcash#6052.
2022-07-08 00:22:51 +00:00
Cory Fields a423c2af8c time: add runtime sanity check
std::chrono::system_clock.time_since_epoch and time_t(0) are not guaranteed
to use the Unix epoch timestamp, but in practice they almost certainly will.
Any differing behavior will be assumed to be an error, unless certain
platforms prove to consistently deviate, at which point we'll cope with it
by adding offsets.

Do a quick runtime check to verify that
time_t(0) == std::chrono::system_clock's epoch time == unix epoch.

Co-authored-by: Anthony Towns <aj@erisian.com.au>

Zcash: The first commit of bitcoin/bitcoin#21110; we intend to handle
the changes made by the second commit of that PR in a separate fashion;
see zcash/zcash#6042.

(cherry picked from commit bitcoin/bitcoin@3c2e16be22)
2022-07-07 14:00:03 -06:00
Ben Woosley 66725e686c build: Detect gmtime_* definitions via configure
This improves the portability of the codebase and fixes compilation
with mingw-w64 7.0+.

Co-authored-by: fanquake <fanquake@gmail.com>

Zcash: We do not yet have FormatISO8601DateTime or FormatISO8601Date,
so those parts of the backport are omitted.

(cherry-picked from commit bitcoin/bitcoin@a46484c8b3)
2022-07-07 14:00:03 -06:00
sasha b72aaab820 Patch smoke_tests.py to require 4 confirmations for z_mergetoaddress 2022-07-07 01:22:40 -07:00
sasha 823c1b44c5 Improve smoke_test.py wait_for_balance message in the minconf!=1 case 2022-07-06 23:23:44 -07:00
sasha 61dd95ef0b Patch smoke_tests.py to properly handle changes in minconf behavior 2022-07-06 22:58:03 -07:00
ebfull 0766e22bdd
Merge pull request #6057 from str4d/gbt-skip-proofs-and-signatures
miner: Disable proof and signature checks in CreateNewBlock
2022-07-06 15:25:01 -06:00
Jack Grigg 5230c9f2f4 miner: Disable proof and signature checks in CreateNewBlock
The only source of transactions for `CreateNewBlock` is the mempool, and
every transaction added to the mempool goes through `AcceptToMemoryPool`
which checks proofs and signatures.

We maintain the ability to enable these checks in `TestBlockValidity`
because it is also used in an (undocumented) `getblocktemplate` mode to
check a proposed block (minus PoW), where we cannot assume the
transactions are valid.

Co-authored-by: Kris Nuttycombe <kris@nutty.land>
2022-07-06 19:38:15 +00:00
Kris Nuttycombe e03b964abf
Merge pull request #6043 from nuttycom/backport/14555-move_util_files_to_dir
scripted-diff: Move util files to separate directory.
2022-07-06 12:00:14 -06:00
str4d 606e5ed134
Merge pull request #6055 from str4d/wallet-updatedtransaction-softlock-fix
Move "previous coinbase" UI monitoring into ThreadNotifyWallets
2022-07-06 17:26:15 +01:00
Kris Nuttycombe 71b6a59ec3 scripted-diff: Move utiltest to src/util
-BEGIN VERIFY SCRIPT-
git mv src/utiltest.h src/util/test.h
git mv src/utiltest.cpp src/util/test.cpp
sed -i -e 's/"utiltest\.h"/"util\/test\.h"/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i -e 's/ZCASH_UTILTEST_H/ZCASH_UTIL_TEST_H/g' src/util/test.h
sed -i -e 's/utiltest\.\(h\|cpp\)/util\/test\.\1/g' src/Makefile.am
-END VERIFY SCRIPT-
2022-07-06 10:25:28 -06:00
str4d 904528997a
Merge pull request #6054 from nuttycom/bug/6044-null_block_pos
Ensure that the node has position information before attempting to read block data.
2022-07-06 15:52:42 +01:00
Jack Grigg e8a7b7253a Move "previous coinbase" UI monitoring into ThreadNotifyWallets
When the wallet notification logic was moved into a separate thread,
most wallet notifications were transferred across. This one was missed,
and it is particularly pernicious: all it does is ask the wallet to tell
the UI that a particular transaction had been updated. We don't actually
_have_ any UI connected in zcashd, but there is a side-effect: the
callback blocks on acquiring `cs_wallet`, in the main thread that
already holds `cs_main`. For particularly large wallets, this can cause
the main thread to block on `ThreadNotifyWallets`, which in turn means
that anything waiting on `cs_main` (e.g. RPC calls) is blocked.

We solve this by moving the callback into `ThreadNotifyWallets`. We
don't technically need it for `zcashd`, but we maintain it in case a
downstream fork has reconnected a UI.
2022-07-06 00:21:49 +00:00
sasha 903f5f9269
Merge pull request #6053 from zcash/release-v5.1.0-rc1
Release v5.1.0-rc1
2022-07-05 17:11:20 -07:00
Kris Nuttycombe d9c5326f17 Ensure that the node has position information before attempting to read block data. 2022-07-05 17:24:39 -06:00
sasha eb43bc5c02 make-release.py: Updated release notes and changelog for 5.1.0-rc1. 2022-07-05 22:25:25 +00:00
sasha 14b3c21f4a make-release.py: Updated manpages for 5.1.0-rc1. 2022-07-05 22:25:25 +00:00
sasha 1d996a080b make-release.py: Versioning changes for 5.1.0-rc1. 2022-07-05 22:11:55 +00:00
Jack Grigg 343ddc1752 qa: Add native_cxxbridge and rustcxx to update checker 2022-07-05 21:45:59 +00:00
Jack Grigg cb5a4acca9 Update release notes 2022-07-05 21:36:45 +00:00
Jack Grigg 2e6a6572ba qa: Postpone dependency updates 2022-07-05 20:43:26 +00:00
str4d 9d93dff4c8
Merge pull request #6048 from nuttycom/sapling-batch-validation
Use batch validation for Sapling proofs and signatures
2022-07-05 20:47:17 +01:00
Jack Grigg af59b2adb7 qa: Reformat for latest cargo-vet 2022-07-05 18:22:57 +00:00
Jack Grigg 90f13641b9 Use batch validation for Sapling proofs and signatures 2022-07-05 18:21:51 +00:00
Jack Grigg 5d9ae0ba63 bench: Add `ConnectBlock` benchmark using block 1723244
This block has 470 transactions, containing a total of 452 Sapling
spends and 1862 outputs, making for a nice benchmark of verification
performance.
2022-07-04 17:32:42 +00:00
str4d 466ea88539
Merge pull request #6000 from ebfull/enablezip216forall
Enable ZIP 216 for blocks prior to NU5 activation
2022-07-04 15:49:26 +01:00
Sean Bowe af2b3d35a4 Update minimum chain work and set NU5 activation block hash for mainnet
The chain work is taken from mainnet block 1710000.
2022-07-03 22:38:32 -06:00
Sean Bowe ec3d2e5dff Address clippy lints. 2022-07-03 22:38:32 -06:00
Sean Bowe cc78bf755f cargo fmt 2022-07-03 22:38:32 -06:00
Sean Bowe 1677ab63aa Remove the old Sapling verification FFI APIs. 2022-07-03 22:38:32 -06:00
Sean Bowe 458e773792 Enable ZIP 216 for blocks prior to NU5 activation 2022-07-03 22:38:32 -06:00
Sean Bowe 6c51df37b4 Introduce new Sapling verification API via cxx and switch consensus rules to use the new API. 2022-07-03 22:38:32 -06:00
Kris Nuttycombe a2d0f152fe
Merge pull request #6046 from nuttycom/bug/disabled_orchard_batch_validation2
Replace "Disabled" Orchard AuthValidator with std::nullopt
2022-07-03 22:38:03 -06:00
Kris Nuttycombe 4600079618 Replace "Disabled" Orchard AuthValidator with std::nullopt 2022-07-03 17:12:57 -06:00
Jim Posen 9a7e2c153d scripted-diff: Move util files to separate directory.
-BEGIN VERIFY SCRIPT-
mkdir -p src/util
git mv src/util.h src/util/system.h
git mv src/util.cpp src/util/system.cpp
git mv src/utilmoneystr.h src/util/moneystr.h
git mv src/utilmoneystr.cpp src/util/moneystr.cpp
git mv src/utilstrencodings.h src/util/strencodings.h
git mv src/utilstrencodings.cpp src/util/strencodings.cpp
git mv src/utiltime.h src/util/time.h
git mv src/utiltime.cpp src/util/time.cpp

sed -i -e 's/"util\.h"/"util\/system\.h"/g' $(git ls-files 'src/*.h' 'src/*.cpp')
git checkout HEAD -- src/secp256k1 # exclude secp256k1, which has its own "util.h"
sed -i -e 's/"utilmoneystr\.h"/"util\/moneystr\.h"/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i -e 's/"utilstrencodings\.h"/"util\/strencodings\.h"/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i -e 's/<utilstrencodings\.h>/<util\/strencodings\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp')
sed -i -e 's/"utiltime\.h"/"util\/time\.h"/g' $(git ls-files 'src/*.h' 'src/*.cpp')

sed -i -e 's/BITCOIN_UTIL_H/BITCOIN_UTIL_SYSTEM_H/g' src/util/system.h
sed -i -e 's/BITCOIN_UTILMONEYSTR_H/BITCOIN_UTIL_MONEYSTR_H/g' src/util/moneystr.h
sed -i -e 's/BITCOIN_UTILSTRENCODINGS_H/BITCOIN_UTIL_STRENCODINGS_H/g' src/util/strencodings.h
sed -i -e 's/BITCOIN_UTILTIME_H/BITCOIN_UTIL_TIME_H/g' src/util/time.h

sed -i -e 's/ util\.\(h\|cpp\)/ util\/system\.\1/g' src/Makefile.am
sed -i -e 's/utilmoneystr\.\(h\|cpp\)/util\/moneystr\.\1/g' src/Makefile.am
sed -i -e 's/utilstrencodings\.\(h\|cpp\)/util\/strencodings\.\1/g' src/Makefile.am
sed -i -e 's/utiltime\.\(h\|cpp\)/util\/time\.\1/g' src/Makefile.am

sed -i -e 's/src\/util\.cpp/src\/util\/system\.cpp/g' test/lint/lint-locale-dependence.sh
sed -i -e 's/src\/utilmoneystr\.cpp/src\/util\/moneystr\.cpp/g' test/lint/lint-locale-dependence.sh
sed -i -e 's/src\/utilstrencodings\.\(h\|cpp\)/src\/util\/strencodings\.\1/g' test/lint/lint-locale-dependence.sh
-END VERIFY SCRIPT-
2022-07-01 17:50:09 -06:00
Marshall Gaucher 91473c80b0
Update contrib/docker/entrypoint.sh
Co-authored-by: str4d <jack@electriccoin.co>
2022-07-01 12:02:11 -07:00
Kris Nuttycombe 2e6a251de7
Merge pull request #5947 from nuttycom/deprecation/gettransaction_vjoinsplit
Deprecate vjoinsplit attribute of gettransaction result.
2022-07-01 12:03:27 -06:00
Kris Nuttycombe 74c4818d8f
Merge pull request #6041 from nuttycom/revert/feature-clock_capability
Revert "Merge pull request #6037 from nuttycom/feature/clock_capability"
2022-07-01 12:03:02 -06:00
Kris Nuttycombe 733289afa3 Revert "Merge pull request #6037 from nuttycom/feature/clock_capability"
This reverts commit 93ae72c17e, reversing
changes made to f3f1f81302.
2022-07-01 10:15:41 -06:00
Daira Hopwood 93ae72c17e
Merge pull request #6037 from nuttycom/feature/clock_capability
Add a clock for testing with an offset from the system clock.
2022-07-01 16:01:35 +01:00