Commit Graph

1330 Commits

Author SHA1 Message Date
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 8068491d2c Fix check transaction tests 2019-08-04 14:35:47 -06:00
Eirik Ogilvie-Wigley f9d6b3e7ef Extract Halvings method and add tests 2019-08-02 21:37:48 -06:00
Eirik Ogilvie-Wigley 27ee4d64f2 Fix integer truncation in Blossom halving calculation 2019-08-02 19:35:53 -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
Eirik Ogilvie-Wigley 8865f4b6f6 Update expiry height for shorter block times 2019-07-30 01:16:37 -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
Simon d7ebbeb2aa Modify PartitionCheck to be aware of pre & post Blossom target spacing. 2019-07-11 14:17:58 -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
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
Dimitris Apostolou 8bcb96999e
Rename joinsplit to shielded 2019-06-16 22:50:58 +03:00
Dimitris Apostolou f57f76d789
Rename vjoinsplit to vJoinSplit 2019-06-16 19:13:49 +03: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
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
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 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
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 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
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
Simon 867786d777 Enable experimental feature -developersetpoolsizezero on mainnet. 2019-04-24 08:40:17 -07:00
Larry Ruane 3d018ab556 add -spentindex changes for bitcore insight block explorer 2019-04-23 11:06:23 -06:00
Simon 4c1a8884f4 Add testnet and regtest experimental feature: -developersetpoolsizezero 2019-04-22 14:24:40 -07:00
Larry Ruane 6cf0e50b56 add -addressindex changes for bitcore insight block explorer 2019-03-28 12:03:48 -06:00
Sean Bowe 8d0e2befe7 (minor) Remove added newline. 2019-03-19 12:45:21 -06: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