Commit Graph

239 Commits

Author SHA1 Message Date
jl777
de4e4047c6 Test 2018-07-21 03:08:28 -11:00
jl777
8506f4cc0f Return hash160 2018-07-21 03:06:49 -11:00
jl777
e0509cb521 Return valid vSolution 2018-07-21 03:04:17 -11:00
jl777
4b80614b5e Test 2018-07-21 02:56:09 -11:00
jl777
f6753cc656 Add CC type to extract destination 2018-07-21 02:53:24 -11:00
jl777
fa7bf712a1 Add support for pay2pubkey for -addressindex 2018-06-26 04:40:32 -11:00
David Dawes
67edc9df03 Another __cpuid() conflict. 2018-06-16 17:31:54 -07:00
Michael Toutonghi
cc1ae28b0c Made time locked addresses visible 2018-05-28 12:45:22 -07:00
Michael Toutonghi
1f722359c1 Verus Proof of Stake Compete with Additional ant-fork protection on block 1 2018-05-13 18:59:06 -07:00
Scott Sadler
20c3ac51c2 wip 2018-05-09 16:17:28 -03:00
miketout
204cf3fcba Enable seamless spending of timelocked coinbases through z_shieldcoinbase 2018-05-09 00:49:09 -07:00
Homu
f0daf3915f Auto merge of #3233 - str4d:3164-sapling-sighash, r=str4d
ZIP 243: Sapling SignatureHash

Closes #3164.
2018-05-08 16:59:33 -07:00
miketout
ea340a1443 Recognizing CLTV transactions more broadly 2018-05-08 13:33:14 -07:00
Jack Grigg
b391b70736 Implement Sapling signature hash (ZIP 243) 2018-05-08 11:45:38 +01:00
miketout
e980a26ddd Enable time locked coin bases to be used as normal coinbase transactions with longer maturity, fix max_money 2018-05-04 16:33:34 -07: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
miketout
48d800c2c6 Merge all Komodo changes, including proof of stake, crypto conditions, passport, etc. 2018-05-02 03:24:21 -07:00
Scott Sadler
0cb91a8d20 wip 2018-04-29 00:34:57 -03:00
miketout
a0dd01bc50 Bug fixes in hash algorithm, parameters, and time lock support 2018-04-28 15:05:20 -07:00
Michael Toutonghi
29bd53a102 Rewrite time locks, coinbase validation, and script functions in C++ for easier integration 2018-04-20 18:38:39 -07:00
Jack Grigg
2d922b66b0 Pass transaction header into correct SignatureHash serialization level
We need to indicate whether PHGR or Groth proofs are expected to vjoinsplit,
which is serialized in an inner hash, not the outer hash.
2018-04-19 20:35:33 +01:00
Jack Grigg
b7e75b17af Implement basic Sapling v4 transaction parser
Details of Sapling datatypes will be filled in later; for now, they are treated
as binary blobs.

Includes code cherry-picked from upstream commit:
    7030d9eb47254499bba14f1c00abc6bf493efd91
    BIP144: Serialization, hashes, relay (sender side)
2018-04-19 05:01:47 +01:00
Jack Grigg
68a1a592ca Remove nType and nVersion from Zcash-specific code 2018-04-17 13:09:47 +01:00
Pieter Wuille
242f1421db Get rid of nType and nVersion
Remove the nType and nVersion as parameters to all serialization methods
and functions. There is only one place where it's read and has an impact
(in CAddress), and even there it does not impact any of the recursively
invoked serializers.

Instead, the few places that need nType or nVersion are changed to read
it directly from the stream object, through GetType() and GetVersion()
methods which are added to all stream classes.
2018-04-17 13:09:28 +01:00
Pieter Wuille
b8a6579366 Make GetSerializeSize a wrapper on top of CSizeComputer
Given that in default GetSerializeSize implementations created by
ADD_SERIALIZE_METHODS we're already using CSizeComputer(), get rid
of the specialized GetSerializeSize methods everywhere, and just use
CSizeComputer. This removes a lot of code which isn't actually used
anywhere.

