• June 19, 2018, 03:03:31 AM
• Welcome, Guest. Please login or register.
 

Author Topic: Installing memorycoin p2pool on Ubuntu server 12.04 LTS  (Read 3398 times)

0 Members and 4 Guests are viewing this topic.

Offline toonces

  • Registered Memorycoin Shareholder
  • Intermediate Member
  • *************
  • Posts: 46
    • View Profile
  • Memorycoin Address:
    MMM71E4XaXiTbeDf36Pq8PjMja8XusemSS
Installing memorycoin p2pool on Ubuntu server 12.04 LTS
« on: April 10, 2014, 07:51:49 AM »
Here is a guide that I use to create memorycoin p2pool server on Ubuntu linux

1. Install Ubuntu Server 12.04 LTS 64 bit from
http:/www.ubuntu.com/download/server

From a terminal:

2. Download installmemorycoind.txt and rename to installmemorycoind.sh
    or copy/paste my script to create the file
    Please read the script comment and edit where appropriate
Code: [Select]
#!/usr/bin/env bash

set -o errexit
set -o xtrace

# This will install all the dependency library to compile the memorycoind
# It will also synchronize the clock and install clock sync software
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get -y upgrade
sudo ntpdate pool.ntp.org
sudo apt-get -y install vim git ntp
sudo apt-get -y install libtool autotools-dev autoconf pkg-config
sudo apt-get -y install git build-essential libssl-dev libdb4.8-dev libdb4.8++-dev libboost1.48-all-dev

# This will download and compile memorycoind
git clone https://github.com/memorycoin/memorycoin
cd memorycoin/src
make -f makefile.unix USE_UPNP=-
cp memorycoind ~

# This will capture the random password generated by memorycoind
set +o errexit
./memorycoind 2> pass.out
set -o errexit

# This will create memorycoin.conf file
egrep "^rpcus|^rpcpassword" pass.out > ~/.memorycoin/memorycoin.conf
cat >> ~/.memorycoin/memorycoin.conf << EOF
rpcallowip=127.0.0.1
rpcport=1925
rpcthreads=50
server=1
daemon=1
listen=1
EOF

# This will change the permission to read only by the current user
chmod 400 ~/.memorycoin/memorycoin.conf
rm pass.out


3. Download installp2pool.txt and rename to installp2pool.sh
    or copy/paste my script to create the file
    Please read the script comment and edit where appropriate

Code: [Select]
#!/usr/bin/env bash

set -o errexit
set -o xtrace

# This will install all the dependency to compile p2pool
sudo apt-get -y install python-software-properties
sudo apt-get -y install python-zope.interface python-twisted python-twisted-web

# This will download and compile p2pool
git clone https://github.com/KillerByte/p2pool
cd ~/p2pool
git submodule sync
git submodule update --init
cd ~/p2pool/memorycoin_momentum/
sudo python setup.py install

#This script will autostart the p2pool when the pool shutdown or crash
#Please change MVTEchaqyCuu8RsP5kMYMuTbxRrwZ2jmtQ (SPICES) to your wallet address or leave it to donate to SPICES
#1.0 is the usual fee p2pool charge. You can change it to your preference.

cat > ~/autostart.sh << \EOF
#!/usr/bin/env bash

for i in {1..10}
do
   /usr/bin/python ~/p2pool/run_p2pool.py --net memorycoin --disable-upnp --fee 1.0 --address MVTEchaqyCuu8RsP5kMYMuTbxRrwZ2jmtQ
   sleep 2
done
EOF
chmod +x ~/autostart.sh

