f26186d1bd Allow accessing basic wallet info without blockchain source (Kristaps Kaupe)
Pull request description:
In both GUI and `wallet-tool.py`. Useful to, for example, extract recovery seed from a .jmdat wallet file without blockchain source. Resolves#545.
Top commit has no ACKs.
Tree-SHA512: c9c2d3b8601eac5dd55a05694c3fbd0873007abc666170e43cf26d745602db84200f5000355e4cc1c3be8085c78764f7d1d6cec87552d4e5775d47aa3d835208
6b41b8b Disable creation of fidelity bond wallets (chris-belcher)
869ef55 Disable loading of fidelity bond wallets by Qt (chris-belcher)
14f086b Add usage guide for fidelity bond wallets (chris-belcher)
2860c4f Freeze timelocked UTXOs with locktimes in future (chris-belcher)
ddb32ce Rename functions to say "key" instead of "privkey" (chris-belcher)
c70183b Create tests for fidelity bond wallets (chris-belcher)
a0a0d28 Add support for spending timelocked UTXOs (chris-belcher)
762b1f6 Add watch only wallets for fidelity bonds (chris-belcher)
a937c44 Add wallet-tool addtxoutproof method (chris-belcher)
97216d3 Sync burner outputs and display in wallet-tool (chris-belcher)
255d155 Add merkle proof functions to BitcoinCoreInterface (chris-belcher)
2271ce0 Add support for burning coins with sendpayment (chris-belcher)
dc715c9 Add timelock fidelity bond wallet sync and display (chris-belcher)
ee70cd7 Add support for OP_CLTV timelock addresses (chris-belcher)
d86df33 Rename functions which create multisig scripts (chris-belcher)
53b056e Rename variable internal to address_type (chris-belcher)
Tree-SHA512: 9f24000b0ebb4524b30c8afaa4416e516c7241c565dd21a96f83b70d6b6c42e83ad20bfd4f6e85545a855af4fcfd6065feb674f5ed270ca51ac814b4c3684ab4
Previously timelocked UTXOs would be returned by calls like
select_utxo() and get_utxos_by_mixdepth(). This caused annoyances
if trying to burn a single UTXO. It could also cause recently-
unlocked coins to accidently get spent, perhaps co-spent with other
coins.
This commit fixes that by freezing UTXOs with the coin control
feature whenever the wallet is sync'd. When the timelock of a coin
passes the user must explicitly use coin control to spend it.
Watchonly wallets use pubkeys instead of privkeys, but in a bit of
hack the functions previously called "_get_priv_from_path" would
actually return public keys for watchonly wallets. This could have
pretty terrible consequences one day, so functions like that have
been renamed to use the word "key" instead, which could be either
private or public.
The cryptoengine class BTC_Timelocked_P2WSH now implements
sign_transaction() which can be used to spend timelocked UTXOs.
FidelityBondMixin.is_timelocked_path() is now used outside the class
so its leading underscore has been removed.
Watch only wallets can now be created via wallet-tool. The wallets
store a bip32 xpub key from which all the public keys are generated.
Watch only wallets only store and display the zeroth mixdepth, which
is the only one needed for fidelity bonds.
The bip32 xpub key needed to create a watch only wallet is now
specially highlighted in the wallet-tool display, this is to help users
actually find it amongst all the other xpubs.
The field key_ident in the wallet class was previously generated using
private keys, which are not available in watch only wallets. So now
for fidelity bond wallets key_ident is generated using a public key.
Existing non-fidelity-bond wallets are unaffected
Fidelity bond wallets are intended to be used when at a later date
using fidelity bonds to greatly increase joinmarket's resistance to
sybil attacks. This commit adds support for timelocked addresses.
It allows users to optionally create wallet which support such
addresses. The synchronization code is modified to also scan for
timelocked addresses. The keypairs of the timelocked addresses go in
the newly created 2nd address type, where before the zeroth index were
receive addresses and first index was change.
The locktime dates are fixed at the first of each month for the next 30
years. This means users dont need to remember any dates, and so just
their seed phrase and wallet type will still be enough to recover all
funds. Each keypair used for timelocking requires an additional 360
addresses to be scanned for, which isn't a problem for Bitcoin Core.
Fidelity bonds are only stored in the zeroth mixdepth, as they are not
used in repeated coinjoins so theres no point having them in multiple
mixdepths.
Timelocked addresses don't use the get_new_script() family of functions
because they all assume that one index equals one address, and that
therefore it's possible to ask for a "next" address. For timelocked
addresses knowing the index is not enough to know the address, the
timestamp must be known too. Also once one address made of
(index, timestamp) is used you mustn't use that index and pubkey again,
even though all the other timelocks for that index/pubkey are unused.
This is for privacy reasons, as its equivalent to address reuse.
Previously an example of a BIP32 path
would be: m/wallet-type'/mixdepth'/internal/index
The 'internal' name referred to internal and external addresses (also
called change and receive). The renaming to 'address_type' is in
preparation to add more branches for timelocked addresses and burner
outputs.
The variable formally known as 'internal' is now no longer a boolean
but always an integer. This almost-always seemlessly fits because the
values False and Ture correspond to 0 and 1. The function
_get_internal_type therefore has no purpose anymore. Delete it.
Makes BitcoinSatValidator a derived class with a specific
range. Makes all port fields respond correctly to correct
or incorrect entries of port numbers. Changes badly named
'qt' variable to 'sf' in getSettingsFields.
92f12ab490 Change lock filename from wallet.jmdat.lock to .wallet.jmdat.lock (Kristaps Kaupe)
Pull request description:
Resolves#587, rationale is in issue.
Was briefly thinking about checking both old and new lock files, but I don't think it's worth doing that.
Top commit has no ACKs.
Tree-SHA512: 521516df56d996e4f420085abf37f493b974e7651c950a9c702b62f4446f5e69519b33651626fde7636a481999b45df8d8da88f266fae9e096181b06efa6e585
Prior to this fix, the settings which were integers
were all restricted to numbers <= 65535, but this is
not acceptable for the tx_fees setting which can be
sats per kilobyte. Note that several other integer inputs
are left without any specific validation; this change
is considered important because there will be use cases
where a large sat/kB is needed.
6bd101ebb3 Remove link to old non segwit version and change new version link to use JoinMarket github organization (Kristaps Kaupe)
e8ec595d31 Shebang and +x for ob-watcher.py (Kristaps Kaupe)
80333b2872 Make ob-watcher independent of current working directory (Kristaps Kaupe)
8997147848 Terminate ob-watcher immediately if HTTP server fails to start (Kristaps Kaupe)
Pull request description:
* Terminate immediately if HTTP server fails to start.
* Make `ob-watcher.py` runnable from any directory.
* Shebang and +x (like was done in #524 for other scripts).
Top commit has no ACKs.
Tree-SHA512: 92b622fc9ad7cc910c1fe354146287998348e26a94909d52961ab50c5c39e2db9707341c2ce5e1943e1b1d4d49a4ecc86cafdf395a88346a2f43f0ad0bc2283d
f2e100e fix sample schedule for testnet (Adam Gibson)
031b8f6 Update tumbler doc for the new schedule format (chris-belcher)
Tree-SHA512: c456863cfe4e18a81e4e769a6c28ef1b01c2a516332281cb7868cb2c7e7e9f62e0c566185911958803ca3c22ae03b764b4c2b3ac969fd47614d728cca15b88f3
6fa7f4cdbb Display address for UTXO on wallet-tool.py freeze (Kristaps Kaupe)
Pull request description:
Suggested by @chris-belcher in #575. Also changes value output from `Y sats` to `X BTC (Y sat)` as in other places.
Top commit has no ACKs.
Tree-SHA512: 60747466f08b282edc9e3dacc6e038de82905e6364065c4b51a084a49832b0f430f92553bf6339db80005db55ca688b863a360e88cd99a6dbf3d5154344b09c3
As per discussion in #569 the use of options.txfee
to set fee rates conflicted with its earlier use
to make a first guess of fees for user warnings.
Now this connection is removed, the guess for warning
calculation is done independent of this option setting.
a539345be3 Implement BIP21 in GUI (Kristaps Kaupe)
Pull request description:
Allows pasting BIP21 URI in address field for single sends. See https://github.com/JoinMarket-Org/joinmarket-clientserver/pull/560#issuecomment-622920476. Also added stripping address field input of extra whitespace at beginning / end. <del>Change with `raise ValueError` in `decode_bip21_uri()` is needed because `amount_str` can be invalid and that raised `decimal.InvalidOperation` on `amount_to_sat()` call.</del><ins>(UPDATE - that one is already merged in with #568)</ins>
Top commit has no ACKs.
Tree-SHA512: 079ca866cc0cded1624531ad6397fcdeeb7ebed7c6eab778e8640561387a3c08e39be2dc137df785f3aae2ad1b4a56b636d1f304ef854da27cf651293d78266f