From 06b50dc6959df4f6649455db45e28fe3511f2cca Mon Sep 17 00:00:00 2001 From: Calin Culianu Date: Sun, 26 Oct 2025 17:03:45 +0200 Subject: [PATCH] Added startup warning about needing to upgrade node if on BTC and no submitpackage Also in this commit: - Updated README.md to talk about v1.6 protocol compatibility and need for v28.0.0 or above of Core/Knots - Updated RPC error message saying Bitcoin Core or Bitcoin Knots (not just Bitcoin Core) >= v28.0.0 is ok for submitpackage. --- README.md | 7 ++++--- src/BitcoinD.cpp | 7 ++++++- src/Servers.cpp | 3 ++- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6dc8842..104f681 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ GPLv3. See the included `LICENSE.txt` file or [visit gnu.org and read the licens ### Highlights: - *Fast:* Written in 100% modern `C++20` using multi-threaded and asynchronous programming techniques. -- *A drop-in replacement for ElectronX/ElectrumX:* Fulcrum is 100% protocol-level compatible with the [Electrum Cash 1.5.3 protocol](https://electrum-cash-protocol.readthedocs.io/en/latest/). Existing server admins should feel right at home with this software since installation and management of it is nearly identical to ElectronX/ElectrumX server. +- *A drop-in replacement for ElectrumX:* Fulcrum is 100% protocol-level compatible with the [Electrum Cash 1.6 protocol](https://electrum-cash-protocol.readthedocs.io/en/latest/). Existing server admins should feel right at home with this software since installation and management of it is nearly identical to an ElectrumX server. - *Cross-platform:* While this codebase was mainly developed and tested on MacOS, Windows and Linux, it should theoretically work on any modern OS (such as *BSD) that has Qt5 or Qt6 Networking available. - ***NEW!*** *Triple-coin:* Supports BCH, BTC and LTC. @@ -27,7 +27,8 @@ GPLv3. See the included `LICENSE.txt` file or [visit gnu.org and read the licens - *For running*: - A supported bitcoin full node with its JSON-RPC service enabled, preferably running on the same machine. - *For **BCH***: Bitcoin Cash Node, Bitcoin Cash Unlimited, Flowee, and bchd have all been tested extensively and are known to work well with this software. - - *For **BTC***: Bitcoin Core v0.17.0 or later. Bitcoin Knots is also rumored to work but is untested by the developer. + - *For **BTC***: Bitcoin Core v0.17.0 or later. Bitcoin Knots is also known to work perfectly well. + - Note: Bitcoin Core and/or Bitcoin Knots >= v28.0.0 are recommended for full Electrum Protocol v1.6 support. - *For **LTC***: Litecoin Core v0.17.0 or later. No other full nodes are supported by this software for LTC. - If using Litcoin Core v0.21.2 or above, your daemon is serializing data using mweb extensions. While Fulcrum understands this serialization format, your Electrum-LTC clients may not. You can run `litecoind` with `-rpcserialversion=1` to have your daemon return transactions in pre-mweb format which is understood by most Electrum-LTC clients. - The node must have txindex enabled e.g. `txindex=1`. @@ -160,7 +161,7 @@ Execute the binary, with `-h` to see the built-in help, e.g. `./Fulcrum -h`. You It is recommended you specify a data dir (`-D` via CLI or `datadir=` via config file) on an SSD drive for best results. Synching against `testnet` should take you about 10-20 minutes (more on slower machines), and mainnet can take anywhere from 4 hours to 20+ hours, depending on machine and drive speed. I have not tried synching against mainnet on an HDD and it will probably take ***days*** if you are lucky. -As long as the server is still synchronizing, all public-facing ports will not yet be bound for listening and as such an attempt to connect to one of the RPC ports will fail with a socket error such as e.g. "Connection refused". Once the server finishes synching it will behave like an ElectronX/ElectrumX server and it can receive requests from Electron Cash (or Electrum if on BTC). +As long as the server is still synchronizing, all public-facing ports will not yet be bound for listening and as such an attempt to connect to one of the RPC ports will fail with a socket error such as e.g. "Connection refused". Once the server finishes synching it will behave like an ElectrumX server and it can receive requests from Electron Cash (or Electrum if on BTC). You may also wish to read the [Fulcrum manpage](https://github.com/cculianu/Fulcrum/blob/master/doc/unix-man-page.md). diff --git a/src/BitcoinD.cpp b/src/BitcoinD.cpp index c342397..5d29dec 100644 --- a/src/BitcoinD.cpp +++ b/src/BitcoinD.cpp @@ -227,7 +227,7 @@ namespace { version = Version::BitcoinDCompact(val); isBchd = true; } else { - isCore = subversion.startsWith("/Satoshi:"); + isCore = subversion.startsWith("/Satoshi:"); // this matches Bitcoin Knots as well isBU = subversion.startsWith("/BCH Unlimited:"); isBCHN = subversion.startsWith("/Bitcoin Cash Node:"); isLTC = subversion.startsWith("/LitecoinCore:"); @@ -316,6 +316,11 @@ void BitcoinDMgr::refreshBitcoinDNetworkInfo() // almost worthless on 27.0.0 (according to ElectrumX devs), and so we require 28.0.0. // See: https://github.com/spesmilo/electrum-protocol/pull/6/files#r2459860616 rsi.hasSubmitPackageRPC = res.isCore && bitcoinDInfo.version >= Version{0, 28, 0}; + if (res.isCore && !rsi.hasSubmitPackageRPC) // warn admin about lack of submitpackage support + Warning() << "*** Compatibility Warning *** The BTC full node backing this " APPNAME " instance" + " lacks the `submitpackage` RPC, which is needed for full Electrum protocol v1.6" + " support. Consider upgrading your full node to either Bitcoin Core or Bitcoin Knots" + " version 28.0.0 or above."; } // end lock scope // be sure to announce whether remote bitcoind is bitcoin core (this determines whether we use segwit or not) BTC::Coin coin = BTC::Coin::BCH; // default BCH if unknown (not segwit) diff --git a/src/Servers.cpp b/src/Servers.cpp index de5cc24..15a3fdc 100644 --- a/src/Servers.cpp +++ b/src/Servers.cpp @@ -2098,7 +2098,8 @@ void Server::rpc_blockchain_transaction_broadcast_package(Client *c, const RPC:: { if (not bitcoindmgr->getRpcSupportInfo().hasSubmitPackageRPC) // This is not supported on anything but Bitcoin Core 28.0.0 - throw RPCError("blockchain.transaction.broadcast_package is only available on Bitcoin Core v28.0.0 or above", + throw RPCError("blockchain.transaction.broadcast_package is only available on Bitcoin Core and/or Bitcoin Knots" + " v28.0.0 or above", RPC::ErrorCodes::Code_MethodNotFound); struct AsyncWorkResult {