add testnet5 network support and libbitcoin public electrum servers
What changed, and why it matters
This commit adds support for a new Bitcoin test network called testnet5 and lists two new public Electrum servers for that network. It also updates the bundled 'drongo' subproject. There are no changes that fix a vulnerability or alter security-sensitive behavior; it is a routine feature addition.
No security action required. Review the drongo submodule bump separately if desired, but this commit itself is a benign feature addition.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff extends Sparrow Wallet to recognize Bitcoin testnet5: CLI/network flag handling, UI network menu, public Electrum server list, bitcoind cookie directory lookup, and checkpoint unit tests. It also bumps the drongo submodule and adds two libbitcoin-hosted public Electrum servers for testnet5. No cryptographic, authentication, or authorization logic is changed.
Changed components
Network selection (CLI and UI)Public Electrum server listbitcoind cookie directory resolutiondrongo submoduleHeader checkpoint testsInspect captured patch +20 / −6
### README.md
@@ -68,12 +68,12 @@ Usage: sparrow [options]
Possible Values: [ERROR, WARN, INFO, DEBUG, TRACE]
--network, -n
Network to use
- Possible Values: [mainnet, testnet, regtest, signet, testnet4]
+ Possible Values: [mainnet, testnet, regtest, signet, testnet4, testnet5]
```
Note that testnet currently refers to testnet3.
-As a fallback, the network (mainnet, testnet, testnet4, regtest or signet) can also be set using an environment variable `SPARROW_NETWORK`. For example:
+As a fallback, the network (mainnet, testnet, testnet4, testnet5, regtest or signet) can also be set using an environment variable `SPARROW_NETWORK`. For example:
`export SPARROW_NETWORK=testnet`
@@ -89,7 +89,7 @@ When not explicitly configured using the command line argument above, Sparrow st
| Linux | ~/.sparrow |
| Windows | %APPDATA%/Sparrow |
-Testnet3, testnet4, regtest and signet configurations (along with their wallets) are stored in subfolders to allow easy switching between networks.
+Testnet3, testnet4, testnet5, regtest and signet configurations (along with their wallets) are stored in subfolders to allow easy switching between networks.
On macOS and Linux, Sparrow also supports the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/latest/).
This is opt in: for each category below, if the corresponding directory already exists, Sparrow uses it, otherwise it continues to use the home folder above. Categories are resolved independently, so files can be moved across one at a time.
### drongo
@@ -1 +1 @@
-Subproject commit 18516bbbe2bfc3ab2a4af6bd319eb2e5152db28c
+Subproject commit 94f13d24eafa1a5df5b51813d67d5eacc2cb56ba
### src/main/java/com/sparrowwallet/sparrow/AppController.java
@@ -425,7 +425,7 @@ void initializeView() {
MenuItem homeItem = new MenuItem("Home Folder...");
homeItem.setOnAction(this::restartInHome);
restart.getItems().add(homeItem);
- List<Network> networks = new ArrayList<>(List.of(Network.MAINNET, Network.TESTNET, Network.TESTNET4, Network.SIGNET));
+ List<Network> networks = new ArrayList<>(List.of(Network.MAINNET, Network.TESTNET, Network.TESTNET4, Network.TESTNET5, Network.SIGNET));
networks.remove(Network.get());
for(Network network : networks) {
MenuItem networkItem = new MenuItem(network.toDisplayString());
### src/main/java/com/sparrowwallet/sparrow/SparrowWallet.java
@@ -107,6 +107,11 @@ public static void main(String[] argv) {
Network.set(Network.TESTNET4);
}
+ File testnet5Flag = new File(Storage.getConfigHome(), "network-" + Network.TESTNET5.getName());
+ if(testnet5Flag.exists()) {
+ Network.set(Network.TESTNET5);
+ }
+
File signetFlag = new File(Storage.getConfigHome(), "network-" + Network.SIGNET.getName());
if(signetFlag.exists()) {
Network.set(Network.SIGNET);
### src/main/java/com/sparrowwallet/sparrow/net/PublicElectrumServer.java
@@ -22,6 +22,8 @@ public enum PublicElectrumServer {
SIGNET_MEMPOOL_SPACE("mempool.space", "ssl://mempool.space:60602", Network.SIGNET),
TESTNET4_MEMPOOL_SPACE("mempool.space", "ssl://mempool.space:40002", Network.TESTNET4),
TESTNET4_C3_SOFT("blackie.c3-soft.com", "ssl://blackie.c3-soft.com:57010", Network.TESTNET4),
+ TESTNET5_WORMER_LIBBITCOIN_NET("wormer.libbitcoin.net", "ssl://wormer.libbitcoin.net:58643", Network.TESTNET5, List.of(PolicyType.SINGLE_HD, PolicyType.MULTI_HD, PolicyType.SINGLE_SP)),
+ TESTNET5_CARMINE_LIBBITCOIN_NET("carmine.libbitcoin.net", "ssl://carmine.libbitcoin.net:58643", Network.TESTNET5, List.of(PolicyType.SINGLE_HD, PolicyType.MULTI_HD, PolicyType.SINGLE_SP)),
FRIGATE_2140_DEV("frigate.2140.dev", "ssl://frigate.2140.dev:50002", Network.MAINNET, List.of(PolicyType.SINGLE_HD, PolicyType.MULTI_HD, PolicyType.SINGLE_SP));
PublicElectrumServer(String name, String url, Network network) {
@@ -34,7 +36,7 @@ public enum PublicElectrumServer {
this.supportedPolicyTypes = supportedPolicyTypes;
}
- public static final List<Network> SUPPORTED_NETWORKS = List.of(Network.MAINNET, Network.TESTNET, Network.SIGNET, Network.TESTNET4);
+ public static final List<Network> SUPPORTED_NETWORKS = List.of(Network.MAINNET, Network.TESTNET, Network.SIGNET, Network.TESTNET4, Network.TESTNET5);
private final Server server;
private final Network network;
### src/main/java/com/sparrowwallet/sparrow/net/cormorant/bitcoind/BitcoindTransport.java
@@ -251,6 +251,8 @@ private static File getCookieDir(File bitcoindDir) {
return new File(bitcoindDir, "testnet3");
} else if(Network.get() == Network.TESTNET4 && Files.exists(Path.of(bitcoindDir.getAbsolutePath(), "testnet4", COOKIE_FILENAME))) {
return new File(bitcoindDir, "testnet4");
+ } else if(Network.get() == Network.TESTNET5 && Files.exists(Path.of(bitcoindDir.getAbsolutePath(), "testnet5", COOKIE_FILENAME))) {
+ return new File(bitcoindDir, "testnet5");
} else if(Network.get() == Network.REGTEST && Files.exists(Path.of(bitcoindDir.getAbsolutePath(), "regtest", COOKIE_FILENAME))) {
return new File(bitcoindDir, "regtest");
} else if(Network.get() == Network.SIGNET && Files.exists(Path.of(bitcoindDir.getAbsolutePath(), "signet", COOKIE_FILENAME))) {
### src/test/java/com/sparrowwallet/sparrow/net/HeaderCheckpointVerificationTest.java
@@ -67,6 +67,11 @@ public void verifyTestnet4Checkpoints() {
verifyCheckpoints(Network.TESTNET4);
}
+ @Test
+ public void verifyTestnet5Checkpoints() {
+ verifyCheckpoints(Network.TESTNET5);
+ }
+
@Test
public void verifySignetCheckpoints() {
verifyCheckpoints(Network.SIGNET);Why this scored 20/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.