Commit graph

20476 commits

Author SHA1 Message Date
Andrew Chow
73711eb0bb Merge psbt peg-in data 2019-10-21 18:02:14 -04:00
Andrew Chow
4ad849fed2 Finalize psbt peg-ins 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
8ece8e0a0c Show peg-in info in decodepsbt 2019-10-16 13:58:19 -04:00
Andrew Chow
646e76f7db Be able to create peg-in PSBTs in createpegin 2019-10-16 13:58:19 -04:00
Andrew Chow
b5590b20ce Add peg-in PSBT fields 2019-10-16 12:55:48 -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
Steven Roose
b117eb4c25
Merge #747: feature_blocksign.py: Allot for possibility of non-empty block 0.5RTT
fcc7051a8 feature_blocksign.py: Allot for possibility of non-empty block 0.5RTT (Gregory Sanders)

Pull request description:

  The way the test is run, the last node(non-signer) can actually become the block producer.

  This, in conjunction with its p2p connection to node 0, means that when node 0 is doing it's compact block back and forth, it can actually create a complete block in 0.5 RTT even if transactions were generated for that block.

  Allow this to happen.

  This may have been a bug in that the non-signer shouldn't have been making blocks, but this is actually more interesting behavior to test, where sometimes partially-complete compact blocks are made, sometimes full, sometimes empty. This exercises more code paths, and so I'm just making sure this succeeds instead, and assert it only succeeds in the expected situation.

Tree-SHA512: f6267208c51344a26636fce4635297f050e2989ec231d2d21463e9a987b58d0a8635bea057b60216fa709ca094cf741ce8acfc0b1d321b6498409c73a19c8fd1
2019-10-15 17:20:22 +01:00
Gregory Sanders
fcc7051a81 feature_blocksign.py: Allot for possibility of non-empty block 0.5RTT 2019-10-15 11:39:51 -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
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
Steven Roose
d6f304a462
Merge #684: Reduce relay min rate to 100 sat/vkB
bf2f1c621 Reduce min relay to 100 sat/vkB (Gregory Sanders)
d8dc3f2f2 modify p2p_feefilter test to catch rounding error (Gregory Sanders)
130d190e7 Disallow implicit conversion for CFeeRate constructor (Gregory Sanders)
36fceda4a feefilter: Compute the absolute fee rather than stored rate to match mempool acceptance logic (Gregory Sanders)

Pull request description:

  Includes an upstream bugfix for feefilter/mempool divergence when the rate is not `%1000=0`.

  Does not lower the minimum wallet default! This must be chosen manually for the time being(`settxfee`), at the risk of not propagating to the rest of the network if peers have not also updated. Fee estimation is also not yet updated to support lower feerates.

Tree-SHA512: 561b47d6f5fd898eec56db41189a6c514e54682b817996f2e188d791a9234102df52bd191e02dced468df30da5816b9acfde53154939180db9bf23bd20256a53
2019-10-14 16:23:31 +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
130d190e70 Disallow implicit conversion for CFeeRate constructor 2019-10-14 10:17:32 -04:00
Gregory Sanders
36fceda4ab feefilter: Compute the absolute fee rather than stored rate to match mempool acceptance logic 2019-10-14 10:17:32 -04:00
Steven Roose
073cb3cb94
Merge #732: Give more descriptive error for non-WSH(OP_TRUE) block generation
3a2888cca Give more descriptive error for non-WSH(OP_TRUE) block generation (Gregory Sanders)

Pull request description:

  If someone transitions to a different block type, including something else op_true-ey but not exactly, `generatetoaddress` and ilk will complain without much recourse.

Tree-SHA512: 720e6888eb3985ad3619d2570b4c22985365a63d72d4a0d9b7d75d2091f6839db034d1b192a177901f0dfbb0d97cef330183438b02c6a11b64d33fe480023d88
2019-10-14 13:38:39 +01:00
Gregory Sanders
b0f4cb397a
Merge #745: finalizecompactblock: Fix it
7126d1fe3 finalizecompactblock: Fix it, make test easier to fail (Gregory Sanders)

