Commit graph

229 commits

Author SHA1 Message Date
ThomasV
5a5502303f make add_signature_to_txin an instance method 2018-06-26 13:09:02 +02:00
ThomasV
24818c14ca
Merge pull request #3762 from SomberNight/txin_type_address_segwit
change partial txn serialization format for imported addresses txins
2018-06-22 13:58:15 +02:00
SomberNight
174d14ba89
add comment to guess_txintype_from_address 2018-06-22 13:57:06 +02:00
SomberNight
170f41f50d
tests: sweeping p2pk 2018-06-18 20:06:17 +02:00
SomberNight
46fdbbbce5
change partial txn serialization format for imported addresses txins
offline signing with segwit WIF keys now works.
offline seed + online address signing now works.
2018-06-15 14:08:20 +02:00
SomberNight
1b834a7a78
fix RBF 2018-06-14 22:19:06 +02:00
SomberNight
8f7a4cf876
follow-up 0438bbc2c2
the previous was quadratic in len(tx.inputs())
2018-06-14 21:46:03 +02:00
SomberNight
0438bbc2c2
transaction.py: change update_signatures API. fix trezor segwit signing.
Traceback (most recent call last):
  File "...\electrum\lib\transaction.py", line 498, in parse_witness
    if txin['witness_version'] != 0:
KeyError: 'witness_version'
2018-06-14 20:13:04 +02:00
SomberNight
05e5ef16eb
transaction.py: more flexible sign() method
handles both x_pubkeys and pubkeys in keypairs
2018-06-14 15:11:20 +02:00
SomberNight
4193c7ff14
transaction.py: wtxid is undefined for uncomplete txns 2018-06-13 19:22:04 +02:00
SomberNight
e8b5bcf31e
fix incorrect txid for partial segwit txns
follow-up #4405
2018-06-13 15:54:45 +02:00
SomberNight
12c5474cf1
stricter tx deserialization: forbid negative output amount values 2018-06-12 14:41:30 +02:00
SomberNight
0b78cb5e6b
stricter tx deserialization: forbid output amount values over 21 million btc 2018-06-12 14:33:22 +02:00
SomberNight
71ce7cce6d
stricter tx deserialization: forbid junk at the end 2018-06-12 10:51:51 +02:00
SomberNight
6b8a563d41
add witness version to our partial format 2018-06-11 19:25:02 +02:00
SomberNight
a0ba5a7962
change partial txn format: add header. only parse inputs and witness for partial txns. 2018-06-11 17:57:29 +02:00
Dev Random
c6fce4b7cc do not actually compute the nested p2wsh-p2sh script if just estimating size (#4412) 2018-06-07 17:44:48 +02:00
SomberNight
16e4827e8c
use libsecp256k1 if available. abstract away ecc stuff. move symmetric crypto and hash functions to crypto.py 2018-05-25 15:43:06 +02:00
SomberNight
e375bf48c4
transaction.py: reserialize scriptSig for incomplete txin
On offline imported privkey + online imported address config, the offline wallet was displaying incorrect tx size.
2018-05-15 18:53:25 +02:00
ghost43
3337af0734
transaction.py: (txin guess) fix some false positive matches of p2sh-segwit (#4336) 2018-05-09 19:16:01 +02:00
SomberNight
cbf1b5d9d5
py3.4 compat: follow-up e13183ea7a 2018-04-29 15:06:19 +02:00
SomberNight
ea55d886b7
follow-up 1d6f000868
I broke multisig..
2018-04-27 21:44:29 +02:00
SomberNight
e13183ea7a
bitcoin.py: SCRIPT-related clean-up. transaction.py: construct_witness 2018-04-27 16:16:27 +02:00
SomberNight
97296432a2
transaction.py: sign_txin. allow override for get_preimage_script. 2018-04-27 16:16:27 +02:00
SomberNight
1d6f000868
transaction.py: shortcut witness/scriptSig serialisation 2018-04-27 16:16:14 +02:00
SomberNight
7b50790584
do not raise BaseException 2018-04-07 17:10:30 +02:00
SomberNight
76e67daadd
changed some asserts to raise-exceptions in lib 2018-04-07 17:01:38 +02:00
SomberNight
4ff3791cb9
fix #4236 2018-04-06 16:43:11 +02:00
ThomasV
05342c5537
Merge pull request #4117 from SomberNight/pay_to_script
fix paying to script
2018-03-23 19:42:04 +01:00
SomberNight
77c8010517 bitcoin.py: parameterise a few address-related methods with network 2018-03-20 17:02:49 +01:00
SomberNight
22061b4555 transaction.get_address_from_output_script now handles witness version > 0 2018-03-18 06:18:48 +01:00
SomberNight
b043c872eb fix paying to script 2018-03-13 06:37:02 +01:00
SomberNight
135c5e805d fix #4046 2018-03-06 12:41:37 +01:00
SomberNight
e5cba92564 transaction serialization: fix segwit coinbase case.
adjust unit tests so that they would have caught it.
2018-03-06 10:34:52 +01:00
SomberNight
063e40bf18 catch IndexError in parse_redeemScript 2018-02-14 16:20:22 +01:00
SomberNight
4b6a3e2e5d fix #3899; and more aggressively catch exceptions in tx.deserialize() 2018-02-14 01:20:38 +01:00
SomberNight
ca19a36478 conflicting transactions 2018-02-06 05:39:40 +01:00
SomberNight
e5f239dd28 follow-up 70aa1f1db9 2018-01-30 17:00:19 +01:00
SomberNight
6faef7efe3 remove comment 2018-01-30 01:47:51 +01:00
SomberNight
889456dc77 follow-up prev commit. better handling of p2sh-segwit. added comment to describe the problem for native segwit. 2018-01-29 22:45:43 +01:00
SomberNight
70aa1f1db9 fix #3788 2018-01-29 02:00:43 +01:00
SomberNight
d8a9c9720a follow-up 65eae139af 2018-01-10 18:39:25 +01:00
SomberNight
aaf5e32207 coinchooser fee calculation now uses tx weights. more precise fee calculation for segwit and mixed-segwit txns. 2017-12-21 01:45:35 +01:00
ThomasV
936ee47d3a
Merge pull request #3496 from SomberNight/coinchooser1
CoinChooser: privacy prefers confirmed and is default
2017-12-12 17:19:19 +01:00
SomberNight
b751e5e7d3 fix: tx size estimation for multisig 2017-12-12 05:43:34 +01:00
SomberNight
2a3c41b24f coinchooser: "privacy" policy now prefers confirmed coins. removed "priority" policy. 2017-12-11 14:49:53 +01:00
SomberNight
0aee9bbbb0 fix spending from multisig (broken by 8be777e882) 2017-12-06 16:02:40 +01:00
SomberNight
8be777e882 tx size estimation: handle uncompressed pubkeys 2017-11-24 04:24:54 +01:00
SomberNight
e373f50596 follow-up prev commit 2017-11-22 01:15:01 +01:00
SomberNight
a2a25e4738 better segwit tx size estimation 2017-11-21 23:02:45 +01:00