Commit graph

1703 commits

Author SHA1 Message Date
Gregory Sanders
2949ea924f
Merge #751: Peg-in fields for PSBT
7cb5f6bb0 Sign PSBTs with peg-in data (Andrew Chow)
73711eb0b Merge psbt peg-in data (Andrew Chow)
4ad849fed Finalize psbt peg-ins (Andrew Chow)
b7e369505 Test createpsbt and decodepsbt with peg-ins (Andrew Chow)
8ece8e0a0 Show peg-in info in decodepsbt (Andrew Chow)
646e76f7d Be able to create peg-in PSBTs in createpegin (Andrew Chow)
b5590b20c Add peg-in PSBT fields (Andrew Chow)

Pull request description:

  Adds peg-in fields for PSBT. `createpsbt` uses the new peg-in raw tx api to allow specifying the peg-in data and then adds it to the psbt. `decodepsbt`, `finalizepsbt` and `walletsignpsbt` are both updated to handle peg-in stuff too. Also tests.

  `walletcreatefundedpsbt` still does not handle peg-in data. It will require handling external inputs which the wallet does not do. I think it would be best to first implement external inputs in `FundTransaction` upstream before allowing `walletcreatefundedpsbt` to accept peg-ins.

Tree-SHA512: 838c2cf0de78b6ad948aaec2932326e2e39b6645c98193c90eedaee7e5cd8ebe3e8ea00e3ba4a67d5f862948195f37aded0e6a08a7c3c20def325d4cabb78ee3
2019-12-03 11:42:58 -05:00
Gregory Sanders
9a51d08eda Fix address string assertions in tests 2019-11-26 09:03:45 -05:00
Gregory Sanders
6fc3fe04ef Change elements mode to activating BIP9 signaling based on height 2019-11-13 16:07:29 -05:00
Gregory Sanders
fd5ec4bff6 HF: Simplify legacy->dynafed transition max sig size 2019-11-08 14:07:07 -05:00
Gregory Sanders
7b15b4802c HF: Publish full dynafed block no matter epoch age 2019-11-08 14:07:01 -05:00
Gregory Sanders
1d7847305c HF: Dyanfed pruned header now has extra root 2019-11-08 14:07:01 -05:00
Gregory Sanders
6d9639b211 getnewblockhex: Take data push for arbitrary data in block coinbase commitment 2019-10-28 09:11:05 -04: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
Andrew Chow
646e76f7db Be able to create peg-in PSBTs in createpegin 2019-10-16 13:58:19 -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
Gregory Sanders
63701d117a
Merge #748: Use bytes_to_hex_str instead of .hex()
4b7f3ca90 Use bytes_to_hex_str instead of .hex() (Andrew Chow)

Pull request description:

  Python 3.4 doesn't have .hex(). 3.4 is required by `.python-version` which is used by pyenv. Pyenv users (like myself) will have a hard time running the tests without this.

Tree-SHA512: 8e2f2319e06c8f597b44dd50903e49536277c1c1cd727bf5336579fea977d8a4b5a82744fe1d8dbedc10be3470a63dc1e15435f54fe7cbb0ac96fcea798d1ddc
2019-10-16 09:56:39 -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
Andrew Chow
ac6f052a6d Have find_vout_for_address only get non-confidential address when using elements chain 2019-10-15 15:22:10 -04:00
Gregory Sanders
fcc7051a81 feature_blocksign.py: Allot for possibility of non-empty block 0.5RTT 2019-10-15 11:39:51 -04:00
Steven Roose
06209ba03d
Merge #709: tweakfedpegscript: Optional fedpeg arg
97e46f937 tweakfedpegscript: Optional fedpeg arg (Gregory Sanders)

Pull request description:

  Might be useful for dynamic federations chains, when calculating old peg-in addresses