Pull request description:

  We were putting together the block wrong in a couple ways.

  The order of the transactions matter when give as the "missing transactions" list. We're simply feeding it two lists of transactions that together should contain the full block. Also we should actually serialized the 2nd argument rather than the 1st, again.

Tree-SHA512: a1ecbc737d39113a517bc0ce3c53dc66472b0789fa60ef86083672e946d2c5ba1e06207314760f3358f34996b794b72d30279c96f65d9f784d35603e4db727d4
2019-10-11 09:24:50 -04:00
Gregory Sanders
7126d1fe38 finalizecompactblock: Fix it, make test easier to fail 2019-10-10 15:46:43 -04:00
Steven Roose
8fd1b52f9d
Merge #744: Fix finalizecompactblock filling in more found txs from mempool
cb90cdb7b Fix finalizecompactblock filling in more found txs from mempool (Gregory Sanders)

Pull request description:

  If you instantiate `InitData` with a non-empty mempool, it may find "missing transactions", fill them in, and then the missing transaction index vector is now faulty and fails.

  All data is already available to finish the block(or not in case of collision), just use given data.

  Fixes intermittent feature_blocksign.py failure.

Tree-SHA512: d0d984b72daf710a1889c1e7032fe4fc81a26701d595441d9978bd6ab37f59b3a90df52a45df120007eb9465c6c4879807b6bea3602bb32ed1c05814d041c6fb
2019-10-10 17:05:33 +01:00
Gregory Sanders
cb90cdb7bf Fix finalizecompactblock filling in more found txs from mempool 2019-10-10 10:52:34 -04:00
Steven Roose
3c01b3435e
Merge #742: Don't run normal functional tests twice.
d71ddbee4 Don't run normal functional tests twice. (Gregory Sanders)

Pull request description:

Tree-SHA512: f10aeaa6e2b56e1a50cc76b1df24f3a509201f34ff8e890c55f15c56ec33b6fd3223adcd423243944672e4e16d63c323a20267753d754c797eeafb703011c472
2019-10-10 10:26:01 +01:00
Gregory Sanders
d71ddbee40 Don't run normal functional tests twice. 2019-10-09 17:32:25 -04:00
Steven Roose
a2a0a83716
Merge #738: feature_fedpeg.py: just use testmempoolaccept checking blinded peg-in…
3e912deef Sprinkle a bunch of syncs to avoid peg-in failure hanging (Gregory Sanders)
3ac8e298a feature_fedpeg.py: just use testmempoolaccept checking blinded peg-in transactions (Gregory Sanders)

Pull request description:

  … transactions

  Previous test had race condition causing spurious failures for no additional coverage.

  Resolves https://github.com/ElementsProject/elements/issues/728

Tree-SHA512: f128bb0b8ad54da683c66bbd6ad1385927659fab4cc8e77e57943dea6c7d989389c39e29ff8d282bdab3e068ec38af449e2941e03f802fe477d839b636587e92
2019-10-09 20:06:13 +01: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
81fd79ab94
Merge #739: Take mempool locks when doing compact block RPC calls touching mempool
67a669e69 Take mempool locks when doing compact block RPC calls touching mempool (Gregory Sanders)

Pull request description:

  This may help reduce the failures in `feature_blocksign.py` that seem to occur fairly often. It could be that the mempool is in an inconsistent state, which messed up compact block finalization.

Tree-SHA512: cd066933cf58b3c57869db3fd97c2de0ff554d442e91051f43626b12778d55835065ad5fc42fed09b7750796e9e0b2e6947f1ac54e02fe4c8e2a84fe340429ae
2019-10-09 13:13:14 -04:00
Gregory Sanders
67a669e692 Take mempool locks when doing compact block RPC calls touching mempool 2019-10-09 12:11:52 -04:00
Steven Roose
4b2fac45b9
Merge #730: Change Proprietary types to use the method specified in BIP 174
34e135011 Use Elements PSBT magic when in Elements mode (Andrew Chow)
3fa355c76 Change Proprietary types to use the method specified in BIP 174 (Andrew Chow)

Pull request description:

  https://github.com/bitcoin/bips/pull/849 (not yet merged) adds to BIP 174 proprietary types. This PR changes the PSBT types used in Elements to be in line with the proposed changes to the BIP/

