Skip to main content

Stratum server implementation based on Twisted

Project description

Description:
============
This is server implementation of Stratum protocol
using asynchronous networking written in Python Twisted.

Homepage: http://stratum.bitcoin.cz

Contact to main developer:
==========================
Email info at bitcoin.cz
Nickname slush at bitcointalk.org forum

Installation
============

Requirements:
python 2.6 or 2.7
linux-based system (should work on Mac OS too, not tested)

Following instructions will work on Ubuntu & Debian*:

a) From GIT, for developers
git clone git://gitorious.org/stratum/server.git
sudo apt-get install python-dev
sudo python setup.py develop

b) From package, permanent install for production use
sudo apt-get install python-dev
sudo apt-get install python-setuptools
sudo easy_install stratum

*) Debian don't have a 'sudo' command, please do the installation
process as a root user.

Configuration
=============

a) Basic configuration
Copy config_default.py to config.py
Edit at least those values: HOSTNAME, BITCOIN_TRUSTED_*

b) Message signatures
For enabling message signatures, generate server's ECDSA key by
python signature.py > signing_key.pem
and fill correct values to SIGNING_KEY and SIGNING_ID (config.py)

c) Creating keys for SSL-based transports
For all SSL-based transports (HTTPS, WSS, ...) you'll need private key
and certificate file. You can use certificates from any authority or you can
generate self-signed certificates, which is helpful at least for testing.

Following script will generate self-signed SSL certificate:

#!/bin/bash
openssl genrsa -des3 -out server.key 1024
openssl req -new -key server.key -out server.csr
cp server.key server.key.org
openssl rsa -in server.key.org -out server.key
openssl x509 -req -in server.csr -signkey server.key -out server.crt

Then you have to fill SSL_PRIVKEY and SSL_CACERT in config file with
values 'server.key' and 'server.crt'.

Startup
=======
Start devel server:
twistd -ny launcher.tac

Devel server *without* lowlevel messages of Twisted:
twistd -ny launcher.tac -l log/twistd.log

Running in production
=====================
TODO: Guide for running twistd as a daemon, init scripts
TODO: Loadbalancing and port redirecting using haproxy
TODO: Tunelling on 80/443 using stunnel
Any volunteer for this ^ ?

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stratum-0.2.11.tar.gz (30.5 kB view details)

Uploaded Source

File details

Details for the file stratum-0.2.11.tar.gz.

File metadata

  • Download URL: stratum-0.2.11.tar.gz
  • Upload date:
  • Size: 30.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for stratum-0.2.11.tar.gz
Algorithm Hash digest
SHA256 0a79b529cff9b6c5e442d49ed06ef2be3914b30cbee0a29405d96103c5fd8528
MD5 53dced78554ba4cdb18af4114f1bb4e4
BLAKE2b-256 ab316653669067dbee6f2a163abc8cb9d312160f19c2388271a4fdaf2196c6ed

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page