Commit Graph

285 Commits

Author SHA1 Message Date
Kris Nuttycombe 6c656ab13d Whitespace-only fix in chainparams.cpp
Fix a trivial annoyance.
2021-02-17 12:13:45 -07: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 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
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 044ff5716e test: Re-enable regtest difficulty adjustment for unit tests that use it 2020-11-18 12:17:57 +00:00
Eric Lombrozo 03f1d38e04 Added fPowNoRetargeting field to Consensus::Params that disables nBits recalculation.
Zcash: Moved conditional into GetNextWorkRequired(), as we had rewritten
CalculateNextWorkRequired() to not have the necessary information. This
means that CalculateNextWorkRequired() will in unit tests calculate what
regtest would use were the new field not set; this is irrelevant, as only
GetNextWorkRequired() is used directly in consensus rules.
2020-11-17 18:48:32 +00:00
Homu 5009f219e6 Auto merge of #4830 - daira:rename-bp-funding-stream, r=daira
Rename the FS_ZIP214_ECC funding stream to FS_ZIP214_BP

See also https://github.com/zcash/zips/pull/412 .

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-27 15:06:57 +00:00
Daira Hopwood d54dda736d Rename the FS_ZIP214_ECC funding stream to FS_ZIP214_BP.
See also https://github.com/zcash/zips/pull/412 .

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-27 13:27:19 +00:00
Jack Grigg d476537d86 scripted-diff: Remove BOOST_STATIC_ASSERT
-BEGIN VERIFY SCRIPT-
sed -i 's/BOOST_STATIC_ASSERT(/static_assert(/' ./src/*.h ./src/*.cpp ./src/*/*.h* ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ;
sed -i ':a;N;$!ba;s/#include <boost\/static_assert.hpp>\n//' ./src/*.h ./src/*.cpp ./src/*/*.h* ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ;
-END VERIFY SCRIPT-
2020-10-27 10:44:58 +00:00
Homu 31f48caf0e Auto merge of #4690 - LarryRuane:CopyPreviousWitnessesPart2, r=str4d
Flush witness data when consistent (part 2)

Closes #4680. After CWallet::ChainTipAdded() updates the witness data, it may flush it to disk (SetBestChain()); make sure the locator part is consistent with the witnesses (height).
2020-09-24 13:31:31 +00:00
Larry Ruane 81db0a2fc7 Flush witness data when consistent (part 2)
After CWallet::ChainTipAdded() updates the witness data, it
may flush it to disk (SetBestChain()); make sure the locator
part is consistent with the witnesses (height).
2020-09-05 07:21:11 -06:00
Sean Bowe 6937dff376
Set activation height for Canopy on mainnet. 2020-09-01 13:16:05 -06:00
Daira Hopwood 889b05df41
Clarify a comment about the ZF and MG addresses 2020-09-01 12:56:05 +01:00
Sean Bowe abd4b736e4
Add dev fund addresses for mainnet. 2020-08-31 15:07:43 -06:00
therealyingtong 283287ab5b
Use 51 Testnet Dev Fund addresses, and adjust the end heights.
Co-authored-by: Ying Tong Lai <yingtong@electriccoin.co>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-25 09:45:30 +08:00
therealyingtong 62c3613816
Delay testnet activation height by one week 2020-07-24 08:15:35 +08:00
therealyingtong 8a4c51508a
Set Canopy testnet activation height to 1020500 2020-07-18 00:28:45 +08:00
ewillbefull@gmail.com c0a19854bf Add dev fund addresses for testnet NU4 activation. 2020-07-15 20:09:39 -06:00
Daira Hopwood aa1b924427 Cosmetic spacing changes.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-07-10 02:14:42 +01:00
Kris Nuttycombe 9228c3113d Fix typo in constant. 2020-07-09 18:26:11 -06:00
Kris Nuttycombe 9119ca8f86 Rename KeyInfo -> KeyConstants and move out of Consensus namespace. 2020-07-09 18:19:13 -06:00
Kris Nuttycombe 07ff0d19a0 Make evident the relationship between chainparams and key IO. 2020-07-09 17:48:47 -06:00
Kris Nuttycombe 4d223f9797 Merge remote-tracking branch 'upstream/master' into zip-207 2020-07-02 13:24:45 -06:00
Jack Grigg efd04b920b Implement zip-207 and zip-214.
Add funding streams to consensus parameters.

