Commit graph

439 commits

Author SHA1 Message Date
Byron Hambly
ac05517749
feat: change getnewblockhex to take multiple commitments
Modifies the getnewblockhex json rpc call to accept an array of
commitments instead of a single commitment.

Backwards compatibility is maintained by first attempting to parse as a
string for a singular commitment.

(cherry picked from commit 661c6c7094)
2022-10-11 16:12:14 +02:00
Andrew Poelstra
3cb9612faa test: add test for Taproot activation 2021-09-18 00:50:17 +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
007912eea4 Implement tests for sha256 streaming opcodes 2021-08-26 20:28:01 +00:00
Bezdrighin
c607835bad Better error messages for invalid addresses
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)
2021-08-17 22:32:47 +00:00
sanket1729
14f93579a5 Add pegins and issuance test 2021-07-01 17:56:44 +00:00
Andrew Poelstra
f76fe5e469 ci: fix some test timeouts 2021-03-31 23:01:22 +00:00
Andrew Poelstra
e801e951df ci: whitelist some RPCs on the functional test coverage check 2021-03-26 17:33:05 +00:00
Andrew Poelstra
f1092db80e disable previous-release compatibility test and walletupgrade test
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.
2021-03-26 17:33:05 +00:00
Andrew Poelstra
697cd77985 ci: disable broken feature_pruning test
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.
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
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
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
638acbcdd0 Merge 40aab35e98 into merged_master (Bitcoin PR #19253) 2020-11-30 03:40:21 +00:00
Andrew Poelstra
65b01321e2 Merge 4f45ea1f73 into merged_master (Bitcoin PR #19725) 2020-11-29 22:09:36 +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
5e62edcf8e Merge ffaac6e614 into merged_master (Bitcoin PR #16378)
Adds a new "send" RPC which I didn't really look at too closely to match
our other RPC modifications. In particular our backport of #17211 adds a
"solving_data" field to other transaction-creation RPCs, but not this
one. (But I checked the current status of #17211 and Andy hasn't updated
upstream either, just passes NullUniValue to FundTransaction from `send`.
So that's what I did here.)
2020-11-29 04:33:22 +00:00
Andrew Poelstra
ef13698934 Merge 48c1083632 into merged_master (Bitcoin PR #19105) 2020-11-28 20:18:13 +00:00
Andrew Poelstra
afe472121a Merge a1d14f522c into merged_master (Bitcoin PR #19671) 2020-11-28 19:48:53 +00:00
Andrew Poelstra
e10dd69c55 Merge a0e75bd31d into merged_master (Bitcoin PR #15937) 2020-11-27 20:39:27 +00:00
Andrew Poelstra
a67921c2c8 Merge dabab06a1a into merged_master (Bitcoin PR #19455) 2020-11-27 19:01:46 +00:00
Andrew Poelstra
9cbfabd2d6 Merge 14ceddd290 into merged_master (Bitcoin PR #18991) 2020-11-27 00:01:40 +00:00
Andrew Poelstra
e377f4f773 Merge f4cfa6d019 into merged_master (Bitcoin PR #15935) 2020-11-26 18:11:36 +00:00
Andrew Poelstra
4a5f6d253f Merge 19aaf7945e into merged_master (Bitcoin PR #19423) 2020-11-26 13:33:52 +00:00
Andrew Poelstra
aef7078adf Merge 107b8559c5 into merged_master (Bitcoin PR #18638) 2020-11-26 01:09:23 +00:00
Andrew Poelstra
37cb4fdaba Merge a4eb6a51a7 into merged_master (Bitcoin PR #19469) 2020-11-26 01:09:22 +00:00
Andrew Poelstra
e96a115bab Merge f6072e601a into merged_master (Bitcoin PR #19368) 2020-11-26 01:09:16 +00:00
Andrew Poelstra
31f5cfcef7 Merge 02b26ba1c1 into merged_master (Bitcoin PR #19200) 2020-11-26 01:09:10 +00:00
Andrew Poelstra
24f4a02a03 Merge 0afbeb73cc into merged_master (Bitcoin PR #19153) 2020-11-26 01:09:05 +00:00
Andrew Poelstra
cd430597f1 Merge 5af16a4db7 into merged_master (Bitcoin PR #16756) 2020-11-26 01:09:04 +00:00
Andrew Poelstra
55d166627c Merge b33136b6ba into merged_master (Bitcoin PR #19083) 2020-11-26 01:09:03 +00:00
Andrew Poelstra
dd4616946d Merge 85f7db2284 into merged_master (Bitcoin PR #19239) 2020-11-26 01:09:03 +00:00
Andrew Poelstra
9e70adf13e Merge 6762a627ec into merged_master (Bitcoin PR #19230) 2020-11-26 01:09:02 +00:00
Andrew Poelstra
d5082ffa37 Merge 39afe5b1c6 into merged_master (Bitcoin PR #19082) 2020-11-26 01:08:58 +00:00
Andrew Poelstra
67f55c5173 Merge 234fabab90 into merged_master (Bitcoin PR #18210) 2020-11-26 01:08:57 +00:00
Andrew Poelstra
b23acd5046 Merge dec067f5a0 into merged_master (Bitcoin PR #18965) 2020-11-26 01:08:54 +00:00
Andrew Poelstra
9ac62395d7 Merge e45fb7e0d2 into merged_master (Bitcoin PR #18877) 2020-11-26 01:08:42 +00:00
Andrew Poelstra
bda1054131 Merge 7a5767423f into merged_master (Bitcoin PR #18808) 2020-11-26 01:08:41 +00:00
Andrew Poelstra
503f615f81 Merge a66ba6d029 into merged_master (Bitcoin PR #18576) 2020-11-26 01:08:35 +00:00
Andrew Poelstra
252c3a223c Merge 978c5a2122 into merged_master (Bitcoin PR #18485) 2020-11-26 01:08:33 +00:00
Andrew Poelstra
733d5cf974 Merge e302830fae into merged_master (Bitcoin PR #18774) 2020-11-26 01:08:33 +00:00
Andrew Poelstra
e5f1b2cdaa Merge 0ef0d33f75 into merged_master (Bitcoin PR #18038) 2020-11-26 01:08:33 +00:00
Andrew Poelstra
1c12ae1719 Merge eef90c14ed into merged_master (Bitcoin PR #16528)
This is the 43-commit descriptor wallet PR. It was remarkably easy to merge, given
its magnitude. With this commit Elements supports importing Bitcoin descriptors
and deriving (Bitcoin) addresses, though of course it does not support blinding
yet. That is a post-rebase project.

The material changes were:

1. Changing constants in the tests (super annoying but nothing surprising)

2. Adding a missing "skip if this coin is not ours" check in src/script/sign.cpp
   which was causing us to erroneously remove existing witnesses from transactions.
   This wasn't a problem before this commit since we would only ask specific
   scriptpubkeymans to sign, and we'd never ask any to sign inputs we didn't
   own. Andy simplified the logic here to always try every scriptpubkeyman,
   which means they have to play a bit more nicely with each other.

Other than that, this was a big diff with many conflicts but literally all of
them were "we both added code" and the resolution was to take both sides.
2020-11-26 01:08:31 +00:00
Andrew Poelstra
fd37b7c5d6 Merge 54f812d9d2 into merged_master (Bitcoin PR #18673) 2020-11-26 01:08:23 +00:00
Andrew Poelstra
5f85d5672b Merge 51e2ce45d6 into merged_master (Bitcoin PR #17693) 2020-11-26 01:08:16 +00:00