Commit graph

901 commits

Author SHA1 Message Date
Pieter Wuille
f15c72cbd2 Send and require SENDADDRV2 before VERACK
See the corresponding BIP change: https://github.com/bitcoin/bips/pull/1043

Github-Pull: #20564
Rebased-From: 1583498fb6
(cherry picked from commit bead935470)
2021-09-22 02:05:01 +00:00
Andrew Poelstra
0907fa0f6f test: support asset issuance in test framework sighashes
Replaces #932
2021-09-19 20:58:07 +00:00
Andrew Poelstra
e57b4c51ad regtest: change network magic away from liquid v1
We don't want connectivity issues between Liquid and custom test networks.
2021-09-10 17:20:20 +00:00
Andrew Poelstra
64194498cf
Merge ElementsProject/elements#1025: Introduce blech32m format for v1+ witness programs
c72c949d29 blech32: copy ubsan suppression for bech32 to blech32 (Andrew Poelstra)
d13fb4994b blech32: add test vectors for blech32 and blech32m (Andrew Poelstra)
15a826ea27 blech32: add functional tests for blech32m (Andrew Poelstra)
c01e09e8c3 blech32: add blech32m format and use it to decode witness v1+ addresses (Andrew Poelstra)
18fcec8714 naming nits (Fabian Jahr)
8515f40fed Add signet support to gen_key_io_test_vectors.py (Pieter Wuille)
b3df66f82e Use Bech32m encoding for v1+ segwit addresses (Pieter Wuille)
42f43a1bcb Add Bech32m test vectors (Pieter Wuille)
b1d1d94e01 Implement Bech32m encoding/decoding (Pieter Wuille)
c607835bad Better error messages for invalid addresses (Bezdrighin)

Pull request description:

  Includes backports of https://github.com/bitcoin/bitcoin/pull/20832 (1 commit) and https://github.com/bitcoin/bitcoin/pull/20861 (5 commits)

ACKs for top commit:
  gwillen:
    utACK c72c949.

Tree-SHA512: af96a6ef31b1cab72b0350197dcb34761e9ffb2ec43685084408b5fafcda0adee1945045003194600372652f7cca65d721bda3ed9b6be7e9543d3199e2cbe145
2021-08-30 18:59:25 +00:00
sanket1729
2c5c7eb87b Update tapscript leaf version 2021-08-27 19:24:07 +00:00
sanket1729
937343c75c Add tests for crypto opcodes 2021-08-27 19:24:07 +00:00
sanket1729
3e7b8c6aed Test arithmetic opcodes 2021-08-26 20:28:01 +00:00
sanket1729
6092d94c1d Add tests for introspection 2021-08-26 20:28:01 +00:00
sanket1729
007912eea4 Implement tests for sha256 streaming opcodes 2021-08-26 20:28:01 +00:00
Pieter Wuille
b3df66f82e Use Bech32m encoding for v1+ segwit addresses
This also includes updates to the Python test framework implementation,
test vectors, and release notes.

https://github.com/bitcoin/bitcoin/pull/20861 (3/5)
2021-08-17 22:32:47 +00:00
Andrew Poelstra
1ba24fe9b3
Merge ElementsProject/elements#1002: Implement Taproot Sighash
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
2021-07-07 20:58:41 +00:00
sanket1729
14f93579a5 Add pegins and issuance test 2021-07-01 17:56:44 +00:00
sanket1729
edf8455fe4 Fix bug in CAssetIssuance decoding 2021-07-01 17:56:44 +00:00
sanket1729
cdd75d4251 Update OP_SUCCESS for elements with allowed opcodes 2021-07-01 17:56:44 +00:00
sanket1729
6c985308d7 Implement Taphash in test framework 2021-07-01 17:56:44 +00:00
Andrew Chow
b1ebc813ea Remove walletsignpsbt, blindpsbt, walletblindpsbt, and
walletfillpsbtdata

