Bitcoin Forum
October 20, 2017, 12:17:33 AM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: [HOWTO] Setup a p2pool for Feathercoin in VirtualBox  (Read 2353 times)
This is a self-moderated topic. If you do not want to be moderated by the person who started this topic, create a new topic.
Mogumodz
Sr. Member
****
Offline Offline

Activity: 290



View Profile
May 24, 2013, 03:27:38 AM
 #1

Thought I would expand on blastbob's (hope he doesn't mind) wonderful tut for how to setup a FTC p2pool on Ubuntu 12.04 for my memory.
Plus we could always use some more p2pool miners.
I've also added a method of running it in a VirtualBox on Windows machine.

Download Virtual Box software - https://www.virtualbox.org/wiki/Downloads

Download a premade Ubuntu 12.04 Virtual Box - http://virtualboxes.org/images/ubuntu/
Code:
Look for 15.Ubuntu Linux 12.04 x86
Size (compressed/uncompressed): 769 MB/3.2 GB
Link: http://sourceforge.net/projects/virtualboximage/files/Ubuntu%20Linux/12.04/ubuntu_12.04-x86.7z
(if you have problems with using a premade VDI, make your own using an Ubuntu ISO http://www.psychocats.net/ubuntu/virtualbox)

Extract ubuntu_12.04-x86.7z
Code:
e.g C:\Program Files\Oracle\VMs\ubuntu_12.04

Run the VM
Code:
Navigate where you just extracted Ubuntu and double click on ubuntu_12.04.vbox or the .vdi

Change network adaptor to Bridged mode
Code:
When the VM gets to the Ubuntu splash screen, hover over the network adapter icon in the bottom right of the VM window and
right click it and select 'Network Adapters' and change 'Attached to' to Bridged Mode.
Also change 'Promiscuous Mode' to Allow all and reboot the VM to get a local IP address you can forward ports to.

Log in to Ubuntu
Code:
(username/password): ubuntu/reverse

Now just follow blastbobs tut below with some amended bits for the new clone.

Modified code can be found here - https://github.com/skralg/p2pool-feathercoin.git

Instructions for Ubuntu 12.04
Code:
sudo apt-get update
sudo apt-get install python-software-properties screen git python-rrdtool python-pygame python-scipy
sudo apt-get install python-twisted python-twisted-web python-imaging build-essential libglib2.0-dev libglibmm-2.4-dev
sudo apt-get install python-dev libboost-all-dev libdb++-dev autoconf automake ncurses-dev

Install Feathercoin Daemon:
Code:
cd ~/ ; git clone https://github.com/FeatherCoin/FeatherCoin ; cd ~/FeatherCoin/src ; make -f makefile.unix USE_UPNP=- ; mv feathercoind ~/
mkdir ~/.feathercoin
nano -w ~/.feathercoin/feathercoin.conf

Add this text into ~/.feathercoin/feathercoin.conf
Code:
server=1
daemon=1
rpcuser=rpcadmin
rpcpassword=GenerateAgoodpasswordhere
rpcport=9667

Fire Up Feathercoin daemon:
Code:
~/feathercoind

Get p2pool modified code for feathercoin:
Code:
cd ~/ ; git clone https://github.com/skralg/p2pool-feathercoin

Install scrypt module for ltc that feathercoin uses (Need sudo) :
Code:
cd ~/p2pool-feathercoin/litecoin_scrypt ; sudo python setup.py install

Start up your P2pool for Feathercoin!:
Code:
screen -d -m -S ftcpool ~/p2pool-feathercoin/run_p2pool.py --net feathercoin -a YourFTCPayoutAddress -f 0 --give-author 0 --w 19327 --bitcoind-p2p-port 9336 --bitcoind-rpc-port 9667 rpcadmin yourgoodpasswordfromfeathercoin.confhere

You can use screen -r to open up the p2pool console, or you can tail -f ~/p2pool-fc/data/feathercoin/log

--w port (The port for the stat web interface and also the port where miners connect)
-f number ( Fee you will get for running the pool, in percent)

Some nice commands:
tail -f ~/p2poolf-fc/data/feathercoin/log | grep BLOCK

-------------------------------------------

Quote
Original Thread

https://bitcointalk.org/index.php?topic=182027.0

Please thank everyone in the original thread who helped, I simply read between the lines and put it all together changing bits that needed to be changed for the new git clone and a few letters here and there.

Bitcoin OTC rating GPG ID: 3E7974A1 P2Pool statistics: p2pool.info
1508458653
Hero Member
*
Offline Offline

Posts: 1508458653

View Profile Personal Message (Offline)

Ignore
1508458653
Reply with quote  #2

1508458653
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1508458653
Hero Member
*
Offline Offline

Posts: 1508458653

View Profile Personal Message (Offline)

Ignore
1508458653
Reply with quote  #2

1508458653
Report to moderator
1508458653
Hero Member
*
Offline Offline

Posts: 1508458653

View Profile Personal Message (Offline)

Ignore
1508458653
Reply with quote  #2

1508458653
Report to moderator
1508458653
Hero Member
*
Offline Offline

Posts: 1508458653

View Profile Personal Message (Offline)

Ignore
1508458653
Reply with quote  #2

1508458653
Report to moderator
hagenees
Jr. Member
*
Offline Offline

Activity: 35


View Profile
May 27, 2013, 05:47:50 PM
 #2

To start p2pool better make this:
1.Go to directory where p2pool is installed - "cd ~/p2pool-feathercoin"
2. Run command: "python run_p2pool.py --net feathercoin -a YourFTCPayoutAddress -f 0 --give-author 0 --w 19327 --bitcoind-p2p-port 9336 --bitcoind-rpc-port 9667 rpcadmin yourgoodpasswordfromfeathercoin.confhere"
napoleon2121
Sr. Member
****
Offline Offline

Activity: 266


View Profile
May 29, 2013, 05:42:27 PM
 #3

i will ask a question now that it may be stupid.. can i assing another feathercoin adress for fees rather than my feathercoid adress ?

chrysophylax
Legendary
*
Offline Offline

Activity: 924


--- ChainWorks Industries ---


View Profile WWW
May 11, 2017, 05:20:27 AM
 #4

interesting ...

is this still viable? ...

#crysx

grn - Gfz2cXMkhMZYWSFvLEMnM8bXk7X5Mtq2J2 . exchange - https://www.cryptopia.co.nz/Exchange/?market=GRN_BTC . cwi thread - https://bitcointalk.org/index.php?topic=1563601 . email - crysx@gnxs.com .
gjhiggins
Legendary
*
Offline Offline

Activity: 1162



View Profile WWW
May 11, 2017, 08:59:49 AM
 #5

interesting ...

is this still viable? ...

#crysx

Seems to depend on which coin and from which version of Bitcoin it was cloned: https://github.com/p2pool/p2pool/issues/341

These days it would probably be more effective to cast the process into a “devops” solution. Personally, I quite like a combo of Vagrant and Ansible, f'rinstance this is an Ansible playbook for creating an Ubuntu 16.04 VM and cross-compiling a Windows binary for Slimcoin.

Cheers

Graham
chrysophylax
Legendary
*
Offline Offline

Activity: 924


--- ChainWorks Industries ---


View Profile WWW
May 12, 2017, 12:13:02 PM
 #6

interesting ...

is this still viable? ...

#crysx

Seems to depend on which coin and from which version of Bitcoin it was cloned: https://github.com/p2pool/p2pool/issues/341

These days it would probably be more effective to cast the process into a “devops” solution. Personally, I quite like a combo of Vagrant and Ansible, f'rinstance this is an Ansible playbook for creating an Ubuntu 16.04 VM and cross-compiling a Windows binary for Slimcoin.

Cheers

Graham


as usual graham ...

you are a total wealth of information ...

ill read more - and see what i can fathom from it ...

im also looking for a 'decent' way to compile ( or cross compile if that is a good way ) windows and osx binaries for the coins we have ...

gitian is complex and quite confusing for me - so im looking for a much more simplified way of doing this ... any hints or links or just outright step by step instructions you could shed light on? ...

much appreciated mate ...

#crysx

grn - Gfz2cXMkhMZYWSFvLEMnM8bXk7X5Mtq2J2 . exchange - https://www.cryptopia.co.nz/Exchange/?market=GRN_BTC . cwi thread - https://bitcointalk.org/index.php?topic=1563601 . email - crysx@gnxs.com .
gjhiggins
Legendary
*
Offline Offline

Activity: 1162



View Profile WWW
May 12, 2017, 01:02:48 PM
 #7

im also looking for a 'decent' way to compile ( or cross compile if that is a good way ) windows and osx binaries for the coins we have

im looking for a much more simplified way of doing this ... any hints or links or just outright step by step instructions

Herewith markdown-formatted destructions from the Slimcoin README:


## Ubuntu-hosted cross-compilation of Windows 32bit binary

### Installing the [MXE](http://pkg.mxe.cc/) cross-compilation tool.

Make the distribution ppa known to the APT package system:

    $ echo "deb http://pkg.mxe.cc/repos/apt/debian wheezy main" > \
       /etc/apt/sources.list.d/mxeapt.list

Add the GPG key to the APT package system:

    $ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D43A795B73B16ABE9643FE1AFD8FFF16DB45C6AB

Update the APT cache:

    $ apt-get update

Install some MXE package:

    $ apt-get install mxe-i686-w64-mingw32.static-qt

Names of packages are `mxe-<target>-<package>`.

Possible targets:

> - i686-w64-mingw32.static
> - x86-64-w64-mingw32.static (note that `_` replaced with `-`)
> - i686-w64-mingw32.shared
> - x86-64-w64-mingw32.shared (note that `_` replaced with `-`)

*(A complete list of packages can be found on the [MXE site](http://mxe.cc/#packages) and in [the build matrix](http://mxe.cc/build-matrix.html).)*

Packages are installed to `/usr/lib/mxe/<target>/`. The location acts as the root of the MXE source tree.

For example, cross-compile CMake project:

    $ target=i686-w64-mingw32.static
    $ mxedir=/usr/lib/mxe/
    $ $mxedir/usr/bin/$target-cmake project-source
    $ make


### Cross-compiling SLIMCoin

    #!/bin/bash

    # Working setup to cross-compile Windows binaries for Slimcoin hosted on a
    # Vagrant Ubuntu 16.04 VM using non-Canonical ppas for MXE and Qt5.7:
    # deb http://pkg.mxe.cc/repos/apt/debian wheezy main

    # Doesn't seem to pass the QT directives through, though. Tough.

    # Basic path bindings
    PATH=/usr/lib/mxe/usr/bin:$PATH
    MXE_PATH=/usr/lib/mxe
    MXE_INCLUDE_PATH=/usr/lib/mxe/usr/i686-w64-mingw32.static/include
    MXE_LIB_PATH=/usr/lib/mxe/usr/i686-w64-mingw32.static/lib
    # Belt and braces
    CXXFLAGS="-std=gnu++11 -march=i686"
    LDFLAGS="-march=i686"
    target="i686-w64-mingw32.static"

    # Particularise for cross-compiling
    export BOOST_LIB_SUFFIX=-mt
    export BOOST_THREAD_LIB_SUFFIX=_win32-mt
    export BOOST_INCLUDE_PATH=${MXE_INCLUDE_PATH}/boost
    export BOOST_LIB_PATH=${MXE_LIB_PATH}
    export OPENSSL_INCLUDE_PATH=${MXE_INCLUDE_PATH}/openssl
    export OPENSSL_LIB_PATH=${MXE_LIB_PATH}
    export BDB_INCLUDE_PATH=${MXE_INCLUDE_PATH}
    export BDB_LIB_PATH=${MXE_LIB_PATH}
    export MINIUPNPC_INCLUDE_PATH=${MXE_INCLUDE_PATH}
    export MINIUPNPC_LIB_PATH=${MXE_LIB_PATH}
    export QMAKE_LRELEASE=${MXE_PATH}/usr/${target}/qt5/bin/lrelease

    # Call qmake to create Makefile.[Release|Debug]
    ${target}-qmake-qt5 \
        MXE=1 \
        USE_O3=1 \
        USE_QRCODE=1 \
        FIRST_CLASS_MESSAGING=1 \
        RELEASE=1 \
        USE_UPNPC=1 \
        BOOST_LIB_SUFFIX=${BOOST_LIB_SUFFIX} \
        BOOST_THREAD_LIB_SUFFIX=${BOOST_THREAD_LIB_SUFFIX} \
        BOOST_INCLUDE_PATH=${BOOST_INCLUDE_PATH} \
        BOOST_LIB_PATH=${BOOST_LIB_PATH} \
        OPENSSL_INCLUDE_PATH=${OPENSSL_INCLUDE_PATH} \
        OPENSSL_LIB_PATH=${OPENSSL_LIB_PATH} \
        BDB_INCLUDE_PATH=${BDB_INCLUDE_PATH} \
        BDB_LIB_PATH=${BDB_LIB_PATH} \
        MINIUPNPC_INCLUDE_PATH=${MINIUPNPC_INCLUDE_PATH} \
        MINIUPNPC_LIB_PATH=${MINIUPNPC_LIB_PATH} \
        QMAKE_LRELEASE=${QMAKE_LRELEASE} slimcoin-qt.pro

    # Go for it. If successful, Windows binary will be written out to ./release/slimcoin-qt.exe
    make -f Makefile.Release CXXFLAGS="-DQT_GUI -DQT_NO_PRINTER -std=gnu++11 -march=i686" LDFLAGS="-march=i686"

The cross-compilation product is saved in the `release` directory under the name `slimcoin-qt.exe` and can be tested on Ubuntu with:

    $ wine release/slimcoin-qt.exe

*(be prepared for a long wait during the loading of the index, e.g. 15-20 mins on a low-end machine)*


Once the MXE distro is installed, copy the bash script into xcomp.sh and just run that whenever required. It has proved reasonably general in that I have been able to just edit the target in order to use the script to produce a Windows binary for a different coin.

BTW, the README also contains destructions for native compilation on OS X Sierra, it requires brew and XCode but otherwise fairly straightforward and works as expected on an Ubuntu 17.04-hosted VirtualBox OS X Sierra VM (which fortuitously happily upgraded itself from an El Capitan distro I managed to get my hands on).

And similarly, my intention to tackle gitian deterministic builds is awaiting a fresh supply of round tuits Smiley

Cheers

Graham
chrysophylax
Legendary
*
Offline Offline

Activity: 924


--- ChainWorks Industries ---


View Profile WWW
May 12, 2017, 05:25:55 PM
 #8

im also looking for a 'decent' way to compile ( or cross compile if that is a good way ) windows and osx binaries for the coins we have

im looking for a much more simplified way of doing this ... any hints or links or just outright step by step instructions

Herewith markdown-formatted destructions from the Slimcoin README:


## Ubuntu-hosted cross-compilation of Windows 32bit binary

### Installing the [MXE](http://pkg.mxe.cc/) cross-compilation tool.

Make the distribution ppa known to the APT package system:

    $ echo "deb http://pkg.mxe.cc/repos/apt/debian wheezy main" > \
       /etc/apt/sources.list.d/mxeapt.list

Add the GPG key to the APT package system:

    $ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D43A795B73B16ABE9643FE1AFD8FFF16DB45C6AB

Update the APT cache:

    $ apt-get update

Install some MXE package:

    $ apt-get install mxe-i686-w64-mingw32.static-qt

Names of packages are `mxe-<target>-<package>`.

Possible targets:

> - i686-w64-mingw32.static
> - x86-64-w64-mingw32.static (note that `_` replaced with `-`)
> - i686-w64-mingw32.shared
> - x86-64-w64-mingw32.shared (note that `_` replaced with `-`)

*(A complete list of packages can be found on the [MXE site](http://mxe.cc/#packages) and in [the build matrix](http://mxe.cc/build-matrix.html).)*

Packages are installed to `/usr/lib/mxe/<target>/`. The location acts as the root of the MXE source tree.

For example, cross-compile CMake project:

    $ target=i686-w64-mingw32.static
    $ mxedir=/usr/lib/mxe/
    $ $mxedir/usr/bin/$target-cmake project-source
    $ make


### Cross-compiling SLIMCoin

    #!/bin/bash

    # Working setup to cross-compile Windows binaries for Slimcoin hosted on a
    # Vagrant Ubuntu 16.04 VM using non-Canonical ppas for MXE and Qt5.7:
    # deb http://pkg.mxe.cc/repos/apt/debian wheezy main

    # Doesn't seem to pass the QT directives through, though. Tough.

    # Basic path bindings
    PATH=/usr/lib/mxe/usr/bin:$PATH
    MXE_PATH=/usr/lib/mxe
    MXE_INCLUDE_PATH=/usr/lib/mxe/usr/i686-w64-mingw32.static/include
    MXE_LIB_PATH=/usr/lib/mxe/usr/i686-w64-mingw32.static/lib
    # Belt and braces
    CXXFLAGS="-std=gnu++11 -march=i686"
    LDFLAGS="-march=i686"
    target="i686-w64-mingw32.static"

    # Particularise for cross-compiling
    export BOOST_LIB_SUFFIX=-mt
    export BOOST_THREAD_LIB_SUFFIX=_win32-mt
    export BOOST_INCLUDE_PATH=${MXE_INCLUDE_PATH}/boost
    export BOOST_LIB_PATH=${MXE_LIB_PATH}
    export OPENSSL_INCLUDE_PATH=${MXE_INCLUDE_PATH}/openssl
    export OPENSSL_LIB_PATH=${MXE_LIB_PATH}
    export BDB_INCLUDE_PATH=${MXE_INCLUDE_PATH}
    export BDB_LIB_PATH=${MXE_LIB_PATH}
    export MINIUPNPC_INCLUDE_PATH=${MXE_INCLUDE_PATH}
    export MINIUPNPC_LIB_PATH=${MXE_LIB_PATH}
    export QMAKE_LRELEASE=${MXE_PATH}/usr/${target}/qt5/bin/lrelease

    # Call qmake to create Makefile.[Release|Debug]
    ${target}-qmake-qt5 \
        MXE=1 \
        USE_O3=1 \
        USE_QRCODE=1 \
        FIRST_CLASS_MESSAGING=1 \
        RELEASE=1 \
        USE_UPNPC=1 \
        BOOST_LIB_SUFFIX=${BOOST_LIB_SUFFIX} \
        BOOST_THREAD_LIB_SUFFIX=${BOOST_THREAD_LIB_SUFFIX} \
        BOOST_INCLUDE_PATH=${BOOST_INCLUDE_PATH} \
        BOOST_LIB_PATH=${BOOST_LIB_PATH} \
        OPENSSL_INCLUDE_PATH=${OPENSSL_INCLUDE_PATH} \
        OPENSSL_LIB_PATH=${OPENSSL_LIB_PATH} \
        BDB_INCLUDE_PATH=${BDB_INCLUDE_PATH} \
        BDB_LIB_PATH=${BDB_LIB_PATH} \
        MINIUPNPC_INCLUDE_PATH=${MINIUPNPC_INCLUDE_PATH} \
        MINIUPNPC_LIB_PATH=${MINIUPNPC_LIB_PATH} \
        QMAKE_LRELEASE=${QMAKE_LRELEASE} slimcoin-qt.pro

    # Go for it. If successful, Windows binary will be written out to ./release/slimcoin-qt.exe
    make -f Makefile.Release CXXFLAGS="-DQT_GUI -DQT_NO_PRINTER -std=gnu++11 -march=i686" LDFLAGS="-march=i686"

The cross-compilation product is saved in the `release` directory under the name `slimcoin-qt.exe` and can be tested on Ubuntu with:

    $ wine release/slimcoin-qt.exe

*(be prepared for a long wait during the loading of the index, e.g. 15-20 mins on a low-end machine)*


Once the MXE distro is installed, copy the bash script into xcomp.sh and just run that whenever required. It has proved reasonably general in that I have been able to just edit the target in order to use the script to produce a Windows binary for a different coin.

BTW, the README also contains destructions for native compilation on OS X Sierra, it requires brew and XCode but otherwise fairly straightforward and works as expected on an Ubuntu 17.04-hosted VirtualBox OS X Sierra VM (which fortuitously happily upgraded itself from an El Capitan distro I managed to get my hands on).

And similarly, my intention to tackle gitian deterministic builds is awaiting a fresh supply of round tuits Smiley

Cheers

Graham


much appreciation graham ...

i will attend to this as soon as im able to sleep and become a coherent human being once more ...

as for the round tuit - i used to sell those in the computer retail chain i used to own a long time ago ... funny thing was - that they were one of the best selling items we had ...

hehehe ...

when you do get one - and able to work on the gitian build - please add my dense clout to the agenda ... i would really like to get my head around gitian - cross compiling - and debian based systems in general ...

im a rhel fella - and NO i dont want you to feel sorry me ... i actually like the os - whether ive submitted to it or not ...

if you ever decide that communication outside of here is beneficial - AND it involves skype - please let me know ... sleep now for me - as im done like the proverbial dinner ...

again - very much appreciated ...

#crysx

grn - Gfz2cXMkhMZYWSFvLEMnM8bXk7X5Mtq2J2 . exchange - https://www.cryptopia.co.nz/Exchange/?market=GRN_BTC . cwi thread - https://bitcointalk.org/index.php?topic=1563601 . email - crysx@gnxs.com .
gjhiggins
Legendary
*
Offline Offline

Activity: 1162



View Profile WWW
May 12, 2017, 07:35:16 PM
 #9

im a rhel fella - and NO i dont want you to feel sorry me ... i actually like the os - whether ive submitted to it or not ...

Hm, it would be useful to cover an rpm-based solution as well as the apt-based one - meet halfway? CentOS?

Cheers

Graham
chrysophylax
Legendary
*
Offline Offline

Activity: 924


--- ChainWorks Industries ---


View Profile WWW
May 13, 2017, 02:42:46 AM
 #10

im a rhel fella - and NO i dont want you to feel sorry me ... i actually like the os - whether ive submitted to it or not ...

Hm, it would be useful to cover an rpm-based solution as well as the apt-based one - meet halfway? CentOS?

Cheers

Graham


desktop - fedora 25 x54 ...
servers - centos 7 x64 ...

miners - fedora 25 x64 ...
mining pool server - centos 7 x64 ...

so an rpm based ( rhel based ) distro is what we ( cwi ) and i use ... though it would be beneficial to have documented all that gets done for all the procedures involved in compiling ( what with all the missing deps in these os ) - i do have 'some' docs regarding what was done to get the pool server up - so compilations are somewhat less cumbersome ...

i think vagrant is a base package in fedora now ( in the repos ) - but centos i would have to go through the link you pointed ...

time is now against me - as next week i need to leave to start thefarm rebuild ... why isnt there more hours in a day? ... round tuits? ...

#crysx

grn - Gfz2cXMkhMZYWSFvLEMnM8bXk7X5Mtq2J2 . exchange - https://www.cryptopia.co.nz/Exchange/?market=GRN_BTC . cwi thread - https://bitcointalk.org/index.php?topic=1563601 . email - crysx@gnxs.com .
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!