1
0
Commit Graph

122 Commits

Author SHA1 Message Date
SomberNight
778aea340e follow-up testnet4 stuff: trivial clean-up
re https://github.com/spesmilo/electrum/pull/9197

localhost in servers list should only be for regtest-like networks
2024-09-16 15:11:03 +00:00
wakiyamap
1d9ff40d0b Add suport testnet4 2024-09-14 03:52:03 +09:00
SomberNight
5b74aa443e qt settings: expose LIGHTNING_PAYMENT_BUDGET_FEE_MAX_MILLIONTHS
Expose as a slider; perhaps it is less footgunny this way?
2024-05-08 15:54:20 +00:00
SomberNight
67d373357b lnworker: make PaymentFeeBudget defaults configurable
- make PaymentFeeBudget proportional fee and flat cutoff fee configurable
  - closes https://github.com/spesmilo/electrum/issues/7622
- increase flat cutoff fee default to 10 sat
  - closes https://github.com/spesmilo/electrum/issues/7669
- rm RouteEdge.is_sane_to_use() (per edge limit) and just rely on budgets (per route limit)
2024-05-08 15:53:22 +00:00
ThomasV
858d999d31 Allow external plugins
- borrows code brom ElectronCash
 - external plugins are imported as zip files
 - check hash from plugins.json file
2024-04-13 11:35:49 +02:00
SomberNight
f495511886 safer os.chmod for wallet files and config: set perms before write
Set unix file permissions first, before writing data.
2024-04-08 14:09:00 +00:00
ThomasV
e2db5ca2ef Merge pull request #8871 from SomberNight/202402_slip19_trezor
support SLIP-19 ownership proofs, for trezor-based Standard_Wallets
2024-02-21 13:06:28 +01:00
SomberNight
b7ed016f3c qt tx_dialog: share btn: replace nested menus with checkboxes
Incidentally, the checkboxes are using the config, so their state is persisted.
2024-02-21 11:56:18 +00:00
ghost43
e11d7b37f2 Merge pull request #8865 from SomberNight/202402_server_bookmarks
network: implement basic "add server as bookmark" functionality
2024-02-16 12:06:18 +00:00
SomberNight
1d4e2ebed6 ConfigVar: add "converter" for getter, add use it for "proxy" key
fixes https://github.com/spesmilo/electrum/issues/8837

Alternatively we could do a config upgrade (convert_version_*) to fix that specific issue,
but they are not safe against downgrade-upgrade-again, so probably not the best choice for
crash-inducing values.
And this kind of converter is a generic solution that can be useful for other configvars later
(though for most usages I expect we will also need a converter for the setter).
2024-02-04 07:20:05 +00:00
SomberNight
e5d28563cc network: implement basic "add server as bookmark" functionality
implement backend and expose it to qt gui
2024-02-03 12:33:34 +00:00
SomberNight
b80f975894 config: rm some dead code 2024-02-03 11:52:29 +00:00
SomberNight
a9a8ed2eb4 follow-up: factor out more hardcoded "sat/byte" and "sat/b" strings
- rename globals
- also rm hardcoded strings from qml
- use consistent unit names in qml
  (previously mixed sat/vB and sat/byte (latter coming from core lib))
2024-02-03 05:26:31 +00:00
SomberNight
13a421aabb factor out hardcoded "sat/byte" and "sat/b" strings
Though note that the qml GUI has some more in qml/js context.
2024-02-03 04:18:46 +00:00
SomberNight
e6a0455ced lnpeer: raise chan fees using update_fee more aggressively
The existing logic of only updating the fee if it is not within 2x of
the current 2-block-eta does not work well for the current mempool.

The current mempool looks a bit weird: you need ~20 sat/vbyte to even get into it,
but there is only around 5 MB of txs paying >25 sat/vbyte.
The estimates look like this:
```
>>> config.fee_estimates
{144: 25764, 25: 27075, 10: 34538, 5: 34538, 2: 34538}
```

This commit changes the logic so that we send update_fee if the old rate is
- below 75% of the current 2-block-eta (instead of 50%), or
- below the 25-block-eta
2024-01-31 08:47:29 +00:00
SomberNight
f30d81a98f swapserver plugin: fix doc 2024-01-17 01:15:14 +00:00
SomberNight
d4f31929af qt chan details dlg: add onchain feerate, to_self_delay 2024-01-16 04:07:48 +00:00
SomberNight
0dae17339d qml: add config setting to allow screenshots
On Android, we disallow screenshots on screens where the seed is visible.
(The seed is extremely sensitive data that should not be stored digitally without
significant precautions but it's also cumbersome to write down or memorise, so
some people instinctively just try to take a screenshot of it when creating a wallet.)
We do this by using the built-in OS mechanism of setting FLAG_SECURE on the window.
However, on some devices with custom ROMs (one report from LineageOS, one from /e/OS),
unsetting FLAG_SECURE crashes the application for some reason.

As a workaround, this commit adds a config setting into the Preferences,
to disable this mechanism and just always allow screenshots.
(note that you can get into the qml Preferences before creating/opening any wallet)

