Commit graph

1720 commits

Author SHA1 Message Date
Steven Roose
3b8e4070c8
Merge #958: Some minor dynafed improvements
14a42a018 Add two missing dynafed fields to getblockchaininfo (Steven Roose)
fe0372933 dynafed: Support changing mainnet dynafed activation (Steven Roose)
ce7a93d93 dynafed: Only verify proposed parameters if they differ from current (Steven Roose)

Pull request description:

  - support blocksigners specifying their own activation to make coordination a bit more flexible
  - don't force fedpeg script to change in order to change the block signing script

Tree-SHA512: 8dd66440261f910b083f7ed461e1930c9380350e3648f6aca44726c39dcca3bb7e62c36d36ae56c2717827fbaee2b9046c6ce0b05441c1d8d1b54f3c284bc4d7
2021-03-02 16:25:46 +00:00
Steven Roose
b888f42270
tests: Add test feature_sighash_rangeproof.py 2021-02-22 15:19:10 +00:00
Steven Roose
236f0b1762
tests: Replace CECKey with new ECKey impl from Bitcoin master
Somehow the CECKey impl is really broken if you want to set
a raw private key. Core master already has a new impl so I just
took that one and replaces the usages. This will probably be equivalent
with what would be rebased in at a later stage.
2021-02-22 13:45:37 +00:00
Steven Roose
fe03729338
dynafed: Support changing mainnet dynafed activation
This should obviously only be done by blocksigners. The flag used is not
documented.
2021-02-10 14:07:06 +01:00
k-matsuzawa
fbdb9f3715 Add signrawtransaction test for input of amountcommitment. 2020-09-05 12:44:04 +09:00
Glenn Willen
3386cae45b Make error messages distinct at each failure location. 2020-07-24 09:09:01 -07:00
Glenn Willen
a4c279e29a Fix logic issues with randomization of outputs in [re]issueasset_base; minor refactoring. 2020-07-15 01:39:15 -07:00
Steven Roose
425691623b
Add test to make sure issuances to wrong addresses fail 2020-04-13 15:20:29 +01:00
Steven Roose
fd4dcf9c7c
Improve coinbase and issuance tx testing for txindex 2020-03-23 18:02:02 +00:00
Steven Roose
95602ec21f
Merge #834: Switch default bits of hiding to 52
c780a5186 nit: Comment in blind_tests.cpp was wrong (Steven Roose)
e87b39040 Some readability improvements in blind.cpp (Steven Roose)
26e5490e8 Switch default bits of hiding to 52 (Gregory Sanders)

Pull request description:

  Replaces https://github.com/ElementsProject/elements/pull/793 and is basically that MR but rebased. (I can't rebase on Greg's branch.)

Tree-SHA512: 2c321d7f50d1c16f73e9eafc905b3a21a1aa7a4c44a2da39b1adda7f7c12d74c0f49379c7995afe605b5c07410e8e2f0e3468826e4d246c91c8a1c2c8a03e5dc
2020-03-17 17:40:05 +00:00
Steven Roose
bfb77ad44d
Reduce mintxfee to 0.1 sat/vbyte and fallback fee to 2 sat/vb 2020-03-17 12:47:03 +00:00
Gregory Sanders
26e5490e83
Switch default bits of hiding to 52 2020-03-16 20:55:37 +00:00
Steven Roose
521e357f93
Add test to test unconfirmed asset balances 2020-03-04 15:57:07 +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
1ce74e07f3 Be able to fund transactions with peg-ins 2019-12-04 11:36:28 -05:00
Andrew Chow
74c4d37788 Tests for fundrawtransaction with external inputs 2019-12-04 11:29:36 -05:00
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