Commit graph

635 commits

Author SHA1 Message Date
Andrew Chow
1ce74e07f3 Be able to fund transactions with peg-ins 2019-12-04 11:36:28 -05:00
Andrew Chow
c25874672b allow fundtx rpcs to work with external inputs 2019-12-04 11:29:33 -05:00
Gregory Sanders
e92ac19a45 Remove 'bitcoin' from address descriptions 2019-11-13 10:55:25 -05: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
cefe40767d Allow specifying peg-in info in raw transaction RPC inputs 2019-10-14 16:58:53 -04:00
Andrew Chow
42babb81f0 Refactor peg-in input construction into its own function in rpc/rawtransaction.cpp 2019-10-14 16:58:53 -04:00
Andrew Chow
a90d1521c8 Refactor peg-in witness construction to it's own function
Also changes to Use CVectorWriter instead of casting for peg-in value serialization
2019-10-14 16:06:58 -04:00
Gregory Sanders
130d190e70 Disallow implicit conversion for CFeeRate constructor 2019-10-14 10:17:32 -04:00
Gregory Sanders
5af17a42bc Update initpegoutwallet help to describe derivation paths properly. 2019-09-30 12:36:45 -04:00
Steven Roose
55c4c6cd20
Fix other bug in initpegoutwallet descriptor parsing 2019-09-30 17:40:33 +02:00
Steven Roose
28dac17c4d
Temp disable pegout descriptors that are not pkh() 2019-09-30 16:07:20 +02:00
Steven Roose
fdba8c45f9
Support descriptors with checksums in initpegoutwallet 2019-09-30 15:50:27 +02:00
Gregory Sanders
809f4acd3b Dynafed blocks must have sighash byte
It is not included in the signature hash.
The sighash byte MUST be SIGHASH_ALL to avoid
malleability.
2019-09-27 14:43:50 -04:00
Gregory Sanders
3fa6c9ca3a sendtomainchain_pak: Fix minimum send amount message 2019-09-11 09:27:53 -04:00
Gregory Sanders
feef196a20 Fix compilation of raw transaction operations with peg-in inputs 2019-09-05 10:51:09 -04:00
Gregory Sanders
953dd82eae p2sh-wrap peg-in addresses if fedpeg_program is p2sh-wrapped 2019-09-05 10:51:09 -04:00
Gregory Sanders
bd11097cec Add fedpeg_program field in dynafed header 2019-09-05 10:51:09 -04:00
Gregory Sanders
dddc040aa0 s/m_dyna_params/m_dynafed_params/ 2019-09-05 10:51:09 -04:00
Gregory Sanders
47db75e39f Dynafed RPC support, tests, and deployment for custom chains 2019-09-05 10:51:09 -04:00
Gregory Sanders
525b24cf5c Expose fedpeg fetching to consensus and mempool internals 2019-09-03 10:55:29 -04:00
Gregory Sanders
802a055191 ScriptHasValidPAKProof takes fedpeg as arg 2019-09-03 10:55:06 -04:00
Gregory Sanders
d35bf08210 Fix sendtomainchain with pak when subtracting fee from output 2019-08-30 11:35:43 -04:00
Glenn Willen
3127c65615 Add legacy help text for walletprocesspsbt suggesting to use new RPCs instead. 2019-07-31 10:50:03 -07:00
Glenn Willen
d39925b08a Disable PSBT RPCs when not in g_con_elementsmode. 2019-07-31 10:50:03 -07:00
Glenn Willen
2848b520b2 PSBT for Confidential Assets 2019-07-31 10:50:03 -07:00
Akio Nakamura
254b166574 [rpc]blindrawtransaction accepts more commitments 2019-07-05 19:07:26 +09:00
Akio Nakamura
7b0b52f816 [RPC]Add assetlabel support to some commands
Remain the support of assetlabel parameter that was previously present.

1. sendtoaddress
 Print 'optional' explicitly in the help text.↲
2. getreceivedbyaddress
 Add the 3rd parameter as "assetlabel"
 Print 'optional' explicitly in the help text.↲
3. getreceivedbylabel
 Add the 3rd parameter as "assetlabel"
 Print 'optional' explicitly in the help text.↲
4. getbalance
 Set the name of 4th parameter as "assetlabel".
 Print 'optional' explicitly in the help text.↲
5. listreceivedbyaddress
 Set the name of 5th parameter as "assetlabel".
 Enable assetlabel selection to the result of amounts.
 Print 'optional' explicitly in the help text.↲
6. gettransaction
 Add the 3rd parameter as "assetlabel"