For CCompactSize and CVarInt this actually removes a more efficient
size computing algorithm, which is brought back in a later commit.
2018-04-16 07:38:38 -06:00
Pieter Wuille
1315591c85 Make streams' read and write return void
The stream implementations had two cascading layers (the upper one
with operator<< and operator>>, and a lower one with read and write).
The lower layer's functions are never cascaded (nor should they, as
they should only be used from the higher layer), so make them return
void instead.
2018-04-16 07:38:37 -06:00
Jack Grigg
d2fb34fb7c Handle usage of prevector for CScript in Zcash-specific code 2018-04-16 07:38:36 -06:00
Pieter Wuille
29a8ade782 Prevector type 2018-04-16 07:38:36 -06:00
mruddy
690d38f0f8 Resolve issue bitcoin/bitcoin#3166.
These changes decode valid SIGHASH types on signatures in assembly (asm) representations of scriptSig scripts.
This squashed commit incorporates substantial helpful feedback from jtimon, laanwj, and sipa.
2018-04-16 07:38:36 -06:00
jl777
e60ac1ca04 Fix 2018-04-16 08:02:27 +03:00
Scott Grayson
0c4f43951e Merge branch 'dev' of https://github.com/jl777/komodo into trunk-merge
* 'dev' of https://github.com/jl777/komodo: (1062 commits)
  Delay PoW check until connect block
  Declare
  KOMODO_NEWBLOCKS
  Prevent autorewind if syncing. Not a critical update
  Change n0/n1 size to int32_t
  Syntax
  Fix n -> static n0/n1
  Test
  Test
  Test
  KOMODO_LONGESTCHAIN = height;
  Sync main.cpp to jl777
  -print
  -USD/EUR
  readme
  curl fix
  -print
  Fix buffer overflows and reduce KMD men usage
  -print
  Test
  ...
2018-04-15 21:59:37 -04:00
Scott Sadler
8a8e10f02f cleanups 2018-04-09 11:53:13 -03:00
Scott Sadler
e625be68a9 allow larger PUSHDATA for CC fulfillment 2018-04-06 02:55:47 -03:00
Scott Sadler
561f3e18c1 tests for bet protocol done; verify notarisation still to test 2018-04-05 05:06:22 -03:00
Scott Sadler
4c121ffdb0 cpp test suite for cryptoconditions integration 2018-04-01 21:18:01 -03:00
Scott Sadler
563581aff4 many changes: * fix CC malleability * extra validations for CCs such as requiring a signature and limiting types * different SIGHASH types for CC 2018-03-31 23:20:03 -03:00
Scott Sadler
2c8d8268dd ImportPayout cc eval code and alot of general cc polish. tests to write 2018-03-30 15:46:41 -03:00
Scott Sadler
991c422a9d fix CC 2018-03-28 15:02:20 -03:00
TheTrunk
8b78a8199e Bitcore port 2018-03-27 13:34:52 +02:00
Scott Sadler
9e74de25fc merge jl777/dev; zcash upgrade, CC to fix 2018-03-26 20:07:32 -03:00
jl777
9000990c30 Merge remote-tracking branch 'zcash/master' into rebase2
# Conflicts:
#	.travis.yml
#	Makefile.am
#	README.md
#	configure.ac
#	depends/Makefile
#	depends/builders/darwin.mk
#	depends/funcs.mk
#	depends/hosts/darwin.mk
#	depends/packages/googlemock.mk
#	depends/packages/googletest.mk
#	depends/packages/libsnark.mk
#	depends/packages/libsodium.mk
#	depends/packages/packages.mk
#	depends/packages/rust.mk
#	src/Makefile.am
#	src/Makefile.gtest.include
#	src/chainparams.cpp
#	src/chainparams.h
#	src/checkpoints.h
#	src/clientversion.h
#	src/coins.cpp
#	src/consensus/consensus.h
#	src/gtest/test_mempool.cpp
#	src/httprpc.cpp
#	src/init.cpp
#	src/komodo-tx.cpp
#	src/main.cpp
#	src/miner.cpp
#	src/policy/fees.cpp
#	src/policy/fees.h
#	src/rpcmining.cpp
#	src/rpcrawtransaction.cpp
#	src/rpcserver.cpp
#	src/test/policyestimator_tests.cpp
#	src/test/rpc_wallet_tests.cpp
#	src/test/transaction_tests.cpp
#	src/txdb.cpp
#	src/txmempool.cpp
#	src/wallet/asyncrpcoperation_sendmany.cpp
#	src/wallet/rpcwallet.cpp
#	src/wallet/wallet.cpp
#	src/wallet/wallet.h
#	src/zcash/CreateJoinSplit.cpp
#	zcutil/build.sh
2018-03-25 18:44:38 +03:00
Scott Sadler
83b8f972f2 Merge remote-tracking branch 'jl777/dev' into cryptoconditions 2018-03-16 23:03:27 -03:00
Scott Sadler
346eb4ae25 small refactor 2018-03-09 09:40:31 -03:00
Scott Sadler
2b2c75de29 basic implementation of transaction replacement. requires cleanup and testing 2018-03-08 15:15:01 -03:00
jl777
ff0e23d17e Test 2018-03-04 10:39:54 +02:00
jl777
7fbab03f73 Test 2018-03-04 10:23:36 +02:00
jl777
7c5999c9f0 Prints 2018-03-04 10:21:33 +02:00
jl777
f8f7a4d4cd Test 2018-03-04 10:11:12 +02:00
jl777
b9dddf15c4 Test 2018-03-04 10:07:57 +02:00
jl777
ff4e7f8672 Test 2018-03-04 10:03:55 +02:00