Commit Graph

8621 Commits

Author SHA1 Message Date
Eirik Ogilvie-Wigley cdb6757095 NPE defense in metrics screen 2019-08-06 09:45:17 -06:00
Eirik Ogilvie-Wigley 2f00729061 Add copyright info 2019-08-05 19:05:11 -06:00
Eirik Ogilvie-Wigley 42a21ef004 Test clean up and fixes 2019-08-05 14:52:34 -06:00
Eirik Ogilvie-Wigley 5a93638981 Distinguish between height and current header height on metrics screen 2019-08-05 14:20:25 -06:00
Eirik Ogilvie-Wigley f97b9c5d9f Algebraic improvements related to halving 2019-08-05 14:02:31 -06:00
Eirik Ogilvie-Wigley 8f0a54c142 Remove DefaultExpiryDelta method 2019-08-05 13:40:06 -06:00
Eirik Ogilvie-Wigley 832134f4cd Update PoW related assertions 2019-08-05 13:16:13 -06:00
Eirik Ogilvie-Wigley 609bb38ad8 Clarify documentation 2019-08-05 13:01:01 -06:00
Eirik Ogilvie-Wigley 0f0512128c Make sure that expiry height is not less than height 2019-08-05 12:57:10 -06:00
Eirik Ogilvie-Wigley 7ddcf427c0 Fix/update comments 2019-08-05 12:41:31 -06:00
Eirik Ogilvie-Wigley 9f70b74692 Do not add expiring soon threshold to expiry height of txs near NU activation 2019-08-05 11:50:05 -06:00
Eirik Ogilvie-Wigley 82c291b6df Fix parsing txexpirydelta argument 2019-08-05 11:32:12 -06:00
Eirik Ogilvie-Wigley 2c35e162a6 Make sure to deactivate blossom in test case 2019-08-05 11:32:12 -06:00
Eirik Ogilvie-Wigley 8068491d2c Fix check transaction tests 2019-08-04 14:35:47 -06:00
Eirik Ogilvie-Wigley bde2e4807c Improve EstimateNetHeight calculation 2019-08-02 22:51:21 -06:00
Eirik Ogilvie-Wigley 2972521323 Add comments and fix typos 2019-08-02 21:43:17 -06:00
Eirik Ogilvie-Wigley f9d6b3e7ef Extract Halvings method and add tests 2019-08-02 21:37:48 -06:00
Eirik Ogilvie-Wigley 93452c97bf Make founders reward tests pass before and after Blossom activation height is set 2019-08-02 20:54:52 -06:00
Eirik Ogilvie-Wigley 3eb90d4040 Use pre-Blossom max FR height when calculating address change interval 2019-08-02 20:53:41 -06:00
Eirik Ogilvie-Wigley 797713284c Update main_tests for shorter block times 2019-08-02 19:37:02 -06:00
Eirik Ogilvie-Wigley 27ee4d64f2 Fix integer truncation in Blossom halving calculation 2019-08-02 19:35:53 -06:00
Eirik Ogilvie-Wigley e6c0f743aa Do not send migration transactions that would expire after a network upgrade 2019-08-02 16:12:42 -06:00
Eirik Ogilvie-Wigley 65df6225a6 Do not create transactions that will expire after the next epoch 2019-08-02 16:01:20 -06:00
Homu c68511b876 Auto merge of #3926 - LarryRuane:3708-getaddressrpcs, r=str4d
add addressindex RPC for bitcore block explorer

Addresses #3708
2019-08-01 05:43:29 -07:00
Homu 2300b911f8 Auto merge of #4035 - Eirik0:use-committransaction, r=str4d
Use CommitTransaction

This enables `-walletbroadcast` to correctly control transactions created with `z_*` APIs. It also addresses some TODOs in the code and consolidates some repeated logic.

Closes #4077 (because `CommitTransaction` calls `KeepKey` on the transparent change address).
2019-08-01 03:04:06 -07:00
Eirik Ogilvie-Wigley 6c1df957ba Update metrics block height estimation for shorter block times 2019-07-31 15:16:25 -06:00
Eirik Ogilvie-Wigley ecfcb817ae Add test for Blossom default tx expiry delta 2019-07-31 14:34:48 -06:00
Eirik Ogilvie-Wigley e358e89db9 PartitionCheck tests for shorter block times 2019-07-31 12:20:15 -06:00
Larry Ruane 68e174e22b add addressindex related RPCs 2019-07-31 10:31:16 -06:00
Jack Grigg 19bd2d0e7c
Use reserve key for transparent change when sending to Sprout 2019-07-31 12:15:09 +01:00
Eirik Ogilvie-Wigley 1188c9adf7 Fix zip208 founders reward calculation and update test 2019-07-30 17:41:33 -06:00
Eirik Ogilvie-Wigley 8865f4b6f6 Update expiry height for shorter block times 2019-07-30 01:16:37 -06:00
Eirik Ogilvie-Wigley c5ac4321f9 Add message to static_assert 2019-07-29 23:25:08 -06:00
Eirik Ogilvie-Wigley 0bb79ea191 pow test cleanup 2019-07-29 19:07:56 -06:00
Eirik Ogilvie-Wigley 68e9d2164c Add missing new line at end of file 2019-07-29 19:07:27 -06:00
Eirik Ogilvie-Wigley e6b63d1f78 Use static_assert 2019-07-29 19:05:41 -06:00
Eirik Ogilvie-Wigley c0d27cb3f2 Simplify PartitionCheck 2019-07-29 18:29:39 -06:00
Eirik Ogilvie-Wigley 2c6c55261d Make NetworkUpgradeAvailable a method of Params 2019-07-29 14:47:06 -06:00
Eirik Ogilvie-Wigley 102dafdf89 Update block subsidy halving for zip208 2019-07-29 13:44:53 -06:00
Homu 0ba07d5842 Auto merge of #4056 - rex4539:fix-rpc-undefined-behavior, r=ebfull
Fix RPC undefined behavior