ref https://github.com/spesmilo/electrum/issues/8522
2023-12-27 07:28:39 +00:00
ThomasV
d691aa0736 qt: add 'notes' tab 2023-12-13 12:31:22 +01:00
Sander van Grieken
786979ec50 config: keep wallets directory stable, regardless of wallet opens in other directories 2023-12-01 16:14:31 +01:00
Sander van Grieken
daeedca1d0 config: use str type for NETWORK_PROXY, NETWORK_PROXY_USER, NETWORK_PROXY_PASSWORD 2023-11-30 14:27:32 +01:00
Sander van Grieken
667485b17e network: split off proxy_user and proxy_pass from serialized proxy string and add separate cmdline params and config keys for them.
support parsing both old style mode:host:port:user:pass and new mode:host:port, where new form also accepts IPv6 addresses
2023-11-30 14:27:31 +01:00
SomberNight
9f1b8613d0 swaps: code style clean-up, add type hints, force kwargs
no intended functional changes
2023-11-22 17:50:29 +00:00
ThomasV
a338459d45 just-in-time channels:
- a node scid alias is derived from the node ID
 - the channel opening fee is sent in a TLV field of open_channel
 - the server requires htlc settlement before broadcasting
   (server does not trust client)
2023-11-13 10:47:18 +01:00
ThomasV
816e617aaf option_zeroconf
- accept zeroconf channels only from a single node
 - fw_info uses get_scid_or_local_alias
2023-11-13 10:47:18 +01:00
SomberNight
7c2131209f config: handle better if data dir disappears while we are running
related https://github.com/spesmilo/electrum/issues/4151#issuecomment-1791117301

closes https://github.com/spesmilo/electrum/issues/4151
2023-11-02 16:59:53 +00:00
Sander van Grieken
c694415b4b qml: add addresslist filter persistence 2023-11-01 18:23:16 +01:00
SomberNight
66e2c779ea Merge remote-tracking branch 'remotes/sombernight/202310_merge_duplicate_outputs'
see https://github.com/spesmilo/electrum/pull/8474
2023-10-24 14:51:51 +00:00
SomberNight
227e257444 (follow-up) wallet: add option to merge duplicate tx outputs 2023-10-24 14:41:39 +00:00
ThomasV
45b248fdef regtest: use static fees instead of hardcoded value
this allows to bump fees using "setfeerate"
2023-10-24 12:24:26 +02:00
ThomasV
98a4d7b60d public channels:
- send node and channel announcements.
 - store channel_flags in constraints
 - store signatures in local and remote configs
2023-10-16 13:54:16 +02:00
SomberNight
63143307f1 config: follow-up rename of FEE_EST_STATIC_FEERATE
follow-up 455167136d
2023-10-10 12:11:45 +00:00
ThomasV
f6bebec0a5 follow-up prev commit (variable rename) 2023-10-09 12:19:23 +02:00
ThomasV
455167136d CLI: new getfeerate/setfeerate API 2023-10-09 12:14:39 +02:00
ThomasV
4e76ed6952 move INITIAL_TRAMPOLINE_FEE_LEVEL to config 2023-10-08 15:06:19 +02:00
SomberNight
357ae985cc config: move tooltips from Qt gui into configvars 2023-09-18 13:54:48 +00:00
ThomasV
649ce979ab send tx change to lightning 2023-09-09 14:14:43 +02:00
SomberNight
87f5df1e8b config: add sanity check for duplicate config keys 2023-09-08 15:11:59 +00:00
SomberNight
8c9fec4ab8 commands: getconfig to use default values, add existence checks
- getconfig and setconfig now both check configvars for existence
- getconfig returns default values when applicable
- setconfig does not side-step type-checks for values

fixes https://github.com/spesmilo/electrum/issues/8607
closes https://github.com/spesmilo/electrum/pull/8608
2023-09-08 15:11:55 +00:00
SomberNight
6a2806c2c5 simple_config: implement complex default values
Besides a literal value, the default can now also be a callable,
which gets called with the config and evaluated as needed, lazily.

This potentially allows e.g. the default value of one configvar to
depend on the current value of another configvar.
2023-09-07 15:30:46 +00:00
SomberNight
5e8b14f742 logging: add config var "LOGS_NUM_FILES_KEEP" instead of hardcoded 10 2023-09-06 16:55:04 +00:00
ThomasV
b2053c68f1 make use_to_trampolines a user visible option, disable it by default 2023-08-27 11:43:17 +02:00
SomberNight
35c9ac8f31 lnworker: MPP send: more aggressively split large htlcs
related: https://github.com/spesmilo/electrum/issues/7987#issuecomment-1670002482
2023-08-11 22:01:08 +00:00
ThomasV
9f5f802cd1 config: save ports instead of net addresses (follow-up 012ce1c1bb) 2023-08-11 08:12:54 +02:00
ThomasV
012ce1c1bb Remove SSL options from config.
This is out of scope for Electrum; HTTP services that require SSL
should be exposed to the world through a reverse proxy.
2023-08-10 17:24:29 +02:00
ThomasV
dfa0dd47b7 swapserver: remove config option LIGHTNING_SWAP_HTLC_FIRST; read it from get_pairs instead. 2023-08-10 17:06:31 +02:00
ThomasV
88883d762c swapserver: remove /api from url 2023-08-10 10:29:32 +02:00
ThomasV
fd10ae3a3b New flow for submarine swaps:
- client requests payment_hash from the server
 - client sends an invoice with that hash
 - client waits to receive HTLCs, then broadcasts funding tx

This means that we now use same script for normal and reverse swaps.
The new flow is enabled by setting option LIGHTNING_SWAP_HTLC_FIRST
in the client. The old protocol is still supported server-side.
2023-08-10 09:04:30 +02:00
ThomasV
11af4e47a8 follow-up ff547e3dcf 2023-08-10 09:02:42 +02:00
ThomasV
ff547e3dcf swapserver: use a single config variable for swapserver_url; testnet and regtest have their own config files 2023-08-10 08:11:37 +02:00