This ensures that `wallet_utils.py` and `genwallet.py` use the same logic for
reading the password.
The current algorithm for reading the password entails some
non-obvious details like utf-8 encoding and not stripping trailing
newlines.
Changes from top to bottom:
- Add header comment
- Import wallet_utils (needed for DEFAULT_MIXDEPTH)
- Make password optional in usage string
- Set variable wallet_name at the top where options are parsed
- Use DEFAULT_MIXDEPTH instead of hardcoded value
bugfix: use enumerate instead of len
reviewed estimation of transaction sizes
estimates are still a bit conservative with room for improvement;
signatures could still save up to one byte each if using low-r
values. python-bitcointx==1.1.2-dev already supports grinding for
low-r values so when it's stable and referenced version is updated,
this should be reviewed again so as to utilize that benefit.
added utility method `estimate_extra_bytes`
the purpose of this method is for the computation
of extra bytes when the coinjoin or direct send output
type is different from that of the wallet
updated tests to reflect new transaction size
computation
p2pkh transactions are now 1 byte larger for
the inputs hence the change amount should be
less 4 * 30 sats.
add private keys for utxos that we may not be
tracking
some transactions (e.g. opt-in rbf) may require signing
with private keys for utxos that we may have stopped
tracking. this commit will search through all inputs
and for those we own and retrieve their private keys
so we can sign with them.
added support for p2wsh output scripts in
refactored the estimation of the transaction size
when outputs of a different type is the target
Previously, a different method was employed which
was kind of kludgy considering the fact that the
`extra_bytes` parameter is really for `OP_RETURN`
outputs. This method modifies the `estimate_tx_size`
method to accept an optional extra parameter called
`outtype` which is used to estimate the correct
transaction size if the target output is different
from that of the wallet.
added missing import
added a note about preserving the order of wallet type constants
Fix bug with timelocked addrs in receive payjoin
Previously there would be a crash if the wallet receiving a payjoin
had a timelocked UTXO.
dab61bb9d6 Minor context menu improvements (Kristaps Kaupe)
Pull request description:
1) Added Ctrl+C keyboard shortcut to "Copy address to clipboard" and "Copy extended public key to clipboard" context menu actions of "JM Wallet" tab.
2) Renamed "pubkey" to "public key" and "tx" to "transaction" in context menus.
Top commit has no ACKs.
Tree-SHA512: 7c4a64940d5ad29d1ad8ff0f935268da750ccd52a9629722a1ad6e6dd9987b930d3b076e0334d226ae6d8bbb038475907399b4c9561b46a48c72ae831878fe05
7c4ba09dab remove executable bit (undeath)
f93ccf0f0c remove unneeded shebangs (undeath)
Pull request description:
Minor code cleanup, removes shebang from files that are not meant to be executed. Additionally, the executable bit is removed from one of the GPG pubkeys.
ACKs for top commit:
kristapsk:
utACK 7c4ba09dab
Tree-SHA512: afce99ceb910ee658d986a07a5c1b6447d4ec3e917921630e47a82b8788984ec150f4c692e5eb47b48d95d468878fb2d741d511622a30e328741e218f1f33972
f7180b8 Emphasize that ygen uses only single UTXO as fbond (chris-belcher)
Tree-SHA512: b6aeee067273f57688d71c87059f5d53492769f9a69c98908421b6abba88d824e8366df1916e29615e7416de0b79e1c8949167ae8ac5033928c1968ad4917277
At least two people have been burned by creating two transactions
sending bitcoins to two timelocked addresses, and then finding that
yield-generator announces only one of them.
This commit expands the section talking about how only one UTXO will
be used. It also edits the text to refer to yield-generator's fidelity
bonds only in the singular, as previously they were referred to in
the plural (i.e. "fidelity bonds"), which possibly added to user's
confusion.
Fixes#976. Joinmarket will allow, but warn, when
non-zero change values (which are not included in
the transaction) result from sweeps (due to the
impossibility of knowing the exact value in advance).
However, prior to this commit, if that estimation
inaccuracy resulted in a negative change value that
was to be ignored, there was a crash due to the fact
that `jmbitcoin.amount_to_str` does not allow negative
values. Hence we instead print the number in the warning
without going through this formatting function.
Adds tests case for negative sweep change.
Before this commit, attempting to spend in a taker-
side Joinmarket coinjoin, a utxo which is of the
tiemelock type (after its timelock expired), had
a potential to crash, because it would be selected
for the generation of a PoDLE but this cannot be
supported (even with taker-side code changes, the
maker could not reconstruct it).
After this commit, any non-standard wallet-type
scriptPubKey is filtered out of being a candidate
for PoDLE generation.
Also a trivial variable name typo is fixed (too-old).
Also the test framework `DummyWallet` now inherits
from `LegacyWallet` because its utxos are of that
type; a future commit should update to `SegwitWallet`.
Also add tests cases for no custom-script PoDLEs.
Before this commit, while sending from mixdepth
zero in a sweep, where 1 or more p2wsh timelock
type outputs (now past their timelock), were present,
was working correctly, non-sweep sends in the same
circumstances were failing due to a key error.
This is now fixed.
ce08a0c Fix year 2038 problem in ob-watcher /fidelitybonds (chris-belcher)
58d3e59 Fix Export Orders page on ob-watcher (chris-belcher)
Tree-SHA512: 77db761eb325d8bda363015414aa8b8c947f4c809be8ce06f730fbe7bff17c92c66ac31d54d820b48df8ff52efb6a324a6c0640bd155dfbb3426102526fa07ab
1bf9f85164 Update link to irc logs to https (Luke)
Pull request description:
Since few months the website offers HTTPS
ACKs for top commit:
kristapsk:
ACK 1bf9f85164. Trivial, tested, so merging.
Tree-SHA512: aa8702e7f41d79c1b6d9383dbed2cd0d47de17aabb3ecb6ef2b90af5b1d80115a6f2d8eba6dd90df1210dfe7aa598e35af4d88d1ccc4e7c6158b24198055391e