2 BTC bounty for improving performance of Bitsquare on Raspberry Pi


Edit: Bounty has been paid.

The previous bounty for getting bitsquare to run on raspberry was pretty successful and got bitsquare to compile, install and run on raspberry pi. Unfortunately it runs too slow, and the bounty did not include any requirement for that.

This bounty is to improve the performance so that bitsquare will run smoothly on raspberry pi.

As I am the bounty creator I’ll be testing the scripts on my Raspberry Pi 2 Model B. So that’s the model it needs to work on.

The bounty requirements:

  • Making a script that compiles and installs (and updates) bitsquare on rpi2b (with Rasbian Jessie 4.x as OS) successfully with all dependencies and prerequisites included. (This is already done in the previous bounty, grab the script(s) needed from that topic and build on that… or create your own if you want)
  • Bitsquare needs to run smoothly, which means it needs to be fully usable and functional and the GUI should respond quickly. Since “quickly” may be a bit diffuse, let’s make it a requirement that the GUI updates/redraws should not take longer than 3 seconds. So if I click for example “portfolio”, it should appear within 3 seconds.
  • Maybe this bounty will require some optimization of the bitsquare code itself to get it working, if so, include that patch in the install script and submit a pull request.
  • The launch time should be reasonable, and syncing should not take more than 24 hours.
  • The code should be open source and free so that it can be enjoyed by the entire community

Bounty BTC address is:

I can also pay the bounty as Monero if preferred.

Anyone can contribute to the bounty by sending BTC to the address above or reply that they want to pledge an amount (and pay after bounty is fulfilled). The address is secure in my cold storage.

I have transferred 1 BTC to the address. So that is the current bounty, keep an eye on the address or the topic for new contributions.

Since we don’t know if this bounty can be accomplished or not there will be an expiration date for the bounty. If the bounty is not claimed by July 1st 2017 all funds will be returned to the identified donators or forwarded to bitsquare, or upon my discretion with input from other donators the expiration date will be extended.


I added 0.5 BTC to this important bounty. I agree to Manfreds recommendations for bounties and let TheKoziTwo decide if the task has been accomplished to satisfaction.


Pinging the previous contributors in case they want to try and claim this new bounty


Please note that you can disable animations under Settings, so popups are displayed without animation which causes slow rendering on weak machines.
I added 0.5 BTC as well.


I’ll start looking at this and pick up a rpi B in the morning.



I don’t know where is the problem of optimisation but I think if we add some memory in the application, maybe the problem is resolved.

And, I don’t have a raspberry pi to test my Script so can you test for me?



As suggested by Frederic94500 I tried the obvious idea to increase heap memory allocation pool with the “-Xmx” switch but it didn’t help, it takes still 10+ minutes to start. It’s kind of funny that during this start phase both the CPU load and RAM usage are quite low, so one wonders what’s acutally going on here. Maybe OpenJFX is just very lame for ARM arch. respectively the Pi… will take further look within the next days.


I am improving performance atm in teh development branch (prob. there will be a new release soon). So if you test better use that build instead of master.


After some trial and error I managed to get it running relatively smoothly. I’d say within the specification, it is well usable. There might be some privacy disadvantages for now.

I used metabit’s version of the installation script as it uses the oracle java sdk which is way faster on arm. (I would give 25% of any bounty received to him, maybe he has even more performance improving ideas).


  • start install script and wait a long time: https://github.com/phosphorit/bitsquare-on-raspberry-pi
  • In raspi-config set video memory to 128mb (leave opengl off as it can cause errors)
  • sudo su # this openjfx version will run in full screen and only as root (could not yet get around that)
  • start like this:
    /usr/bin/java -Dsun.java2d.opengl=True -Xmx256m -jar /home/pi/bitsquare/gui/target/shaded.jar --useTorForHttp false --useTorForBtc false --maxConnections 6 --logLevel OFF
  • you might have to manually create a missing folder as in the error message and try again

I also did this but probably not all is necessary:
  • use a fast sd card
  • set cpu frequency governor to performance
  • set swap file size to 0
  • use cable lan instead of wifi

Now on to some more testing and clean up.

p.s.: if someone here can pm or email metabit please do so as I don’t seem to be able.
p.s.2.: I also disabled animations from the settings but it does not seem to stick. I really would prefer an editable config file.
p.s.3 edited: opengl should stay turned off in raspi-config (it still works on my setup with the option alone but has little impact anyway)
p.s.4: path corrected (no /src/)
p.s. 5: added new script


I ran it, but got this error when trying to launch:

root@raspberrypi:/home/pi# /usr/bin/java -Dsun.java2d.opengl=True -Xmx256m -jar /home/pi/bitsquare/gui/target/shaded.jar --useTorForHttp false --useTorForBtc false --maxConnections 6 --logLevel OFF Exception in thread "main" java.lang.UnsupportedClassVersionError: io/bitsquare/app/BitsquareAppMain : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:803) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482) root@raspberrypi:/home/pi#


odd, I will try it from a fresh image


@TheKoziTwo there is a java 7 version on that image so you need to choose the correct java version jdk1.8.0…:
sudo update-alternatives --config java

I have created an updated install script: https://github.com/phosphorit/bitsquare-on-raspberry-pi/blob/master/bitsquare.sh

The path was wrong in the start command above (‘src’), fixed now.


I launched it 15 minutes ago, but so far nothing has happened. How long did the launch take for you?


It should not take longer than a minute.

Did you make yourself root? sudo su?

Were there any errors above the blue text? In white?

With the script above it worked for me with a fresh install with only a few commands. I will do it again and write down every step.


I ran it again now…

Above the blue text it says:

Dispman: Cannot open display


This only works with a screen directly attached. Otherwise it sounds like you may have opengl activated in raspi-config? Contrary to what I wrote at the beginning opengl needs to be (left) deactivated in raspi-config.

Sorry you run into so much trouble. I will try to streamline things a bit more tomorrow.


OK, I disabled OpenGL. It works now. UI updates are ok, maybe 2-3 sec. Looks very good so far, I think you may have nailed it. Good job


Wow congrats guys!!!


Step by step instructions:

  • start with fresh standard jessie image: https://www.raspberrypi.org/downloads/raspbian/
  • set up wifi in GUI / check LAN connection
  • sudo raspi-config --> advanced --> memory split --> 128 --> reboot
  • git clone https://github.com/phosphorit/bitsquare-on-raspberry-pi
  • cd bitsquare-on-raspberry-pi
  • chmod 777 bitsquare.sh
  • ./bitsquare.sh # this will take about an hour; can also be used to update bitsquare & bitcoinj
  • sudo su
  • ./start.sh


It was not expected this would work, but you proved the world wrong. Congrats!!