f7e1fb6708 blind: add functional test that attempting to spend more than 256 inputs fails "gracefully" (Andrew Poelstra)
ba538cbe2a blind.cpp: refuse to create surjection proofs that would trigger an assertation failure (Andrew Poelstra)
Pull request description:
There isn't really any reasonable way to recover from this situation but we can at least gracefully fail instead of triggering an assertation failure.
Fixes#979Fixes#880
ACKs for top commit:
gwillen:
utACK f7e1fb6.
Tree-SHA512: 6f95732964503e5ac6fc85fd6b45958f1b1719b1f9ecf3d6295d571489112837cdb4429a02a389da82e8d5fcd55527241cba50bceff00bb4facd8be037c7dcab
This commit addresses #20809.
We add an additional 'error' property in the result of 'validateaddress' in case the address is not valid that gives a short description of why the address in invalid. We also change the error message returned by 'getaddressinfo' in case the address is invalid.
https://github.com/bitcoin/bitcoin/pull/20832 (1/1)
ELEMENTS: Merge conflicts resolved based on d6c85c5620 (from 22.0 rebase)
14f93579a5 Add pegins and issuance test (sanket1729)
edf8455fe4 Fix bug in CAssetIssuance decoding (sanket1729)
cdd75d4251 Update OP_SUCCESS for elements with allowed opcodes (sanket1729)
4618097ab4 Implement taphash for elements (sanket1729)
6c985308d7 Implement Taphash in test framework (sanket1729)
a26f6fead6 Expose only blockchain hash twice in header (sanket1729)
afb9e7b727 taproot: feed genesis hash and parent pegged asset to sighash function (Andrew Poelstra)
Pull request description:
ACKs for top commit:
apoelstra:
ACK 14f93579a5
Tree-SHA512: f0a3f6ef9f8958bc948cc42375600767f39aadc0dac096fe8e7823dc69ddc4204360e504af7801d05bb19ae4e6ace6a271842531c192e330167381cf2690c856
f8553c571b Disable joinpsbts (Andrew Chow)
864f625fcf Fix display of outputs in PSBT ops dialog (Andrew Chow)
5425da4278 Enable converttopsbt for PSET (Andrew Chow)
4940ceeea6 Use a constant for maximum surjection targets (Andrew Chow)
4a44ff2c2e Check elements blinding field constraints during deser (Andrew Chow)
9fe6401d59 Allow specifying SIGHASH_RANGEPROOF (Andrew Chow)
7533503b3c Initialize optionals with nullopt (Andrew Chow)
64b30bfc3d Enable analyzepsbt (Andrew Chow)
b65a00f095 Add PSBTOutput::GetTxOut() (Andrew Chow)
80ff739c7a Default to adding bip32 derivs (Andrew Chow)
1889554e2c Remove unnecessary psbt blinding test (Andrew Chow)
afd795010b Update rpc_psbt.py for PSET (Andrew Chow)
46ccf611c4 Only allow psbt_version 2 (Andrew Chow)
b1ebc813ea Remove walletsignpsbt, blindpsbt, walletblindpsbt, and walletfillpsbtdata (Andrew Chow)
d8fa5c1458 Use createtx array outputs (Andrew Chow)
0e2f1ff441 Make m_peg_in_witness during SignPSBTInput (Andrew Chow)
bd97836767 Update FinalizeAndExtract for PSEt (Andrew Chow)
c0cb623acc Allow value commitments instead of explicit value (Andrew Chow)
2c0cee5a20 Update GetUnsignedTx for PSET (Andrew Chow)
25df8aa12b Fixes to FillPSBT (Andrew Chow)
e9bfff25db Allow empty scriptPubKeys (Andrew Chow)
eeb6cf76e4 Mark PSET as being implemented (Andrew Chow)
3db2622e70 Only sign blinded PSBTs in walletprocesspsbt (Andrew Chow)
a8a6f4c999 Add IsBlinded and IsFullyBlinded helpers for PSBT (Andrew Chow)
124efa2668 Return better errors for BlindingStatus (Andrew Chow)
f686e0fa54 Remove walletfillpsbtdata RPC (Andrew Chow)
5391095205 Output PSBTOutputs with aux info from ConstructTransaction (Andrew Chow)
ea2c3dfb20 Remove output_assets and have asset field in outputs (Andrew Chow)
e6cc0fd693 Have walletprocesspsbt blind before signing (Andrew Chow)
bad1876e03 Re-enable and fix PSBT signing (Andrew Chow)
9a450ecc19 Set blinder_index to self in walletcreatefundedpsbt (Andrew Chow)
3f6c8bfda1 Add walletblindpsbt rpc (Andrew Chow)
e7dd046b03 Implement BlindPSBT (Andrew Chow)
1dbc3b270c Implement updatepsbtpegin RPC (Andrew Chow)
bdfcb436b7 Add calculateasset RPC (Andrew Chow)
79c4a9901b pset: add issuance things (Andrew Chow)
6890461bfe Implement blinded combiner stuff (Andrew Chow)
2220d844ef Return peg-in UTXO with GetUTXO (Andrew Chow)
33c694f822 Helper functions to determine whether a PSBTOutput is blinded (Andrew Chow)
ee28be3018 Extract elements fields for tx into psbt (Andrew Chow)
f84a927a71 Add DecomposePeginWitness (Andrew Chow)
e37439775a Implement and enable decodepsbt for PSET (Andrew Chow)
b372430f70 Implement PSET fields and their de/ser (Andrew Chow)
ecaf5ea1cf Use GetUnsignedTx when serializing in PSBTv0 (Andrew Chow)
e860cd0f42 Add a PSBT constructor for providing the version (Andrew Chow)
0ca0b7e040 Update rpc_psbt.py to test PSBTv0 explicitly in some places (Andrew Chow)
f4bca18784 Restrict joinpsbts to PSBTv0 only (Andrew Chow)
ebc49e3111 Allow createpsbt and walletcreatefundedpsbt to take psbt version (Andrew Chow)
2c1fe5841f Allow and create PSBTv2 in RPCs (Andrew Chow)
e467ec68ad Update PSBT::UpdatePSBTOutput to use GetUnsignedTx (Andrew Chow)
a34474e25a Allow specifying PSBT version in constructor (Andrew Chow)
bedc1e0fec Implement PSBTv2 in decodepsbt (Andrew Chow)
139ac3613e Implement PSBTv2 AddInput and AddOutput (Andrew Chow)
16395c15e9 Update wallet for PSBTv2 (Andrew Chow)
9c8330024a Update RPCs for PSBTv2 (Andrew Chow)
c9c23cad6b Update PSBT Operations Dialog for v2 (Andrew Chow)
500554acbe Update AnalyzePSBT for PSBTv2 (Andrew Chow)
f269d1170c Update FinalizeAndExtract for v2 (Andrew Chow)
23f644206b Update SignPSBTInput for PSBTv2 (Andrew Chow)
d8dba3333b Add PSBTInput::GetOutPoint (Andrew Chow)
4ff2593280 Implement PSBTv2 field merging (Andrew Chow)
cd5515a266 Change PSBT::AddOutput to take just PSBTOutput (Andrew Chow)
90cd7ec5d5 Change PSBT::AddInput to take just PSBTInput (Andrew Chow)
bd1a57bd80 Add PSBT::GetUniqueID (Andrew Chow)
32bdf2d97e Add PSBT::GetUnsignedTx (Andrew Chow)
10bf24726b Add PSBT::ComputeLockTime() (Andrew Chow)
3c647b7a54 Replace PSBT::GetInputUTXO with PSBTInput::GetUTXO (Andrew Chow)
4b805fd4b5 Convert PSBTv0 unsigned tx to PSBTv2 fields (Andrew Chow)
32234dfa68 Call CacheUnsignedTxPieces in PSBT constructor (Andrew Chow)
c32950e02b Add PSBT::CacheUnsignedTxPieces (Andrew Chow)
457b6bd44b Enforce PSBT version constraints (Andrew Chow)
2042765520 Have PSBTInput and PSBTOutput know the PSBT's version (Andrew Chow)
8c624438ca Change PSBT unknown fields test to use higher numbers (Andrew Chow)
dd792cea62 Implement PSBTv2 fields de/ser (Andrew Chow)
ec03f83d5f Define psbtv2 field numbers (Andrew Chow)
20e8dff880 Merge global xpubs in joinpsbts and combinepsbts (Andrew Chow)
bc2651d200 Add global xpub test vectors from BIP (Andrew Chow)
7fd50b2795 Add global_xpubs to decodepsbt (Andrew Chow)
2c54175f0f Implement serializations for PSBT_GLOBAL_XPUB (Andrew Chow)
5b5c5efbbb Implement operator< for KeyOriginInfo and CExtPubKey (Andrew Chow)
4eabba9be7 Separate individual HD Keypath serialization into separate functions (Andrew Chow)
cb9c553429 Store version bytes and be able to serialize them in CExtPubKey (Andrew Chow)
fad29bafd3 moveonly: Move (Un)Serialize(To/From)Vector, (De)SerializeHDKeypaths to psbt module (Andrew Chow)
31a7e0a744 Test for proprietary field (Andrew Chow)
5bb930e0b4 Output proprietary type info in decodepsbt (Andrew Chow)
575fec01b2 Implement PSBT proprietary type (Andrew Chow)
25c13ad3b8 Output psbt version in decodepsbt (Andrew Chow)
ad2b2d7c58 Add GetVersion helper to PSBT (Andrew Chow)
50c281fc12 Implement PSBT versions (Andrew Chow)
e882a3a32d Types are compact size uints (Andrew Chow)
fdf71def4c Remove PSET and disable PSBT/PSET things for now (Andrew Chow)
Pull request description:
The original PSET had some issues with leaking private information and there were issues with the design of the various roles. This PR replaces it with a new PSET design that should be able to provide all of the things that people expect PSETs to do while preserving privacy.
Additionally, an actual specification for this new design has been written up. It describes all of the new fields, their serialization, and how roles should handle the PSET data.
This is still a work in progress as not everything with the blinder role has been worked out yet.
Top commit has no ACKs.
Tree-SHA512: 69f6f74dd252e4fba14e201f8f1d9b017b3b62ddf375e6536e71a3f327435e7c1ef8a12b2914cbed3e46f70bcbc8caadc07342ee323ece45a47dd1d77d81b3e8
This test is for a condition that no longer matters. Prior to CA, there
was only the single value blinder for a transaction that sent unconf to
conf. This would necessitate setting that single blinding factor to 0,
which would make the single output not actually blinded. But with CA,
because each output has an additional blinding factor for the asset,
this issue no longer exists.
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
Should revisit; I am not sure whether we have a long-term stable
URL for prebuilt past Elements releases, but we should be able
to just point test/get-previous-releases.py at that, and change
the set of versions (since we do not have 0.15, 0.19, etc), and
we're good to go.
Everyone is _not_ connected in this test, so on slow machines
where this check triggers (e.g. the CI boxes) the test incorrectly
fails. This was also a source of (very infrequent) spurious failures
during the rebase.
It may be that we just need to recompute some numbers because our
block limits are different. But this test takes 20 minutes to
fail and it would take some time to understand what the expected
behavior is.