Commit Graph

14672 Commits

Author SHA1 Message Date
Homu a058196146 Auto merge of #4603 - nuttycom:ff/no_global_params, r=daira
Prefer explicit passing of CChainParams to the Params() global.

This is (intended to be) a pure refactoring, no functional changes included.
2020-12-17 01:26:36 +00:00
Jack Grigg a8bcd46b8c test: Fix test_bitcoin compilation on macOS High Sierra
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-12-17 00:42:48 +00:00
Homu 5b97cd27f8 Auto merge of #4904 - rex4539:https, r=nuttycom
Update links

Updates numerous insecure or outdated links, plus a few minor typo fixes.
2020-12-17 00:05:14 +00:00
Kris Nuttycombe bce1da684b Remove vestigial OSX_SDK_VERSION from darwin build.
Upstream still uses this variable for qt builds, but as we no longer
have the GUI wallet it's unnecessary for Zcash.
2020-12-16 22:59:35 +00:00
fanquake f201e1e02d build: set minimum supported macOS to 10.14 2020-12-16 22:59:35 +00:00
Jack Grigg 8a1803b21a lint: Remove boost::variant and boost::optional from allowed includes 2020-12-16 22:59:35 +00:00
Jack Grigg db17aae4db Finish migrating to std::optional 2020-12-16 22:59:35 +00:00
Jack Grigg d8d0918951 scripted-diff: Migrate from boost::optional to std::optional
-BEGIN VERIFY SCRIPT-
sed -i 's/boost::none/std::nullopt/g' ./src/*.h ./src/*.cpp ./src/*/*.h* ./src/*/*.cpp ./src/*/*/*.h* ./src/*/*/*.cpp ;
sed -i 's/boost::optional/std::optional/g' ./src/*.h ./src/*.cpp ./src/*/*.h* ./src/*/*.cpp ./src/*/*/*.h* ./src/*/*/*.cpp ;
sed -i 's/std::optional<\(.*\)&>/std::optional<std::reference_wrapper<\1>>/' ./src/*/*.h ./src/*/*.cpp ;
sed -i 's/is_initialized()/has_value()/' ./src/*.cpp ./src/*/*.cpp ;
sed -i ':a;N;$!ba;s/#include <boost\/optional.hpp>\n//' ./src/*.h ./src/*.cpp ./src/*/*.h* ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ;
sed -i ':a;N;$!ba;s/#include "boost\/optional.hpp"\n//' ./src/*.h ;
-END VERIFY SCRIPT-
2020-12-16 22:59:35 +00:00
Jack Grigg 521eb81a95 Add <optional> header to files that will need it 2020-12-16 22:59:34 +00:00
Jack Grigg d9928926f3 Migrate from boost::optional::get to boost::optional::value
std::optional only has std::optional::value.
2020-12-16 22:59:34 +00:00
Jack Grigg ae4551004a Finish migrating to std::variant 2020-12-16 22:59:32 +00:00
Jack Grigg b521cb8932 scripted-diff: Migrate from boost::variant to std::variant
-BEGIN VERIFY SCRIPT-
sed -i 's/boost::variant/std::variant/' ./src/*.h ./src/*.cpp ./src/*/*.h* ./src/*/*.cpp ;
sed -i 's/boost::get<\(.*\)>(&/std::get_if<\1>(\&/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.cpp ;
sed -i 's/boost::get</std::get</' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.cpp ;
sed -i 's/boost::apply_visitor(/std::visit(/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ;
sed -i 's/class \(.*\)\b \?: public boost::static_visitor<.*>/class \1/' ./src/*.h ./src/*.cpp ./src/*/*.h* ./src/*/*.cpp ;
sed -i ':a;N;$!ba;s/#include <boost\/variant\(\/.*\)\?.hpp>\n//' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ;
sed -i ':a;N;$!ba;s/#include "boost\/variant\/.*.hpp"\n//' ./src/*/*.cpp ;
-END VERIFY SCRIPT-
2020-12-16 22:49:53 +00:00
Jack Grigg f68c79554f Add <variant> header to files that will need it 2020-12-16 22:48:21 +00:00
Homu 83a4ae49b6 Auto merge of #4886 - LarryRuane:getblocktemplate-shielded, r=str4d
improve getblocktemplate performance for shielded coinbase

Closes #4817. This improvement applies only when the `longpollid` argument is specified. This argument causes the `getblocktemplate` RPC to not return a template immediately, but instead to wait until either a new block arrives, or new transactions arrive in the mempool.
2020-12-16 21:56:27 +00:00
Jack Grigg 8239c756b7 mempool: Log all accepted txids at INFO level
This adds logging for locally-submitted transactions. At DEBUG level we
additionally log contextual information about accepted transactions from
peers.

