{"id":16735846,"url":"https://github.com/blockparty-sh/cpp_slp_graph_search","last_synced_at":"2025-03-21T21:31:37.971Z","repository":{"id":40733742,"uuid":"208372937","full_name":"blockparty-sh/cpp_slp_graph_search","owner":"blockparty-sh","description":"gs++ | SLP Graph Search Server","archived":false,"fork":false,"pushed_at":"2022-12-11T06:30:47.000Z","size":4228,"stargazers_count":9,"open_issues_count":23,"forks_count":11,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T05:34:24.755Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blockparty-sh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-14T01:33:09.000Z","updated_at":"2022-02-28T05:34:56.000Z","dependencies_parsed_at":"2023-01-26T17:15:16.675Z","dependency_job_id":null,"html_url":"https://github.com/blockparty-sh/cpp_slp_graph_search","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockparty-sh%2Fcpp_slp_graph_search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockparty-sh%2Fcpp_slp_graph_search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockparty-sh%2Fcpp_slp_graph_search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blockparty-sh%2Fcpp_slp_graph_search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blockparty-sh","download_url":"https://codeload.github.com/blockparty-sh/cpp_slp_graph_search/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244874310,"owners_count":20524577,"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","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":[],"created_at":"2024-10-13T00:07:34.123Z","updated_at":"2025-03-21T21:31:36.759Z","avatar_url":"https://github.com/blockparty-sh.png","language":"C","readme":"gs++ | SLP Graph Search Server\n===\n\nWIP\n\nIn-memory SLP Graph Search server. \n\n# Install\n\n\n\n## Install Third Party Libs\n\nInstall recent version of [Boost](https://www.boost.org/)\n\nInstall [SWIG 3](http://www.swig.org)\n\nFollow [this](https://github.com/grpc/grpc/blob/master/BUILDING.md) guide to install gRPC and Protobuf for your system if it is not already installed.\n\n### Condensed install for Debian 10 (Buster)\n\n###### Install Boost, SWIG,  GRPC C++ \u0026 Protobuf from Debian repositories\n```\nsudo apt install libboost-all-dev swig libgrpc++-dev protobuf-compiler-grpc\n``` \n\n###### Install compilation essentials, including libgmp and libzmq libraries.\n```\nsudo apt install apt-transport-https curl gnupg build-essential autoconf libtool pkg-config cmake libgmp-dev libgmp3-dev libzmq3-dev\n```\n\n###### Git Clone This Repo\ngit clone https://github.com/blockparty-sh/cpp_slp_graph_search.git\n\ncd cpp_slp_graph_search\n\nContinue to build. \n\n## Build\n\nThe initial build might take a long time to download and build required dependencies, so grab some coffee.\n\nFrom root directory build like normal CMake program.\n\n```\nmkdir build\ncd build\ncmake ..\nmake -j\n```\n\nYou can use `-DCMAKE_BUILD_TYPE=Debug` for debug build.\n\n### Troubleshooting during building\n* If you have issues compiling successfully but can't find the error...\n\nRun make without the -j switch. ex. *make*\nSince -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.\n\n* Compilation with -j requires at least 8gb of ram. \n\nIf 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.\n\n# Running\n\nExecutables are deposited into the /build/bin subdir after a successful build.\n\nMake sure you have bitcoind running and the following options enabled:\n\n```\ntxindex=1\nserver=1\nrpcuser=bitcoin\nrpcpassword=password\nrpcport=8332\nrpcworkqueue=10000\nrpcthreads=8\nzmqpubhashtx=tcp://*:28332\nzmqpubrawtx=tcp://*:28332\nzmqpubhashblock=tcp://*:28332\nzmqpubrawblock=tcp://*:28332\n```\n\n## gs++\n\nThis is the server portion. You will pass a config file to it as the only argument.\n\n`./bin/gs++ ../config.toml`\n\n## REST\n\nThere is also a simple JSON server in `./server/proxy` as an alternative to connecting via gRPC.\n\n\n## gs++-cli\n\nYou can query the server using the cli program to test.\n\n`./bin/gs++-cli --validate 508e543ff30ffe670e30ebd281ab25ebe6767071e87decbb958230a7760936ae`\n\n## txdecoder\n\nThis is a small utility to debug SLP transactions. Just pass the txdata as hex as the only argument.\n\n`./bin/txdecoder 0200000002168bef68766234af97c65c60f2891be0bc8bbc2894f6517b9a216da95ba12c1f020000006a47304402206fcbf79712d6c84f4367c0ba6d7ec27f4d4690dd65d8c4e49cfe7f543a515736022007d7b4fb3f6315e432c673a8793dc1a7ccbd1e73eeba6498bb636ed409daa0c941210350090260acd0cd7a5f7030b2aad76ec6454626ab0872246031f3809d210e4569ffffffff168bef68766234af97c65c60f2891be0bc8bbc2894f6517b9a216da95ba12c1f030000006b483045022100dabdf03df22031dc386761aa40e15dbb654a42e8dc27803f2de9eda2651236cd02205321628ad9d75dc76d16365cb77c2fa75d03a2497a116b23230eebed2f23f9d741210350090260acd0cd7a5f7030b2aad76ec6454626ab0872246031f3809d210e4569ffffffff040000000000000000406a04534c500001010453454e44207f8889682d57369ed0e32336f8b7e0ffec625a35cca183f4e81fde4e71a538a1080000000000000cdb08000000001936f55b22020000000000001976a9140315c06540c4445792ea3ff407a978ec18da1d8188ac22020000000000001976a9144942f11b739a3835d867554ff93cc6685eb1eb5388ac5fb27100000000001976a9144942f11b739a3835d867554ff93cc6685eb1eb5388ac00000000`\n\n## blockdecoder\n\nThis is a small utility to debug cached blocks. Just pass the blockdata as hex as the only argument.\n\n```\n./bin/blockdecoder `xxd -c10000000000 -p ../cache/slp/610/610104`\n```\n\n## unit tests\n\nWe have a few unit tests, please help add to these. Many of the tests come from the [slp-unit-test-data](https://github.com/simpleledger/slp-unit-test-data) repository.\n\n`./bin/unit-test`\n\n# Fuzzing\n\nPlease read the [README](./fuzz/README.md) which will describe how to set this up.\n\n\n# Integration\n\nYou can use any grpc client to connect to a running server. It is recommended you disable max message size. Use the definitions in the `./pb` directory.\n\n# TODO\n\ngs++:\n    look into sending txs and early exit based on that\n\nadd grpc queries for\n    look up slp utxos by scriptpubkey\n    look up slp utxos for a specific token by scriptpubkey\n    look up all utxos for a specific token by scriptpubkey\n    look up slp utxo\n    look up slp token (stats/details + minting baton)\n\nrollback using transactions instead of input/output\n    rollback slp as well\n\ntrack block headers so we know when to automatically rollback\n\nrest:\n    add broadcast endpoint\n    add gettxproof endpoint\n\n    look up slp utxos by scriptpubkey\n    look up slp utxos for a specific token by scriptpubkey\n    look up all utxos for a specific token by scriptpubkey\n    look up slp utxo\n    look up slp token (stats/details + minting baton)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockparty-sh%2Fcpp_slp_graph_search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblockparty-sh%2Fcpp_slp_graph_search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockparty-sh%2Fcpp_slp_graph_search/lists"}