Commit Graph

33 Commits

Author SHA1 Message Date
f321x f0fc8a9691 qt: add changelog action to help menu in toolbar
Adds a "Changelog" action to the "Help" menu of the toolbar. This allows
users to open the RELEASE-NOTES file in the browser (from github).
2026-01-23 10:20:54 +01:00
f321x 348ca667ca contants: add support for mutinynet signet
Adds the mutinynet signet (https://github.com/MutinyWallet/mutiny-net/)
to the supported networks so it's possible to
use it with Electrum. Mutinynet is similar to signet, except for a
shorter block interval (30 sec), a nice faucet
(faucet.mutinynet.com) and some extra features in its core fork.
It also has some lightning network nodes, see
the mempool instance on mutinynet.com.
2025-08-14 15:59:11 +02:00
SomberNight 323fe963bc constants: NETS_LIST to have deterministic ordering
Currently running the help command lists the supported chains in random order.
This patch changes the ordering to be lexicographical.

```
$ ./run_electrum --help
usage: run_electrum [-h] [--version] [-v VERBOSITY] [-D ELECTRUM_PATH] [-w WALLET_PATH] [-P]
                    [--testnet] [--signet] [--mainnet] [--simnet] [--regtest] [--testnet4] [-o]
                    [--rpcuser RPCUSER] [--rpcpassword RPCPASSWORD] [--forgetconfig]
                    <command> ...

[...]

global options:
  -v VERBOSITY          Set verbosity (log levels)
  -D ELECTRUM_PATH, --dir ELECTRUM_PATH
                        electrum directory
  -w WALLET_PATH, --wallet WALLET_PATH
                        wallet path
  -P, --portable        Use local 'electrum_data' directory
  --testnet             Use testnet chain
  --signet              Use signet chain
  --mainnet             Use mainnet chain
  --simnet              Use simnet chain
  --regtest             Use regtest chain
  --testnet4            Use testnet4 chain
  -o, --offline         Run offline
  --rpcuser RPCUSER     RPC user
  --rpcpassword RPCPASSWORD
                        RPC password
  --forgetconfig        Forget config on exit

Run 'electrum help <command>' to see the help for a command
```

```
$ python3 -c "import electrum.constants as k; print(k.NETS_LIST)"
(<class 'electrum.constants.BitcoinTestnet'>, <class 'electrum.constants.BitcoinSignet'>, <class 'electrum.constants.BitcoinSimnet'>, <class 'electrum.constants.BitcoinMainnet'>, <class 'electrum.constants.BitcoinRegtest'>, <class 'electrum.constants.BitcoinTestnet4'>)

$ python3 -c "import electrum.constants as k; print(k.NETS_LIST)"
(<class 'electrum.constants.BitcoinTestnet4'>, <class 'electrum.constants.BitcoinSimnet'>, <class 'electrum.constants.BitcoinTestnet'>, <class 'electrum.constants.BitcoinSignet'>, <class 'electrum.constants.BitcoinMainnet'>, <class 'electrum.constants.BitcoinRegtest'>)
```
2025-07-31 16:44:45 +00:00
SomberNight 6257d9e266 constants.py: add datadir_subdir, cli_flag, config_key methods
- use these to generalise recurring "switch-like" ifs
- this effectively also adds a `--mainnet` CLI option
    - closes https://github.com/spesmilo/electrum/issues/9790
2025-05-29 18:41:28 +00:00
SomberNight 1355f849c3 constants.py: reorganise file hierarchy in chains/ 2025-05-29 15:31:27 +00:00
SomberNight 5e2c52081d update block header checkpoints 2025-05-29 15:02:01 +00:00
SomberNight 172c3721bd follow-up prev: include chains/ folder in win and mac binaries 2025-01-27 14:21:34 +00:00
SomberNight 9bef4a5322 constants: move mainnet/testnet/regtest-specific json files to chains/
note: I find "chains" less ambiguous than "networks" or "net".
Though the codebase already uses "net"/"network" for the same meaning,
e.g. see `electrum.constants.net` or the `getinfo` cmd dict containing a "network" key.. :/
2025-01-27 13:40:41 +00:00
SomberNight 0779d9d7ae fallback ln nodes: simplify a bit
note: BitcoinRegtest subclasses BitcoinTestnet, so the FALLBACK_LN_NODES field should be overwritten

trivial follow-up of https://github.com/spesmilo/electrum/pull/9457
2025-01-27 13:19:29 +00:00
f321x eb600a3a14 move fallback ln nodes in separate json files and import them in constants 2025-01-20 11:13:23 +01:00
SomberNight 1257f21b1b constants: rm set_testnet/set_mainnet fns with AbstractNet.set_as_network 2024-09-16 15:27:45 +00:00
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 2f1095510c bitcoin.py/transaction.py: API changes: rm most hex usage
Instead of some functions operating with hex strings,
and others using bytes, this consolidates most things to use bytes.

This mainly focuses on bitcoin.py and transaction.py,
and then adapts the API usages in other files.

Notably,
- scripts,
- pubkeys,
- signatures
should be bytes in almost all places now.
2024-04-29 17:10:26 +00:00
SomberNight 5e08d6e486 constants: add some more type hints 2024-04-29 16:50:19 +00:00
SomberNight 312f2641e7 don't use bare except
use "except Exception", or if really needed explicitly "except BaseException"
2023-04-24 12:58:01 +00:00
SomberNight 57e52da77f lnaddr: clean-up SEGWIT_HRP vs BOLT11_HRP confusion
With signet, SEGWIT_HRP != BOLT11_HRP, so the previous "currency" string
became a flawed concept. Instead we pass around net objects now.
2021-06-22 16:16:21 +02:00
wakiyamap 9f4d7ec6d1 Add net.BOLT11_HRP 2021-05-08 11:53:58 +09:00
wakiyamap 639cd94dcb add signet support 2021-05-06 19:47:22 +09:00
ThomasV a642a11936 add another DNS seed 2021-03-26 14:28:34 +01:00
Luke Childs 7b122d2679 Automated BIP39 Recovery, squashed 2020-08-20 17:50:39 +02:00
SomberNight 59a428ea7f lnworker: re-enable dns seeds for peer-finding bootstrap
but only for mainnet
2020-03-03 20:12:12 +01:00
SomberNight 6d8c605307 move lnworker.first_block to constants 2019-08-20 09:03:11 +02:00
SomberNight c02cc9bb3b persist recent peers. implement dns seed bootstrapping.
dns seeds are currently disabled though, as they always seem to return mainnet nodes.
2019-08-20 09:03:10 +02:00
SomberNight a5b44d25b0 persist channel db on disk. verify channel gossip sigs. 2019-08-20 09:03:10 +02:00
SomberNight 8ffeb79d01 constants.py: remove duplicate Simnet declaration 2019-08-20 09:03:10 +02:00
SomberNight f174609158 constants.py: Simnet inherits from Testnet 2019-08-20 09:03:09 +02:00
Janus 8468fc8f68 use same servers for simnet as for regtest 2019-08-20 09:03:09 +02:00
Janus 0abfcd2b6a lightning: add --simnet and --lightning switches 2019-08-20 09:03:09 +02:00
SomberNight 650225e238 crash reporter UX
see #5483
2019-07-04 19:13:12 +02:00
SomberNight 85a7aa291e bip32: refactor whole module. clean-up. 2019-02-22 18:50:24 +01:00
SomberNight cdca74aa39 move max_checkpoint from network to constants 2018-09-09 05:00:09 +02:00
Janus 097ac144d9 file reorganization with top-level module 2018-07-13 14:01:37 +02:00