Commit graph

67 commits

Author SHA1 Message Date
Byron Hambly
af3fe60b69 Merge 94db963de5 into merged_master (Bitcoin PR bitcoin/bitcoin#23300) 2023-05-17 13:44:36 +00:00
Byron Hambly
f80332fee5 Merge 2e82af46e2 into merged_master (Bitcoin PR bitcoin/bitcoin#23207) 2023-05-12 09:55:10 +00:00
James Dorfman
ebc6e3967f Merge bb60960750 into merged_master (Bitcoin PR bitcoin/bitcoin#22593) 2023-04-03 20:34:45 +00:00
Glenn Willen
f035196ceb Merge 586e5c7dd7 into merged_master (Elements PR ElementsProject/elements#1062) 2022-04-20 21:51:53 -07:00
Pablo Greco
85c3c2b819 Deprecate con_dyna_deploy_start in favor of evbparams 2021-11-23 14:36:03 +00:00
Andrew Poelstra
242586cea6 lint: fix pylint issues 2021-10-15 00:20:23 +00:00
Andrew Poelstra
e4c9cc06dc Merge 250c8e59d5 into merged_master (Elements PR ElementsProject/elements#1030) 2021-09-18 03:17:06 +00:00
Glenn Willen
b2e1cc38de Regression test for pegin validation issues during sync
Add a regression test for https://github.com/ElementsProject/elements/issues/891 .

This checks that we can sync successfully when making a bunch of new blocks
just as we have transient loss of parent daemon connectivity. This reliably
fails without the fix, and reliably succeeds with it. (It stands in for the
situation, more common in production, where we sync faster than the parent
daemon can keep up after a long outage.)
2021-09-13 22:10:36 +00:00
Andrew Poelstra
313f73d5b2 When validation is waiting for parent chain daemon, "stall".
Currently, if -validatepegin is given, and block validation can't proceed
because the parent chain is not synced, we mark the block invalid and put
it in a queue to be "revalidated" later. Unfortunately, marking a block
invalid has downstream consequences, in particular causing descendant blocks
to be marked invalid, which are not currently fixed by the queue.

Instead, we'll use a different strategy: if the mainchain daemon isn't
sufficiently synced to validate a block, we will "stall" connecting that
block to the chain, and have ActivateBestChain simply keep the tip at the
previous block until we're ready.

We can still download and validate (partly) blocks past this point while
we're waiting. They will be connected once the parent chain daemon catches
up.
2021-09-13 22:10:09 +00:00
Andrew Poelstra
36e5e2a7f1 Merge 9a154599fe into merged_master (Elements PR ElementsProject/elements#900)
Surprisingly easy to do. Almost all of the diff resolution was mechanically
  * replacing boost::variant with std::variant
  * replacing Optional with std::optional
     * then replacing `nullopt` with `std::nullopt`
  * updating the RPC functions for the new RPCArg::Default type
  * update the tests/ directory to make new (since 22) tests use arrays for
    createrawtransaction outputs
  * other ad-hoc changes to function parameters etc (not too many of these)

I had to "really" change the code in PrecomputePSBTData, which was introduced
in 22.0 and affected by PSET, but this function was like 8 lines long so it
was easy.

Reviewing the diff may be a bit difficult because of the mix of mechanical
changes and ad-hoc things. Probably the most straightforward thing to do
is to redo the merge, `sed -i` to fix the boost::variant and Optional stuff,
then diff the remaining conflicts against this commit.

TODO: grep for `blindpsbt` and you will see that this RPC is still referenced
in documentation and help text even though it was deleted. Need to fix this
in 0.21 in a separate PR.
2021-09-04 19:34:14 +00:00
Andrew Poelstra
083e08cf82 Merge d6a59166a1 into merged_master (Bitcoin PR bitcoin/bitcoin#22257)
Just as mechanical and annoying as it looks.
2021-07-28 21:06:57 +00:00
Andrew Poelstra
d39d57c704 Merge 1c7be9ab90 into merged_master (Bitcoin PR #20286)
I hate this PR.
2021-06-28 21:30:17 +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 Chow
1dbc3b270c Implement updatepsbtpegin RPC 2021-06-22 14:42:18 -04:00
Andrew Poelstra
a9ab76769e Merge 11cbd4bb54 into merged_master (Bitcoin PR #17556)
This PR eliminates "strange regtest=0 behavior" in a test which had forced
us to disable the test for Elements. Can re-enable now :)

I also removed the `chain_in_args` parameter to `TestNode`, which Steven added
in https://github.com/ElementsProject/elements/pull/533 (which itself replaces
unconditionally adding chain={} on the command-line, which was added in #458).
These were added in the 0.17 rebase to deal with the job of starting bitcoind,
which then did not support the `chain=` command-line arg as well as elementsd,
which back then required this command-line arg.

This was causing some issues with the "check -acceptnonstdtxn doesn't work on
mainnet" test because it would add -chain=elementsregtest to the command-line
of a daemon that was supposed to be connecting to mainnet/liquidv1. It is
possible to override this behavior, but since 0.20+ versions of elementsd and
bitcoind have essentially the same support for chain= options, it seemed
cleaner to just eliminate the diff.
2021-06-18 14:40:09 +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
a7602fb56d Merge 652c45fdbb into merged_master (Bitcoin PR #15454) 2020-11-29 06:12:28 +00:00
Andrew Poelstra
8dcff8b5c8 Merge 6bb5f6d8e3 into merged_master (Bitcoin PR #16377)
Note that this is a breaking change in Core's RPC -- if you add pegins
to createfundedpsbt then it won't do coin selection unless you provide
the additional new add_inputs option.
2020-11-26 01:09:10 +00:00
Andrew Poelstra
dd22beb3b3 Merge e5ab941489 into merged_master (Elements PR #813) 2020-11-26 01:07:41 +00:00
Andrew Poelstra
c7bf5baf96 Merge 526e802d69 into merged_master (Elements PR #755)
This Elements PR includes components of Core PR #17211, which since the
refactors to use effective value landed, no longer provides the right
error message when a user provides an unowned input from a wallet tx.
See https://github.com/bitcoin/bitcoin/pull/17211#pullrequestreview-528389011

This breaks a functional test which was included in this PR, but which
conveniently has been changed in the current version of the Core PR. I
fixed the behavior (commented, in SelectCoins) rather than updating the
test to the most recent version.
2020-11-14 16:51:53 +00:00
Andrew Poelstra
fd78a12518 Merge 2949ea924f into merged_master (Elements PR #751) 2020-11-14 16:51:52 +00:00
Andrew Poelstra
508fcb020d Merge b688b859db into merged_master (Bitcoin PR #17004) 2020-11-09 21:20:44 +00:00
Andrew Poelstra
4f50591181 Merge 0d2832a6d1 into merged_master (Elements PR #741)
To resolve the `ConstructTransaction` conflict I reverted to the existing code
then manually applied the diff (it adds a parameter then adds a giant pile of
code to the input loop).
2020-11-09 21:20:40 +00:00
Andrew Poelstra
809a747245 Merge a2a0a83716 into merged_master (Elements PR #738) 2020-11-09 21:20:36 +00:00
Andrew Poelstra
b24be4b1a7 Merge 59c138d2f1 into merged_master (Bitcoin PR #16898) 2020-11-09 21:20:27 +00:00
Andrew Poelstra
9cc26a716a Merge 5b2fe5563b into merged_master (Elements PR #642)
FIXME: we disable standardness checks for the non-PAK node in the PAK tests.
This is because of a bug in Elements which causes non-PAK nodes to reject
pegouts for standardness reasons. Need to fix it after the rebase.
2020-11-09 21:20:21 +00:00
Andrew Poelstra
bb82340205 Merge 7b302eb99d into merged_master (Elements PR #663) 2020-11-06 15:20:17 +00:00
Andrew Poelstra
daa130fe7b Merge ee642f5862 into merged_master (Elements PR #658) 2020-11-06 15:20:13 +00:00
Andrew Poelstra
041d9ca6c3 Merge 0e9cb2d24d into merged_master (Bitcoin PR #15773) 2020-10-28 15:28:06 +00:00
Andrew Poelstra
67d718b048 Merge a74d588f21 into merged_master (Bitcoin PR #14954) 2020-10-27 22:32:24 +00:00
Glenn Willen
fc841c8047 Fix claimpegin and createrawpegin support for multiwallet.
Fix multiple issues with claimpegin and createrawpegin support for
multiple loaded wallets:

- Failure to call EnsureWalletIsAvailable would cause a crash when multiple
  wallets were loaded, but one was not specified in the RPC call.
- Failure to propagate the request URL from claimpegin when making an
  internal call to another RPC would result in failure when multiple
  wallets were loaded, by failing to specify one for that call.

Add a regression test to the feature_fedpeg.py test: at a critical point,
create a second wallet on the sidechaind, and set up the RPC client to
use the first one, to check that it still works correctly.
2020-02-06 23:08:56 -08:00
Andrew Chow
00eb6c0978 Test funding peg-in psbt 2019-12-04 12:01:54 -05:00
Andrew Chow
7cb5f6bb00 Sign PSBTs with peg-in data 2019-10-21 18:02:14 -04:00
Andrew Chow
73711eb0bb Merge psbt peg-in data 2019-10-21 18:02:14 -04:00
Andrew Chow
b7e369505f Test createpsbt and decodepsbt with peg-ins 2019-10-21 18:02:14 -04:00
Gregory Sanders
0d2832a6d1
Merge #741: Allow specifying peg-in data in createrawtransaction
5a4d61169 Test raw transaction peg-in (Andrew Chow)
ac6f052a6 Have find_vout_for_address only get non-confidential address when using elements chain (Andrew Chow)
cefe40767 Allow specifying peg-in info in raw transaction RPC inputs (Andrew Chow)
42babb81f Refactor peg-in input construction into its own function in rpc/rawtransaction.cpp (Andrew Chow)
a90d1521c Refactor peg-in witness construction to it's own function (Andrew Chow)

Pull request description:

  Adds to `createrawtransaction` the fields `pegin_bitcoin_tx`, `pegin_txout_proof`, and `pegin_claim_script` so that raw transactions can contain peg-in inputs too.

  Since `ConstructTransaction` is used by `createpsbt` and `walletcreatefundedpsbt` but those should not support peg-ins yet (the peg-in data should go into PSBT fields for peg-ins but those don't exist yet), an argument is added to it to optionally reject peg-in data.

Tree-SHA512: fcf3e4be87f92bfc5b00321bec405001d98615cefb76118345e0c759c6bfcb90b6050735960b6fbdbe26479fa11c9273f9963873a8adc1fbad9ed31dc7953ee0
2019-10-16 10:16:25 -04:00
Andrew Chow
4b7f3ca908 Use bytes_to_hex_str instead of .hex()
Python 3.4 doesn't have .hex().
2019-10-15 18:37:08 -04:00
Andrew Chow
5a4d61169b Test raw transaction peg-in 2019-10-15 15:22:17 -04:00
Gregory Sanders
3e912deefc Sprinkle a bunch of syncs to avoid peg-in failure hanging 2019-10-09 13:24:51 -04:00
Gregory Sanders
3ac8e298a9 feature_fedpeg.py: just use testmempoolaccept checking blinded peg-in transactions 2019-10-09 13:24:51 -04:00
Gregory Sanders
b105ff45e5 feature_fedpeg.py: Run in various dynafed transition settings 2019-09-05 10:51:09 -04:00
Gregory Sanders
50a2b599ca After a reorg, boot all peg-ins and peg-outs from mempool 2019-09-05 10:51:09 -04:00
Steven Roose
56358b8c0e
Add tests for blinding pegin transactions 2019-06-13 17:03:50 +01:00
Gregory Sanders
25b2674fd6 Expose pegin confirmation depth parameter via getsidechaininfo 2019-06-07 11:56:08 +02:00
Steven Roose
efe4e8ff04
MERGE-FIX: Fix functional tests 2019-05-24 17:11:47 +01:00
Steven Roose
dc900eb7d7
Merge branch 'master' into catchup 2019-05-14 16:49:18 +01:00
Steven Roose
5492cefcc6
MERGE-FIX: Fix fedpeg and pak tests for 0.18.0 2019-05-14 15:09:20 +01:00
Steven Roose
2939b5d41e
Make fedpeg test compatible with bitcoind v0.18.0 parent 2019-05-14 13:36:15 +01:00