Raiden on Private Network Tutorial
##################################

Introduction
============

This tutorial shows how to run Raiden on a private network, using the ``master`` branch (this is useful when you are working on a pull-request).  Also this tutorial assumes Ubuntu 18.04.2 LTS.

Creating a Virtual Environment
==============================

In a shell, run

.. code:: bash

 $ sudo apt-get install libncurses5-dev
 $ rm -rf priv_chain
 $ mkdir priv_chain
 $ cd priv_chain
 $ virtualenv -p python3.7 env
 $ source env/bin/activate

You should now be in the virtual environment, where all Python package installations are separately managed.

Now the command prompt should look like:

.. code:: bash

 (env) $


Install Raiden and dependencies
===============================

.. code:: bash

 (env) $ pwd
 <snip>/priv_chain
 (env) $ git clone https://github.com/raiden-network/raiden
 (env) $ cd raiden
 (env) $ pip install -r requirements.txt -c constraints.txt -e .

Launch a private network
========================

Create an account
-----------------

Start mining
------------

Figure out the contract version
===============================

Deploy contracts
================

Raiden on Private Network Tutorial
##################################

Introduction
============

This tutorial shows how to run Raiden on a private network, using the ``master`` branch (this is useful when you are working on a pull-request).  Also this tutorial assumes Ubuntu 18.04.2 LTS.

Creating a Virtual Environment
==============================

In a shell, run

.. code:: bash

 $ sudo apt-get install libncurses5-dev
 $ rm -rf priv_chain
 $ mkdir priv_chain
 $ cd priv_chain
 $ virtualenv -p python3.7 env
 $ source env/bin/activate

You should now be in the virtual environment, where all Python package installations are separately managed.

Now the command prompt should look like:

.. code:: bash

 (env) $


Install Raiden and dependencies
===============================

.. code:: bash

 (env) $ pwd
 <snip>/priv_chain
 (env) $ git clone https://github.com/raiden-network/raiden
 (env) $ cd raiden
 (env) $ pip install -r requirements.txt -c constraints.txt -e .

Launch a private network
========================

Installing Geth
---------------

Follow `the guide <https://geth.ethereum.org/install-and-build/Installing-Geth>`__ and install Geth. A command ``geth`` should be available in your shell. This guide assumes version 1.8.23, but other versions might work.

Preparing a genesis config
--------------------------


Create an account
-----------------

Start mining
------------

Figure out the contract version
===============================

Deploy contracts
================

Add a section about installing geth
Add a section about installing geth