Closes https://github.com/zcash/zcash/issues/3792
2019-07-26 15:19:07 -07:00
Eirik Ogilvie-Wigley ff0820df5e Update test_pow for shorter block times 2019-07-26 10:48:16 -06:00
Eirik Ogilvie-Wigley c192e3a75d Update pow_tests for shorter block times 2019-07-26 10:34:23 -06:00
Dimitris Apostolou ff40531607 Fix RPC undefined behavior.
Co-Authored-By: Dimitris Apostolou <dimitris.apostolou@icloud.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-07-23 21:36:53 +01:00
Eirik Ogilvie-Wigley 7421272712 Make nextHeight required in CalculateNextWorkRequired 2019-07-18 14:57:13 -06:00
Daira Hopwood bc909a7a7f Replace http with https: in links to the MIT license.
Also change MIT/X11 to just MIT, since no distinction was intended.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-07-18 15:26:01 +01:00
Daira Hopwood f63731261c Update copyright information for Zcash, leveldb, and libsnark.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-07-18 13:59:30 +01:00
Daira Hopwood 6db54c9861 Add MIT license to Makefiles
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-07-18 13:59:30 +01:00
Homu d2a5526202 Auto merge of #4053 - rex4539:shielded-funds, r=Eirik0
Fix naming inconsistency

Closes https://github.com/zcash/zcash/issues/3486
2019-07-17 12:36:37 -07:00
Simon d7ebbeb2aa Modify PartitionCheck to be aware of pre & post Blossom target spacing. 2019-07-11 14:17:58 -06:00
Simon 3a8fd5ea33 Replace nPoWTargetSpacing -> PoWTargetSpacing() in tests 2019-07-11 13:46:29 -06:00
Simon 22e8dc2679 Replace nPoWTargetSpacing -> PoWTargetSpacing() in ProcessMessage() 2019-07-11 13:46:29 -06:00
Simon 4b985ce999 Update GetBlockTimeout() to take height parameter. 2019-07-11 13:46:29 -06:00
Simon b30ff0d367 Update PoW function calls to pass in height. 2019-07-11 13:46:29 -06:00
Simon 35d1fdeba6 Replace nPoWTargetSpacing -> PoWTargetSpacing() 2019-07-11 13:46:28 -06:00
Simon ac4a606d4a Remove use of redundant member nPowTargetSpacing. 2019-07-11 13:46:28 -06:00
Simon 8863d77d65 Redefine PoW functions to accept height parameter.
Introduce target spacing constants and redefine struct member
variable nPoWTargetSpacing as a member function.  The height
parameter is used to determine if Blossom has activated yet.
2019-07-11 13:46:28 -06:00
Homu 984b41422a Auto merge of #4054 - rex4539:haveshieldedrequirements, r=Eirik0
Rename joinsplit to shielded

Closes https://github.com/zcash/zcash/issues/3550
2019-07-11 09:45:19 -07:00
Homu 29c1b29f3f Auto merge of #4055 - rex4539:rename-findwallettx, r=Eirik0
Rename FindWalletTx to FindWalletTxToZap

Closes https://github.com/zcash/zcash/issues/3572
2019-07-10 15:45:46 -07:00
Homu 9d07a12750 Auto merge of #4052 - rex4539:rename-vjoinsplit, r=Eirik0
Rename vjoinsplit to vJoinSplit

Closes https://github.com/zcash/zcash/issues/3188
2019-07-10 11:59:23 -07:00
Daira Hopwood ef2dcbf1d4 make-release.py: Versioning changes for 2.0.6. 2019-06-19 00:27:11 +01:00
Dimitris Apostolou 8b1a8e8b93
Rename FindWalletTx to FindWalletTxToZap 2019-06-16 23:06:45 +03:00
Dimitris Apostolou 8bcb96999e
Rename joinsplit to shielded 2019-06-16 22:50:58 +03:00
Dimitris Apostolou ff1840f68a
Fix naming inconsistency 2019-06-16 22:37:23 +03:00
Dimitris Apostolou f57f76d789
Rename vjoinsplit to vJoinSplit 2019-06-16 19:13:49 +03:00
Daira Hopwood f7a4aab352 make-release.py: Versioning changes for 2.0.6-rc1. 2019-06-12 16:32:57 +01:00
Homu bb58c8ec2e Auto merge of #3863 - LarryRuane:3708-getrawtransaction, r=daira
add spentindex to getrawtransaction RPC results for bitcore block explorer

