gs++ | SLP Graph Search Server
In-memory SLP Graph Search server.
Install Third Party Libs
Install recent version of Boost
Install SWIG 3
Follow this guide to install gRPC and Protobuf for your system if it is not already installed.
Condensed install for Debian 10 (Buster)
Install Boost, SWIG, GRPC C++ & Protobuf from Debian repositories
sudo apt install libboost-all-dev swig libgrpc++-dev protobuf-compiler-grpc
Install compilation essentials, including libgmp and libzmq libraries.
sudo apt install apt-transport-https curl gnupg build-essential autoconf libtool pkg-config cmake libgmp-dev libgmp3-dev libzmq3-dev
Git Clone This Repo
Continue to build.
The initial build might take a long time to download and build required dependencies, so grab some coffee.
From root directory build like normal CMake program.
mkdir build cd build cmake .. make -j
You can use
-DCMAKE_BUILD_TYPE=Debug for debug build.
Troubleshooting during building
- If you have issues compiling successfully but can't find the error...
Run make without the -j switch. ex. make Since -j switch builds parallelized the true error for the build failure gets lost. Disabling the parallel compile will let you zero in on the failure.
- Compilation with -j requires at least 8gb of ram.
If you receive errors such as
c++: fatal error: Killed signal terminated program cc1plus you are running out of ram. Again, build without -j or get more ram.
Executables are deposited into the /build/bin subdir after a successful build.
Make sure you have bitcoind running and the following options enabled:
txindex=1 server=1 rpcuser=bitcoin rpcpassword=password rpcport=8332 rpcworkqueue=10000 rpcthreads=8 zmqpubhashtx=tcp://*:28332 zmqpubrawtx=tcp://*:28332 zmqpubhashblock=tcp://*:28332 zmqpubrawblock=tcp://*:28332
This is the server portion. You will pass a config file to it as the only argument.
There is also a simple JSON server in
./server/proxy as an alternative to connecting via gRPC.
You can query the server using the cli program to test.
./bin/gs++-cli --validate 508e543ff30ffe670e30ebd281ab25ebe6767071e87decbb958230a7760936ae
This is a small utility to debug SLP transactions. Just pass the txdata as hex as the only argument.
This is a small utility to debug cached blocks. Just pass the blockdata as hex as the only argument.
./bin/blockdecoder `xxd -c10000000000 -p ../cache/slp/610/610104`
We have a few unit tests, please help add to these. Many of the tests come from the slp-unit-test-data repository.
Please read the README which will describe how to set this up.
You can use any grpc client to connect to a running server. It is recommended you disable max message size. Use the definitions in the
gs++: look into sending txs and early exit based on that
add grpc queries for look up slp utxos by scriptpubkey look up slp utxos for a specific token by scriptpubkey look up all utxos for a specific token by scriptpubkey look up slp utxo look up slp token (stats/details + minting baton)
rollback using transactions instead of input/output rollback slp as well
track block headers so we know when to automatically rollback
rest: add broadcast endpoint add gettxproof endpoint
look up slp utxos by scriptpubkey look up slp utxos for a specific token by scriptpubkey look up all utxos for a specific token by scriptpubkey look up slp utxo look up slp token (stats/details + minting baton)