Skip to content
Shawn Wilkinson edited this page Feb 22, 2015 · 30 revisions

This FAQ will be populated with questions (and associated answers/solutions/advice) that arise during the course of testing with Group A.

How do I install and use Downstream Farmer?

To participate in Group A testing, you will need to have been a Storj crowdsale participant, have access to the SJCX address you used during the crowdsale, and have at least 10,000 SJCX associated with this address.

Downstream-farmer can be installed on Windows, OSX and Ubuntu:

Windows

  1. Download the latest release of downstream-farmer here. Please only use v0.1.5, as the newer versions will not work with the current live cluster.

  2. Unzip the file.

  3. The uncompressed directory should contain a downstream.exe file and a directory data which contains an identities.json file.

  4. You will need to created a signed message in order to prove that you own the SJCX address you would like to farm with. To do this, open your favorite wallet software (e.g. mainline Bitcoin client, Armory, Counterwallet, Electrum, and Multibit), and sign a message of your choice. For instance, on Counterwallet, perform the following steps:

    1. In Address Actions click Sign Message. step1

    2. Type a message of your choice and click Sign. step2

    3. Then, open data/identities.json in your favorite text editor (e.g. Notepad) and copy and paste your Address, the message you typed, and the created signature. Use the JSON format shown, or you will not be able to connect. step3

    Ensure that any whitespace in the message is included in the JSON string and that it is enclosed with double quotes.

    1. Save the file. Now data/identities.json contains a signed message proving ownership of your SJCX address.
  5. Finally, run the following command in the uncompressed directory:

     .\downstream.exe
    

which should request 100 bytes of data from the live.driveshare.org cluster and then begin proving challenges. The current setup can request more data, but we recommend you keep it at 100 bytes until the next release.

Due to the nature of this test, the farmer will run out of challenges after 256 heartbeats, and will automatically request a new data chunk to fill the requested space. You will see this occur if you leave your farmer running for approximately 4 and a half hours.

You can see the data chunks your farmer is hosting by browsing to the data/chunks directory.

Ubuntu

