Skip to content

algotechio/samourai-dojo-electrs

 
 

Repository files navigation

Samourai Dojo with Rust Electrum Server

Fork of Samourai Dojo with added support for electrs - romanz' light weight implementation of Electrum Server in Rust.

Installation

MyDojo (installation with Docker and Docker Compose)

For installation of Samourai Dojo, view Dojo's documentation

Electrs

The electrs server is now part of dojo folowing the same coding pattern as explorer.

By default the electrs will start with dojo.sh start. If you don't want to run electrs server, simply modify the following line in ./docker/my-dojo/conf/docker-electrs.conf:

ELECTRS_INSTALL=off

You also configure additional options when running electrs. For example, you may want to limit index-batch-size if you are running on limited hardware (Raspberry Pi or similar)

ELECTRS_OPTIONS="--index-batch-size=10"

Useful reference:

Adding electrs to existing dojo installation

If you are adding electrs to existing dojo installation, you need to fully remove the tor container, its storage and image (because the tor services are configured in ./docker/my-dojo/tor/restart.sh and this file is added to the docker image during build time):

TODO: The restart.sh script could be mounted using VOLUME

docker container rm -f tor
docker volume rm my-dojo_data-tor
docker image ls   # get the tor image id of samouraiwallet/dojo-tor
docker image rm <imageid>   # image id of samouraiwallet/dojo-tor

After that you can run ./dojo.sh start and the tor's image will be rebuilt

Electrum wallet (client)

Prerequisites:

  • Configure the tor proxy on your computer (google how to install this on your computer)
  • <onion address> generated by dojo's tor (check by dojo.sh onion)

Start from command line

The safest is to start electrum server from command line to make sure that when you startup the wallet it does not connect to random servers:

electrum --oneserver --server <your-onion-address>.onion:50001:t --proxy socks5:127.0.0.1:<tor proxy port>

Edit electrum config file

Alternatively, edit ~/.electrum/config and change the following parameters (which has the same effect as the above command line):

"oneserver": true,
"proxy": "socks5:127.0.0.1:9060::",
"server": "<onion address>.onion:50001:t",

Useful reference:

Packages

No packages published

Languages

  • JavaScript 80.5%
  • Shell 10.7%
  • Smarty 3.3%
  • Dockerfile 2.6%
  • CSS 1.7%
  • HTML 1.2%