-
Recompile lbrycrd with a normalization fork height on regtest less than 100.
-
From SDK install instructions:
sudo apt-get install build-essential python3.7 python3.7-dev git python-virtualenv libssl-dev python-protobuf
-
Download torba repo:
git clone https://github.com/lbryio/torba
This is optional: you can use the pypi torba that is pulled automatically as part of step 9.
-
Download lbry repo:
git clone [https://github.com/lbryio/lbry](https://github.com/lbryio/lbry) && cd lbry
-
Go to the right branch if it's not in master yet: git checkout handle_case_insensitivity
-
Set up virtual environment:
virtualenv lbry-venv --python=python3.7
-
Go into the virtual environment (done every time):
source lbry-venv/bin/activate
-
Install torba:
cd ../torba && pip install -e .
-
Install lbry:
cd ../lbry && pip install -e .
-
Verify that the unit tests pass:
python -m unittest discover tests
-
Run SDK locally:
orchstr8 —blockchain 127.0.0.1 —spv 127.0.0.1 —wallet 127.0.0.1 &
(spv refers to the wallet server, blockchain refers to lbrycrd, wallet refers to the wallet client.) -
After a minute, verify that it's working:
../torba/torba/bin/lbrycrd-cli -regtest -rpcuser=rpcuser -rpcpassword=rpcpassword -rpcport=9246 getinfo
-
Kill the orchstr8 job. Alternately, you could set up the folder for step 14 using
orchstr8 download
instead of running an instance of everything. -
Replace the files in ../torba/torba/bin with links to your local lbrycrd build with something like:
ln -s ~/Workspace/lbrycrd/src/lbrycrd-cli .
(from the torba/torba/bin folder after you removed the files) -
Download desktop app:
cd .. && git clone [https://github.com/lbryio/lbry-desktop](https://github.com/lbryio/lbry-desktop) && cd lbry-desktop
-
Go to the branch for normalization if it hasn't been merged yet.
-
Install yarn and nodejs if necessary and go to the lbry-desktop folder.
-
Pull the app's dependencies:
yarn
-
Rerun orchstr8 as in step 11.
-
Run the app:
yarn dev
-
Verify that the app output shows "failed to bind TCP localhost:5279 for listening. Daemon is already running", meaning that it connected successfully to your local wallet. Also, you should see 10 coins in your wallet as orchstr8 goes 110 blocks.
Note: if any step complains about missing TORBA_LEDGER:
export TORBA_LEDGER=lbrynet.extras.wallet
Caveat 1: we're not using a local lighthouse build yet
Lighthouse is used for the search features in the desktop app. It's URL is hard-coded in the app. Sean was going to add a LBRY_LIGHTHOUSE environment variable to override it. I don't see that it's there yet, though. Lighthouse gets its data from Chainquery — you would need both of those pulling from your temporary regtest instance (spawned by orchstr8) , which means that perhaps orchstr8 should also incorporate them. (And my personal opinion is that the we should only have one indexer — the wallet server and lighthouse should be combined.)
Caveat 2 (the worst one): step 11 (orchstr8) doesn't actually work
The wallet parameter isn't fully implemented. As a temporary work-around, there is a commented-out unit test in test_commands.py that will run the framework indefinitely. It's named test_full_stack . You can run that test to start the SDK. You can run it from PyCharm. Install PyCharm (community edition); it does a good job of detecting the virt-env folder in lbry. From there open test_commands.py and use the gutter commands to run the tests there.
Alternatively, you could run orchestr8 with only spv and blockchain params. You could then run lbrynet manually. Use the example config file, but change the folders in it to point to the folder generated by orchstr8. Also change the lbryum_server parameter there.