Commit Graph

12390 Commits

Author SHA1 Message Date
codetriage-readme-bot f0da2af80c Link to development guidelines in CONTRIBUTING.md 2019-06-11 10:27:52 -05:00
Homu 5f40d5e6a3 Auto merge of #3910 - Eirik0:3909-fix-mergetoaddress, r=Eirik0
Fix z_mergetoaddress sending from ANY_SPROUT/ANY_SAPLING when the wallet contains both note types

Closes #3909
2019-06-10 12:46:54 -07:00
Eirik0 cf30355fc3 Clarify what combinations of from addresses can be used in z_mergetoaddress 2019-06-10 13:21:25 -06:00
Eirik0 a8055cfe10 Fix z_mergetoaddress sending from ANY_SPROUT/ANY_SAPLING when the wallet contains both note types 2019-06-10 13:21:25 -06:00
Homu 4c7b44bbdb Auto merge of #4041 - Eirik0:getmigrationstatus-help, r=str4d
z_getmigrationstatus help message wording change

This is follow up from #4017
2019-06-06 15:23:50 -07:00
Eirik0 406b8ff509 z_getmigrationstatus help message wording change 2019-06-06 13:49:11 -06:00
Homu 70d8489663 Auto merge of #4017 - bitcartel:fix_sapling_rpc_help_typo, r=Eirik0
Fix typo and clean up help message for RPC z_getmigrationstatus.
2019-06-05 18:27:22 -07:00
Homu 20aef43d7f Auto merge of #4036 - Eirik0:sprout-note-entry, r=Eirik0
Replace CSproutNotePlaintextEntry with SproutNoteEntry to match Sapling

This refactoring makes the output of GetFilteredNotes safer to use, by setting the Sprout note at the point of decryption, where the corresponding address is already known, rather than having to recall it using the correct payment address.
2019-06-05 14:13:08 -07:00
Homu 3d37ebe9d8 Auto merge of #2912 - str4d:2074-main-refactor-1, r=str4d
Bitcoin Core refactoring and cleanups 1

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6538
- bitcoin/bitcoin#6163
- bitcoin/bitcoin#6982
- bitcoin/bitcoin#6986
- bitcoin/bitcoin#7053
- bitcoin/bitcoin#7444
- bitcoin/bitcoin#7793
  - Excluding some comments in `txmempool.h` on code we haven't yet pulled in.
- bitcoin/bitcoin#7916
- bitcoin/bitcoin#7815

Additionally, the Equihash parameters are moved into the consensus parameters, and
various other functions in `main.cpp` have `const CChainParams&` arguments added.

Part of #2074.
2019-05-28 06:39:25 -07:00
Homu f9f1f7cfff Auto merge of #4032 - Eirik0:remove-unused-mergetoaddress-test, r=str4d
Remove old mergetoaddress RPC test

The test wallet_mergetoaddress.py is no longer run and has been replaced by mergetoaddress_sprout.py and mergetoaddress_sapling.py. It should have been removed as part of #3619, but was not.
2019-05-28 04:42:16 -07:00
Jack Grigg e12d018464
Globals: Explicitly pass const CChainParams& to ReceivedBlockTransactions() 2019-05-23 20:03:35 +01:00
Jack Grigg 3ffc29b881
Globals: Explicitly pass const CChainParams& to IsInitialBlockDownload() 2019-05-23 20:03:34 +01:00
Jack Grigg 9e0f75dcbd
Consistently use chainparams and consensusParams 2019-05-23 17:48:31 +01:00
Jack Grigg a3b64d8677
Globals: Explicitly pass const CChainParams& to DisconnectBlock() 2019-05-23 17:48:30 +01:00
Jack Grigg c6012fe923
Globals: Explicit const CChainParams& arg for main:
- ContextualCheckBlockHeader
- ContextualCheckBlock
2019-05-23 17:48:29 +01:00
Jack Grigg be94721953
Globals: Explicitly pass const CChainParams& to ContextualCheckTransaction() 2019-05-23 17:48:28 +01:00
Jack Grigg 7ef947c32b
Globals: Explicit const CChainParams& arg for main:
- CheckBlockHeader
- CheckBlock
2019-05-23 17:48:27 +01:00
Jack Grigg 13cfabb36c
Globals: Explicitly pass const CChainParams& to IsStandardTx() 2019-05-23 17:48:26 +01:00
Jack Grigg 9f7f70e0c3
Globals: Remove Zcash-specific Params() calls from main.cpp 2019-05-23 17:48:25 +01:00
Wladimir J. van der Laan 3647f0a7b1
Break circular dependency main ↔ txdb
Break the circular dependency between main and txdb by:

- Moving `CBlockFileInfo` from `main.h` to `chain.h`. I think this makes
  sense, as the other block-file stuff is there too.

- Moving `CDiskTxPos` from `main.h` to `txdb.h`. This type seems
  specific to txdb.

- Pass a functor `insertBlockIndex` to `LoadBlockIndexGuts`. This leaves
  it up to the caller how to insert block indices.

Zcash: This does not actually break the circular dependency for us yet, as we
still need to pull in bitcoin/bitcoin#7756 and bitcoin/bitcoin#7904.
2019-05-23 17:48:24 +01:00
face e9128c4a1d
Explicitly pass CChainParams to ConnectBlock 2019-05-23 17:48:23 +01:00
face f2baeb7cb6
Pass CChainParams to DisconnectTip() 2019-05-23 17:48:22 +01:00
Jorge Timón a68c8114e1
Globals: Explicitly pass const CChainParams& to UpdateTip() 2019-05-23 17:48:21 +01:00
MarcoFalke 98f3010026
[doc] Fix doxygen comments for members 2019-05-23 17:48:20 +01:00
Peter Todd 9b0f61af2d
Improve block validity/ConnectBlock() comments
Previously didn't make clear that the ContextualCheckBlock* functions
meant the block headers as context - not the UTXO set itself - and that
ConnectBlock() also did UTXO-related validity checks (in the future we
may split that functionality into a separate UTXO-specific contextual
check block function).

Also, reordered to put validity checks first for better readability.
2019-05-23 17:48:19 +01:00
Jorge Timón 44b2d060ef
Globals: Remove a bunch of Params() calls from main.cpp:
1) Chainparams: Explicit CChainParams arg for main:

-AcceptBlock
-AcceptBlockHeader
-ActivateBestChain
-ConnectTip
-InitBlockIndex
-LoadExternalBlockFile
-VerifyDB parametric constructor

2) Also pickup more Params()\. in main.cpp

3) Pass nPruneAfterHeight explicitly to new FindFilesToPrune() in main.cpp
2019-05-23 17:48:18 +01:00
Jorge Timón 793a72e31f
Chainparams: Explicit CChainParams arg for miner:
-BitcoinMiner
-CreateNewBlock
-GenerateBitcoins
-ProcessBlockFound
2019-05-23 17:48:17 +01:00
Jorge Timón 8e5d8ca52a
Chainparams: Explicit CChainParams arg for main (pre miner):
-ProcessNewBlock
-TestBlockValidity
2019-05-23 17:48:16 +01:00
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