Closes zcash/zcash#4907.
2020-12-16 02:54:48 +00:00
Jack Grigg a5736aad95 rpc: Log the new filter when we set it 2020-12-16 02:42:10 +00:00
Jack Grigg b517be4334 rpc: Reload CNode spans after reloading the log filter
Closes zcash/zcash#4908.
2020-12-16 02:07:06 +00:00
Jack Grigg 42c38b00c1 net: Rework CNode spans
- Extract a reload function for recreating them.
- Record the peer id.
- Remove the peer id and address from the CNode constructor log
  (it will always be shown by the span at that log level).
2020-12-16 01:37:17 +00:00
Kris Nuttycombe e9b5d83709 Prefer explicit passing of CChainParams to the Params() global. 2020-12-15 08:23:09 -07:00
Larry Ruane 5f68253e58 improve getblocktemplate performance for shielded coinbase 2020-12-13 12:33:25 -07:00
Dimitris Apostolou f459e43dc9
Update links 2020-12-13 11:24:44 +02:00
Homu e9cc9b4eec Auto merge of #4896 - nuttycom:document_nsequence, r=daira
Write down the folklore about nSequence
2020-12-11 17:16:37 +00:00
Homu e7b425298f Auto merge of #4893 - str4d:ed25519-zebra-consensus, r=daira
Switch to ed25519-zebra for consensus signature checks

ed25519-zebra can validate all signatures pre-Canopy, and now that Canopy
is active on mainnet, we don't need to worry about consensus divergence.
2020-12-11 15:11:47 +00:00
Jack Grigg ceccb10e4f Update minimum chain work and set activation block hashes for testnet
The chain work is taken from testnet block 1197611.
2020-12-09 13:00:46 +00:00
Jack Grigg 28e01d67f7 Update minimum chain work and set activation block hashes for mainnet
The chain work is taken from mainnet block 1069420.
2020-12-08 14:45:45 +00:00
Jack Grigg 4ca2b20496 test: Use ed25519_verify in ConsensusTests 2020-12-08 14:23:37 +00:00
Homu 5ab69760c5 Auto merge of #4891 - zquestz:add_hex_to_getblock, r=daira
[Feature] Include transaction hex in verbose getblock output

This fixes https://github.com/zcash/zcash/issues/4888 and actually makes it so the existing documentation is correct!

I also added a small test to make sure the transaction hex is returned correctly in verbose (2) `getblock` calls, and matches the value in `getrawtransaction`.

Let me know if there is anything else I need to update, as this is my first PR for zcash.

-------------------------------------------------------------------------------------------

Please ensure this checklist is followed for any pull requests for this repo. This checklist must be checked by both the PR creator and by anyone who reviews the PR.
* [ ] Relevant documentation for this PR has to be completed and reviewed by @mdr0id before the PR can be merged
* [ ] A test plan for the PR must be documented in the PR notes and included in the test plan for the next regular release

As a note, all buildbot tests need to be passing and all appropriate code reviews need to be done before this PR can be merged.
2020-12-08 14:16:34 +00:00
Kris Nuttycombe 2e9bdc6789 Write down the folklore about nSequence 2020-12-08 07:14:42 -07:00
Homu 7dbd969b14 Auto merge of #4882 - rex4539:fix-readelf, r=daira
readelf is Linux only

Fixes https://github.com/zcash/zcash/issues/4875.
2020-12-05 14:31:11 +00:00
Dimitris Apostolou 307dd8837f
Fix readelf configuration
Co-authored-by: str4d <thestr4d@gmail.com>
2020-12-04 20:48:26 +02:00
Homu 36838ef60f Auto merge of #4889 - LarryRuane:getinfo-add-build-version, r=LarryRuane
add more version information to getinfo rpc

Needed for https://github.com/zcash/lightwalletd/issues/319, lightwalletd's `GetLightdInfo` grpc would like to return the zcashd version and commit hash.
2020-12-04 16:59:21 +00:00
Jack Grigg c3a91be479 Switch to ed25519-zebra for consensus signature checks
ed25519-zebra can validate all signatures pre-Canopy, and now that Canopy
is active on mainnet, we don't need to worry about consensus divergence.
2020-12-04 03:42:16 +00:00
Homu 77c2a5f810 Auto merge of #4877 - str4d:boost-backports, r=str4d
Backport Boost removal PRs

Cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#7613
- bitcoin/bitcoin#10502
- bitcoin/bitcoin#10193
- bitcoin/bitcoin#13961
- bitcoin/bitcoin#13734
  - Only the second commit (we don't need the first).
- bitcoin/bitcoin#14480

Part of #4819.
2020-12-04 01:34:19 +00:00
Jack Grigg 4cb31e5a19 Fix Hungarian notation nit from Daira 2020-12-04 01:32:07 +00:00
Josh Ellithorpe efb603557a
Include transaction hex in verbose getblock output 2020-12-03 14:18:17 -10:00
Larry Ruane 18775308fa add more version information to getinfo rpc 2020-12-02 09:42:28 -07:00
Homu c8896f9907 Auto merge of #4874 - str4d:rpc-tests-py, r=str4d
Backport migration from rpc-tests.sh to rpc-tests.py

Cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#6567
- bitcoin/bitcoin#6523
- bitcoin/bitcoin#6616
- bitcoin/bitcoin#6788
  - Only the commit fixing `rpc-tests.py`
- bitcoin/bitcoin#6791
  - Only the fix to `qa/rpc-tests/README.md`
- bitcoin/bitcoin#6827
- bitcoin/bitcoin#6930
- bitcoin/bitcoin#6804
- bitcoin/bitcoin#7029
- bitcoin/bitcoin#7028
- bitcoin/bitcoin#7027
- bitcoin/bitcoin#7135
- bitcoin/bitcoin#7209
- bitcoin/bitcoin#7635
- bitcoin/bitcoin#7778
- bitcoin/bitcoin#7851
- bitcoin/bitcoin#7814
  - Only the changes to the new .py files in this PR.
- bitcoin/bitcoin#7971
- bitcoin/bitcoin#7972
- bitcoin/bitcoin#8056
  - Only the first commit.
- bitcoin/bitcoin#8098
- bitcoin/bitcoin#8104
- bitcoin/bitcoin#8133
  - Only the `rpc-tests.py` commit.
- bitcoin/bitcoin#8066
- bitcoin/bitcoin#8216
  - Only the last two commits.
- bitcoin/bitcoin#8254
- bitcoin/bitcoin#8400
- bitcoin/bitcoin#8482
  - Excluding the first commit (only affects RPC tests we don't have).
- bitcoin/bitcoin#8551
- bitcoin/bitcoin#8607
  - Only the pull-tester commit, for conflict removal.
- bitcoin/bitcoin#8625
- bitcoin/bitcoin#8713
- bitcoin/bitcoin#8750
- bitcoin/bitcoin#8789
- bitcoin/bitcoin#9098
- bitcoin/bitcoin#9276
  - Excluding the second commit (we don't have the changes it requires).
- bitcoin/bitcoin#9657
- bitcoin/bitcoin#9807
- bitcoin/bitcoin#9766
- bitcoin/bitcoin#9823
2020-12-02 13:53:52 +00:00
Jack Grigg a7370b112e test: Run shielding-heavy RPC tests in serial 2020-12-02 13:52:08 +00:00
Jack Grigg 3a91bcfac5 test: Silence pyflakes unused import warning
rpc-tests.py trial-imports zmq to determine whether it is available.
2020-12-02 01:01:50 +00:00
Dimitris Apostolou 21bfa3a0e1
readelf is Linux only 2020-11-25 12:44:58 +02:00
Jack Grigg e03667b608 lint: Remove boost/foreach.hpp from allowed includes 2020-11-23 23:24:05 +00:00
Chun Kuan Lee ed5c647b45 refactor: Drop boost::this_thread::interruption_point and boost::thread_interrupted in main thread 2020-11-23 23:07:15 +00:00
Chun Kuan Lee 8e2d9a78fe gui: get special folder in unicode 2020-11-23 23:07:15 +00:00
MarcoFalke 1ffd2d5fad util: Replace boost::signals2 with std::function
Zcash: Added missing imports that were being implicitly included.
2020-11-23 23:07:15 +00:00
Jorge Timón df3b6684f2 clang-format: Delete ForEachMacros 2020-11-23 23:07:15 +00:00
Jorge Timón c3983ccb1c scripted-diff: Remove #include <boost/foreach.hpp>
-BEGIN VERIFY SCRIPT-
sed -i ':a;N;$!ba;s/#include <boost\/foreach.hpp>\n//' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp
-END VERIFY SCRIPT-
2020-11-23 23:07:15 +00:00
Jorge Timón 62114cff9e scripted-diff: Remove BOOST_REVERSE_FOREACH
-BEGIN VERIFY SCRIPT-
sed -i 's/BOOST_REVERSE_FOREACH(\(.*\), \(.*\))/for (\1 : reverse_iterate(\2))/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ;
-END VERIFY SCRIPT-
2020-11-23 23:07:15 +00:00
Jorge Timón e8b5d36eea Fix const_reverse_iterator constructor (pass const ptr) 2020-11-23 23:07:15 +00:00
Jorge Timón 46509b99f4 Introduce src/reverse_iterator.hpp and include it...
...where it will be needed

Taken from https://gist.github.com/arvidsson/7231973 with small
modifications to fit the bitcoin core project
2020-11-23 23:07:15 +00:00
Jorge Timón f5e98e0fb1 scripted-diff: Remove PAIRTYPE
Zcash: Added an extra command to handle cases where the pair were not
separated by a space.

-BEGIN VERIFY SCRIPT-
sed -i 's/PAIRTYPE(\([^,]*\), \([^\)]*\))/std::pair<\1, \2>/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ;
sed -i 's/PAIRTYPE(\([^,]*\),\([^\)]*\))/std::pair<\1, \2>/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ;
sed -i ':a;N;$!ba;s/#define std::pair<t1, t2>    std::pair<t1, t2>\n//' ./src/utilstrencodings.h ;
-END VERIFY SCRIPT-
2020-11-23 23:07:15 +00:00