- Rename bump_fee "methods" to "strategies".
- Refactor strategies so that bump_fee can use any subset of them in any permutation.
- Adds a new strategy which decreases the payment outputs (instead of change).
Exclude unconfirmed transactions from --to_height and include them into --from_height.
The reason being that an unconfirmed transaction will end up eventually into the last
block which most of the time will be higher than --from_height
bump_fee was returning an invalid tx if its input was a
PartialTransaction that had signatures. It was relying on
line 1441 to remove signatures.
Relatedly, the WalletDB used to store such PartialTransactions as
PartialTransaction objects, but only until the program was restarted.
This is because serialising and de-serialising such a tx results in a
Transaction object.
So, combining these two, to reproduce a bug:
- create a tx, sign it, save as local
- bump fee, sign it, save as local
- bump fee --> tx already signed!? --> has old sigs, so it is invalid
Previously, if bump_fee decided to add new inputs to the tx, they would
have a different sequence number than the existing inputs. This was
unintentional.
When the app is started, the password is checked against all
wallets in the directory.
If the test passes:
- subsequent wallet creations will use the same password
- subsequent password updates will be performed on all wallets
- wallets that are not storage encrypted will encrypted
on the next password update (even if they are watching-only)
This behaviour is restricted on Android, with a 'single_password' config variable.
Wallet creation without password is disabled if single_password is set
When replacing non-segwit tx, bump_fee in some circumstances created
a tx that tried to spend from the tx-to-be-replaced. There is
explicit logic to avoid this but it only worked for segwit txs.
The change in transaction.py is a no-op, just tried to make it clearer
that the scriptSigs, witnesses are being reset by from_tx().
There are three export options for exporting a PSBT.
The default option previously only put derivation path suffixes for pubkeys
(paths relative to the intermediate xpub), now it puts the full path
(if is known by the keystore).
The "export for hardware device; include xpubs" option works same as before:
it puts both full paths and also global xpubs into the PSBT.
Hence the difference between the default option and the "include xpubs" option
is now only that the latter puts global xpubs into the PSBT.
This change is largely made for user-convenient in mind.
Now exporting a PSBT should be less error-prone: particularly for the
single-signer coldcard with sdcard usage, the default option will now work.
closes#5969
related #5955
If a tx contained a derivation path for a pubkey,
with a length=2 der suffix,
with the first element of the suffix not in (0, 1),
with a fingerprint that matches either our root or intermediate fp,
then processing that tx would raise and result in a crash reporter.
Traceback (most recent call last):
File ".../electrum/electrum/gui/qt/main_window.py", line 2718, in do_process_from_text
self.show_transaction(tx)
File ".../electrum/electrum/gui/qt/main_window.py", line 1041, in show_transaction
show_transaction(tx, parent=self, desc=tx_desc)
File ".../electrum/electrum/gui/qt/transaction_dialog.py", line 84, in show_transaction
d = TxDialog(tx, parent=parent, desc=desc, prompt_if_unsaved=prompt_if_unsaved)
File ".../electrum/electrum/gui/qt/transaction_dialog.py", line 680, in __init__
self.set_tx(tx)
File ".../electrum/electrum/gui/qt/transaction_dialog.py", line 218, in set_tx
tx.add_info_from_wallet(self.wallet)
File ".../electrum/electrum/transaction.py", line 1944, in add_info_from_wallet
wallet.add_input_info(txin, only_der_suffix=only_der_suffix)
File ".../electrum/electrum/wallet.py", line 1573, in add_input_info
is_mine = self._learn_derivation_path_for_address_from_txinout(txin, address)
File ".../electrum/electrum/wallet.py", line 2609, in _learn_derivation_path_for_address_from_txinout
pubkey, der_suffix = ks.find_my_pubkey_in_txinout(txinout, only_der_suffix=True)
File ".../electrum/electrum/keystore.py", line 155, in find_my_pubkey_in_txinout
path = self.get_pubkey_derivation(pubkey, txinout, only_der_suffix=only_der_suffix)
File ".../electrum/electrum/keystore.py", line 391, in get_pubkey_derivation
if not test_der_suffix_against_pubkey(der_suffix, pubkey):
File ".../electrum/electrum/keystore.py", line 368, in test_der_suffix_against_pubkey
if pubkey != self.derive_pubkey(*der_suffix):
File ".../electrum/electrum/keystore.py", line 491, in derive_pubkey
assert for_change in (0, 1)
AssertionError
config.mempool_fees is now [] if server claims mempool is ~empty,
and None if no valid histogram has been received from server.
(previously it used to be [] in both cases)
The gossip db is loaded early when the network is started to save
time when the gui is locked and a wallet not yet loaded. Side effects
of the LNWallet to start peering when a channel db is loaded is
circumvented.
Enables lightning by creating a node private key and storing it in
the wallet. The gossiper is not launched at start up, only if there
are existing channels.
Previously e.g. bip32 derivation info was missing for change outputs in partial tx returned by bump_fee.
This was not exposed to users as the GUI TxDialog calls `tx.add_info_from_wallet(self.wallet)`.