No description
Find a file
2022-04-11 03:19:59 +00:00
.github/workflows cleanup 2021-12-07 07:05:01 -05:00
db use chainhash.Hash types from lbcd where appropriate 2022-04-11 03:19:59 +00:00
docker Progress of reading rocksdb 2021-12-11 17:22:45 -05:00
internal More cleanup 2022-04-11 01:40:29 +00:00
meta we're doing grpc 2021-03-18 17:24:48 -04:00
protobuf more cleanup / refactor. almost ready for another review 2022-04-06 19:53:43 +00:00
scripts update script 2021-12-12 18:42:55 -05:00
server More cleanup 2022-04-11 01:40:29 +00:00
testdata More tests 2022-02-23 19:43:52 -05:00
.gitignore Try adding test db with git-lfs 2021-12-07 06:45:18 -05:00
action.yml qwer 2021-12-06 22:39:30 -05:00
diagram.png add diagram 2021-03-19 15:10:32 -04:00
docker-compose-hub-server.yml I think network_mode: host is correct here 2021-06-04 14:14:13 -04:00
go.mod use chainhash.Hash types from lbcd where appropriate 2022-04-11 03:19:59 +00:00
go.sum use chainhash.Hash types from lbcd where appropriate 2022-04-11 03:19:59 +00:00
LICENSE we're doing grpc 2021-03-18 17:24:48 -04:00
main.go More cleanup 2022-04-11 01:40:29 +00:00
readme.md some cleanup 2022-03-24 18:47:58 -04:00
signal.go signal handling code files 2022-03-07 20:26:25 +00:00
signalsigterm.go more cleanup / refactor. almost ready for another review 2022-04-06 19:53:43 +00:00
version.txt v0.2021.12.06.1 2021-12-06 17:42:34 -05:00

LBRY Hub

A hub provides back-end services to LBRY clients. Services include

  • URL resolution
  • search
  • wallet services (getting and sending transactions, address subscription)
  • hub federation and discovery

This project will eventually subsume and replace the wallet server and the lighthouse search provider.

Installation

No install instructions yet. See Contributing below.

Usage

Prerequisite: run python block processor and search plugin

Follow the instructions here.

Run this hub

./hub serve

Search for stuff

./hub search text goes here

Contributing

Contributions to this project are welcome, encouraged, and compensated. Details here.

Dev Dependencies

Install Go 1.14+

  • Ubuntu: sudo add-apt-repository ppa:longsleep/golang-backports && sudo apt install golang-go
  • OSX: brew install go
  • Windows https://golang.org/doc/install

Download protoc from https://github.com/protocolbuffers/protobuf/releases and make sure it is executable and in your path.

Install Go plugin for protoc and python:

go get google.golang.org/protobuf/cmd/protoc-gen-go google.golang.org/grpc/cmd/protoc-gen-go-grpc
pip install grpcio grpcio-tools github3.py

Lastly the hub needs protobuf version 3.17.1, it may work with newer version but this is what it's built with, on ubuntu systems you'll have to install this from source see the GitHub actions in .github/workflows for an example of this.

Install rocksdb and setup your CGO flags, on ubuntu

sudo apt-get install libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev libzstd-dev liblz4-dev
export CGO_CFLAGS="-I/path/to/rocksdb/include"
export CGO_LDFLAGS="-L/path/to/rocksdb -lrocksdb -lstdc++ -lm -lz -lsnappy -llz4 -lzstd -lbz2"
https://github.com/protocolbuffers/protobuf/releases/download/v3.17.1/protobuf-all-3.17.1.tar.gz

If you can run ./protobuf/build.sh without errors, you have go and protoc installed correctly.

Finally, run the block processor as described under Usage.

Running from Source

Run ./dev.sh to start the hub. The script will restart the hub as you make changes to *.go files.

To search, use go run . search text goes here.

Windows

reflex doesn't work on windows, so you'll need to run go run . serve and restart manually as you make changes.

License

This project is MIT licensed. For the full license, see LICENSE.

Security

We take security seriously. Please contact security@lbry.com regarding any security issues. Our PGP key is here if you need it.

Contact

The primary contact for this project is @lyoshenka (grin@lbry.com).