#3708 There are a few new `getrawtransaction` JSON result fields that the Insight block explorer depends on.
2019-06-11 13:15:00 -07:00
Larry Ruane f381d4e085 add spentindex to getrawtransaction RPC results 2019-06-11 10:29:51 -06:00
Daira Hopwood 346d11d3eb Closes #3992. Remove obsolete warning message.
Co-authored-by: Simon <simon@bitcartel.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2019-06-11 17:27:49 +01: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
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
Eirik0 4120aff037 Use reserve key for transparent change when sending to Sapling 2019-05-30 09:56:45 -06:00
Eirik0 27f91abf00 Allow passing optional reserve key as a parameter to SendTransaction 2019-05-28 20:10:42 -06:00
Eirik0 d3d8fb7221 Inline sign_send_raw_transaction 2019-05-28 17:58:49 -06:00
Eirik0 de410efd54 Do not shadow the return value when testmode is true 2019-05-28 17:29:40 -06: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 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
Eirik0 c34d253fa6 make-release.py: Versioning changes for 2.0.5-2. 2019-05-15 09:49:44 -06: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
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 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
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
Eirik0 f809ff997f make-release.py: Versioning changes for 2.0.5-1. 2019-05-08 06:50:57 -06: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
Eirik0 94e419f95d Rename variable and add comment 2019-05-06 11:46:16 -06:00
Eirik0 d48c3efca7 Store the migration operation id rather than the operation iteslf 2019-05-06 09:57:40 -06:00
Eirik0 7cf4749d0d Correctly account for migration transactions in the mempool
Co-authored-by: LarryRuane <larry@z.cash>
2019-05-05 12:59:43 -06:00
Eirik0 c1daa11d7b make-release.py: Versioning changes for 2.0.5. 2019-05-03 16:30:13 -06:00
Simon 68c17ffec8 Update chain work and checkpoint using block 525000. 2019-05-02 14:53:35 -07:00
Eirik0 6c47e6fe7b make-release.py: Versioning changes for 2.0.5-rc1. 2019-05-01 14:15:14 -06:00
Homu d894f7b3b2 Auto merge of #3977 - LarryRuane:3873-setmigration-cli, r=bitcartel
3873 z_setmigration cli bool enable arg conversion

Addresses #3873.
2019-05-01 09:26:20 -07:00
Larry Ruane 4cbe0a9d02 3873 z_setmigration cli bool enable arg conversion 2019-05-01 10:03:24 -06:00
Eirik0 3cad5f454f Do not throw an exception if HD Seed is not found when exporting wallet 2019-04-30 15:47:03 -06:00
Eirik0 e14cf96642 Calculate the number of confimations in the canonical way 2019-04-30 11:06:08 -06:00
Eirik0 345177cfc1 Do not look at vin/vout when determining migration txs and other cleanup 2019-04-30 09:52:53 -06:00
Eirik0 e9530f40f2 use -valueBalance rather than vpub_new to calculate migrated amount 2019-04-29 17:00:26 -06:00
Eirik0 108e587c14 Fix typos and update documentation 2019-04-29 15:29:29 -06:00
Eirik0 5969bd8f55 Fix help message 2019-04-29 15:29:27 -06:00
Eirik0 6e82d72852 Add rpc to get Sprout to Sapling migration status 2019-04-29 15:28:35 -06:00
Eirik0 52cfa9c1ee Create method for getting HD seed in RPCs 2019-04-29 15:28:35 -06:00
Homu f283f2460e Auto merge of #3967 - Eirik0:3961-migration-address, r=Eirik0
3961 migration address

Closes #3961
2019-04-29 11:41:47 -07:00
Homu 63fff636d7 Auto merge of #3968 - bitcartel:3768_enable_mainnet_turnstile, r=bitcartel
Activate turnstile on mainnet