These are all done by walletprocesspsbt
2021-06-22 14:42:38 -04:00
Andrew Chow
d8fa5c1458 Use createtx array outputs 2021-06-22 14:42:19 -04:00
Andrew Poelstra
2573747447 fix test code duplication from 3a0de44d90 2021-04-15 17:06:37 +00:00
Andrew Poelstra
55be2930fb test: disable "is everyone connected" check in sync_all in blocksigner test
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.
2021-03-26 17:33:05 +00:00
Andrew Poelstra
68bfd70b43 ci: various linter / CI compiler error fixes
Includes changing TRUE to OP_TRUE for anyone-can-spend output name,
to avoid symbol conflict on win64 builds, which is really obnoxious.
2021-03-26 17:33:04 +00:00
Andrew Poelstra
22cf380984 Merge a993a7c675 into merged_master (Elements PR #960)
Several conflicts in the C++ code related to the new `flags` parameter
to `CheckSignature` and the corresponding function being renamed upstream
to `CheckSignatureECDSA`.

Several conflicts in the test harness as Steven sorta pulled the new
upstream ECKey module into the Python code, and the actual upstream
code was slightly different. Also needed to update the feature_taproot
code to always use the non-RANGEPROOF sighash since dynafed is not
enabled in the Taproot test.

Also had to pull the `set_wif` method out of `ECKey` and inline it because
otherwise it triggers a "circular inclusion" error between script.py (which
would pull in `base58_to_bytes` from address.py) and address.py (which now
pulls in some taproot EC related stuff from script.py).

Noticed that #960 does not test the "sighash rangeproof flag set but no
witnesses" case.
2021-03-25 23:46:21 +00:00
Steven Roose
b888f42270
tests: Add test feature_sighash_rangeproof.py 2021-02-22 15:19:10 +00:00
Steven Roose
236f0b1762
tests: Replace CECKey with new ECKey impl from Bitcoin master
Somehow the CECKey impl is really broken if you want to set
a raw private key. Core master already has a new impl so I just
took that one and replaces the usages. This will probably be equivalent
with what would be rebased in at a later stage.
2021-02-22 13:45:37 +00:00
Andrew Poelstra
29c7f63764 Merge c48e788246 into merged_master (Bitcoin PR #18836) 2020-12-02 15:51:02 +00:00
Andrew Poelstra
51e3b537f6 Merge 4fd37d0a10 into merged_master (Bitcoin PR #20292) 2020-12-02 06:39:49 +00:00
Andrew Poelstra
23f0a2294b Merge c51c2753a4 into merged_master (Bitcoin PR #20326) 2020-12-02 05:21:55 +00:00
Andrew Poelstra
d009849f95 Merge ef4c7c4e0b into merged_master (Bitcoin PR #18788)
This one was pretty brutal, but ultimately nothing too surprising.
Just had to keep track of which wallets owned which blinding keys,
and in wallet_importprunedfunds.py I had to manually create a
Liquid address.
2020-12-02 01:21:09 +00:00
Andrew Poelstra
a01ffb9d0c Merge 0c2eb7f8de into merged_master (Bitcoin PR #20262) 2020-12-01 21:09:44 +00:00
Andrew Poelstra
9ce2c21435 Merge 42b66a6b81 into merged_master (Bitcoin PR #20186) 2020-12-01 20:37:50 +00:00
Andrew Poelstra
6f267e338a Merge 47fc883106 into merged_master (Bitcoin PR #19967) 2020-12-01 14:36:58 +00:00
Andrew Poelstra
251361078d Merge 80c8a02f1b into merged_master (Bitcoin PR #20159) 2020-12-01 05:47:16 +00:00
Andrew Poelstra
b733f588d8 Merge cb21d864c5 into merged_master (Bitcoin PR #19401) 2020-12-01 05:14:13 +00:00
Andrew Poelstra
85663c72a3 Merge 82d3596dfe into merged_master (Bitcoin PR #20161) 2020-12-01 04:25:27 +00:00
Andrew Poelstra
e765fc93ea Merge 3caee16946 into merged_master (Bitcoin PR #19953)
Taproot :D
2020-12-01 02:54:57 +00:00
Andrew Poelstra
4eeadb7fde Merge 8ed37f6c84 into merged_master (Bitcoin PR #19077) 2020-11-30 20:20:56 +00:00
Andrew Poelstra
4cb66aae97 Merge 0b2abaa666 into merged_master (Bitcoin PR #19954) 2020-11-30 17:12:23 +00:00
Andrew Poelstra
62faba7499 Merge 171cd05ae3 into merged_master (Bitcoin PR #20034) 2020-11-30 05:33:57 +00:00
Andrew Poelstra
638acbcdd0 Merge 40aab35e98 into merged_master (Bitcoin PR #19253) 2020-11-30 03:40:21 +00:00
Andrew Poelstra
52c2d8e525 Merge 78f912c901 into merged_master (Bitcoin PR #19804) 2020-11-29 21:58:22 +00:00
Andrew Poelstra
455f61c0db Merge 8c5f68118c into merged_master (Bitcoin PR #18267)
This commit adds signet support, which is a little bit silly/redundant for us :)
Was a surprisingly easy merge to handle, and hopefully in future Core is more
mindful of signed blocks when they are changing code architecture.

I had to change a couple lines of src/signet.cpp to add blank assets to the
CTxOuts and to find transaction input scriptWitnesses. No need to add any
other tx witness data (and the CAsset()s that I did add to make things compile
won't be used..) because signet will always have g_con_elementsmode off.
2020-11-29 16:57:55 +00:00
Andrew Poelstra
ca42c615f0 Merge b99a1633b2 into merged_master (Bitcoin PR #19781) 2020-11-29 14:25:26 +00:00
Andrew Poelstra
81a3dda09b Merge c30f79d418 into merged_master (Bitcoin PR #19940) 2020-11-29 14:00:02 +00:00
Andrew Poelstra
af5429c8ac Merge f2d9934381 into merged_master (Bitcoin PR #19922) 2020-11-29 03:11:53 +00:00
Andrew Poelstra
3f50e404e0 Merge 564e1ab0f3 into merged_master (Bitcoin PR #19800) 2020-11-29 02:37:47 +00:00
Andrew Poelstra
897f8be4ef Merge bd60a9a8ed into merged_master (Bitcoin PR #19818) 2020-11-28 22:14:15 +00:00
Andrew Poelstra
f5f5be3203 Merge 136fe4c5e9 into merged_master (Bitcoin PR #19816) 2020-11-28 21:25:31 +00:00
Andrew Poelstra
9a200a587e Merge 505b39e72b into merged_master (Bitcoin PR #19610) 2020-11-28 20:35:13 +00:00
Andrew Poelstra
ef13698934 Merge 48c1083632 into merged_master (Bitcoin PR #19105) 2020-11-28 20:18:13 +00:00
Andrew Poelstra
f4b291f821 Merge 28f4e53e16 into merged_master (Bitcoin PR #19752) 2020-11-28 14:17:23 +00:00
Andrew Poelstra
66ad009d69 Merge e80e5b3e4f into merged_master (Bitcoin PR #19760) 2020-11-28 13:25:26 +00:00