{"id":14138850,"url":"https://github.com/cculianu/Fulcrum","last_synced_at":"2025-08-05T04:31:17.477Z","repository":{"id":38381265,"uuid":"231261772","full_name":"cculianu/Fulcrum","owner":"cculianu","description":"A fast \u0026 nimble SPV Server for BCH, BTC, and LTC","archived":false,"fork":false,"pushed_at":"2025-04-10T03:48:55.000Z","size":93596,"stargazers_count":398,"open_issues_count":55,"forks_count":92,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-05-22T20:07:26.791Z","etag":null,"topics":["bch","bitcoin","bitcoin-cash","bitcoincash","btc","cpp17","electroncash","electronx","electrum","electrum-ltc","electrumx","fast","litecoin","ltc","server","spv"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cculianu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-01-01T20:41:17.000Z","updated_at":"2025-05-14T20:31:19.000Z","dependencies_parsed_at":"2024-06-26T22:42:22.451Z","dependency_job_id":"8ad51763-8e53-4d46-9b73-4b0856aaaed8","html_url":"https://github.com/cculianu/Fulcrum","commit_stats":{"total_commits":1355,"total_committers":17,"mean_commits":79.70588235294117,"dds":0.04354243542435421,"last_synced_commit":"67bb4cc26783d3151753c1e5a5950fbf2c5c0762"},"previous_names":[],"tags_count":50,"template":false,"template_full_name":null,"purl":"pkg:github/cculianu/Fulcrum","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cculianu%2FFulcrum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cculianu%2FFulcrum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cculianu%2FFulcrum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cculianu%2FFulcrum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cculianu","download_url":"https://codeload.github.com/cculianu/Fulcrum/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cculianu%2FFulcrum/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268835977,"owners_count":24314949,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-05T02:00:12.334Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bch","bitcoin","bitcoin-cash","bitcoincash","btc","cpp17","electroncash","electronx","electrum","electrum-ltc","electrumx","fast","litecoin","ltc","server","spv"],"created_at":"2024-08-16T17:00:33.432Z","updated_at":"2025-08-05T04:31:12.463Z","avatar_url":"https://github.com/cculianu.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# ![Image FulcrumLogo](https://raw.githubusercontent.com/cculianu/Fulcrum-art/master/F-circle2_grn_64.png) Fulcrum\n\n[![Docker Build](https://github.com/cculianu/Fulcrum/actions/workflows/publish.yml/badge.svg)](https://github.com/cculianu/Fulcrum/actions/workflows/publish.yml)\n[![Copr build status](https://copr.fedorainfracloud.org/coprs/jonny/BitcoinCash/package/fulcrum/status_image/last_build.png)](https://copr.fedorainfracloud.org/coprs/jonny/BitcoinCash/package/fulcrum/)\n\nA fast \u0026 nimble SPV server for Bitcoin Cash, Bitcoin BTC, and Litecoin. \n\nFor more information, visit [The Official Fulcrum Website™️](https://fulcrumserver.org/).\n\n#### Copyright\n(C) 2019-2024 Calin Culianu \u003ccalin.culianu@gmail.com\u003e\n\n#### License:\nGPLv3. See the included `LICENSE.txt` file or [visit gnu.org and read the license](https://www.gnu.org/licenses/gpl-3.0.html).\n\n![Image Fulcrum](https://raw.githubusercontent.com/cculianu/Fulcrum-art/master/F_bal_stylized_1_256.png)\n\n### Highlights:\n\n- *Fast:* Written in 100% modern `C++20` using multi-threaded and asynchronous programming techniques.\n- *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.\n- *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 Core and Qt5 Networking available.\n- ***NEW!*** *Triple-coin:* Supports BCH, BTC and LTC.\n\n### Requirements\n\n- *For running*:\n  - A supported bitcoin full node with its JSON-RPC service enabled, preferably running on the same machine.\n    - *For **BCH***: Bitcoin Cash Node, Bitcoin Unlimited Cash, Flowee, and bchd have all been tested extensively and are known to work well with this software.\n    - *For **BTC***: Bitcoin Core v0.17.0 or later.  No other full nodes are supported by this software for BTC.\n    - *For **LTC***: Litecoin Core v0.17.0 or later.  No other full nodes are supported by this software for LTC.\n      - 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.\n    - The node must have txindex enabled e.g. `txindex=1`.\n    - The node must not be a pruning node.\n    - *Optional*: For best results, enable zmq for the \"hasblock\" topic using e.g. `zmqpubhashblock=tcp://0.0.0.0:8433` in your `bitcoin.conf` file (zmq is only available on: Core, BCHN, BU 1.9.1+, or Litecoin Core).\n  - *Recommended hardware*: Minimum 1GB RAM, 64-bit CPU, ~40GB disk space for mainnet BCH, 133GB for BTC (as of Aug 2023). For best results, use an SSD rather than an HDD.\n- *For compiling*: \n  - `Qt Core` \u0026 `Qt Networking` libraries `5.15.2` or above (I use `5.15.2` myself).  Qt `5.15.1` (or earlier) is not supported.\n  - *Optional but recommended*: `libzmq 4.x` development headers and library (also known as `libzmq3-dev` on Debian/Ubuntu and `zeromq-devel` on Fedora). Fulcrum will run just fine without linking against `libzmq`, but it will run better if you do link against `libzmq` and also turn on `zmqpubhashblock` notifications in `bitcoind` (zmq is only available on: Core, BCHN, or BU 1.9.1+).\n  - A modern, 64-bit `C++20` compiler.  `clang-17` or `g++-13` are recommended. MSVC on Windows is not supported (please use `MinGW G++` instead, which ships with Qt Open Source Edition for Windows).\n\n### Quickstart\n\n1. Download a [pre-built static binary](https://github.com/cculianu/Fulcrum/releases).\n2. Verify that the binary runs on your system by executing the binary with `./Fulcrum -h` to see the CLI options.\n3. Setup a configuration file and to point Fulcrum to your bitcoind JSON-RPC server, specify listening ports, TLS certificates, etc.  See: [doc/fulcrum-example-config.conf](https://github.com/cculianu/Fulcrum/blob/master/doc/fulcrum-example-config.conf) and/or [doc/fulcrum-quick-config.conf](https://github.com/cculianu/Fulcrum/blob/master/doc/fulcrum-quick-config.conf)\n4. Also see this section below on [Running Fulcrum](#running-fulcrum).\n\n### How To Compile\n\nCompiling is for those users that do not wish to use the [pre-built static binaries provided here](https://github.com/cculianu/Fulcrum/releases), or for users on platforms for which the static binaries are not provided (such as FreeBSD or macOS). To compile, it's recommended you use the Qt Creator IDE.\n\n1. Get the latest version of Qt Open Source Edition for your platform.\n2. Point the Qt Creator IDE at the `Fulcrum.pro` file.\n3. Set the build configuration to \"Release\".  Hit Build.  It should \"just work\".\n\nYou may also build from the CLI (on Linux and MacOS):\n\n1. Make sure you have `qmake` in your path and all the requisite Qt5 dev libs installed.\n2. `qmake` (to generate the Makefile)\n3. `make -j8`  (replace 8 here with the number of cores on your machine)\n\n**A note for Linux users**: You may have to install the Qt5 networking package separately such as `libqt5network5` (depending on your distribution). You also need `libbz2-dev` otherwise compilation will fail. If you are having trouble finding the required Qt versions, you can try this link: https://launchpad.net/~beineri (for Ubuntu/Debian ppas). For best results, you may wish to also ensure you have `pkg-config` and `libzmq` installed (aka `libzmq3-dev` on Debian/Ubuntu, `zeromq-devel` on Fedora).\n\n**A note for Windows users**: `Qt 5.15.2` (or above) with `MinGW G++ 11.x.x` (or above) is the compiler/Qt kit you should be using.  MSVC is not supported by this codebase at the present time.\n\n#### What to do if compiling fails\nIf you have problems compiling, the most likely culprit would be your compiler not being `C++20` compliant (please use a recent version of `gcc` or `clang` on Linux, Apple's `Xcode` on Mac, or `MinGW G++ 11.x` or above on Windows).\n\nThe other likely culprit is the fact that at the present time I have included a statically-built `librocksdb` in the codebase. There are versions of this library for Windows, Mac, and Linux included right in the source tree, and `Fulcrum.pro` looks for them and links to them. Instructions are included within the `Fulcrum.pro` project file about how to build your own static `librocksdb` if the bundled one does not work on your system.\n\nIf you are still having trouble, [file an issue here in this github](https://github.com/cculianu/Fulcrum/issues).\n\n#### Linking against the system `librocksdb.so` (experimental)\n\nYou may optionally build against the **system rocksdb** (Linux only) if your distribution offers `rocksdb` version `6.6.4` or newer.\n\n1. `qmake LIBS=-lrocksdb`  (to generate the Makefile **without** linking to the included static lib)\n2. `make clean \u0026\u0026 make -j8` (replace 8 here with the number of cores on your machine)\n\n**Note**: Some Linux distributions have been known to package `librocksdb.so` incorrectly. [See here for an example](https://bugs.archlinux.org/task/65093), so until I can be confident most distributions do it right, I am considering using the system `librocksdb.so` an ***experimental feature*** for the time being (in principle it should work ok if the library is compiled correctly).\n\n#### Making sure `libzmq` is detected and used (optional but recommended)\n\nEnsure that `libzmq3` (Debian/Ubuntu) and/or `zeromq-devel` (Fedora/Redhat) is installed, and that `pkg-config` is also installed.  If on Unix (macOS, Linux, or Windows MinGW), then ideally the `qmake` step will find `libzmq` on your system and automatically use it. If that is not the case, you may try passing flags to `qmake` such as `LIBS+=\"-L/path/to/libdir_containting_libzmq -lzmq\"` and `INCLUDEPATH+=\"/path/to/dir_containing_zmq_h\"` as arguments when you invoke `qmake`.  Using `libzmq` is optional but highly recommended. If you have trouble getting Fulcrum to compile against your `libzmq`, [open a new issue](https://github.com/cculianu/Fulcrum/issues) and maybe I can help.\n\n### Building the Windows static `Fulcrum.exe`\n\n**New!** I recently added a mechanism using Docker to build a statically-linked\nWindows `.exe`. This build is 100% compatible with any stock 64-bit Windows 7 or\nabove system -- you don't have to install anything -- it *just works*. You can\ndownload the pre-built `.exe` yourself here from the [releases\npage](https://github.com/cculianu/Fulcrum/releases).\n\nIf you want to build it yourself though, you can do so, but it requires\n[Docker](https://www.docker.com/) on either a MacOS or a Linux host system (it\nmay work on Windows too with Linux tools for Windows -- but I haven't tried it\nmyself). It builds *all* dependencies, including a static Qt and static rocksdb.\nAs such, it may take a while so be patient.\n\n1. Make sure Docker is installed such that you don't need to use `sudo`. This is the default on MacOS, but on Linux you may need to [follow these instructions here](https://docs.docker.com/install/linux/linux-postinstall/).\n\n2. Run the build script:\n\n    `$ contrib/build/build.sh windows master`\n\nThe first argument to the script is the platform to build (in this case\n`windows`). The second argument to the script is a git `branch` or `tag` to\nbuild. Two `.exe` files will be generated, `Fulcrum.exe` and `FulcrumAdmin.exe`,\nwhich will appear in `dist/win` after the build process completes.\n\n- *Note:* You can point the build script to any repository, not just this one, by giving it a `GIT_REPO` environment variable:\n\n    `$ GIT_REPO=https://github.com/myusername/MyFulcrumFork contrib/build/build.sh windows master`\n\n    `$ GIT_REPO=$(pwd) contrib/build/build.sh windows master`\n\n### Building a static executable for Linux\n\n**New!** I recently added a mechanism using Docker to build a statically-linked\nLinux executable. This build is 100% compatible with most stock 64-bit Linux\nsystems with a new enough glibc. So on a relatively modern Linux system, you\ndon't have to install anything -- it *just works*. You can download the\npre-built binary yourself here from the [releases page](https://github.com/cculianu/Fulcrum/releases).\n\nIf you want to build it yourself though, you can do so, but it requires [Docker](https://www.docker.com/)\non either a MacOS or a Linux host system.  It builds a static Qt and static rocksdb.\n\n1. Make sure Docker is installed such that you don't need to use `sudo`. This is the default on MacOS, but on Linux you may need to [follow these instructions here](https://docs.docker.com/install/linux/linux-postinstall/).\n\n2. Run the build script:\n\n    `$ contrib/build/build.sh linux master`\n\nThe first argument to the script is the platform to build (in this case\n`linux`). You may also specify `oldlinux` as the first argument if you wish to\nbuild for an older system (in which case the Docker container will use Ubuntu 16.04\nto compile, instead of the Ubuntu \"latest\" tag). The second argument to the\nscript is a git `branch` or `tag` to build.\n\n- *Note:* You can point the build script to any repository, not just this one, by giving it a `GIT_REPO` environment variable:\n\n    `$ GIT_REPO=https://github.com/myusername/MyFulcrumFork contrib/build/build.sh linux master`\n\n    `$ GIT_REPO=$(pwd) contrib/build/build.sh linux master`\n\n---\n\n### Running Fulcrum\n\nExecute the binary, with `-h` to see the built-in help, e.g. `./Fulcrum -h`. You can set most options from the CLI, but you can also specify a **config file** as an argument. See:\n\n - [doc/fulcrum-example-config.conf](https://github.com/cculianu/Fulcrum/blob/master/doc/fulcrum-example-config.conf) in the source tree. This sample config file is very well documented with comments.\n - [doc/fulcrum-quick-config.conf](https://github.com/cculianu/Fulcrum/blob/master/doc/fulcrum-quick-config.conf) in the source tree. This is a more abbreviated config file you can use as a starting point as well.\n\n`Fulcrum` requires a `bitcoind` instance running either on `testnet` or `mainnet` (or `regtest` for testing), which you must tell it about via the CLI options or via the config file.  You also need to tell it what port(s) to listen on and optionally what SSL certificates to use (if using SSL). ***Note:*** *Electron Cash (and/or Electrum) at this time no longer support connecting to non-SSL servers, so you should probably configure SSL for production use*.\n\nIt 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.\n\nAs 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).\n\nYou may also wish to read the [Fulcrum manpage](https://github.com/cculianu/Fulcrum/blob/master/doc/unix-man-page.md).\n\n\n#### Admin Script: FulcrumAdmin\n\n`Fulcrum` comes with an admin script (`Python 3.6+` is required on the system to run this script).  You may send commands to `Fulcrum` using this script. The script requires that an **admin port** (config var `admin=`, CLI arg `-a`) be configured for your server.  To run the script, execute `./FulcrumAdmin -h` and you will see a list of possible subcommands that you can send to `Fulcrum`. Below you see all available commands (the below assumes the `admin` port is on port `8000`):\n\n    $ ./FulcrumAdmin -p 8000 addpeer              Add a peer to the server's list of peers\n    $ ./FulcrumAdmin -p 8000 ban                  Ban clients by ID and/or IP address\n    $ ./FulcrumAdmin -p 8000 banpeer              Ban peers by hostname suffix\n    $ ./FulcrumAdmin -p 8000 bitcoind_throttle    Query or set server bitcoind_throttle setting\n    $ ./FulcrumAdmin -p 8000 clients (sessions)   Print information on all the currently connected clients\n    $ ./FulcrumAdmin -p 8000 getinfo              Get server information\n    $ ./FulcrumAdmin -p 8000 kick                 Kick clients by ID and/or IP address\n    $ ./FulcrumAdmin -p 8000 listbanned (banlist) Print the list of banned IP addresses and peer hostnames\n    $ ./FulcrumAdmin -p 8000 loglevel             Set the server's logging verbosity\n    $ ./FulcrumAdmin -p 8000 maxbuffer            Query or set server max_buffer setting\n    $ ./FulcrumAdmin -p 8000 peers                Print peering information\n    $ ./FulcrumAdmin -p 8000 query                Query for balance, UTXO, and history information for one or more addresses\n    $ ./FulcrumAdmin -p 8000 rmpeer               Remove peers by hostname suffix\n    $ ./FulcrumAdmin -p 8000 simdjson             Get or set the server's 'simdjson' (JSON parser) setting\n    $ ./FulcrumAdmin -p 8000 stop (shutdown)      Gracefully shut down the server\n    $ ./FulcrumAdmin -p 8000 unban                Unban IP addresses\n    $ ./FulcrumAdmin -p 8000 unbanpeer            Unban peers by hostname suffix\n\n---\n\n### Protocol Documentation\n\nDocumentation for the Electrum Cash protocol that Fulcrum uses is [available here](https://electrum-cash-protocol.readthedocs.io/en/latest/).\n\n---\n\n### Platform Notes\n\n#### Windows\n\nThis codebase will not compile correctly (or at all) using MSVC. Please use the `MinGW` and/or `G++` kit in Qt Creator to build this software.\n\n#### Linux\n\nBe sure you have a recent gcc that support C++20. I am using gcc-13 in my docker builders, but gcc-11 *should* work too.\n\n#### MacOS\n\nEverything should just work (I use MacOS as my dev machine).\n\n---\n\n### F.A.Q.\n\n\n\n**Q:** Why Qt?  This isn't a GUI app!\n\n**A:** Yes, I know.  However, Qt is a very robust, cross-platform and fast application framework.  You can use its \"Core\" library for console apps, servers, etc.  It has great network support and other basic things a programmer needs to get stuff done.\n\n**Q:** Why is the compiled binary called `Fulcrum` (capital `F`) and not `fulcrum` (lowercase `f`) as is customary on Linux/Unix?\n\n**A:** Because I like capital letters, even on Linux.  I also develop (this and other software) for macOS and Windows and over there the Linux/Unix lowecase thing looks a little out-of-place.  Perhaps my sensibilities have been affected by my win32 and macOS dev work, or perhaps I'm just unconventional.  Embrace the lack of convention here! That being said, if the capital `F` bothers you, feel free to rename it or represent it as `fulcrum` wherever you like.\n\n---\n\n### Donations\n\nSure!  Send **BCH** here:\n\n[bitcoincash:qphax4s4n9h60jxj2fkrjs35w2tvgd4wzvf52cgtzc](bitcoincash:qphax4s4n9h60jxj2fkrjs35w2tvgd4wzvf52cgtzc)\n\n[![bitcoincash:qphax4s4n9h60jxj2fkrjs35w2tvgd4wzvf52cgtzc](https://raw.githubusercontent.com/cculianu/DonateSpareChange/master/donate.png)](bitcoincash:qphax4s4n9h60jxj2fkrjs35w2tvgd4wzvf52cgtzc)\n\nOr, for anonymity you can donate to this **BCH RPA address**: **`paycode:qygqyce24f7n6q2u36r8t332z5426ul78v7z0ynl6v9wlmk9tt28adksqgc0fzge8fk6ux8cj9tjvp8mkakvfzkgwqzj5h4n9tnfcpscsn7wxqqqqqqqzzmxze04`**\n\nYou may also send **BTC** to the BTC-equivalent of the above BCH address, which is: **`1BCHBCH6TXBaXyc5HReLBm1sNytBF2kkPD`**\n\n---\n\n### Sponsors\n\n![General Protocols](https://c3-soft.com/imgs/general-protocols.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcculianu%2FFulcrum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcculianu%2FFulcrum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcculianu%2FFulcrum/lists"}