This PR enables [ZIP209](https://github.com/zcash/zips/blob/master/zip-0209.rst) support on mainnet, to mark blocks as invalid if they would lead to a turnstile violation in the Sprout or Sapling value pools.

To test this PR, I performed the following manual tests:

1. Used RPC call `getblock` to verify the fallback Sprout value.
2. Individually changed the fallback Sprout block hash, block height and chain value, recompiling and relaunching the node, verifying that each individual change resulted in an error.  When the block hash and block height are incorrect, an error is logged to debug.log `FallbackSproutValuePoolBalance(): fallback block hash is incorrect`.  An incorrect chain value results in node termination with error: `void FallbackSproutValuePoolBalance(CBlockIndex*, const CChainParams&): Assertion '*pindex->nChainSproutValue == chainparams.SproutValuePoolCheckpointBalance()' failed.`
3. Ran the `Smoke Testing` described in PR #3885, on mainnet.
4. Launched zcashd with experimental feature `-developersetpoolsizezero` to manually trigger a turnstile violation in both Sprout and Sapling shielded pools.  The Sprout turnstile violation occurred after launch, due to chance, when the next incoming block 520786 contained a Sprout unshielding transaction. The Sapling turnstile violation was triggered after creating a Sapling unshielding transaction.
2019-04-29 09:08:46 -07:00
str4d b9c7f274a4
remove extra hyphen
Co-Authored-By: Eirik0 <eirik@z.cash>
2019-04-29 09:55:07 -06:00
Eirik0 8ffd63af2d Add migration options to conf file
Co-authored-by: Simon <simon@bitcartel.com>
2019-04-29 09:36:26 -06:00
Homu 20821614a8 Auto merge of #3888 - Eirik0:3873-sapling-migration, r=Eirik0
Sapling migration RPC

Closes #3873
2019-04-27 12:29:29 -07:00
Larry Ruane 7fb8088288 add -timestampindex for bitcore insight block explorer 2019-04-26 08:44:56 -06:00
Homu 1b24243392 Auto merge of #3849 - LarryRuane:3708-spentindex, r=daira
add SpentIndex changes needed for bitcore block explorer

Addresses #3708, follow-on to #3837, note there are no tests yet (will come later with RPC interfaces).
2019-04-25 16:32:22 -07:00
Homu 1fefed9eb5 Auto merge of #3940 - str4d:3607-init-encrypted-wallet-without-hd-seed, r=bitcartel
init: Fix new HD seed generation for previously-encrypted wallets

Closes #3607.

How to verify (with `zcashd` flags `-testnet -wallet=wallet.3607.dat -experimentalfeatures -developerencryptwallet`):
- Start `zcashd` 2.0.0, encrypt the wallet, and stop the node.
- Start `zcashd` 2.0.1+ (before this branch), and see that it crashes during startup.
- Start `zcashd` built from this branch, and see that it does not crash during startup. Unlock the wallet, then stop.
- Start `zcashd` 2.0.1+ (before this branch), and see that it no longer crashes during startup.
2019-04-25 13:15:51 -07:00
Eirik0 5519d16997 Set min depth when selecting notes to migrate 2019-04-25 13:43:23 -06:00
Eirik0 7c4ad6e298 Additional locking and race condition prevention 2019-04-24 11:31:14 -06:00
Eirik0 699288b4b4 Documentation cleanup 2019-04-24 11:31:14 -06:00
Eirik0 162bfc3a1e Move migration logic to ChainTip 2019-04-24 11:31:14 -06:00
Eirik0 81a45d6984 Add rpc to enable and disable Sprout to Sapling migration 2019-04-24 11:31:14 -06:00
Simon 867786d777 Enable experimental feature -developersetpoolsizezero on mainnet. 2019-04-24 08:40:17 -07:00
Simon fc79a848fb Enable ZIP209 on mainnet and set fallback Sprout pool balance. 2019-04-23 22:57:30 -07:00
Homu e1c922de5b Auto merge of #3964 - bitcartel:test_turnstile_violation, r=bitcartel
Test turnstile violation

Adds experimental feature -developersetpoolsizezero to enable developers to test Sprout and Sapling turnstile violations on testnet and in regtest mode.
2019-04-23 15:07:43 -07:00
Larry Ruane 3d018ab556 add -spentindex changes for bitcore insight block explorer 2019-04-23 11:06:23 -06:00
Homu ab856294d9 Auto merge of #3505 - str4d:rust-targets, r=str4d
depends: Support additional cross-compilation targets in Rust

This will make it easier for third parties to cross-compile `zcashd` for other platforms. The third commit in this PR shows how to add a new target to the Rust dependency builder.

The default Rust target during cross-compilation is the canonical host, which is derived from `HOST` using `depends/config.sub`. If the canonical host differs from the required Rust target, add the necessary mapping in addition to the target itself.

Also includes fixes for cross-compiling aarch64 targets.
2019-04-23 08:33:40 -07:00
Simon 4c1a8884f4 Add testnet and regtest experimental feature: -developersetpoolsizezero 2019-04-22 14:24:40 -07:00
Gareth Davies 82848efb0e Adding addressindex.h to Makefile.am
Co-authored by: Daira Hopwood <daira@jacaranda.org>
2019-04-21 07:44:18 -07:00
Homu 8752c7aef5 Auto merge of #3935 - str4d:blossom-activation-logic, r=str4d
Add Blossom to upgrade list
2019-04-09 10:39:07 -07:00
Homu 33548140d9 Auto merge of #3907 - LarryRuane:3860-enable-debug-build, r=daira
fix enable-debug build DB_COINS undefined

Fixes #3860. The way `DB_COINS` is defined in this PR is the same as in `src/txdb.cpp` (static "global" instead of class member).
2019-04-09 03:45:07 -07:00
Homu e73326eed0 Auto merge of #3837 - LarryRuane:3708-addressindex, r=bitcartel
add AddressIndex changes needed for bitcore block explorer

Addresses #3708, note there are no tests yet (will come later with RPC interfaces).
2019-04-04 17:36:56 -07:00
Jack Grigg 1f561f323f
init: Fix new HD seed generation for previously-encrypted wallets
Closes #3607.
2019-04-04 18:27:46 +01:00
Homu 926fd0ce28 Auto merge of #3848 - str4d:transaction-builder-sprout, r=Eirik0
Add Sprout support to TransactionBuilder

The logic in `TransactionBuilder::CreateJSDescriptions()` is a combination of the logic used by `z_sendmany`, `z_mergetoaddress` and `z_shieldcoinbase`, in order to support arbitrary numbers of Sprout inputs or outputs.
2019-04-04 10:19:46 -07:00
Jack Grigg 885fce070a
Add Blossom to upgrade list 2019-04-02 07:39:36 +01:00
Braydon Fuller ec81c70964 tests: adds unit test for IsPayToPublicKeyHash method 2019-03-28 12:04:02 -06:00
Larry Ruane 6cf0e50b56 add -addressindex changes for bitcore insight block explorer 2019-03-28 12:03:48 -06:00
Simon 108dc2df95 make-release.py: Versioning changes for 2.0.4. 2019-03-26 11:25:19 -07:00
Larry Ruane e1df250a0d fix enable-debug build DB_COINS undefined 2019-03-20 16:29:06 -06:00
Simon b95cb71653 make-release.py: Versioning changes for 2.0.4-rc1. 2019-03-20 09:29:06 -07:00
Homu 3c5062aa90 Auto merge of #3898 - sandakersmann:patch-1, r=bitcartel
Update COPYRIGHT_YEAR in clientversion.h to 2019

Update COPYRIGHT_YEAR in clientversion.h to 2019
2019-03-20 07:36:25 -07:00
Homu 6158f0a4fa Auto merge of #3897 - ebfull:wallet-sprout-check-commitment, r=ebfull
Check consistency of note commitment and ciphertext in wallet

Fixes #3896.
2019-03-19 21:21:54 -07:00
Sean Bowe c1009374b1 (wallet) Check that the commitment matches the note plaintext provided by the sender. 2019-03-19 13:12:26 -06:00
Homu 008705d7c1 Auto merge of #3885 - ebfull:turnstile, r=bitcartel
Reject blocks that violate turnstile

This is an implementation of a consensus rule which marks blocks as invalid if they would lead to a turnstile violation in the Sprout or Shielded value pools. The motivations and deployment details can be found in the [accompanying ZIP draft](https://github.com/zcash/zips/pull/210).

**This PR only introduces the rule for testnet at the moment.**

We achieve the institution of this rule in three ways:

1. Nodes prior to #2795 did not record the "delta" in the Sprout value pool balance as part of the on-disk block index. This was a long time ago, though, and all nodes that are consensus-compatible with the network today have been recording this value for newer blocks. However, the value is absent from older block indexes unless the node has reindexed or synchronized from scratch in the time since. We shouldn't need to require nodes to reindex in order to enforce this consensus rule. We avoid this problem by falling back on a hardcoded Sprout shielded value pool balance in a very recent block.
2. If during `ConnectBlock` we observe that the resulting shielded value pool balance of Sprout or Sapling is negative, we reject the block.
3. During the miner's block assembly process the miner will skip over transactions if adding them to the assembled block might violate the turnstile, since the resulting block would be invalid. This means that theoretical transactions violating the turnstile would still be relayed in the network (and made available in users' memory pools) and so a turnstile violation would have some visibility outside of block relay.

## Smoke Testing

It's really tricky to test the behavior that automatically falls back to hardcoded shielded value pool balances in our architecture because it's very testnet-specific and node-version-specific. However, we can do some smoke tests to see that everything is working.

I modified the serialization of `CDiskBlockIndex` to serialize `boost::none` for `nSproutValue`

```
if ((s.GetType() & SER_DISK) && (nVersion >= SPROUT_VALUE_VERSION)) {
    boost::optional<CAmount> nSproutValueFake = boost::none;
    READWRITE(nSproutValueFake);
}
```

and then began a reindex of my node which I interruped around height 130k on testnet. I then restored the original serialization and resumed the reindex; I have thus _roughly_ simulated a older node "upgrading" to a newer node that records the deltas when processing new blocks. My node showed pool monitoring was disabled, as expected, for Sprout. I confirmed that some blocks following the reindex had nonzero Sprout `valueDelta` from `getblock`, as expected. I finished the reindex, restarted the node, and confirmed that the serialization worked for newer blocks but not older blocks by querying `getblock`, simply as a reassurance.

Finally, I introduced the code in this PR and reloaded the node. The desired behavior (that the chain began to be "monitored" again) worked, and the values were consistent with the hardcoded constant. I then made a payment to a Sprout z-addr from the transparent pool and the pool value increased as expected, as reported by `getblockchaininfo`. I reindexed the node again to exercise the remaining logic and check for turnstile violations throughout the history of testnet; there were none.
2019-03-19 12:10:17 -07:00
Eirik0 ee9ff2ce74 Rename and update comment 2019-03-19 12:55:55 -06:00
Sean Bowe 8d0e2befe7 (minor) Remove added newline. 2019-03-19 12:45:21 -06:00
Sean Bowe 4e3dca978b Do not enable ZIP209 on regtest right now. 2019-03-19 12:44:53 -06:00
Marius Kjærstad 3f8e662a89
Update COPYRIGHT_YEAR in clientversion.h to 2019
Update COPYRIGHT_YEAR in clientversion.h to 2019
2019-03-19 17:42:52 +01:00
Sean Bowe 30a5d6f520 Only enforce Sapling turnstile if balance values have been populated. 2019-03-18 14:09:32 -06:00
Sean Bowe b5c7e63bcd Change SproutValuePoolCheckpointEnabled to ZIP209Activated 2019-03-18 11:32:26 -06:00
Sean Bowe 6482b661ab Check blockhash of fallback block for Sprout value pool balance 2019-03-14 15:39:11 -06:00
Sean Bowe ebe2edce9a Add newlines to turntile log messages for miner 2019-03-14 15:25:31 -06:00
Sean Bowe 831725a671 Use existing chainparams variable 2019-03-14 15:25:10 -06:00
Sean Bowe 2b1252af80 Consolidate logic to enable turnstile auditing for testnet/regtest/mainnet. 2019-03-14 14:29:04 -06:00
Sean Bowe cb6df4b0cc Fix tallying for Sprout/Sapling value pools. 2019-03-14 14:08:12 -06:00
Simon ea5f00aa5d Add checkpoint for block 497000. 2019-03-13 17:31:49 -07:00
Simon 16385486b8 Update nMinimumChainWork using block 497000. 2019-03-13 17:24:43 -07:00
Sean Bowe bf4de896e7 (testnet/regtest) Avoid mining transactions that would violate the turnstile. 2019-03-13 01:38:34 -06:00
Jack Grigg 98cfe4228c
configure: Guess -march for libsnark OPTFLAGS instead of hard-coding
When cross-compiling, this will remove the -march flag entirely unless
the user specifies CONFIGURE_FLAGS="--with-gcc-arch=<arch>".
2019-03-13 07:37:56 +00:00
Sean Bowe 8a990a7d64 (testnet) Reject blocks that result in turnstile violations 2019-03-13 00:54:29 -06:00
Sean Bowe 24db3297df (testnet) Fall back to hardcoded shielded pool balance to avoid reorgs. 2019-03-13 00:43:54 -06:00
Jack Grigg 1fee15028f
Move payment disclosure code and tests into wallet
The code was already compiled as part of the wallet, but the tests were
not, meaning that the tests would fail to compile when the wallet was
disabled.
2019-03-06 10:04:23 +13:00
Jack Grigg c7fc78987a
Move utiltest.cpp from wallet to common
This ensures it is accessible by the test suite when the wallet is
disabled.
2019-03-06 09:41:39 +13:00
Jack Grigg c233f6fd31
Add comments 2019-03-06 09:03:55 +13:00
Jonas Schnelli 648d6bee65
miner: rename UpdateRequestCount signal to ResetRequestCount 2019-03-06 09:02:50 +13:00
Jonas Schnelli f4055fe158
add CReserveScript to allow modular script keeping/returning
- use one CReserveScript per mining thread
2019-03-06 09:02:50 +13:00
Jonas Schnelli 38da0d16b1
fix GetScriptForMining() CReserveKey::keepKey() issue 2019-03-06 09:02:50 +13:00
Jonas Schnelli b2993bc5d4
detach wallet from miner 2019-03-06 09:02:50 +13:00
Eirik0 6281cc32b7 Use a custom error type if creating joinsplit descriptions fails 2019-02-28 11:29:14 -07:00
Eirik0 9e8729113c Split test in to multiple parts 2019-02-26 15:09:55 -07:00
Jack Grigg cb51e03587 Add Sprout support to TransactionBuilder 2019-02-26 13:36:50 -07:00
Homu 92cd76fcba Auto merge of #3859 - LarryRuane:3708-patched-explorer, r=mdr0id
Simplify DisconnectBlock arguments/return value

DisconnectBlock currently has a complicated interface:

  Situation       Return value
                  pfClean != nullptr   pfClean == nullptr

  All good:       true                 true
  Failure:        false                false
  Unclean rewind: true                 false
                  with *pfClean=false

Change this to return a tristate enum instead. As an added bonus,
remove the ValidationState& argument which was unused.
2019-02-26 10:50:59 -08:00
Pieter Wuille ec555a8e9b Simplify DisconnectBlock arguments/return value
DisconnectBlock currently has a complicated interface:

  Situation       Return value
                  pfClean != nullptr   pfClean == nullptr

  All good:       true                 true
  Failure:        false                false
  Unclean rewind: true                 false
                  with *pfClean=false

Change this to return a tristate enum instead. As an added bonus,
remove the ValidationState& argument which was unused.
2019-02-26 11:10:20 -07:00
Homu 52fbc1ce66 Auto merge of #3657 - Eirik0:3395-sapling-benchmarks, r=str4d
Update zcbenchmarks to include sapling data

Closes #3395

This PR adds a benchmark named `trydecryptsaplingnotes` which is intended to be similar to `trydecryptnotes`. It also adds a benchmark `incnotewitnessessapling` which is similar to `incnotewitnesses`.

As a side note, while looking for examples to follow I ran in to a fair amount of setup, which I wanted to be able to reuse, repeated across several tests. I pulled some of that logic in to a utility functions and refactored the existing tests using that setup.
2019-02-26 09:05:35 -08:00
Homu 48b7dea5a8 Auto merge of #3639 - leto:size_on_disk, r=bitcartel
Port getblockchaininfo.size_on_disk from BTC master

Closes #3630.
2019-02-25 10:08:44 -08:00
Homu e45154f559 Auto merge of #3817 - Eirik0:3646-better-error-msgs, r=mdr0id
Improve some error messages when building a transaction fails

Follow up from #3646
2019-02-19 10:09:43 -08:00
mdr0id 81fbf49883 make-release.py: Versioning changes for 2.0.3. 2019-02-11 09:05:39 -08:00
mdr0id fe0507761a Update nMinimumChainWork with information from the getblockchaininfo RPC 2019-02-11 09:04:13 -08:00
mdr0id 626874390a make-release.py: Versioning changes for 2.0.3-rc1. 2019-02-04 11:51:52 -08:00
Eirik Ogilvie-Wigley caa1203307 Improve some error messages when building a transaction fails 2019-01-30 04:12:15 -07:00
Eirik Ogilvie-Wigley 8a1d19307b Renaming and other minor cleanup 2019-01-29 21:18:10 -07:00
Eirik Ogilvie-Wigley 3e5cc59c2e Change to t->z transaction and create separate benchmark for sapling 2019-01-23 15:04:48 -07:00
Eirik Ogilvie-Wigley 275bd8f67a Add a method for generating a test CKey 2019-01-23 15:04:45 -07:00
Eirik Ogilvie-Wigley 010481c7e5 FakeCoinsViewDB can inherit directly from CCoinsView 2019-01-23 14:45:37 -07:00
Eirik Ogilvie-Wigley a6a17c45b8 benchmarks do not require updating network parameters 2019-01-23 14:45:37 -07:00
Eirik Ogilvie-Wigley b27ac486e4 Prevent header from being included multiple times 2019-01-23 14:45:37 -07:00
Eirik Ogilvie-Wigley edac39b8fd Include Sapling transactions in increment note witness benchmark 2019-01-23 14:45:37 -07:00
Eirik Ogilvie-Wigley 1534671fb0 Add test method for generating master Sapling extended spending keys 2019-01-23 14:45:37 -07:00
Eirik Ogilvie-Wigley 9eadcb3eca Move test SaplingNote creation to utiltest 2019-01-23 14:45:37 -07:00
Eirik Ogilvie-Wigley c3e2de5959 Move reusable Sapling test setup to utiltest 2019-01-23 14:12:02 -07:00
Eirik Ogilvie-Wigley 89e75c8c0d Add benchmark for decrypting sapling notes 2019-01-23 14:12:02 -07:00
Eirik Ogilvie-Wigley 8f41036701 Rename methods to include Sprout 2019-01-23 14:12:02 -07:00
Homu bf8ba762d6 Auto merge of #3737 - gtank:zmq_checkedblock, r=str4d
zmq: add flag to publish all checked blocks

This change adds a hook for the BlockChecked signal to the zmq publisher. This is useful for light wallet daemon initialization (see https://github.com/zcash/zcash/issues/3638 for context, and [lightwalletd](https://github.com/zcash-hackworks/lightwalletd) for implementation).

The new flag is `-zmqpubcheckedblock=address`, in keeping with the established style.
2019-01-23 12:53:51 -08:00
Homu 5862b2921b Auto merge of #3646 - Eirik0:transaction-builder-result, r=daira
Return more information when building a transaction fails

This PR is intended to make it easier to diagnose what went wrong when building a transaction using `TransactionBuilder` fails.
2019-01-22 10:14:27 -08:00
Homu 08dc0904fb Auto merge of #3711 - str4d:wallet-atomic-write-optimisation, r=Eirik0
wallet: Skip transactions with no shielded data in CWallet::SetBestChain()

Co-authored-by: Daira Hopwood <daira@jacaranda.org>

Closes #3495.
2019-01-21 13:16:00 -08:00
Eirik Ogilvie-Wigley c297558169 throw an exception rather than returning false when building invalid transactions 2019-01-17 15:19:13 -07:00
Eirik Ogilvie-Wigley d55d88707c Return more information when building a transaction fails 2019-01-17 15:10:42 -07:00
Homu 8df7a073ce Auto merge of #3647 - LarryRuane:2926-mutex-assert-stop, r=str4d
On shutdown, wait for miner threads to exit (join them)

Closes #2926. Have `Shutdown()` running in the main thread wait for miner threads to exit before exiting.
2019-01-03 08:49:16 -08:00
Jack Grigg a6da0b03da
Set Sprout note data in WalletTest.WriteWitnessCache 2019-01-02 13:23:28 +00:00
Homu abd55f27f2 Auto merge of #3691 - ebfull:printsproutr1cs, r=daira
Allow user to ask server to save the Sprout R1CS to a file during startup.

This adds an experimental feature `-savesproutr1cs` which can be used to save the file `r1cs` containing the constraint system used in the original launch of Zcash. The file is written to the parameters directory. This can be used to recover this file for verification of the Sprout MPC transcript and parameters.
2018-12-18 23:28:06 -08:00
Homu e84b865a55 Auto merge of #3716 - charlieok:initialize_params_in_transaction_builder_tests, r=daira
initialize pCurrentParams in TransactionBuilder tests

In issue https://github.com/zcash/zcash/issues/3715 the failing tests were calling Params(), which includes an assertion that pCurrentParams is not null, without first calling SelectParams(), which will set that pointer. All the other tests in the same test case (which don't fail in the manner described in #3715 ) start out by calling `SelectParams(CBaseChainParams::REGTEST);`.

This change adds an identical call to the affected tests, getting past the failed assertion  in Params() on pCurrentParams.

Here is a GitLab pipeline showing output from these tests run in isolation before this change:
https://gitlab.com/charlieok/zcash/pipelines/38304730

...and here is one with the same set of tests after this change:
https://gitlab.com/charlieok/zcash/pipelines/38307556
2018-12-16 06:01:54 -08:00
George Tankersley 260e81a8b1 zmq: add flag to publish all checked blocks
This change adds a hook for the BlockChecked signal to the zmq
publisher. This is useful for light wallet daemon initialization.

The new flag is `-zmqpubcheckedblock=address`
2018-12-15 00:02:52 -05:00
Homu c4d352166d Auto merge of #3699 - Eirik0:mergetoaddress-doc-update, r=daira
Update z_mergetoaddress documentation

Corrected an error, added clarification, and updated some formatting for z_mergetoaddress documentation.
2018-12-12 11:58:18 -08:00
Eirik Ogilvie-Wigley 25f1f7dc61 Update z_mergetoaddress documentation 2018-12-11 14:25:35 -07:00
Jack Grigg 7afb23ef31
Add Sapling test cases 2018-12-01 15:55:34 +00:00
Jack Grigg c3eaffdb48
Use nullptr instead of NULL in wallet tests 2018-12-01 15:51:00 +00:00
Homu 9cd74866c7 Auto merge of #3262 - str4d:2074-perf-1, r=str4d
Bitcoin 0.12 performance improvements

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6918
- bitcoin/bitcoin#6932

Part of #2074.
2018-11-30 15:25:33 -08:00
Homu 8e2ca4d94e Auto merge of #3714 - mdr0id:release-v2.0.2, r=bitcartel
Release v2.0.2
2018-11-30 10:18:43 -08:00
mdr0id 6f8d182f50 Add Charlie and Ariel alias to author_aliases
Update approx_release_height to allow pre-rel to get into master prior

Bump APPROX_RELEASE_HEIGHT due to transient failures in pre-release 2.0.2 PR
2018-11-30 10:04:49 -08:00
mdr0id 9a126cbb70 Update nnMinimumChainWork per 2.0.2 getblockchaininfo 2018-11-29 10:32:18 -08:00
Charlie O'Keefe 67d2b19caa initialize pCurrentParams in TransactionBuilder tests
These three tests were failing when run in isolation, or sporadically
when test order is randomized, since Params() includes an assertion that
pCurrentParams is not null.
2018-11-29 01:40:37 -07:00
mdr0id d974ec3fec make-release.py: Versioning changes for 2.0.2. 2018-11-28 11:00:22 -08:00
Jack Grigg 0de659946e
wallet: Skip transactions with no shielded data in CWallet::SetBestChain()
Co-authored-by: Daira Hopwood <daira@jacaranda.org>

Closes #3495.
2018-11-28 00:56:42 +01:00
Larry Ruane 23c9deafb7 remove non-ascii characters from help text 2018-11-20 17:41:45 -07:00
mdr0id 4c5943cade make-release.py: Versioning changes for 2.0.2-rc1. 2018-11-18 10:11:46 -08:00
Sean Bowe 685c0ab07f Allow user to ask server to save the Sprout R1CS out during startup. 2018-11-17 17:10:58 -07:00
Simon 6d154ace1a For ZEC-013. RPC sendrawtransaction returns error if tx expiring soon. 2018-11-17 09:02:18 -08:00
Simon 4484c76202 For ZEC-013. RPC createrawtransaction returns error if tx expiring soon. 2018-11-17 09:02:10 -08:00
Simon cc1ab2db55 For ZEC-013. Don't propagate txs which are expiring soon in p2p messages.
When responding to "mempool" message, do not include the txid of an
expiring soon transaction in the "inv" message reply.
When responding to "getdata" message, do not reply with a "tx" message
for a transaction which is expiring soon.
2018-11-17 09:02:00 -08:00
Simon f8cd79c2de For ZEC-013. Mitigate potential tx expiry height related DoS vector.
Don't accept transactions which are about to expire (next 3 blocks).
Don't set a ban score if a peer does propragate these transactions.
See ZEC-013 for more detail.
2018-11-17 09:01:49 -08:00
Homu a47e1fda73 Auto merge of #3684 - str4d:load-sapling-chain-value, r=bitcartel
Load sapling chain value into memory

`CBlockIndex::nSaplingValue` has been correctly set and written to disk since before Sapling activated, meaning that all nodes now are correctly tracking the Sapling shielded pool value on-disk. However, on restart the per-block values are not being read into memory, and so the in-memory pool value appears to be zero on every restart. Setting `nSaplingValue` in-memory during block index loading fixes the problem.
2018-11-16 21:07:46 -08:00
Homu ed6b10018a Auto merge of #3670 - LarryRuane:3399-peer-ban-overwinter, r=bitcartel
don't ban peers when loading pre-sapling (and pre-blossom) blocks

Resolves #3399.
2018-11-16 19:22:48 -08:00