Skip to content

Commit

Permalink
added p2pool for vertcoin
Browse files Browse the repository at this point in the history
  • Loading branch information
donSchoe committed Jan 27, 2014
1 parent 5dc2585 commit acbf46d
Show file tree
Hide file tree
Showing 120 changed files with 24,223 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.o
*.so
*.pyc
data/*
vertcoin_scrypt/build/*
p2pool-scanner/index.html
p2pool-scanner/node_modules/*
p2pool-scanner/p2pool-vertcoin-public.json
674 changes: 674 additions & 0 deletions COPYING

Large diffs are not rendered by default.

99 changes: 99 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# === makefile ------------------------------------------------------------===

ROOT=$(shell pwd)
CACHE_ROOT=${ROOT}/.cache
PKG_ROOT=${ROOT}/.pkg

-include Makefile.local

.PHONY: all
all: ${PKG_ROOT}/.stamp-h

.PHONY: check
check: all
"${PKG_ROOT}"/bin/coverage run "${PKG_ROOT}"/bin/trial p2pool
"${PKG_ROOT}"/bin/coverage xml -o build/report/coverage.xml

.PHONY: run
run: all
"${PKG_ROOT}"/bin/python run_p2pool.py

.PHONY: shell
shell: all
"${PKG_ROOT}"/bin/ipython

.PHONY: mostlyclean
mostlyclean:
-rm -rf build
-rm -rf .coverage

.PHONY: clean
clean: mostlyclean
-rm -rf "${PKG_ROOT}"

.PHONY: distclean
distclean: clean
-rm -rf "${CACHE_ROOT}"

.PHONY: maintainer-clean
maintainer-clean: distclean
@echo 'This command is intended for maintainers to use; it'
@echo 'deletes files that may need special tools to rebuild.'

.PHONY: dist
dist:

# ===--------------------------------------------------------------------===

${CACHE_ROOT}/virtualenv/virtualenv-1.10.1.tar.gz:
mkdir -p ${CACHE_ROOT}/virtualenv
sh -c "cd ${CACHE_ROOT}/virtualenv && curl -O https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.10.1.tar.gz"

${PKG_ROOT}/.stamp-h: conf/requirements*.pip ${CACHE_ROOT}/virtualenv/virtualenv-1.10.1.tar.gz
# Because build and run-time dependencies are not thoroughly tracked,
# it is entirely possible that rebuilding the development environment
# on top of an existing one could result in a broken build. For the
# sake of consistency and preventing unnecessary, difficult-to-debug
# problems, the entire development environment is rebuilt from scratch
# everytime this make target is selected.
${MAKE} clean

# The ``${PKG_ROOT}`` directory, if it exists, is removed by the
# ``clean`` target. The PyPI cache is nonexistant if this is a freshly
# checked-out repository, or if the ``distclean`` target has been run.
# This might cause problems with build scripts executed later which
# assume their existence, so they are created now if they don't
# already exist.
mkdir -p "${PKG_ROOT}"
mkdir -p "${CACHE_ROOT}"/pypi

# ``virtualenv`` is used to create a separate Python installation for
# this project in ``${PKG_ROOT}``.
tar \
-C "${CACHE_ROOT}"/virtualenv --gzip \
-xf "${CACHE_ROOT}"/virtualenv/virtualenv-1.10.1.tar.gz
python "${CACHE_ROOT}"/virtualenv/virtualenv-1.10.1/virtualenv.py \
--clear \
--distribute \
--never-download \
--prompt="(p2pool) " \
"${PKG_ROOT}"
-rm -rf "${CACHE_ROOT}"/virtualenv/virtualenv-1.10.1

# readline is installed here to get around a bug on Mac OS X which is
# causing readline to not build properly if installed from pip.
"${PKG_ROOT}"/bin/easy_install readline

# pip is used to install Python dependencies for this project.
for reqfile in conf/requirements*.pip; do \
"${PKG_ROOT}"/bin/python "${PKG_ROOT}"/bin/pip install \
--download-cache="${CACHE_ROOT}"/pypi \
-r $$reqfile; \
done

# All done!
touch "${PKG_ROOT}"/.stamp-h

# ===--------------------------------------------------------------------===
# End of File
# ===--------------------------------------------------------------------===
97 changes: 94 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,95 @@
p2pool-vtc
==========
Requirements:
-------------------------
Generic:
* Vertcoin >=0.8.5
* Python >=2.6
* Twisted >=10.0.0
* python-argparse (for Python =2.6)

Linux:
* sudo apt-get install python-zope.interface python-twisted python-twisted-web
* sudo apt-get install python-argparse # if on Python 2.6

Windows:
* Install Python 2.7: http://www.python.org/getit/
* Install Twisted: http://twistedmatrix.com/trac/wiki/Downloads
* Install Zope.Interface: http://pypi.python.org/pypi/zope.interface/3.8.0
* Install python win32 api: http://sourceforge.net/projects/pywin32/files/pywin32/Build%20218/
* Install python win32 api wmi wrapper: https://pypi.python.org/pypi/WMI/#downloads
* Unzip the files into C:\Python27\Lib\site-packages

Running P2Pool:
-------------------------
To use P2Pool, you must be running your own local bitcoind. For standard
configurations, using P2Pool should be as simple as:

python run_p2pool.py

Then run your miner program, connecting to 127.0.0.1 on port 9332 with any
username and password.

If you are behind a NAT, you should enable TCP port forwarding on your
router. Forward port 9333 to the host running P2Pool.

Run for additional options.

python run_p2pool.py --help

Donations towards further development:
-------------------------
1HNeqi3pJRNvXybNX4FKzZgYJsdTSqJTbk

Official wiki :
-------------------------
https://en.bitcoin.it/wiki/P2Pool

Alternate web front end :
-------------------------
* https://github.com/hardcpp/P2PoolExtendedFrontEnd

Notes for Vertcoin:
=========================
Requirements:
-------------------------
In order to run P2Pool with the Vertcoin network, you would need to build and install the
ltc_scrypt module that includes the scrypt proof of work code that Vertcoin uses for hashes.

Linux:

cd vertcoin_scrypt
sudo python setup.py install

Windows (mingw):
* Install MinGW: http://www.mingw.org/wiki/Getting_Started
* Install Python 2.7: http://www.python.org/getit/

In bash type this:

cd vertcoin_scrypt
C:\Python27\python.exe setup.py build --compile=mingw32 install

Windows (microsoft visual c++)
* Open visual studio console

In bash type this:

SET VS90COMNTOOLS=%VS110COMNTOOLS% # For visual c++ 2012
SET VS90COMNTOOLS=%VS100COMNTOOLS% # For visual c++ 2010
cd vertcoin_scrypt
C:\Python27\python.exe setup.py build --compile=mingw32 install

If you run into an error with unrecognized command line option '-mno-cygwin', see this:
http://stackoverflow.com/questions/6034390/compiling-with-cython-and-mingw-produces-gcc-error-unrecognized-command-line-o

Running P2Pool:
-------------------------
Run P2Pool with the "--net vertcoin" option.
Run your miner program, connecting to 127.0.0.1 on port 9171.

Sponsors:
-------------------------

Thanks to:
* The Bitcoin Foundation for its generous support of P2Pool
* The Litecoin Project for its generous donations to P2Pool

P2Pool node for Vertcoin including node scanner
Loading

0 comments on commit acbf46d

Please sign in to comment.