notice) Also getwalletinfo had a parameter to specify "assetlabel".
But no need to add a parameter because the command is a catch-all one.
2019-06-25 18:36:39 +09:00
Steven Roose
cc49106514
Update getnewaddress help message with "blech32" special case 2019-06-17 10:41:09 +01:00
Steven Roose
a9f589b9ec
Add support for blinding pegin transactions
Both via blindrawtransaction and rawblindrawtransaction.
2019-06-13 16:58:50 +01:00
Steven Roose
bf0cc83ba3
Add confidential assets values to listunspent documentation 2019-06-13 16:58:47 +01:00
Steven Roose
4e84596892
Always return blind address for "blech32" type
Even when -blindedaddresses=0.
2019-06-13 16:58:45 +01:00
Gregory Sanders
408912290a Better explain the 8-decimal asset issuance. 2019-06-07 10:01:36 +02:00
Steven Roose
1b78b9f222
Merge #636: have peg-in witness creation strip witness for space savings
7737d29b7 have peg-in witness creation strip witness for space savings (Gregory Sanders)

Pull request description:

  Cheaper peg-in witness for those with segwit transactions in Bitcoin.

  resolves https://github.com/ElementsProject/elements/issues/628

Tree-SHA512: defc4f38b2456c6f45cf2ebd48a3d5f9e39544bd048606257ef6cf90623595c159f61e3df56845fb7a37a44b5019614e692663978a9664dd9b4d01b77bedeb86
2019-06-05 10:46:33 +01:00
Steven Roose
c29771437e
Merge #625: Disallow issuance calls in bitcoin mode
5de1e3f9d Disallow issuance calls in bitcoin mode (Gregory Sanders)

Pull request description:

  Enough people are running `-regtest` and getting confused as to why they cannot issue assets to make some checks worth it even though we don't intend people to run bitcoin mode at all.

Tree-SHA512: cb595839d01a000b5a48be4ae5c7084a687bb5c252be8f812f56455082ed78e66cb15313ab15934941cd403040ae253d8270faf6e85995d5caa0d1a66ccd3c6c
2019-06-05 10:40:15 +01:00
Gregory Sanders
7737d29b72 have peg-in witness creation strip witness for space savings 2019-05-28 11:52:57 -04:00
Steven Roose
de81c0d97e
MERGE-FIX: Fix linter (mostly RPC help)
I also moved some RPC methods that were not at the end of the file with
the other ELEMENTS RPC methods. This makes the diff on my machine look
crazy. Let's hope GitHub has more intelligent diffs..
2019-05-27 17:40:16 +01:00
Steven Roose
473e1e9ca1
MERGE-FIX: Fix compatibility functional tests 2019-05-22 16:54:46 +01:00
Steven Roose
52f6f6905b
WIP: Fix compilation after merge 2019-05-20 16:22:05 +01:00
Gregory Sanders
5de1e3f9d5 Disallow issuance calls in bitcoin mode 2019-05-20 07:45:42 -04:00
Steven Roose
f4889a5253
UPSTREAM MERGE BROKEN: Merge upstream commit '519b0bc5dc' into master 2019-05-17 16:17:09 +01:00
Steven Roose
d21e0563c1
Address some linter complaints 2019-05-15 17:30:04 +01:00
Steven Roose
ad3d496d78
Add extra lock check for OSX build
Apparently my upstream checkpoint was in the middle of a series of
commits by ianofsky separating wallet from the main code.  This means
that I have to add this main lock which will be replaced by the
locked_chain interface in a subsequence catchup.
2019-05-15 17:30:02 +01:00
Steven Roose
dc900eb7d7
Merge branch 'master' into catchup 2019-05-14 16:49:18 +01:00
Steven Roose
48a82fa993
Make claimpegin fail in the case of a double claim
Currently it will commit to the transaction without it being able to
enter the mempool. This makes the block creation code include the tx
into the block and create an invalid block.
2019-05-08 15:35:58 +01:00
Steven Roose
50c557083d
Report IsValidPeginWitness error message 2019-05-07 20:13:42 +01:00
Steven Roose
9f4f2e7519
MERGE-FIX: Fix compilation errors 2019-05-03 17:46:12 +01:00
Steven Roose
7f894ae00b
UPSTREAM MERGE BROKEN: Merge commit 'f617e05c38' into master 2019-05-01 19:18:18 +01:00
Gregory Sanders
a9cbe55309 refactor getpeginaddress to not call getnewaddress RPC 2019-05-01 10:54:06 -04:00
Gregory Sanders
cdb33e5214 createrawpegin should look for wpkh addresses, not nested 2019-05-01 10:54:06 -04:00
Gregory Sanders
7fd6b88c97 claimpegins should arrive in witness destinations 2019-04-19 07:39:32 -04:00