Note: These installation instructions were tested on Ubuntu 14.04 and 14.10. Please ensure you have Python 2.7.6 and Pip 1.5.x or greater installed.

  1. Run the following commands to install dependencies and the farmer.

    1. With Pip:

       $ sudo apt-get update
       $ sudo apt-get install python-dev libcrypto++-dev libgmp-dev git python-pip build-essential
       $ sudo pip install downstream-farmer
      

      Note: It is recommended to install downstream-farmer inside a virtual environment instead to prevent conflicts with your system's Python or packages. See the alternate source instructions below for guidance. Note: --process-dependency-links should not be required for versions of downstream-farmer greater than v0.1.7.

    2. From source:

       $ sudo apt-get update
       $ sudo apt-get install python-dev libcrypto++-dev libgmp-dev git python-pip build-essential
       $ sudo pip install virtualenv virtualenvwrapper
       $ wget https://github.com/Storj/downstream-farmer/archive/v0.x.x.tar.gz
       $ mkdir ~/.virtualenvs
       $ export WORKON_HOME="~/.virtualenvs"
       $ echo "export WORKON_HOME=$WORKON_HOME" >> ~/.bashrc
       $ echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bashrc
       $ echo "export PIP_VIRTUALENV_BASE=$WORKON_HOME" >> ~/.bashrc 
       $ source ~/.bashrc
       $ mkvirtualenv farmer
       $ tar xzvf v0.x.x.tar.gz
       $ cd downstream-farmer-0.x.x/
       $ python setup.py install
       $ sudo ln -s /home/<your_username>/.virtualenvs/farmer/bin/downstream /usr/local/bin/downstream
       $ deactivate
      
  2. You will need to created a signed message in order to prove that you own the SJCX address you would like to farm with. To do this, open your favorite wallet software (e.g. mainline Bitcoin client, Armory, Counterwallet, Electrum, and Multibit), and sign a message of your choice. For instance, on Counterwallet, perform the following steps:

    1. In Address Actions click Sign Message. step1

    2. Type a message of your choice and click Sign. step2

    3. Using the terminal, move to a directory where you have write access and create a data folder and an identities.json file inside of it.

       $ cd ~/Desktop
       $ mkdir data
       $ cd data
       $ touch identities.json
      
    4. Next, open identities.json in a text editor (e.g. nano, Sublime Text, vim) and copy and paste your Address, the message you type,d and the created signature. Use the JSON format shown or you will not be able to connect:

       {
         "19qVgG8C6eXwKMMyvVegsi3xCsKyk3Z3jV": {
           "message": "test message",
           "signature": "HyzVUenXXo4pa+kgm1vS8PNJM83eIXFC5r0q86FGbqFcdla6rcw72/ciXiEPfjli3ENfwWuESHhv6K9esI0dl5I="
         }
       }
      

    Ensure that any whitespace in the message is included in the JSON string and that it is enclosed with double quotes.

    1. Save the file. Now data/identities.json contains a signed message proving ownership of your SJCX address.
  3. Return to the folder containing your `data folder and run the following command in the uncompressed directory:

     $ cd ~/Desktop
     $ downstream
    

which should request 100 bytes of data from the live.driveshare.org cluster and then begin proving challenges. If you would like to contribute more hard drive space for the test, specify a larger size.

Due to the nature of this test, the farmer will run out of challenges after 256 heartbeats, and will automatically request a new data chunk to fill the requested space. You will see this occur if you leave your farmer running for approximately 4 and a half hours.

You can see the data chunks your farmer is hosting by browsing to the data/chunks directory.

OSX

  1. To install downstream-farmer easily on OSX, you can use Homebrew. Install Homebrew by running the following command in a terminal:

     $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
    

    To prevent any issues later, we recommend running brew doctor and following the recommendations (if possible).

  2. Then, run the following commands to add the Storj tap and install downstream-farmer.

     $ brew tap storj/storj
     $ brew install downstream-farmer
    
  3. You will need to create a signed message in order to prove that you own the SJCX address you would like to farm with. To do this, open your favorite wallet software (e.g. mainline Bitcoin client, Armory, Counterwallet, Electrum, and Multibit), and sign a message of your choice. For instance, on Counterwallet, perform the following steps:

    1. In Address Actions click Sign Message. step1

    2. Type a message of your choice and click Sign. step2

    3. Using the terminal, move to a directory where you have write access and create a data folder and an identities.json file inside of it.

       $ cd ~/Desktop
       $ mkdir data
       $ cd data
       $ touch identities.json
      
    4. Next, open identities.json in a text editor (e.g. nano, Sublime Text, vim) and copy and paste your Address, the message you type,d and the created signature. Use the JSON format shown or you will not be able to connect:

       {
         "19qVgG8C6eXwKMMyvVegsi3xCsKyk3Z3jV": {
           "message": "test message",
           "signature": "HyzVUenXXo4pa+kgm1vS8PNJM83eIXFC5r0q86FGbqFcdla6rcw72/ciXiEPfjli3ENfwWuESHhv6K9esI0dl5I="
         }
       }
      

    Ensure that any whitespace in the message is included in the JSON string and that it is enclosed with double quotes.

    1. Save the file. Now data/identities.json contains a signed message proving ownership of your SJCX address.
  4. Return to folder containing your data folder and run downstream to begin farming:

     $ cd ~/Desktop
     $ downstream
    

which should request 100 bytes of data from the live.driveshare.org cluster and then begin proving challenges. If you would like to contribute more hard drive space for the test, specify a larger size.

Due to the nature of this test, the farmer will run out of challenges after 256 heartbeats, and will automatically request a new data chunk to fill the requested space. You will see this occur if you leave your farmer running for approximately 4 and a half hours.

You can see the data chunks your farmer is hosting by browsing to the data/chunks directory.

I'm getting an error that says 'New token requests must include posted signature providing ownership of farming address'. What's up with that?

Be sure to create an identities.json file as describe above for your OS. Also, be sure that you are running your farmer in the folder directly above the data folder. For example, If you have ~/Desktop/data/identities.json then run downstream from ~/Desktop/.