SomberNight
364fca6a58
transaction: fix regression: witness_utxo was not included in QR code
...
fixes #6600
5 years ago
SomberNight
c4c22312c4
transaction: impl tx.to_qr_data(): move logic from GUI to tx class
5 years ago
SomberNight
7b91da9966
Qt tx dialog: handle "empty" locktime field
...
fix https://github.com/spesmilo/electrum/issues/5486#issuecomment-696276020
5 years ago
SomberNight
13fe8e466d
transaction: simply PartialTransaction constructor
...
rm footgun (see prev commit)
5 years ago
SomberNight
73cf007048
transaction: allow PSBT input to have both UTXO and WITNESS_UTXO
...
- make sure they are consistent
- only keep one of them internally (UTXO), and only serialise with UTXO (not both)
fixes #6429
5 years ago
SomberNight
1849206394
submarine_swaps: small clean-up
6 years ago
ghost43
947af92126
tx dialog: show various warnings if input amounts cannot be verified ( #6217 )
...
see #5749
6 years ago
matejcik
e058ee2957
psbt: always include full prev tx ( #6198 )
...
* enable streaming full UTXOs for all types of inputs
Co-authored-by: SomberNight <somber.night@protonmail.com>
6 years ago
SomberNight
62be1cc367
small clean-up re "extract preimage from on-chain htlc_tx"
...
related: #6122
6 years ago
ThomasV
8ba7e68064
fix #6122 : extract preimage from on-chain htlc_tx
6 years ago
ThomasV
8f41aeb783
Replace wallet backup with channel backups
...
- channels can be backed up individually
- backups are added to lnwatcher
- AbstractChannel ancestor class
6 years ago
SomberNight
968eeebdc0
transaction: follow-up prev
...
makes more sense to special-case deserialize()
and not invoke the extra logic then
6 years ago
SomberNight
8560930bac
transaction: (fix) invalidate ser cache when changing locktime/version
...
we can keep the same API, using @property ,
instead of introducing getters and setters
6 years ago
SomberNight
a32af44ff9
trivial clean-up (typing/imports)
6 years ago
ThomasV
15e91169c5
lnpeer: fix json serialization of funding_inputs
6 years ago
ThomasV
6833adf8b6
simplify previous commit (revert changes on transaction.py)
6 years ago
ThomasV
e85fb25146
lnpeer: verify signature in closing_signed
6 years ago
SomberNight
9ab18ea6c9
transaction.deserialize: more sanity checks
...
this is mandated by consensus
99813a9745/src/consensus/tx_check.cpp (L13)
6 years ago
SomberNight
6937b87a7c
transaction.BCDataStream: minor fixes
...
- fix read/write_boolean (though unused...)
- sanity check in read_bytes
6 years ago
zebra-lucky
c0be0471f2
fix BCDataStream.read_bytes ( #5991 )
...
* fix BCDataStream.read_bytes
* followup fix BCDataStream.read_bytes: fix TestBCDataStream.test_bytes
6 years ago
SomberNight
aaf174ef3e
lnpeer: cooperative close: verify scriptpubkey matches templates
6 years ago
SomberNight
18c6451518
json_db: only deserialize transactions on-demand
6 years ago
SomberNight
d2f132738a
wallet: only select mature coins by default
...
this is a regression from #5721
Removed the `TxInput.is_coinbase` method as I think it is a confusing API,
instead we now have `TxInput.is_coinbase_input` and `TxInput.is_coinbase_output`.
related #5872
6 years ago
SomberNight
8cf3587aeb
base_encode/base_decode: change to saner API
6 years ago
SomberNight
61aebd0f2d
(fix) qt coin selection: signatures for coins would persist in memory
...
Scenario: select some UTXOs in the 'Coins' tab. Create a tx and sign it.
Close the tx dialog without broadcasting/etc (cancel tx).
Signatures would remain for selected UTXOs.
Create new tx -> invalid sigs.
6 years ago
SomberNight
5b88b8667e
also grind ecdsa low R when using libsecp256k1, and fix tests
...
note: low R grinding would not have to be duplicated if we trusted the caller
to have done it already (as is the case with the classes in ecc.py), and if
we propagated the choice of "random_k" as part of the nonce_function passed
to libsecp256k1 (which is not currently done)
6 years ago
ThomasV
78813dcb7d
Pass make_tx function to ConfirmTxDialog
...
- allow 'spend max' when opening a channel (fixes #5698 )
- display amount minus fee when 'max' buttons are pressed
- estimate fee of channel funding using a template with dummy address
6 years ago
SomberNight
bf8a58c0b4
tx_from_any: strip whitespaces
...
see https://github.com/spesmilo/electrum/pull/5721#issuecomment-551876236
6 years ago
SomberNight
85a4811742
transaction.tx_from_any: recognise even more types, and add tests
6 years ago
SomberNight
cd49839bc0
transaction: helpful error msg if user tries to load old partial tx
6 years ago
SomberNight
27df235c26
transactions: reading QR codes: clean-up and accept all encodings
6 years ago
SomberNight
29a6e3c019
psbt: implement PSBT_GLOBAL_VERSION field
...
based on latest BIP-0174 update: bitcoin/bips#849
6 years ago
SomberNight
83740c1a78
psbt: implement CompactSize key types (previously single-byte types)
...
based on latest BIP-0174 update: bitcoin/bips#849
6 years ago
SomberNight
aa518c0ea5
psbt: allow insecure signing of legacy UTXOs without full previous tx
...
When "importing" a psbt, we accept witness utxos even for legacy inputs
(warning shown to user in gui).
When "exporting" a psbt, we follow the spec; except when exporting as a QR code,
in which case we include witness utxos for all inputs.
This makes QR codes for psbts with legacy inputs feasible, just like they
were before, with our custom tx serialization format (with the same risk,
of burning coins as miner fees).
6 years ago
SomberNight
8a7c3447b3
tx dialog: try harder to show fee
6 years ago
SomberNight
955caa7292
transaction: to_json() debug methods display bip32 str (not int) paths
6 years ago
SomberNight
46db33df75
psbt: follow-ups: BCDataStream.read_bytes() should return bytes
...
This fixes keepkey, as in particular the code in the plugin expected
TxOutpoint.txid to be bytes not a bytearray (and the TxOutpoint named tuple
itself claims txid to be bytes).
6 years ago
SomberNight
cc4f6804b0
psbt: follow-ups: fix trezor
6 years ago
SomberNight
26a5f212cb
psbt: cleaner API for serialize* methods
6 years ago
SomberNight
1017fefdc9
psbt: only include xpubs for multisig wallets
6 years ago
SomberNight
90b190bbcd
psbt: fix bug re witness_utxo serialization
6 years ago
SomberNight
d872be7f6b
psbt: don't put xpubs and full paths into tx by def; only while signing
6 years ago
SomberNight
e6c841d05f
psbt: put fake xpubs into globals. keystores handle xfp/der_prefix missing
6 years ago
SomberNight
7eb7eb8674
add support for manual coinjoins
6 years ago
SomberNight
bafe8a2fff
integrate PSBT support natively. WIP
6 years ago
SomberNight
b138fff9a5
wallet: txi/txo small clean-up
6 years ago
SomberNight
befa8ea771
transaction: kill "name", "csv_delay", "cltv_expiry" fields
6 years ago
ThomasV
64deb87ade
fix #5513
6 years ago
SomberNight
83fcdbd561
lnchannel: handle htlc-address collisions
...
We were previously generating an incorrect commitment_signed msg if there were
multiple htlcs sharing the same scriptPubKey.
6 years ago
SomberNight
ab76a1fe5b
wallet.add_hw_info: also store "is_change" in output_info
...
as it seems every consumer wants to know this and has its own hacks to
figure it out
6 years ago