1
0
Fork 0
mirror of https://github.com/bitcoin/bips.git synced 2025-02-24 15:36:53 +01:00
Commit graph

84 commits

Author SHA1 Message Date
Luke Dashjr
375f11a30c
Merge pull request #1099 from achow101/more-psbt-tests
BIP 174: Add test vectors for additional unsigned tx serialization
2021-04-22 22:51:05 +00:00
Andrew Chow
754b77a915 BIP 174: Add test vectors for additional unsigned tx serialization
There are some edge cases with unsigned tx serialization, so this adds
test vectors for them. Specifically, an unsigned tx with witness
serialization is invalid, a transaction with 0 inputs and 0 outputs is
valid, and a transaction with 0 inputs and non-0 outputs is valid.
2021-04-08 13:34:18 -04:00
kiminuo
f45d7c5784
Update bip-0174.mediawiki
I, personally, find this easier to read.
2021-03-31 10:22:39 +02:00
Luke Dashjr
cd3885c0fb
Merge pull request #1078 from dr-orlovsky/patch-5
Fixing Simple Signer Algorithm
2021-03-15 20:17:23 +00:00
Luke Dashjr
d7cc27613e Merge BIP 370 2021-03-15 20:16:33 +00:00
Andrew Chow
eaaf376099 174: Change PSBT unknown fields test to use higher numbers
Previously these tests were using 0x0f as the unknown field number. As
these have now been defined, change them to use 0xf0 instead as it is
unlikely we will use those anything soon.
2021-03-04 16:14:45 -05:00
Dr. Maxim Orlovsky
6db1e16486
Fixing Simple Signer Algorithm
Simple Signer Algorithm was lacking an index argument (last one) on all function calls
2021-03-02 20:26:59 +01:00
Andrew Chow
b3d224f384 Specify BIP 370 PSBTv2 2021-02-12 16:09:35 -05:00
Luke Dashjr
518fd3fe07 Merge remote-tracking branch 'origin-pull/1036/head' 2021-02-04 00:56:42 +00:00
Luke Dashjr
cf13cfa250
Merge pull request #988 from dr-orlovsky/patch-1
BIP 174: require creator to initialize empty output fields
2021-02-03 22:47:20 +00:00
Luke Dashjr
f70132e58b BIP 174: Revert title change to fit length limit
This partially reverts c0991047e2.
2021-02-03 22:33:18 +00:00
Andrew Chow
88fb205264 Combine Appendix with field listing tables 2021-01-25 17:13:57 -05:00
Andrew Chow
c27d5e8b96 Mark BIP 174 as final 2021-01-25 17:13:57 -05:00
Andrew Chow
80df41818e Include PSBT versions that can or must include field 2021-01-15 13:01:24 -05:00
Andrew Chow
a4fb1b9de0 Specify procedure for new fields and versions 2021-01-15 13:01:24 -05:00
Andrew Chow
c0991047e2 Explicitly specify PSBTv0 2021-01-15 13:01:19 -05:00
Andrew Chow
50fdf5435e Reformat BIP 174 2021-01-14 12:50:27 -05:00
Rusty Russell
6057fede05 BIP 174: clarify format of proprietary extensions.
"Variable length string identifier" is not defined anywhere, and the suggestion
to use "0x00" is also deeply unclear.  I assumed it meant a nul-terminated
string!

