Git Product home page Git Product logo

lbryumx's Introduction

Build Status Coverage Status Docker Automated build

LbryumX - The LBRY Electrum Protocol Server

LbryumX running

LbryumX is an extension of electrumx that provides the server side of LBRY Electrum Protocol.

Running from Docker

Installing from Docker is the best way to have a monitored and always up-to-date server. Watchtower ensures the Docker container will be running and checks for image updates every 5 minutes. To install it, just try:

sudo docker run -d --name watchtower  -v /var/run/docker.sock:/var/run/docker.sock \
    v2tec/watchtower --label-enable --cleanup

Then, install and run lbrycrd with -txindex:

./lbrycrdd -server -txindex -rpcuser=lbry -rpcpassword=mySuperSecurePassword -port=19245

Finally, start the server:

sudo docker run -v database:/database --ulimit nofile=90000:90000 \
    -e DB_DIRECTORY=/database --net="host" \
    -e DAEMON_URL=http://lbry:[email protected]:19245 \
    -d --label=com.centurylinklabs.watchtower.enable=true lbry/lbryumx:latest

This will create a volume called database, set the number of open files higher, use the host networking, set the RPC URL and label it as a watchtower monitored container. For more information on the available environment variables, see electrumx documentation. Environment variables are set on the container using -e as you can see in the above command.

Installing from source on a Python virtual environment

  1. Make sure you have Python 3.6 installed.
  2. Create a new virtual environment.
  3. Clone and install electrumx (this fork just makes it available as a module)
    $ git clone -b packages https://github.com/lbryio/electrumx.git electrumx
    $ pip install -e electrumx/.
  4. Clone and install lbryumx:
    $ git clone https://github.com/lbryio/lbryumx.git
    $ pip install -r requirements.txt
    $ pip install -e .

Usage

Lbryumx connects to an instance of lbrycrd and provides an electrum protocol server with wallet commands and custom commands for claims. For using it, you will need a lbry daemon or any final release of the LBRY app.

Example Usage

Given that you have installed a LBRY daemon or a LBRY app, edit ~/.lbrynet/daemon_settings.yml for setting your server as the default one:

lbryum_servers:
    - my.lbryumx.server:50001

Then start and use the app or daemon normally.

Running from Source

For running the server, all configurations are set over environment variables then we just run lbryumx_server.py, for instance:

TCP_PORT=50001 HOST=0.0.0.0 COIN=LBC DAEMON_URL=http://lbry:lbry@localhost:9245/ DB_DIRECTORY=/tmp/testx BANDWIDTH_LIMIT=10000 MAX_SESSIONS=1000 python3.6 lbryumx_server.py

If you're still stuck, create an issue with the output of that command, your system info, and any other information you think might be helpful.

Contributing

Contributions to this project are welcome, encouraged, and compensated. For more details, see lbry.io/faq/contributing

The master branch is regularly built and tested, but is not guaranteed to be completely stable. Releases are created regularly to indicate new official, stable release versions.

Testing and code review is the bottleneck for development; we get more pull requests than we can review and test on short notice. Please be patient and help out by testing other people's pull requests, and remember this is a security-critical project where any mistake might cost people lots of money.

Developers are strongly encouraged to write unit tests for new code, and to submit new unit tests for old code. Unit tests can be run with: py.test -v

The Travis CI system makes sure that every pull request is built, and that unit and sanity tests are automatically run. Then, after a success round of tests, a new Docker image is published.

License

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

Security

We take security seriously. Please contact [email protected] regarding any security issues. Our PGP key is here if you need it.

Contact

The primary contact for this project is @shyba ([email protected])

lbryumx's People

Contributors

eukreign avatar shyba avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.