Commit Graph

12567 Commits

Author SHA1 Message Date
Jorge Timón 94debefbcf
Globals: Make AcceptBlockHeader static (Fix #6163)
..and at the same time prevent AcceptBlockHeader() from calling global function Params()
2019-05-23 17:48:15 +01:00
Jorge Timón 71cf6ba98b
Globals: Explicit Consensus::Params arg for main:
-CheckBlockIndex
-DisconnectTip
-GetTransaction
-InvalidateBlock
-ProcessGetData
-ReadBlockFromDisk
2019-05-23 17:48:14 +01:00
Jack Grigg cea06a4fd3
Move Equihash parameters into consensus params 2019-05-23 17:48:13 +01:00
Daniel Kraft 9a529fd217
Add some const declarations where they are appropriate.
Declare some arguments of functions as "const" pointers where they are
not meant to be modified.
2019-05-23 17:48:04 +01:00
Eirik0 a630f50349 Replace CSproutNotePlaintextEntry with SproutNoteEntry to match Sapling 2019-05-23 09:24:46 -06:00
Homu 683a5459bb Auto merge of #4031 - Eirik0:2.0.6-author-aliases, r=str4d
Update author aliases

Alphabetized the existing aliases and added:

- 'Eirik0': 'Eirik Ogilvie-Wigley'
- 'mdr0id': 'Marshall Gaucher'
- 'paveljanik': 'Pavel Janik'
- 'zebambam': 'Benjamin Winston'
2019-05-23 06:16:40 -07:00
Homu c2f18237d5 Auto merge of #4014 - zebambam:add_bitcoinabc_responsible_disclosure_relationship, r=Eirik0
Fixes #4013, added BitcoinABC as a disclosure partner

I've tried to avoid using "partner" as a term in general because it's not accurate, but it's quicker to type. We intend to share any vulns we become aware of in our bitcoin code with at least BitcoinABC.
2019-05-22 20:03:45 -07:00
Eirik0 bb0a3e1cb5 Remove old mergetoaddress RPC test 2019-05-22 16:01:50 -06:00
Eirik0 be04f76034 Update author aliases 2019-05-22 15:47:05 -06:00
Homu de68430af6 Auto merge of #4008 - Eirik0:3971-fix-comment, r=Eirik0
Fix tree depth in comment

Closes #3971
2019-05-16 14:00:33 -07:00
Simon 831611edd3 Fix typo and clean up help message for RPC z_getmigrationstatus. 2019-05-15 11:06:37 -07:00
Homu 9e833b39ee Auto merge of #4016 - Eirik0:release-v2.0.5-2, r=Eirik0
Release v2.0.5 2
2019-05-15 10:31:07 -07:00
Eirik0 408a122952 Update ZIP reference 2019-05-15 10:45:25 -06:00
Eirik0 c75fb97d3a make-release.py: Updated release notes and changelog for 2.0.5-2. 2019-05-15 09:56:01 -06:00
Eirik0 3fc90655bf make-release.py: Updated manpages for 2.0.5-2. 2019-05-15 09:56:01 -06:00
Eirik0 c34d253fa6 make-release.py: Versioning changes for 2.0.5-2. 2019-05-15 09:49:44 -06:00
Homu 823eeaf4ca Auto merge of #4009 - Eirik0:2.0.5-2_release_notes, r=Eirik0
Notable changes for v2.0.5-2
2019-05-14 20:20:15 -07:00
Eirik0 44905b21da Release notes wording and punctuation 2019-05-14 13:31:25 -06:00
Eirik0 8c82f8f72f Notable changes for v2.0.5-2 2019-05-14 11:24:19 -06:00
zebambam 5d1da630a2 Fixes #4013, added BitcoinABC as a disclosure partner 2019-05-14 07:51:08 -07:00
Homu 488067613c Auto merge of #4002 - Eirik0:migration-status-info, r=Eirik0
Add Logging and persist async operation for Sapling migration

Currently zcashd will automatically remove the last async migration operations when it reaches the height where it sends the transactions it just made. This is not in alignment with other async operations, which are not removed until a node is restarted or a user calls `z_getoperationresult`. This PR removes the calls to pop the operations so that they can be accessed and reviewed later. In this PR I also correct the operation's `amount_migrated` field to exclude the transaction fee (this field existed for debugging purposes, but should be consistent with `z_getmigrationstatus`), and have included the list of migration txids in the operation's result (this is similar to the async rpcs such as `z_sendmany`).

Documentation: none needed.

Test plan:
* After migration transactions have been created, list the opids and call `z_getoperationresult` on them.
* Check that the operations' `amount_migrated` fields exclude the fee.
2019-05-13 08:18:08 -07:00
Eirik0 23d9826ef9 Fix LogPrint statements 2019-05-10 17:25:30 -06:00
Eirik0 58348c79b3 Add logging for Sprout to Sapling migration transaction generation 2019-05-10 17:22:08 -06:00
Eirik0 7470ae8885 Do not automatically remove async migration operations and return txids 2019-05-10 17:19:56 -06:00
Homu 664b7d32a1 Auto merge of #4005 - daira:migration-expiration, r=Eirik0
Change expiry delta for migration transactions to 450 blocks

Documentation: to be done as part of the ZIP 308 update (zcash/zips#229).

Test plan: manually check that migration transactions have the expected expiry height, using getrawtransaction $TXID 1.

Closes #3999
2019-05-10 12:31:45 -07:00
Eirik0 a84125aacd Fix tree depth in comment 2019-05-10 12:58:11 -06:00
Eirik0 0e06801e12 Move reused sign and send logic 2019-05-10 12:45:14 -06:00
Eirik0 a7a52d2424 Move reused async rpc send logic to separate file 2019-05-10 12:20:52 -06:00
Eirik0 3220d99360 Use CommitTransaction() rather than sendrawtransaction() 2019-05-10 11:44:40 -06:00
Daira Hopwood 9615caa8f9 Fix cosmetic spacing issue in z_setmigration help.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-05-10 16:08:03 +01:00
Daira Hopwood e7529049fb Test the expiry height of migration transactions.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-05-10 13:48:43 +01:00
Daira Hopwood 14c0be6f27 Change expiry delta for migration transactions to 450 blocks.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-05-10 13:48:43 +01:00
Daira Hopwood 9cd34fc10a Repair calls to TransactionBuilder from tests.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-05-10 13:48:43 +01:00
Daira Hopwood 5eb7129d95 Generalize TransactionBuilder and CreateNewContextualCMutableTransaction to allow choosing the expiry delta.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-05-10 13:48:43 +01:00
Homu e97621acf7 Auto merge of #3995 - bitcartel:no_migration_during_block_download_phase, r=Eirik0
Don't allow Sprout-to-Sapling migration when syncing during IBD or after wake from sleep.

Prevent migration transactions from being created in response to incoming blocks when a node launches and syncs (the initial block download phase) and when a node wakes from sleep/hibernation and starts syncing old blocks rapidly.
2019-05-09 13:51:49 -07:00
Homu 785989f2f9 Auto merge of #3997 - bitcartel:transaction_builder_tiny_format_error, r=Eirik0
Remove unused specifier from format string

The extra specifier meant that a runtime error would be thrown during Sprout to Sapling migration, if `zrpcunsafe` logging was enabled, preventing migration transactions from being created.
2019-05-09 11:26:33 -07:00
Simon 6921c81b9d Don't allow migration when node is syncing at launch or after waking up. 2019-05-09 09:32:09 -07:00
Simon bda85eb06a Remove unused specifier from format string.
The extra specifier meant that a runtime error would be thrown
during Sprout to Sapling migration if `zrpcunsafe` logging
was enabled:
"tinyformat: Too many conversion specifiers in format string"
2019-05-08 20:51:13 -07:00
Homu 5aaef0b58c Auto merge of #3994 - Eirik0:release-v2.0.5-1, r=Eirik0
Release v2.0.5-1
2019-05-08 07:45:09 -07:00
Eirik0 dfa40412af make-release.py: Updated release notes and changelog for 2.0.5-1. 2019-05-08 06:57:28 -06:00
Eirik0 eceff9bed6 make-release.py: Updated manpages for 2.0.5-1. 2019-05-08 06:57:28 -06:00
Eirik0 f809ff997f make-release.py: Versioning changes for 2.0.5-1. 2019-05-08 06:50:57 -06:00
Homu 92702158ae Auto merge of #3990 - Eirik0:fix-migration-amount, r=Eirik0
Fix calculating amount to migrate
2019-05-07 20:57:30 -07:00
Eirik0 ea8823ce51 coinsView is required when using TransactionBuilder if there may be Sprout change 2019-05-07 18:41:35 -06:00
Eirik0 5fd7af5f85 Add the amount migrated to the operation's result 2019-05-07 08:58:23 -06:00
Eirik0 f0f7b3f012 Fix summing available funds 2019-05-07 08:55:26 -06:00
Homu 5347f6e6cb Auto merge of #3989 - Eirik0:2.0.5-1_release_notes, r=bitcartel
Notable changes for v2.0.5-1
2019-05-06 19:45:12 -07:00
Eirik0 aa23406263 Notable changes for v2.0.5-1 2019-05-06 17:22:10 -06:00
Homu cc80501ea3 Auto merge of #3987 - Eirik0:migration-null-defence, r=Eirik0
Sprout -> Sapling migration status nullptr defence
2019-05-06 12:12:06 -07:00
Eirik0 94e419f95d Rename variable and add comment 2019-05-06 11:46:16 -06:00