Andrew Chow
0ca0b7e040
Update rpc_psbt.py to test PSBTv0 explicitly in some places
2021-06-22 13:54:50 -04:00
Andrew Chow
f4bca18784
Restrict joinpsbts to PSBTv0 only
2021-06-22 13:54:50 -04:00
Andrew Chow
ebc49e3111
Allow createpsbt and walletcreatefundedpsbt to take psbt version
2021-06-22 13:54:50 -04:00
Andrew Chow
2c1fe5841f
Allow and create PSBTv2 in RPCs
2021-06-22 13:54:50 -04:00
Andrew Chow
e467ec68ad
Update PSBT::UpdatePSBTOutput to use GetUnsignedTx
2021-06-22 13:54:50 -04:00
Andrew Chow
a34474e25a
Allow specifying PSBT version in constructor
2021-06-22 13:54:50 -04:00
Andrew Chow
bedc1e0fec
Implement PSBTv2 in decodepsbt
2021-06-22 13:54:50 -04:00
Andrew Chow
139ac3613e
Implement PSBTv2 AddInput and AddOutput
2021-06-22 13:54:50 -04:00
Andrew Chow
16395c15e9
Update wallet for PSBTv2
2021-06-22 13:54:50 -04:00
Andrew Chow
9c8330024a
Update RPCs for PSBTv2
2021-06-22 13:54:50 -04:00
Andrew Chow
c9c23cad6b
Update PSBT Operations Dialog for v2
2021-06-22 13:54:50 -04:00
Andrew Chow
500554acbe
Update AnalyzePSBT for PSBTv2
2021-06-22 13:54:50 -04:00
Andrew Chow
f269d1170c
Update FinalizeAndExtract for v2
2021-06-22 13:54:50 -04:00
Andrew Chow
23f644206b
Update SignPSBTInput for PSBTv2
2021-06-22 13:54:50 -04:00
Andrew Chow
d8dba3333b
Add PSBTInput::GetOutPoint
...
Helper for getting the PSBTInput COutPoint
2021-06-22 13:54:50 -04:00
Andrew Chow
4ff2593280
Implement PSBTv2 field merging
2021-06-22 13:54:50 -04:00
Andrew Chow
cd5515a266
Change PSBT::AddOutput to take just PSBTOutput
2021-06-22 13:54:50 -04:00
Andrew Chow
90cd7ec5d5
Change PSBT::AddInput to take just PSBTInput
2021-06-22 13:54:50 -04:00
Andrew Chow
bd1a57bd80
Add PSBT::GetUniqueID
...
The unique ID for PSBTv2 is different from v0. Use this function to get
the ID without requiring the caller to know the version number.
2021-06-22 13:54:50 -04:00
Andrew Chow
32bdf2d97e
Add PSBT::GetUnsignedTx
...
A helper function for getting the unsigned transaction regardless of
psbt version.
2021-06-22 13:54:50 -04:00
Andrew Chow
10bf24726b
Add PSBT::ComputeLockTime()
...
Function to compute the lock time for the transaction
2021-06-22 13:54:50 -04:00
Andrew Chow
3c647b7a54
Replace PSBT::GetInputUTXO with PSBTInput::GetUTXO
...
Now that PSBTInput's track their own prevouts, there's no need for a
PSBT global function to fetch input specific data.
2021-06-22 13:54:50 -04:00
Andrew Chow
4b805fd4b5
Convert PSBTv0 unsigned tx to PSBTv2 fields
...
This is just a convenience and doesn't effect serialization.
2021-06-22 13:54:50 -04:00
Andrew Chow
32234dfa68
Call CacheUnsignedTxPieces in PSBT constructor
2021-06-22 13:54:50 -04:00
Andrew Chow
c32950e02b
Add PSBT::CacheUnsignedTxPieces
...
Fetches the PSBTv2 fields from PSBTv0's global unsigned tx. This allows
us to pretend everything internally is a PSBTv2 and makes things easier
to work with.
2021-06-22 13:54:50 -04:00
Andrew Chow
457b6bd44b
Enforce PSBT version constraints
...
With PSBTv2, some fields are not allowed in PSBTv2, and some are
required. Enforce those.
2021-06-22 13:54:50 -04:00
Andrew Chow
2042765520
Have PSBTInput and PSBTOutput know the PSBT's version
2021-06-22 13:54:50 -04:00
Andrew Chow
8c624438ca
Change PSBT unknown fields test to use higher numbers
...
Previously these tests were using 0x0f as the field number. Changed to
use 0xf0 instead as it is unlikely we will hit that anytime soon.
2021-06-22 13:54:50 -04:00
Andrew Chow
dd792cea62
Implement PSBTv2 fields de/ser
2021-06-22 13:54:50 -04:00
Andrew Chow
ec03f83d5f
Define psbtv2 field numbers
2021-06-22 13:54:50 -04:00
Andrew Chow
20e8dff880
Merge global xpubs in joinpsbts and combinepsbts
2021-06-22 13:54:50 -04:00
Andrew Chow
bc2651d200
Add global xpub test vectors from BIP
2021-06-22 13:54:50 -04:00
Andrew Chow
7fd50b2795
Add global_xpubs to decodepsbt
2021-06-22 13:54:50 -04:00
Andrew Chow
2c54175f0f
Implement serializations for PSBT_GLOBAL_XPUB
2021-06-22 13:54:50 -04:00
Andrew Chow
5b5c5efbbb
Implement operator< for KeyOriginInfo and CExtPubKey
2021-06-22 13:54:50 -04:00
Andrew Chow
4eabba9be7
Separate individual HD Keypath serialization into separate functions
2021-06-22 13:54:50 -04:00
Andrew Chow
cb9c553429
Store version bytes and be able to serialize them in CExtPubKey
...
CExtPubKey does not store the version bytes for the extended public key.
We store these so that a CExtPubKey can be serialized and deserialized with
the same version bytes.
2021-06-22 13:54:50 -04:00
Andrew Chow
fad29bafd3
moveonly: Move (Un)Serialize(To/From)Vector, (De)SerializeHDKeypaths to psbt module
...
SerializeToVector, UnserializeFromVector, DeserializeHDKeypaths, and SerializeHDKeypaths
were in sign.h where PSBT was originally implemented. Since all of the PSBT serialization
has moved to its own file, these functions should follow.
2021-06-22 13:54:50 -04:00
Andrew Chow
31a7e0a744
Test for proprietary field
2021-06-03 15:44:20 -04:00
Andrew Chow
5bb930e0b4
Output proprietary type info in decodepsbt
2021-06-03 15:44:20 -04:00
Andrew Chow
575fec01b2
Implement PSBT proprietary type
2021-06-03 15:44:20 -04:00
Andrew Chow
25c13ad3b8
Output psbt version in decodepsbt
2021-06-03 15:44:20 -04:00
Andrew Chow
ad2b2d7c58
Add GetVersion helper to PSBT
2021-06-03 15:44:19 -04:00
Andrew Chow
50c281fc12
Implement PSBT versions
2021-06-03 15:44:19 -04:00
Andrew Chow
e882a3a32d
Types are compact size uints
2021-06-03 15:44:19 -04:00
Andrew Chow
fdf71def4c
Remove PSET and disable PSBT/PSET things for now
...
Reset back to Bitcoin PSBT and disable PSBT/PSET handling in wallet and
rpc.
This is just a reset to allow for PSBTv2 change and then a new and
improved PSET.
2021-06-03 15:44:19 -04:00
Steven Roose
eda3fbe212
Merge ElementsProject/elements#1001 : Adds an -fno-stack-check compile time flag to OSX local builds
...
43657b5aaa Adds an -fno-stack-check compile time flag to OSX local builds (Mike Slominsk)
Pull request description:
As a workaround for several elements issues on OSX 10.15 and later, this PR adds the `-fno-stack-check` flag to local (non-cross compile) OSX builds.
Background: There seems to be a general issue with OSX (version >= 10.15) builds and clang's default use of `-fstack-check` which seems to be buggy enough to cause issues with multiple projects.
closes #987 #998
Also related to #782
Top commit has no ACKs.
Tree-SHA512: b8ecf10771da235878d10a59cddf22be9e587c2c6b278a62ea777d547b1a37abfbec4945842df2b581407e81dafcfc3df1d86e27f861a03322cb188917a5e940
2021-06-02 18:16:55 +01:00
Mike Slominsk
43657b5aaa
Adds an -fno-stack-check compile time flag to OSX local builds
2021-05-18 15:15:38 -07:00
Steven Roose
3172615d2c
Merge ElementsProject/elements#986 : Undo default signalling behavior for dynafed unless enabled
...
b7a116d910 Undo default signalling behavior for dynafed unless enabled (Steven Roose)
Pull request description:
This adds an explicit argument to enable dynafed signalling that is not active by default.
ACKs for top commit:
gwillen:
That looks great, utACK b7a116d .
Tree-SHA512: bf13ff2b0a8b2cb1d5570ef8f5c423c3b112249d08407791fdca9a86ab7759dd37aa28edce14b5c8600bf22f100472515bed465243253fefd3f51ce9782e9210
2021-05-10 12:05:59 +02:00
Steven Roose
b7a116d910
Undo default signalling behavior for dynafed unless enabled
2021-05-07 13:46:55 +02:00