Tree-SHA512: 33c8f58cf020cf835640ca959f6e84dd58b59df3386fcd5ac71dee9c210028d0857acef65a02fb84888209010e41115b5c54bbb2458effc284afaf44b310c3a5
2019-10-14 16:25:43 +01:00
Gregory Sanders
bf2f1c6217 Reduce min relay to 100 sat/vkB 2019-10-14 10:17:32 -04:00
Gregory Sanders
d8dc3f2f29 modify p2p_feefilter test to catch rounding error 2019-10-14 10:17:32 -04:00
Gregory Sanders
7126d1fe38 finalizecompactblock: Fix it, make test easier to fail 2019-10-10 15:46:43 -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
97e46f9376 tweakfedpegscript: Optional fedpeg arg 2019-10-08 10:23:28 -04:00
Steven Roose
55c4c6cd20
Fix other bug in initpegoutwallet descriptor parsing 2019-09-30 17:40:33 +02:00
Steven Roose
fdba8c45f9
Support descriptors with checksums in initpegoutwallet 2019-09-30 15:50:27 +02:00
Gregory Sanders
522a147be7
Add blech32 roundtrip test for python implementation 2019-09-13 20:28:07 +05:00
Dmitry Petukhov
32564b0a99
fix len check in blech32 decode() in test framework 2019-09-13 20:24:23 +05:00
Gregory Sanders
606f5665a9 Fix feature_pak.py in light of #706 2019-09-12 10:35:45 -04:00
Gregory Sanders
f3ce121a6a RPC: Fix tweakfedpegscript for dynafed, add basic test 2019-09-10 11:03:03 -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
Gregory Sanders
6000752a92 Enforce PAK checks on dynafed proposals 2019-09-05 10:51:09 -04:00
Gregory Sanders
afdf0239ba Update python test framework for DynaFedParamEntry fedpeg program 2019-09-05 10:51:09 -04:00
Gregory Sanders
95d8339f43 Add functional test for illegal proposals 2019-09-05 10:51:09 -04:00
Gregory Sanders
1baad6bf5a Update dynafed functional test to new behavior 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
15996384d4 s/ConsensusParamEntry/DynaFedParamEntry/ 2019-09-05 10:51:09 -04:00
Gregory Sanders
642260a126 s/m_sbs_wit_limit/m_signblock_witness_limit/ 2019-09-05 10:51:09 -04:00
Gregory Sanders
b66804678c s/HF_MASK/DYNAFED_HF_MASK/ 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
b996a425e1 Set default of multi_data_permitted to enforce_pak 2019-09-03 10:55:06 -04:00
Gregory Sanders
16b87ba951 Disable PAK loading from configuration on init, disable pak test 2019-09-03 10:55:06 -04:00
Gregory Sanders
563cd93d43 Add python implementation of dynafed block serialization 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
2848b520b2 PSBT for Confidential Assets 2019-07-31 10:50:03 -07:00
Akio Nakamura
d584b65c18 [test]decrese num of inputs on partial blind test 2019-07-05 19:10:11 +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
Gregory Sanders
7b302eb99d
Merge #663: Add support for blinding pegins
cc49106 Update getnewaddress help message with "blech32" special case (Steven Roose)
56358b8 Add tests for blinding pegin transactions (Steven Roose)
a9f589b Add support for blinding pegin transactions (Steven Roose)
bf0cc83 Add confidential assets values to listunspent documentation (Steven Roose)
4e84596 Always return blind address for "blech32" type (Steven Roose)

Pull request description:

  Adds pegin handling support for `blindrawtransaction` and `rawblindrawtransaction`.

Tree-SHA512: 1138aeedd2d5852108abd53a6afc83524e5f06ad3ab770fd8ab37c97c8dd5c49f78b8d44bdf7cbe2c073e07cd8566bf032526ab6488e99fc02f8b5b154a3fde1
2019-06-21 11:05:24 -04:00
Steven Roose
f9d159ba3a
Don't assert on user-inputed values
This prevents the assertion from crashing the node when an RPC user
enters invalid blinding factors.
2019-06-14 15:52:11 +01:00