Be explicit: you mean it must be a compact siz1\e unsigned int length, followed
by that many identifier bytes, followed by a compact size unsigned int subtype,
followed by optional keydata.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-01-13 16:55:42 -05:00
Ferdinando M. Ametrano
456c8c5088
fixed input test case description as per output test case description 2020-11-16 21:58:41 +01:00
fametrano
c12af49c17
fixed typos 2020-11-15 09:53:06 +01:00
Luke Dashjr
1b7bf8e6aa
Merge pull request #981 from apoelstra/2020-08-rename-hash-preimages
BIP174: add `_IN_` to names of new hash preimage fields
2020-10-05 16:31:18 +00:00
Luke Dashjr
602f4971ee
Merge pull request #990 from dr-orlovsky/patch-3
BIp 174: fixing typo in rationale reference with closed tag
2020-10-05 16:19:38 +00:00
Dr. Maxim Orlovsky
6b3b636490
BIp 174: fixing typo in rationale reference with closed tag 2020-09-08 15:00:07 +02:00
Dr. Maxim Orlovsky
d509aa2110
BIP 174: removing extra "fields" word 2020-09-07 18:38:23 +02:00
Dr. Maxim Orlovsky
a159cca11f
BIP 174: rename responsibilities->roles to match Bitcoin Core
[Bitcoin Core uses "roles" instead of "responsibilities"](https://github.com/bitcoin/bitcoin/blob/master/src/psbt.h#L559) and it makes semantical sense (plus less verbose).
2020-09-07 13:17:44 +02:00
Dr. Maxim Orlovsky
3d297861eb
Require creator to initialize empty output fields
The current version of the spec requires creator role to initialize empty input fields, but says nothing about output field initialization. At the same time, the following role, updater, "should also add redeemScripts, witnessScripts, and BIP 32 derivation paths to the input and output data if it knows them.", which does not make any sense if the fields were uninitialized. The [current Bitcoin Core implementation does this](a24806c25d/src/psbt.cpp (L12)), and [other PSBT implementations, like rust-bitcoin, follow this practice](https://github.com/rust-bitcoin/rust-bitcoin/blob/master/src/util/psbt/mod.rs#L59)
2020-09-07 13:06:43 +02:00
Andrew Poelstra
983b9840b3 bip 174: add new hash preimage fields to Appendix A 2020-08-27 15:02:44 +00:00
Andrew Poelstra
e30d465a6a bip174: add _IN_ to new hash preimage fields 2020-08-26 13:49:42 +00:00
Luke Dashjr
76c3ced4b0
Merge pull request #964 from sanket1729/master
BIP 174: Fix formatting changes
2020-08-20 22:17:04 +00:00
Luke Dashjr
f6e11640e7
Merge pull request #955 from apoelstra/2020-07-hash-preimages-to-174
BIP174: add hash preimage fields to inputs
2020-08-20 22:16:52 +00:00
Andrew Poelstra
277be22357 BIP174: add hash preimage fields to inputs 2020-08-11 17:31:16 +00:00
Sanket Kanjalkar
8d3b41936f
Fix formatting changes 2020-08-04 13:27:31 -05:00
Andrew Chow
5ac2cb5b93 BIP174: Clarify that both UTXO types are allowed 2020-07-21 18:27:20 -04:00
Mike Schmidt
3dbd4866b7 bip-0174: Input Finalizer finalized fields clarifications 2020-06-09 14:40:19 -05:00
Luke Dashjr
24eddbb48a
Merge pull request #869 from benthecarman/patch-2
BIP 174: Specify that separator only appears at end of the map
2020-01-03 04:31:58 +00:00
Dmitry Petukhov
8faf97e720
BIP-174: add missing types to Appendix A; fix proprietary type names
PSBT_INPUT_PROPRIETARY -> PSBT_IN_PROPRIETARY

PSBT_OUTPUT_PROPRIETARY -> PSBT_OUT_PROPRIETARY

to be consistent with other in/out type names that use shortened `IN` and `OUT`
2019-12-14 20:39:40 +05:00
Luke Dashjr
0a388fac46
Merge pull request #860 from azuchi/fix-wrong-description-bip174
BIP174: Fix wrong description about Proprietary Use Type
2019-12-13 16:07:25 +00:00
Luke Dashjr
56fe789358
Merge pull request #866 from dgpv/patch-6
BIP174: remove 'first byte is the type' comment for key data
2019-12-13 16:06:41 +00:00
Luke Dashjr
feb5395fe0
Merge pull request #867 from dgpv/patch-7
BIP-174: test data: fix value length
2019-12-13 16:06:26 +00:00
Ben Carman
e097b1d38a
BIP 174: Specify that separator only appears at end of the map 2019-12-11 15:53:06 -06:00
Dmitry Petukhov
65f0b3dd62
BIP-174: test data: fix value length
In the test case "Case: PSBT With invalid output witnessScript typed key", after PSBT_OUT_WITNESS_SCRIPT key with garbage data (which ends with `...478ef51309d`, follows value `2b` which would denote the length of the data value of the key. But the length of actual remaining data is only 7 bytes. Thus, an implementation that reads key-value pairs and checks for validity of the key data after it has read the current key-value pair, will not be able to hit the exact condition intended for this test case: extra data within the key itself. This is because such implementation will hit serialization error when it will try to read the data of the value and will get the short read.

Reading full key-value pair and then checking key format afterwards is fairly normal thing to do, as the format of the keys with all their meaning is an abstraction of higher level than just the simple key-value serialization format.

The proposed change is to replace byte `2b` after the key data to `06` and thus make the value length in the key-value pair valid (not going beyond the end of the data).

base64 encoding has been changed accordingly.
2019-12-09 17:30:47 +05:00
Ben Carman
c7191c935e
Specify 32 bit itns as unsigned and their endianess 2019-12-09 01:44:43 -06:00
Dmitry Petukhov
267c02a4b5
BIP174: remove 'first byte is the type' comment for key data
As the key type is now defined as compact size integer, `At the beginning of each key is a compact size unsigned integer representing the type`, the comment in the first table in the document, about first byte of the key being the key type is no longer accurate.

As the structure of the key data is described further in the text after the table, and the comment that it starts with the compact size integer seems a bit long to be in that table, I think it is better to just remove the comment about the key data structure from the table, and leave the explanation to the text after the table.
2019-12-09 12:21:09 +05:00
azuchi
87a85402ae BIP174: Fix wrong description about Proprietary Use Type 2019-11-14 11:53:05 +09:00
Luke Dashjr
ba804c9d52
Merge pull request #844 from kallerosenbaum/master
BIP174: Remove misleading sentence
2019-11-04 15:00:38 +00:00
Luke Dashjr
daed7bfa8d
Merge pull request #849 from achow101/bip174-extensions
Bip174 extensions
2019-11-04 14:06:54 +00:00
Andrew Chow
bc3a81e698 Specify proprietary use type 2019-10-02 15:09:51 -04:00
Kalle Rosenbaum
f1aff33f46 BIP174: Remove misleading sentence
The sentence seems to suggest that the "master key fingerprint" can be the fingerprint of any intermediate node on the derivation path, which isn't true.
2019-09-20 19:00:03 +02:00
Luke Dashjr
7e9fab150f
Merge pull request #810 from NicolasDorier/bips/global-xpub-test-vector
bip174: Add test vector for global xpub
2019-09-20 00:35:24 +00:00
Luke Dashjr
c7057971e1
Merge pull request #842 from darosior/174_typo
Remove a typo in bip-0174
2019-09-20 00:35:04 +00:00