Add funding stream payments to coinbase txns generated by the miner.
* Reduce valueBalance for shielded outputs to funding streams.
* Ensure we produce binding signatures in any case where shielded
  outputs go to either a funding stream or the miner.
2020-06-25 16:15:50 -06:00
George Tankersley 27b8a616de Add ZF and gtank's DNS seeders 2020-06-10 21:10:43 -04:00
Daira Hopwood c1227ae67c Rename NU4 to Canopy in constant and function names.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-05-28 13:11:48 +01:00
Homu 3860e7cae7 Auto merge of #4533 - ebfull:heartwood-activation, r=ebfull
Enable Heartwood activation on mainnet

This sets the Heartwood activation height to `903000`, which follows the deprecation height of `v2.1.2-3` (which is set to deprecate on block `901475`, roughly 31 hours earlier, sometime mid-July).
2020-05-20 21:36:27 +00:00
Sean Bowe d0c96683bf
Set the Heartwood activation height to 903000. 2020-05-19 14:38:49 -06:00
Sean Bowe ecafe6913c
Update minimum chain work on testnet to reflect Heartwood activation. 2020-05-18 09:59:34 -06:00
ebfull 84a703b3b1
Merge branch 'master' into hotfix-v2.1.2-1 2020-05-06 16:36:01 -06:00
Sean Bowe 8dcb533226
Add the intended testnet activation block of Heartwood to our intended rewind logic. 2020-05-05 14:47:29 -06:00
Jack Grigg 99d387fc51 Add NU4 to upgrade list
Once NU4 has a name, we will rename the constants.
2020-05-01 11:38:03 +12:00
Sean Bowe b42af16553
Set Heartwood activation height for testnet to 903800. 2020-04-21 16:13:33 -06:00
Homu b5f179d207 Auto merge of #4370 - str4d:3060-sapling-viewing-keys, r=str4d
Add support for Sapling full viewing keys

This PR adds Sapling support to `z_exportviewingkey` and `z_importviewingkey`, and stores imported Sapling viewing keys in the wallet.

Closes #3060.
2020-03-28 02:41:26 +00:00
Daira Hopwood 5d5e6a6762 Fix typos/minor errors in comments, and wrap some lines.
This minimizes the diff in the example implementation of funding streams in ZIP 207.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-03-11 16:41:31 +00:00
Jack Grigg 3c7385bc8e Add encoding and decoding for Sapling extended full viewing keys 2020-02-21 00:59:27 +00:00
Alfredo Garcia d53d4d880a add destination wrappers 2020-02-18 13:20:43 -03:00
Daira Hopwood ca8d32070a Add string argument to static_asserts to satisfy C++11.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-02-06 23:35:56 +00:00
Daira Hopwood 4ab896c69d Enable future timestamp soft fork at varying heights according to network.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-02-04 23:40:04 +00:00
Homu 126a3b96ae Auto merge of #4247 - rex4539:protect-to-shield, r=daira
Change "protect" terminology to "shield"

Closes https://github.com/zcash/zcash/issues/2149

Note: Renamed `wallet_protectcoinbase.py` to `wallet_shieldingcoinbase.py` because there was an existing file also named `wallet_shieldcoinbase.py`.
2019-12-06 16:29:29 +00:00
Homu f9602d407b Auto merge of #4240 - str4d:heartwood-activation-logic, r=str4d
Add Heartwood to upgrade list
2019-12-05 17:40:29 +00:00
Dimitris Apostolou f0003239f8
Change "protect" terminology to "shield" 2019-12-04 23:17:06 +02:00
Jorge Timón bd87de60ed
Chainparams: Translations: DRY: options and error strings
Also remove SelectBaseParamsFromCommandLine and SelectParamsFromCommandLine
2019-12-04 17:18:31 +00:00
Jorge Timón af9b9652fa
Chainparams: Replace CBaseChainParams::Network enum with string constants (suggested by Wladimir) 2019-12-04 17:18:30 +00:00
Jack Grigg 9c93079e28
Add Heartwood to upgrade list 2019-11-25 14:15:19 +00:00
Sean Bowe 4180589f02
Set mainnet activation of Blossom 2019-11-01 09:31:55 -06:00