Links

BSVLite

A lightweight drop-in replacement for bitcoin-sv

Introduction

BSVLite offers the key services of a full bitcoin-sv node at the fraction of the cost.
In 2022, the recommended specifications for running a bitcoin-sv node in production are:
  • 10 core 20 thread CPU or more preferred
  • 64GB of RAM + 64GB Swap
  • 1Gbit+ Internet connectivity (up and down)
The cost of running a server with these specifications is becoming prohibitive for many and many companies do not have dedicated people to maintain and manage Bitcoin nodes.
Despite there being a number of APIs available to interact with the BSV blockchain, many application developers need or prefer to run their own node. BSVLite is a drop-in replacement for bitcoin-sv that you run on your own infrastructure and it is seen and behaves like a full node instance. However, because it interacts directly with Taal's production nodes, it can run on a much less provisioned server.

Installation

You can download a tarball of BSVLite from https://cdn.taal.com/bsvlite/
After download do the following:
gunzip bsvlite-darwin.tar.gz
tar -xf bsvlite-darwin.tar
cd bsvlite_XXX
cp settings.conf.example settings.conf
The start script start.sh ensures that BSVLite will be launched at startup. The stop script stop.sh removes BSVLite from the startup applications.

Mac version

Before using the script start.sh, it has to be edited. Replace this line <string>$DIR/bsvlite</string> by either <string>$DIR/bsvlite_arm64</string> for ARM CPU-architecture or <string>$DIR/bsvlite_amd64</string> for AMD CPU-architecture.

Settings

Out of the box, BSVLite runs an RPC and REST server on port 8332 and a ZMQ server on port 28332. All settings can be modified by creating and editing the settings.conf file which sits in the same folder as the BSVLite binary.
Possible settings are:
consoleAddress=localhost:9400
debugServer=false
rpcBind=:8332
rpcUsername=bitcoin
rpcPassword=bitcoin
zmqAddress=tcp://:28332
bitcoinRpcUrl=https://bsvlite.taal.com/api/v1/bitcoin
bitcoinTimeout=10s
ignoreCertificate=false
bitcoinZmqUrl=tcp://bsvlite.taal.com:28338
# Testnet is at tcp://bsvlite.taal.com:28337
# Enter your Taal APIKey here...
apiKey=
Upon executing BSVLite, the program will additionally start a web application at URL http://localhost:9400/ which allows to do changes to the settings.
Before BSVLite can be used, a BSVLite-enabled API key has to be added in the settings. This can be done by either editing the API key on the line starting with apiKey= in settings.conf or by changing the setting on the web application.
Getting an API Key (current public beta)
  1. 1.
    Please contacts sales https://www.taal.com/contact/
  2. 2.
    Registers on Taal Platform and obtain mainnet key​
  3. 3.
    Taal enables customer’s mainnet key​ for bitcoin - BSVLite
  4. 4.
    Download BSV Lite from https://cdn.taal.com/bsvlite
  5. 5.
    Adjust BSVLite settings and add mainnet API key​
  6. 6.
    Integrate with your application​

Running BSVLite

RPC interface

Once BSVLite is running, you can interface with it using the bitcoin-sv CLI:
./bitcoin-cli -rpcuser=bitcoin -rpcpassword=bitcoin -rpcport=8332 help
Or cURL:
curl --user bitcoin:bitcoin --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "help" }' -H 'Content-Type: application/json' http://localhost:8332
or using cURL with jq to extract the result field:
curl --user bitcoin:bitcoin --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "help" }' -H 'Content-Type: application/json' http://localhost:8332 | jq -r '.result'
The following node commands can be used with BSVLite:
  • getbestblockhash
  • getblockchaininfo
  • getblockcount
  • getblockhash
  • getblockheader
  • getblockstats
  • getblockstatsbyheight
  • getchaintips
  • getchaintxstats
  • getdifficulty
  • getmempoolancestors
  • getmempooldescendants
  • getmempoolentry
  • getmempoolinfo
  • getmerkleproof
  • getmerkleproof2
  • getrawmempool
  • getrawnonfinalmempool
  • gettxout
  • gettxoutproof
  • gettxouts
  • gettxoutsetinfo
  • verifymerkleproof
  • verifytxoutproof
  • decoderawtransaction
  • decodescript
  • getrawtransaction
  • getnetworkinfo
  • getinfo
  • help

REST interface

BSVLite also exposes REST endpoints. A more detailed description of these endpoints can be found here.
Examples:
curl --location 'http://localhost:8332/rest/block/00000000000000000795188a509adb9807df29bb007d30d1054629aade2d5419.hex'
curl --location 'http://localhost:8332/rest/chaininfo.json'
The REST endpoint /rest/block/* can not be used.

Sending raw transactions