Simon
33264f5b46
Remove GetTxid() from CTransaction and update test_txid
2016-09-07 15:12:09 -07:00
Simon
805344dcf4
Refactor: replace calls to GetTxid() with GetHash()
2016-09-07 15:12:09 -07:00
Simon
3bdb071cc3
Remove #1144 from transaction.cpp by reverting back to commit 942bc46
.
2016-09-07 15:12:09 -07:00
Simon
82f3c490b1
Remove #1144 from transaction.h.
...
Reverts to 4bc00dc
with commits f0dab51
(snark) and f5e5707
(joinsplit) retained.
GetTxid() is now an alias for GetHash().
2016-09-07 15:12:09 -07:00
Jack Grigg
5db5e42ec3
Add optional bool to disable computation of proof in JSDescription constructor
2016-08-30 00:29:49 +12:00
Daira Hopwood
c6a7e897bc
Add mostly-static checks on consistency of Equihash parameters, MAX_HEADERS_RESULTS, and MAX_PROTOCOL_MESSAGE_LENGTH.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-08-24 06:13:06 +01:00
zkbot
cd9d373987
Auto merge of #1260 - str4d:1175-byte-array-manipulation, r=ebfull
...
Update Equihash implementation to match the Zcash spec
Closes #1175
2016-08-24 03:01:13 +00:00
Sean Bowe
f0dab51cf3
Implement zkSNARK compression.
2016-08-22 00:36:12 -06:00
Jack Grigg
5be6abbf84
Store the Equihash solution in minimal representation in the block header
...
The genesis blocks and miner tests have been regenerated, because changing the
block header serialisation format changes the block hash, and thus validity.
The Equihash solutions have been removed from the bloom test inputs for
simplicity (block validity is not checked there; only a valid serialisation is
necessary).
2016-08-16 16:02:39 +12:00
Sean Bowe
f5e5707d4c
Change memo field size and relocate `ciphertexts` field of JoinSplit description.
2016-08-15 09:39:14 -06:00
Simon
74cd8821c7
Remove GetSerializeHash() method.
2016-07-29 23:28:34 -07:00
Simon
c63af91a78
Update comment.
2016-07-28 18:44:00 -07:00
Simon
3979881fc5
Fix comment.
2016-07-28 16:40:01 -07:00
Simon
92f7426d19
Make txid const.
2016-07-27 12:14:44 -07:00
Simon
90a9019387
Fix issue where a coinbase tx should have it's sigscript hashed
...
to avoid duplicate txids, as discussed in BIP34 and BIP30.
2016-07-27 00:52:27 -07:00
Simon
07e6d5b025
Refactor GetTxid() into UpdateTxid() to match coding style of hash member variable.
...
UpdateTxid() is called alongside UpdateHash() when a CTransaction is
deserialized or constructed. GetTxid() now returns a const reference.
2016-07-26 17:13:03 -07:00
Simon
10d2c57c0d
Replace calls to GetHash() with GetTxid() for transaction objects.
...
Where the caller intends to receive a transaction id and not a double
SHA256 hash.
2016-07-26 17:13:03 -07:00
Simon
1e84d84d3a
Rename GetHash() method to GetSerializeHash().
...
When pulling from upstream we are now forced to examine GetHash() usage
and replace with GetSerializeHash() if the caller wants a double SHA256
hash, or with GetTxid() if the caller wants a transaction id.
2016-07-26 17:09:27 -07:00
Simon
49689a574c
Add GetTxid() which returns a non-malleable txid.
2016-07-26 17:09:27 -07:00
Daira Hopwood
4bc00dc141
Bucket -> note.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-07-18 10:06:18 -06:00
Sean Bowe
b7e4abd6f7
Rename some usage of 'pour'.
2016-07-18 10:06:18 -06:00
Sean Bowe
942bc46756
Rename GetPourValueIn to GetJoinSplitValueIn
2016-07-18 10:06:18 -06:00
Sean Bowe
bfeaf0049a
Rename JSDescription's `serials` to `nullifiers`.
2016-07-18 10:06:18 -06:00
Sean Bowe
8675d94b63
Rename vpour to vjoinsplit.
2016-07-18 10:06:18 -06:00
Sean Bowe
a8c68ffe99
Rename CPourTx to JSDescription.
2016-07-18 10:06:18 -06:00
Jack Grigg
a8d384aeda
Add a 256-bit reserved field to the block header
...
This field has no defined semantics. While it was added as a result of
discussions about merged mining in #724 , this field will not necessarily ever be
used for that purpose.
2016-06-07 16:06:25 +12:00
Sean Bowe
3a10823ad4
Wrap lines in *CTransaction constructors.
2016-05-30 19:35:09 -06:00
Sean Bowe
1e99cbab04
Use joinsplit_sig_t in more places.
2016-05-30 19:33:28 -06:00
Sean Bowe
320f2cc7e0
Switch to Ed25519 for cryptographic binding of joinsplits to transactions.
2016-05-30 11:05:55 -06:00
Taylor Hornby
b48122b57b
Fix tests for JoinSplit signatures
2016-05-30 11:05:43 -06:00
Taylor Hornby
6aae9d1a55
Sign JoinSplit transactions
2016-05-30 11:05:31 -06:00
Sean Bowe
3ebca007f3
Reorder fields of CPourTx to reflect the spec.
2016-05-24 11:08:31 -06:00
Sean Bowe
9285bba885
Enable binary serializations of proofs and r1cs keys, and make the `CPourTx` proof field fixed-size.
2016-05-24 11:08:31 -06:00
Sean Bowe
2dc3599271
Transplant of libzcash.
2016-05-12 16:44:47 -06:00
Sean Bowe
2140639309
Remove scriptPubKey/scriptSig from CPourTx, and add randomSeed.
2016-05-12 16:44:30 -06:00
Sean Bowe
5961dcb6da
Change ciphertext length to match protocol spec, and refactor the use of constants.
2016-05-05 21:02:03 -06:00
Sean Bowe
6c36a9fe03
NoteEncryption implementation and integration, removal of ECIES and crypto++ dependencies.
2016-04-28 16:25:12 -06:00
Jack Grigg
fdda3c5085
Use Equihash for Proof-of-Work
...
The main and test networks are configured to use parameters that are currently
low-memory but usable with the basic solver; they will be increased once the
solver is optimised. The regtest network is configured to have extremely low
memory usage for speed.
Note that Bitcoin's double-hasher is used for the difficulty check. This does
not match the paper, but is simpler than changing the block header
serialization. Single hashing is kept for the EquiHash solver because there is
no requirement on execution time there, only on memory usage.
2016-04-08 13:56:00 +12:00
Sean Bowe
a897db652f
Reorganizing the zerocash tree.
2016-02-15 15:28:20 -07:00
Sean Bowe
d488e75ea8
Fix comment.
2016-01-19 16:29:44 -07:00
Sean Bowe
f512cf7c7b
Added value balance consensus enforcement for pours.
2016-01-19 14:36:04 -07:00
Sean Bowe
96c31d163f
Added CPourTx verification and construction routines.
2016-01-19 14:36:04 -07:00
Sean Bowe
5884044ba9
Introduce `vpour` to `CTransaction`.
...
Transactions of version 2 and above contain a `vpour` field which is a vector of `CPourTx`
objects that embody our protocol. We introduce serialization primitives for boost::array
(we intend for changing the amount of inputs and outputs in the circuit to be simple).
SIGHASH_* operations hash this field like any other for now.
2016-01-19 14:35:59 -07:00
Peter Todd
5e82e1c8f5
Add CHECKLOCKTIMEVERIFY (BIP65) soft-fork logic
...
Based on the earlier BIP66 soft-fork logic implemented by Pieter
Wuille's 5a47811da5
Rebased-From: 287f54fc90c29301faede8d4ac2ea24a91441917
2015-10-08 17:48:51 +02:00
jtimon
691161d419
Consensus: Create consensus/consensus.h with some constants
2015-04-20 21:27:51 +02:00
Wladimir J. van der Laan
df5c246ba3
Merge pull request #5831
...
1d9b378
qa/rpc-tests/wallet: Tests for sendmany (Luke Dashjr)
40a7573
rpcwallet/sendmany: Just take an array of addresses to subtract fees from, rather than an Object with all values being identical (Luke Dashjr)
292623a
Subtract fee from amount (Cozz Lovan)
90a43c1
[Qt] Code-movement-only: Format confirmation message in sendcoinsdialog (Cozz Lovan)
2015-03-16 12:23:14 +01:00
Cozz Lovan
292623adf5
Subtract fee from amount
...
Fixes #2724 and #1570 .
Adds the
automatically-subtract-the-fee-from-the-amount-and-send-whats-left
feature to the GUI and RPC (sendtoaddress,sendmany).
2015-03-13 11:04:18 +01:00
Wladimir J. van der Laan
a0ae79d775
Replace CBlockHeader::GetHash with call to SerializeHash
...
Removes variability between LE and BE.
As suggested by @sipa.
2015-03-06 17:21:59 +01:00
Wladimir J. van der Laan
4f92773f92
src/primitives/transaction.h: endian compatibility in serialization
2015-03-06 17:21:58 +01:00
Wladimir J. van der Laan
81aeb28436
src/primitives/block.cpp: endian compatibility in GetHash
2015-03-06 17:21:58 +01:00