#This will create sample yam-mmc.cfg file that you can copy to your minner
#Use only yam m7p or newer
#Change the ip to your p2pool pool and put a second one that have the lowest latency/ping from your location
# according to ---
#Change the address to your wallet to received the newly mine coin
#Change the donation-interval, the smaller the number the more you contribute to yam developer
cat > ~/yam-mmc.cfg << EOF
threads = 0
mining-params = mmc:av=0&aesni=on&m=1024&donation-interval=25
mine = stratum+tcp://MVTEchaqyCuu8RsP5kMYMuTbxRrwZ2jmtQ@103.253.69.8:8080/mmc
mine = stratum+tcp://MVTEchaqyCuu8RsP5kMYMuTbxRrwZ2jmtQ@162.243.241.151:8080/mmc
EOF

#This script will start p2pool and put it in the background.
cat > ~/start.sh << \EOF
#!/usr/bin/env bash

tmux new-session -d '~/autostart.sh' \; detach
EOF
chmod +x ~/start.sh

#Setting file for tmux using the same binding with screen
cat > ~/.tmux.conf << EOF
set -g prefix C-a
unbind C-b
bind-key a send-prefix
set -s escape-time 1
set -g base-index 1
setw -g pane-base-index 1
set -g default-terminal "screen-256color"
setw -g mode-keys vi
set -g history-limit 10000
EOF


#This will update p2pool code to the latest
cat > ~/updatep2pool.sh << \EOF
#!/usr/bin/env bash

tmux kill-server
cd ~/p2pool
git pull
git submodule sync
git submodule update --init
cd ~/p2pool/memorycoin_momentum/
sudo python setup.py install
rm -rf ~/p2pool/data/memorycoin
EOF


4. type
chmod +x *.sh
./installmemorycoind.sh

Take a break get some coffee or tea.

5. type
./installp2pool.sh
./memorycoind

6. Check
./memorycoind getinfo
And wait until blocks is equal to current mmc block which you can find at
http://mmcexplorer.info

Take another break and get some tea or coffee

7. Start p2pool
./start.sh


8. Check by going to
http://yourserverip:8080

Memorycoin p2pool is still work in progress

Please be aware that mined coin take awhile before you can spend it, need at least 80 confirmation.
« Last Edit: May 03, 2015, 02:44:38 AM by Delinquency »

Offline kanes

  • Chief Support Officer
  • Fanatic Member
  • ***************
  • Posts: 144
    • View Profile
  • Memorycoin Address:
    MMCcso6SQ8oiEZzRmzooYCJK3iFGUqXBSM
Re: [GUIDE] Installing memorycoin p2pool on Ubuntu server 12.04 LTS
« Reply #1 on: April 10, 2014, 08:55:37 AM »
Amazing  Work. Thanks :D

Do you know what ports you have to open in firewall? Beside 1927. 
Thanks
CSO Vote Address: MVTEcsoS5YnxyhAF4Dx4GB7VLKRF325JGa
Please send 0.00000001 MMC to vote for me as your new CSO!

Offline kanes

  • Chief Support Officer
  • Fanatic Member
  • ***************
  • Posts: 144
    • View Profile
  • Memorycoin Address:
    MMCcso6SQ8oiEZzRmzooYCJK3iFGUqXBSM
Re: [GUIDE] Installing memorycoin p2pool on Ubuntu server 12.04 LTS
« Reply #2 on: April 10, 2014, 09:20:09 AM »
 Please be aware that mined coin take awhile before you can spend it, need at least 80 confirmation.

What do you mean with this?
CSO Vote Address: MVTEcsoS5YnxyhAF4Dx4GB7VLKRF325JGa
Please send 0.00000001 MMC to vote for me as your new CSO!

Offline toonces

  • Registered Memorycoin Shareholder
  • Intermediate Member
  • *************
  • Posts: 46
    • View Profile
  • Memorycoin Address:
    MMM71E4XaXiTbeDf36Pq8PjMja8XusemSS
Re: [GUIDE] Installing memorycoin p2pool on Ubuntu server 12.04 LTS
« Reply #3 on: April 10, 2014, 09:26:34 AM »
Firewall port that need to be open:

IN/OUT to the outside world 
1968 for the mmc network
2968 for the mmc p2pool network
8080 for the status page and communication to the mining worker
and
IN/OUT localhost
1925 for RPC communication between p2pool and memorycoind

Offline toonces

  • Registered Memorycoin Shareholder
  • Intermediate Member
  • *************
  • Posts: 46
    • View Profile
  • Memorycoin Address:
    MMM71E4XaXiTbeDf36Pq8PjMja8XusemSS
Re: [GUIDE] Installing memorycoin p2pool on Ubuntu server 12.04 LTS
« Reply #4 on: April 10, 2014, 09:30:17 AM »
Please be aware that mined coin take awhile before you can spend it, need at least 80 confirmation.
What do you mean with this?

Usually if you withdraw coin from regular pool you can spend/send it to other without waiting.
But coin from p2pool or solo mined you need to wait about 80 confirmation before you can spend/send to other.

Offline KillerByte

  • Junior Member
  • ***
  • Posts: 64
  • More P2Pool!
    • View Profile
  • Memorycoin Address:
    MVTEcnogH2ArcvpkYJ66GcErb1iwHhLPN1
Re: [GUIDE] Installing memorycoin p2pool on Ubuntu server 12.04 LTS
« Reply #5 on: April 10, 2014, 01:22:33 PM »
Please be aware that mined coin take awhile before you can spend it, need at least 80 confirmation.
What do you mean with this?
Usually if you withdraw coin from regular pool you can spend/send it to other without waiting. But coin from p2pool or solo mined you need to wait about 80 confirmation before you can spend/send to other.

thanks toonces. This guide is useful.

Offline kanes

  • Chief Support Officer
  • Fanatic Member
  • ***************
  • Posts: 144
    • View Profile
  • Memorycoin Address:
    MMCcso6SQ8oiEZzRmzooYCJK3iFGUqXBSM
Re: [GUIDE] Installing memorycoin p2pool on Ubuntu server 12.04 LTS
« Reply #6 on: April 10, 2014, 08:50:53 PM »
I have made around 300 shares in the last hours, but i only see 2 shares at status. how is this possible?
CSO Vote Address: MVTEcsoS5YnxyhAF4Dx4GB7VLKRF325JGa
Please send 0.00000001 MMC to vote for me as your new CSO!

Offline toonces

  • Registered Memorycoin Shareholder
  • Intermediate Member
  • *************
  • Posts: 46
    • View Profile
  • Memorycoin Address:
    MMM71E4XaXiTbeDf36Pq8PjMja8XusemSS
Re: [GUIDE] Installing memorycoin p2pool on Ubuntu server 12.04 LTS
« Reply #7 on: April 10, 2014, 11:43:13 PM »
There are small update on the updatep2pool.sh to include memorycoin_momentum.
Just update your updatep2pool.sh by adding


Code: [Select]
cd ~/p2pool/memorycoin_momentum/
sudo python setup.py install

at the end if you already install the previous script.

Otherwise the guide above already have the updated version.

Thank you

Offline KillerByte

  • Junior Member
  • ***
  • Posts: 64
  • More P2Pool!
    • View Profile
  • Memorycoin Address:
    MVTEcnogH2ArcvpkYJ66GcErb1iwHhLPN1
Re: [GUIDE] Installing memorycoin p2pool on Ubuntu server 12.04 LTS
« Reply #8 on: April 11, 2014, 04:25:42 AM »
I have made around 300 shares in the last hours, but i only see 2 shares at status. how is this possible?

Not all the shares that you submit are being counted by the network, only the ones that qualify to get to the next level. Here is how the hashrate difficulties work:

1. Local shares - the shares that you submit from your miner go here. These are only used to calculate the local hash rate.
2. Pool shares - these shares are added to the P2Pool sharechain and are counted as a submitted share on the website. The number of these you submit determines your payout.
3. Block shares - these are shares which find a block. The person who finds the block is awarded an additional subsidy to encourage the submission of this type of share to the network, so that it is not wasted.