Tree-SHA512: 73085a16005448d9f6ad1b74da4a40043ec29738256a439f35106793d11d0e95cb8d728db5cfefe1ddd49cd80367f7f5790d09efaa95bc443e1d6ba295240c4d
2019-10-09 16:46:15 +01:00
Andrew Chow
34e1350114 Use Elements PSBT magic when in Elements mode
Elements PSBTs are incompatible with normal PSBTs due to differing transaction
formats, so use different magic bytes to distinguish.
2019-10-08 14:12:04 -04:00
Andrew Chow
3fa355c767 Change Proprietary types to use the method specified in BIP 174 2019-10-08 14:04:44 -04:00
Gregory Sanders
97e46f9376 tweakfedpegscript: Optional fedpeg arg 2019-10-08 10:23:28 -04:00
Gregory Sanders
3a2888ccad Give more descriptive error for non-WSH(OP_TRUE) block generation 2019-10-08 10:22:40 -04:00
Steven Roose
ee14d88de2
Merge #734: Don't run unit tests for compatibility run(which is a NOP)
b53ad3118 Disable functional tests for sanitzer runs which just OOM (Gregory Sanders)
1893ba191 Don't run unit tests for compatibility run(which is a NOP) (Gregory Sanders)

Pull request description:

  This particular build is intended for bitcoin_functional tests only, and the unit tests are timing out consistently for some unrelated reason, so turn them off.

Tree-SHA512: 8f31b5f4fef38271652a3c534c2191d6b6d567e992ef27ba4a6f2fc8c3aebd6d9aef755563780554609346ab397adc71e16229878cad48289918d1ff71cfa0fb
2019-10-08 15:19:54 +01:00
Gregory Sanders
b53ad31189 Disable functional tests for sanitzer runs which just OOM 2019-10-08 10:07:07 -04:00
Gregory Sanders
d93e27ef93
Merge #733: Fix assets_tutorial.py signblock dynafed error
f302515f7 Fix assets_tutorial.py signblock dynafed error (wintercooled)

Pull request description:

  Versions 0.18+ require a witnessScript argument for signblock unless the start arguments specify the ``con_dyna_deploy_start`` argument as ``0``.

Tree-SHA512: cb12eaf7664868ad741a72188db8e5c6337e9376b48972698eda7c333afbaf8f99b138aadba3b877977a2b34d0a32551c6c0606e1836af2c41939b227dd58647
2019-10-08 09:12:18 -04:00
Gregory Sanders
1893ba1910 Don't run unit tests for compatibility run(which is a NOP) 2019-10-08 08:37:54 -04:00
wintercooled
f302515f7c Fix assets_tutorial.py signblock dynafed error 2019-10-08 11:34:00 +01:00
Gregory Sanders
ed03bfc899
Merge #726: Support descriptors with checksums in initpegoutwallet
5af17a42b Update initpegoutwallet help to describe derivation paths properly. (Gregory Sanders)
55c4c6cd2 Fix other bug in initpegoutwallet descriptor parsing (Steven Roose)
28dac17c4 Temp disable pegout descriptors that are not pkh() (Steven Roose)
fdba8c45f Support descriptors with checksums in initpegoutwallet (Steven Roose)

Pull request description:

  Non-pkh descriptor types will be re-enabled once entire liquid network functionary set is updated to use elements daemons.

Tree-SHA512: 41203f767c4879251eb958f938a8cc88b8f5d03ffa16bb598645f5c1bd5b45d7e6468cadcb3c5c12abd62c73913834718b9ad48a24f721537d1e8a0a3cf7e6fc
2019-09-30 12:39:56 -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
Steven Roose
280c33f865
Merge #723: [HF] Dynafed blocks must have sighash byte
809f4acd3 Dynafed blocks must have sighash byte (Gregory Sanders)

Pull request description:

  It is not included in the signature hash.
  The sighash byte MUST be SIGHASH_ALL to avoid malleability.

Tree-SHA512: d4a658448e3a8b3609b32fc24e8d28fc65ea13021ba0b49109b6c4477253d08183ac6e77e0658f23b2630cbb916c6b19e86db241c5d7456391385a308235d0bd
2019-09-30 01:18:46 +02:00