Skip to content

Commit

Permalink
Merge pull request #189 from zcash/bitcartel-patch-1
Browse files Browse the repository at this point in the history
Update ZIP 243 with test vector for transparent tx
  • Loading branch information
daira authored Oct 25, 2018
2 parents 43e83ef + 9ed3c3d commit 35478ad
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions zip-0243.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Title: Transaction Signature Verification for Sapling
Author: Jack Grigg <[email protected]>
Daira Hopwood <[email protected]>
Simon Liu <[email protected]> (Update 2018-10-15)
Category: Consensus
Created: 2018-04-10
License: MIT
Expand Down Expand Up @@ -464,6 +465,52 @@ Transaction digest with ``nIn = 0`` and ``nHashType = 2`` (``SIGHASH_NONE``)::

sighash: 2a3aaa9a36355bfc74f8fd576a446837ad009f8e1289ec60ed3f57b89b57951a

Test vector 3
-------------

Testnet transaction with txid ``97d8814886d07fc12bbac90c089a10f90906cbb53402ee26e576ef99276c492d`` sends only transparent funds.

Raw transaction::

0400008085202f8901a8c685478265f4c14dada651969c45a65e1aeb8cd6791f2f5bb6a1d9952104d9010000006b483045022100a61e5d557568c2ddc1d9b03a7173c6ce7c996c4daecab007ac8f34bee01e6b9702204d38fdc0bcf2728a69fde78462a10fb45a9baa27873e6a5fc45fb5c76764202a01210365ffea3efa3908918a8b8627724af852fc9b86d7375b103ab0543cf418bcaa7ffeffffff02005a6202000000001976a9148132712c3ff19f3a151234616777420a6d7ef22688ac8b959800000000001976a9145453e4698f02a38abdaa521cd1ff2dee6fac187188ac29b0040048b004000000000000000000000000

header: 04000080
nVersionGroupId: 85202f89
vin: 01 a8c685478265f4c14dada651969c45a65e1aeb8cd6791f2f5bb6a1d9952104d9 01000000 6b483045022100a61e5d557568c2ddc1d9b03a7173c6ce7c996c4daecab007ac8f34bee01e6b9702204d38fdc0bcf2728a69fde78462a10fb45a9baa27873e6a5fc45fb5c76764202a01210365ffea3efa3908918a8b8627724af852fc9b86d7375b103ab0543cf418bcaa7f feffffff
vout: 02 005a620200000000 1976a9148132712c3ff19f3a151234616777420a6d7ef22688ac
8b95980000000000 1976a9145453e4698f02a38abdaa521cd1ff2dee6fac187188ac
nLockTime: 29b00400
nExpiryHeight: 48b00400
valueBalance: 0000000000000000
vShieldedSpend: 00
vShieldedOutput: 00
vJoinSplit: 00
Transaction digest with ``nIn = 0`` and ``nHashType = 1`` (``SIGHASH_ALL``)::

Preimage:
0400008085202f89fae31b8dec7b0b77e2c8d6b6eb0e7e4e55abc6574c26dd44464d9408a8e33f116c80d37f12d89b6f17ff198723e7db1247c4811d1a695d74d930f99e98418790d2b04118469b7810a0d1cc59568320aad25a84f407ecac40b4f605a4e686845400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000029b0040048b00400000000000000000001000000a8c685478265f4c14dada651969c45a65e1aeb8cd6791f2f5bb6a1d9952104d9010000001976a914507173527b4c3318a2aecd793bf1cfed705950cf88ac80f0fa0200000000feffffff
header: 04000080
nVersionGroupId: 85202f89
hashPrevouts: fae31b8dec7b0b77e2c8d6b6eb0e7e4e55abc6574c26dd44464d9408a8e33f11
hashSequence: 6c80d37f12d89b6f17ff198723e7db1247c4811d1a695d74d930f99e98418790
hashOutputs: d2b04118469b7810a0d1cc59568320aad25a84f407ecac40b4f605a4e6868454
hashJoinSplits: 0000000000000000000000000000000000000000000000000000000000000000
hashShieldedSpends: 0000000000000000000000000000000000000000000000000000000000000000
hashShieldedOutputs: 0000000000000000000000000000000000000000000000000000000000000000
nLockTime: 29b00400
nExpiryHeight: 48b00400
valueBalance: 0000000000000000
nHashType: 01000000

Input:
prevout: a8c685478265f4c14dada651969c45a65e1aeb8cd6791f2f5bb6a1d9952104d9 01000000
scriptCode: 1976a914507173527b4c3318a2aecd793bf1cfed705950cf88ac
amount: 80f0fa0200000000
nSequence: feffffff

sighash: f3148f80dfab5e573d5edfe7a850f5fd39234f80b5429d3a57edcc11e34c585b

Deployment
==========
Expand Down

0 comments on commit 35478ad

Please sign in to comment.