Sean Bowe
7b62078782
Remove underscores from gtest test names.
2018-05-07 14:37:46 -06:00
Sean Bowe
7703a673ea
Generalize the PushAnchor implementation behavior.
2018-05-07 14:37:43 -06:00
Sean Bowe
9ea4e387b2
Generalize the PopAnchor implementation behavior.
2018-05-07 13:46:06 -06:00
Sean Bowe
18322f074c
Introduce support for GetBestAnchor(SAPLING).
2018-05-07 13:46:06 -06:00
Sean Bowe
2bd59e1473
Rename PushAnchor to PushSproutAnchor.
2018-05-07 13:46:06 -06:00
Sean Bowe
008f4ee8e7
Rename GetAnchorAt to GetSproutAnchorAt.
2018-05-07 13:46:06 -06:00
Sean Bowe
8b8d70cad9
Rename DB_ANCHOR to DB_SPROUT_ANCHOR.
2018-05-07 13:46:06 -06:00
Sean Bowe
30325eebf5
Add primitive implementation of GetSaplingAnchorEnd.
2018-05-07 13:46:06 -06:00
Sean Bowe
691a3fa2e9
Rename hashReserved to hashSaplingAnchorEnd.
2018-05-07 13:46:06 -06:00
Sean Bowe
08f0728884
Rename hashAnchor to hashSproutAnchor.
2018-05-07 13:46:06 -06:00
Sean Bowe
d455828fdc
Specifically describe anchors as Sprout anchors.
2018-05-07 13:46:06 -06:00
Sean Bowe
28d20bdb11
Rename NullifierType to ShieldedType.
2018-05-07 13:46:06 -06:00
Sean Bowe
2f23a656fb
Add regression tests and test vectors for Sapling merkle tree
2018-05-07 13:46:06 -06:00
Sean Bowe
2b002a7e60
Add implementation of Sapling merkle tree
2018-05-07 13:46:06 -06:00
Sean Bowe
a7cbb8475f
Abstract `uncommitted` and depth personalization for IncrementalMerkleTree.
2018-05-07 13:46:06 -06:00
Homu
265eca3f47
Auto merge of #3212 - str4d:2864-sapling-tx-size-limit, r=str4d
...
Raise 100kB transaction size limit from Sapling activation
Closes #2864 .
2018-05-07 02:20:42 -07:00
Homu
8ef1d333b5
Auto merge of #2894 - per-gron:dont-export-unless-needed, r=str4d
...
Make some globals static that can be
I wrote this patch as part of making a Bazel build system but it really is independent from that so I'm putting this as a separate PR.
External linkage does not help and just encourages sloppy dependencies (ie using symbols only declared in a cpp file in some other cpp file) and can lead to weird issues when there are name collisions.
2018-05-04 15:05:43 -07:00
Jack Grigg
e1dbec49b7
Add test of Sapling transaction size boundary
2018-05-04 11:17:30 +01:00
Jack Grigg
892ae945f7
Rework z_sendmany z-address recipient limit
...
From Sapling, the z-address recipients could require either JSDescriptions or
OutputDescriptions. Instead of trying to give an exact number in the help text,
rely on transaction size estimation to guide user behaviour.
2018-05-04 11:17:30 +01:00
Jack Grigg
25fee3509a
Rename MAX_TX_SIZE to MAX_TX_SIZE_AFTER_SAPLING
2018-05-04 11:17:30 +01:00
Jack Grigg
ddcee7e13a
Benchmark the largest valid Sapling transaction in validatelargetx
...
11130 inputs results in a transaction between 1992301 and 2003431 bytes.
2018-05-04 11:17:30 +01:00
Jack Grigg
15ec5525e3
Raise 100kB transaction size limit from Sapling activation
...
Closes #2864 .
2018-05-04 11:17:30 +01:00
Homu
d97bfb766b
Auto merge of #3228 - str4d:3058-taddr-encoding-refactor, r=str4d
...
Refactor t-address encoding
Includes code cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#11117
- bitcoin/bitcoin#11259
- Only the second commit (first is for QT code)
- bitcoin/bitcoin#11167
- Only the first commit (the rest are not part of the t-address encoding refactor).
Part of #3058 . Precursor to #3202 .
2018-05-03 18:12:22 -07:00
Homu
2d1a3cf8f5
Auto merge of #3183 - bitcartel:least_authority_issue_d, r=str4d
...
Closes #3182 - Least Authority Issue D
Prevent undefined behaviour when null pointer is passed in as parameter to function
Includes a backport of bitcoin/bitcoin#10250 .
2018-05-03 16:39:10 -07:00
Homu
c7f5d5ce1c
Auto merge of #3227 - str4d:3191-nullifier-macos-fix, r=str4d
...
Fix -Wstring-plus-int warning on clang
2018-05-03 14:36:39 -07:00
Pieter Wuille
c8f9c87bf1
Implement {Encode,Decode}Destination without CBitcoinAddress
2018-05-03 01:13:04 +01:00
João Barbosa
6939c994ef
Remove unused GetKeyID and IsScript methods from CBitcoinAddress
2018-05-03 01:13:04 +01:00
Pieter Wuille
56c43a36bf
Move CBitcoinAddress to base58.cpp
2018-05-03 01:13:04 +01:00
Jack Grigg
b6be3e88bb
Use CBitcoinAddress wrappers in Zcash-specific code
2018-05-03 01:13:04 +01:00
Pieter Wuille
07444da1db
Introduce wrappers around CBitcoinAddress
...
This patch removes the need for the intermediary Base58 type
CBitcoinAddress, by providing {Encode,Decode,IsValid}Destination
function that directly operate on the conversion between strings
and CTxDestination.
2018-05-03 01:12:57 +01:00
Homu
9e5398686c
Auto merge of #3206 - bitcartel:3194_polymorphic_note_class, r=str4d
...
Update note classes to be polymorphic
Closes #3194 . Lays foundation for introduction of Sapling notes through refactoring and creation of a class hierarchy for Sprout notes. This PR updates some tests, but otherwise is a no-op.
2018-05-02 08:07:35 -07:00
Homu
53fa6f1315
Auto merge of #3179 - bitcartel:backport_transaction_details_in_getblock_v2bitcartel, r=str4d
...
Add improvements to getblock RPC output
Includes and supercedes #3095 . Includes code cherry-picked from bitcoin/bitcoin#8704 .
2018-05-01 10:19:10 -07:00
Homu
0a8d0c25e8
Auto merge of #3220 - Eirik0:3209-fix-CheckTransaction, r=str4d
...
Implement consensus rules about the number of Spend and Output Descriptions in a transaction
Closes #3209 .
Part of #3065 .
2018-05-01 07:09:52 -07:00
Jack Grigg
1f9dfbb9f0
Fix -Wstring-plus-int warning on clang
2018-05-01 14:55:47 +01:00
Homu
90304c4214
Auto merge of #3213 - str4d:3202-precursor, r=str4d
...
Upstream encoding cleanups
Cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#7922
- bitcoin/bitcoin#7825
- bitcoin/bitcoin#8317
- bitcoin/bitcoin#9804
- Only the commit that changed `base58.cpp`
Precursor to #3202 .
2018-05-01 05:22:38 -07:00
Homu
23f8b30c88
Auto merge of #3193 - str4d:b9856-badalloc-terminate, r=bitcartel
...
Terminate immediately when allocation fails
Backport of bitcoin/bitcoin#9856
Closes #1498 .
2018-05-01 02:09:51 -07:00
Simon
54a872f0fa
Fix undefined behaviour, calling memcpy with NULL pointer.
...
Identified as part of audit: Least Authority, Issue D.
2018-04-30 16:41:02 -07:00
Simon
9bd8f092c6
Closes #3178 by adding verbosity level improvements to getblock RPC.
...
This is a follow-up commit for d0a1d833520d120bb5a2ac4cf4192047af6afe24
found in PR #3095 in order to fix nits and add a test.
2018-04-30 11:51:59 -07:00
Simon
bf911b3038
Tweaks to d0a1d83 to complete backport of Bitcoin PR #8704
2018-04-30 09:55:30 -07:00
Peter Pratscher
eb78a45a0c
Backported Bitcoin PR #8704 to optionally return full tx details in the getblock rpc call
2018-04-30 09:55:30 -07:00
Marshall Gaucher
b300118002
Merge pull request #2813 from str4d/2074-uacomment
...
Implement uacomment config parameter
2018-04-30 09:12:38 -06:00
Simon
debf6af9f8
Move memo member varible from SproutNotePlaintext to BaseNotePlaintext.
...
Add memo() accessor to BaseNotePlaintext.
2018-04-26 15:05:30 -07:00
Simon
d266f40393
Create class hierarchy for SproutNotePlaintext.
...
BaseNotePlaintext contains member variable for common attribute, value.
2018-04-26 15:05:30 -07:00
Simon
5020a93631
Refactoring: rename NotePlaintext --> SproutNotePlaintext
...
Also renames:
CNotePlaintextEntry --> CSproutNotePlaintextEntry
CUnspentNotePlaintextEntry --> CUnspentSproutNotePlaintextEntry
2018-04-26 15:05:30 -07:00
Simon
9354f8e568
Remove unused SproutNote variables.
2018-04-26 15:05:30 -07:00
Simon
5f4fa1a954
Add virtual destructor to SproutNote and BaseNote
...
Also add test to make sure default copy constructors are okay.
2018-04-26 15:05:30 -07:00
Simon
5d99e3e92f
Refactoring: SproutNote member variable value moved to BaseNote.
...
All notes have a value, so the member variable has been moved to the
base class, and direct member access has been replaced with a getter.
2018-04-26 15:05:19 -07:00
Eirik Ogilvie-Wigley
812098256f
Coinbase transactions can not have shielded spend or output
2018-04-26 15:53:26 -06:00
Eirik Ogilvie-Wigley
4b4662b06d
Make sure transactions have non-empty outputs
2018-04-26 15:24:59 -06:00
Homu
a2ff78620a
Auto merge of #3191 - Eirik0:3057-sapling-nullifier-set, r=str4d
...
Add sapling nullifier set
PR for https://github.com/zcash/zcash/issues/3057
2018-04-26 05:28:39 -07:00