Universal Bitcoin backend for core lightning with BIP 157 support
The name of this plugin was choose by the community on twitter, and
we choose the name folgore
that means lightning
in Italian (see).
This idea was pretty cool because pin a the period where this plugin is born, in particular Italian Governament
ban English words in some context, so I was thinking that this name was pretty cool for a plugin and also
to joke around this Italian choice.
To install the plugin in core lightning you need to have the rust installed
>> make
cp ./target/debug/folgore_plugin /home/<user>/.lightning/plugins
This plugin will support coffee as plugin manager, and it is also the recommended way to install a this plugin in core lightning.
To install it you need just to install coffee and then run the following commands
>> coffee --network <your network> remote add folgore-git https://github.com/coffee-tools/folgore.git
>> coffee --network <your network> install folgore
The plugin is developed to work out of the box without any extra configuration, but if you want make a customization, these are some configuration options:
bitcoin-client
: The client name that the plugin need to use, by defaultesplora
but the following clients are supported:nakamoto
: Bitcoin node implementation with the BIP 157 support;esplora
: Rest API to support esplora like backend,bitcoind
: Bitcoin Core implementation
bitcoin-esplora-url
: The URL of the esplora server, by default using the Blockstream APIbitcoin-rpcurl
: The URL of bitcoin core (for now it support http only and not https)bitcoin-rpcuser
: Bitcoin core RPC user inside for authentication;bitcoin-rpcpassword
: Bitcoin core RPC password for authentication.bitcoin-fallback-client
: Bitcoin fallback client, in the case one of the client fails, the plugin use another backend for the request.
Once plugin is successfully installed, you can simply run "lightningd" and plugin will start. However, you're supposed to run "lightningd" with "--disable-plugin bcli" option.
lightningd --network=<network-name> --disable-plugin bcli
for eg.
lightningd --network=testnet --disable-plugin bcli
This plugin allow the support of the BIP 157 Client Side Block Filtering in core lightning in a alpha mode.
In fact, the plugin is build on top of nakamoto with a bunch of fixes that are proposed as PR in the main repository, in addition the current version of the plugin is build on top of an core lightning RFC PR #6181, so the support the the BIP 157 is very experimental and there is still work to do.
However, it is the perfect time to stress test the plugin and report not known bugs, so please
if you want test the BIP 157 support consider to install the plugin with one of the
previous method, and then run lightnind
with the option bitcoin-client=nakamoto
and then
report any bugs that you find with an issue.
In addition, if you are running the plugin with a not clean node, you should run nakamoto and wait that it will sync the initial information for the chain otherwise core lightning will crash because nakamoto return an older block height (this issue is fixed with the PR #6181 on core lightning).
To run nakamoto you can run the following command
git clone https://github.com/vincenzopalazzo/nakamoto.git && cd nakamoto
git checkout macros/client_model-fixes
cd node
cargo run -- --log debug --testnet
An than lets wait a while that nakamoto will sync with the network.
Universal Bitcoin backend for core lightning with BIP 157 support
Copyright (C) 2020-2021 Vincenzo Palazzo [email protected]
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.