SpreadcoinTalk

Spreadcoin => Technical Support => Topic started by: vertoe on January 29, 2015, 09:48:38 PM

Title: Step-by-step: Masternode on VPS
Post by: vertoe on January 29, 2015, 09:48:38 PM
VPS: I used Amazon Webservice running Ubuntu 14.10. This will be running the masternode.
Local: I used a Qt wallet to generate the transaction input and masternode secret.

Single masternode on one VPS.

1 VPS: Get dependencies for building spreadcoin daemon:
Code: [Select]
sudo apt-get install git build-essential autoconf libboost-all-dev libssl-dev libprotobuf-dev protobuf-compiler libqt4-dev libqrencode-dev libdb-dev libdb++-dev libminiupnpc-dev(http://i.imgur.com/h9PG2Ujl.png) (http://imgur.com/h9PG2Uj)

2 VPS: Get the source code:
Code: [Select]
git clone https://github.com/spreadcoin-project/spreadcoin
3 VPS: And switch directory:
Code: [Select]
cd spreadcoin/src(http://i.imgur.com/rlIbJ4kl.png) (http://imgur.com/rlIbJ4k)

4 VPS: Checkout mn-test branch:
Code: [Select]
git checkout mn-test(http://i.imgur.com/gxbRahUl.png) (http://imgur.com/gxbRahU)

5 VPS: Compile the daemon:
Code: [Select]
make -j $(nproc) -f makefile.unix(http://i.imgur.com/6ss0ng1l.png) (http://imgur.com/6ss0ng1)

6 VPS: Create a config file:
Code: [Select]
mkdir -p ~/.spreadtestcoin
cat > ~/.spreadtestcoin/spreadcoin.conf <<EOF
rpcuser=spreadcoinrpc
rpcpassword=3btqdvnaaY8Lsv934ZeULWRcgnv4KblablablaB2S5FHB # change this to something usefull
daemon=1
server=1
testnet=1
EOF

7 VPS: ...and "Install" the daemon:
Code: [Select]
sudo cp spreadcoind /usr/bin/spreadcoind(http://i.imgur.com/5LkPI6ql.png) (http://imgur.com/5LkPI6q)

8 VPS: Run the daemon:
Code: [Select]
spreadcoind -daemon -server(http://i.imgur.com/Zajcc0Ql.png) (http://imgur.com/Zajcc0Q)

9 On your local wallet, get a new address and send at least 100 coins to that address and wait for 50 confirmations.
Code: [Select]
mnQEmuD8yC4UAkc8Fm6A49JfKaqAqTZEk5
10 On your local wallet, copy the transaction id.
Code: [Select]
7f7bbb802daa9723b1e060cfa28b6e1a1b6d5ad68f1136ca8f6aa9450edee6f7
11 Local: Generate a masternode secret from the transaction input by going to the console at tools > debug console. if input:0 fails, try:1, and so on until you get what you want:
Code: [Select]
mnsecret 7f7bbb802daa9723b1e060cfa28b6e1a1b6d5ad68f1136ca8f6aa9450edee6f7:1(http://i.imgur.com/sMkOyOll.png) (http://imgur.com/sMkOyOl)

12 On the VPS, put it directly into the config file:
Code: [Select]
echo "mnstart=7f7bbb802daa9723b1e060cfa28b6e1a1b6d5ad68f1136ca8f6aa9450edee6f7:1:1c574e216511919b4578586843198d6c006171592001003986fccae864a3db9b78b6e08037f30fcbbfd33aeec23a6d2130e06556ae66a4796c731b778ad790f0d6:925EuDdYmiQvgq1S6em6kQ1WR5wU5qB8t7treVVFBhwxFLrkN27" >> ~/.spreadtestcoin/spreadcoin.conf(http://i.imgur.com/3zkeTtIl.png) (http://imgur.com/3zkeTtI)

... wait for 50 confirmations of the tx ...

13 VPS: ...and start the masternode:
Code: [Select]
spreadcoind mnstart 7f7bbb802daa9723b1e060cfa28b6e1a1b6d5ad68f1136ca8f6aa9450edee6f7:1:1c574e216511919b4578586843198d6c006171592001003986fccae864a3db9b78b6e08037f30fcbbfd33aeec23a6d2130e06556ae66a4796c731b778ad790f0d6:925EuDdYmiQvgq1S6em6kQ1WR5wU5qB8t7treVVFBhwxFLrkN27(http://i.imgur.com/v4hXywIl.png) (http://imgur.com/v4hXywI)

If it says "true", you are done!!!einself

Multiple masternodes on one VPS.

Repeat steps 9-13 for each masternode input with >100 SPR and >50 confirmations you have. Happy masternoding.

Worked? SSHUvYeyGQcV6z1QvFiu2SppKDTbb2ZFC1
Title: Re: Step-by-step: Masternode on VPS
Post by: Mr. Spread on January 29, 2015, 10:04:44 PM
I think it is better not to send your coins to the wallet stored on VPS but instead keep them in your local wallet and generate mnsecert from it.
Title: Re: Step-by-step: Masternode on VPS
Post by: MyFarm on January 29, 2015, 10:46:41 PM
I think it is better not to send your coins to the wallet stored on VPS but instead keep them in your local wallet and generate mnsecert from it.

Agreed.  Vertoe, could you edit it for this please?  I'll kick in an additional 100 SPR to the bounty.

Also, on this step: make -j $(nproc) -f makefile.unix

I get:
Quote
Building LevelDB ...
make[1]: Entering directory `/home/ubuntu/spreadcoin/src/leveldb'
g++ -I. -I./include -fno-builtin-memcmp -pthread -DOS_LINUX -DLEVELDB_PLATFORM_POSIX -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/home/ubuntu/spreadcoin/src -I/home/ubuntu/spreadcoin/src/obj -DUSE_UPNP=0 -DUSE_IPV6=1 -I/home/ubuntu/spreadcoin/src/leveldb/include -I/home/ubuntu/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -c db/builder.cc -o db/builder.o
make[1]: g++: Command not found
make[1]: *** [db/builder.o] Error 127
make[1]: Leaving directory `/home/ubuntu/spreadcoin/src/leveldb'
make: *** [leveldb/libleveldb.a] Error 2

I assume something went wrong.  Any ideas?
Title: Re: Step-by-step: Masternode on VPS
Post by: vertoe on January 29, 2015, 10:58:54 PM
Code: [Select]
g++: Command not found
are you on ubuntu and did you install the package build-essential (first step)?
Title: Re: Step-by-step: Masternode on VPS
Post by: vertoe on January 29, 2015, 11:10:41 PM
I think it is better not to send your coins to the wallet stored on VPS but instead keep them in your local wallet and generate mnsecert from it.

Updated.
Title: Re: Step-by-step: Masternode on VPS
Post by: Strumpet! on January 29, 2015, 11:56:00 PM
Vertoe, instead of guessing the output number you can just copy/paste the output column from the Masternode tab in the QT wallet, and run

mnsecret <pasted-output>

I find it easier to copy all my elegible-to-be-a-MN SPR lump outputs, run mnsecret on them all, and copy/paste the lot into the remote spreadcoin.conf file at the same time, then just restart spreadcoind.

It would be pretty easy for Mr Spread to have a button that automated this for you within the QT client and outputted a bunch of 'mnstart=...' lines for you to copy to the VPS.

Also, I think you should include a basic firewall setup as part of the guide, I use:
Code: [Select]
sudo apt-get install ufw
sudo ufw allow ssh/tcp
sudo ufw limit ssh/tcp
sudo ufw allow 51678/tcp
sudo ufw logging on
sudo ufw enable
sudo ufw status

edit: and an initial update, some VPS images are quite out of date.
Code: [Select]
sudo apt-get update
sudo apt-get upgrade

But this is your show and I'll butt out.  :)
Title: Re: Step-by-step: Masternode on VPS
Post by: MyFarm on January 30, 2015, 03:41:02 AM
I got a little further this time.  On the same step, this time I got:

Quote
virtual memory exhausted: Cannot allocate memory
make: *** [obj/main.o] Error 1

After it ran for quite awhile.  Is my little free micro instance not powerful enough?  :)  What is the story here?
Title: Re: Step-by-step: Masternode on VPS
Post by: girino on January 30, 2015, 03:50:02 AM
I got a little further this time.  On the same step, this time I got:

Quote
virtual memory exhausted: Cannot allocate memory
make: *** [obj/main.o] Error 1

After it ran for quite awhile.  Is my little free micro instance not powerful enough?  :)  What is the story here?

you can add some virtual memory to it, so it stands the compilation process

http://stackoverflow.com/questions/17173972/how-do-you-add-swap-to-an-ec2-instance
Title: Re: Step-by-step: Masternode on VPS
Post by: MyFarm on January 30, 2015, 04:00:33 AM
I got a little further this time.  On the same step, this time I got:

Quote
virtual memory exhausted: Cannot allocate memory
make: *** [obj/main.o] Error 1

After it ran for quite awhile.  Is my little free micro instance not powerful enough?  :)  What is the story here?

you can add some virtual memory to it, so it stands the compilation process

http://stackoverflow.com/questions/17173972/how-do-you-add-swap-to-an-ec2-instance

Thank you.

NOW I get:

Quote
net.cpp:18:32: fatal error: miniupnpc/miniwget.h: No such file or directory
 #include <miniupnpc/miniwget.h>

Heh.  Any ideas?
Title: Re: Step-by-step: Masternode on VPS
Post by: girino on January 30, 2015, 04:15:31 AM
(...)
NOW I get:

Quote
net.cpp:18:32: fatal error: miniupnpc/miniwget.h: No such file or directory
 #include <miniupnpc/miniwget.h>

Heh.  Any ideas?

Code: [Select]
sudo apt-get install libminiupnpc-dev
Title: Re: Step-by-step: Masternode on VPS
Post by: MyFarm on January 30, 2015, 04:57:19 AM
(...)
NOW I get:

Quote
net.cpp:18:32: fatal error: miniupnpc/miniwget.h: No such file or directory
 #include <miniupnpc/miniwget.h>

Heh.  Any ideas?

Code: [Select]
sudo apt-get install libminiupnpc-dev

Thank you!

Vertoe, I ran into this issue on both my AWS and another VPS I have been trying it on.  Does it need to be added to the instructions?
Title: Re: Step-by-step: Masternode on VPS
Post by: def15 on January 30, 2015, 05:37:34 AM
(...)
NOW I get:

Quote
net.cpp:18:32: fatal error: miniupnpc/miniwget.h: No such file or directory
 #include <miniupnpc/miniwget.h>

Heh.  Any ideas?

Code: [Select]
sudo apt-get install libminiupnpc-dev

Thank you!

Vertoe, I ran into this issue on both my AWS and another VPS I have been trying it on.  Does it need to be added to the instructions?

100 SPR burning a hole in my wallet. :)

I will send as soon as it passes the MyFarm test.
Title: Re: Step-by-step: Masternode on VPS
Post by: MyFarm on January 30, 2015, 05:55:31 AM
When I enter
Quote
echo "mnstart=`spreadcoind mnsecret 7f7bbb802daa9723b1e060cfa28b6e1a1b6d5ad68f1136ca8f6aa9450edee6f7:1`" >> ~/.spreadtestcoin/spreadcoin.conf

(with my transaction ID)

I get:

Quote
error: {"code":-5,"message":"Could not get private key, wallet is locked or it is not your transaction"}

Wallet is not locked and this is the transaction ID of the coins I sent to myself.

Anyone have any ideas?

Title: Re: Step-by-step: Masternode on VPS
Post by: vertoe on January 30, 2015, 06:11:47 AM
(...)
NOW I get:

Quote
net.cpp:18:32: fatal error: miniupnpc/miniwget.h: No such file or directory
 #include <miniupnpc/miniwget.h>

Heh.  Any ideas?

Code: [Select]
sudo apt-get install libminiupnpc-dev

Updated thanks.
Title: Re: Step-by-step: Masternode on VPS
Post by: vertoe on January 30, 2015, 06:13:00 AM
When I enter
Quote
echo "mnstart=`spreadcoind mnsecret 7f7bbb802daa9723b1e060cfa28b6e1a1b6d5ad68f1136ca8f6aa9450edee6f7:1`" >> ~/.spreadtestcoin/spreadcoin.conf

(with my transaction ID)

I get:

Quote
error: {"code":-5,"message":"Could not get private key, wallet is locked or it is not your transaction"}

Wallet is not locked and this is the transaction ID of the coins I sent to myself.

Anyone have any ideas?

It looks like a cold/remote setup is not possible yet. It only seems to work if the funds are on the VPS (e.g. private key known), I had the same problem.
Title: Re: Step-by-step: Masternode on VPS
Post by: Mr. Spread on January 30, 2015, 06:54:22 AM
This command is incorrect:
echo "mnstart=`spreadcoind mnsecret 7f7bbb802daa9723b1e060cfa28b6e1a1b6d5ad68f1136ca8f6aa9450edee6f7:1`" >> ~/.spreadtestcoin/spreadcoin.conf
You should put actual mnsecret instead of `spreadcoind mnsecret 7f7bbb802daa9723b1e060cfa28b6e1a1b6d5ad68f1136ca8f6aa9450edee6f7:1`
Title: Re: Step-by-step: Masternode on VPS
Post by: MyFarm on January 30, 2015, 07:52:54 AM
This command is incorrect:
echo "mnstart=`spreadcoind mnsecret 7f7bbb802daa9723b1e060cfa28b6e1a1b6d5ad68f1136ca8f6aa9450edee6f7:1`" >> ~/.spreadtestcoin/spreadcoin.conf
You should put actual mnsecret instead of `spreadcoind mnsecret 7f7bbb802daa9723b1e060cfa28b6e1a1b6d5ad68f1136ca8f6aa9450edee6f7:1`

I just did this, did the mnstart, and got back "True" (I didn't have to wait 50 confirms)

Now, the masternode connected to this has always been checked in my wallet and thus was running from my local PC.  How do I tell that it is running from my VPS now?
Title: Re: Step-by-step: Masternode on VPS
Post by: GilAlexander on January 30, 2015, 08:21:27 AM
This command is incorrect:
echo "mnstart=`spreadcoind mnsecret 7f7bbb802daa9723b1e060cfa28b6e1a1b6d5ad68f1136ca8f6aa9450edee6f7:1`" >> ~/.spreadtestcoin/spreadcoin.conf
I believe it will work if there is wallet.dat with that tx on the vps - so if you can generate mnsecret from it. If no, you'll need to put plaintext mnsecrets generated locally. They don't contain private keys for mn addresses (there are private keys for some other addresses) so it is true cold setup. If you have multiple mns, your .conf will be:
Code: [Select]
mnstart=
mnstart=
mnstart=
No need to ./spreadcoind mnstart .. after that - it will be done automatically when daemon start.

How do I tell that it is running from my VPS now?
Backup your wallet.dat on local pc and delete and run wallet without it. Then wait for some time and check whether your masternodes are still in list and elected. It will mean that your vps "supports" them.
Title: Re: Step-by-step: Masternode on VPS
Post by: MyFarm on January 30, 2015, 08:28:41 AM
Backup your wallet.dat on local pc and delete and run wallet without it. Then wait for some time and check whether your masternodes are still in list and elected. It will mean that your vps "supports" them.
Thanks, I'll give that a try tomorrow.

In theory, if I shutdown the computer that masternode USED to be on, shouldn't it stay in the masternode list while my others drop off and I can monitor that with another computer?

With that said, a more userfriendly way of tracking these would be nice at some point.
Title: Re: Step-by-step: Masternode on VPS
Post by: GilAlexander on January 30, 2015, 08:42:12 AM
In theory, if I shutdown the computer that masternode USED to be on, shouldn't it stay in the masternode list while my others drop off and I can monitor that with another computer?
I'm not sure I understood the question.
Qt-wallet with checked "control" or daemon with mnstart entries in .conf or daemon with mnstart command will propagate some messages via network that prove other nodes that your mn is capable. This is how it should work. If there are no any your nodes left that do so, you masternodes will be vanished from the list after an hour, as Mr. Spread said.
To monitor you may either wait your masternodes deelected and then try to start them from vps or turn your local wallet off and check if they are in list after some hours.
Title: Re: Step-by-step: Masternode on VPS
Post by: girino on January 30, 2015, 11:12:58 AM
When I enter
Quote
echo "mnstart=`spreadcoind mnsecret 7f7bbb802daa9723b1e060cfa28b6e1a1b6d5ad68f1136ca8f6aa9450edee6f7:1`" >> ~/.spreadtestcoin/spreadcoin.conf

(with my transaction ID)

I get:

Quote
error: {"code":-5,"message":"Could not get private key, wallet is locked or it is not your transaction"}

Wallet is not locked and this is the transaction ID of the coins I sent to myself.

Anyone have any ideas?

It looks like a cold/remote setup is not possible yet. It only seems to work if the funds are on the VPS (e.g. private key known), I had the same problem.

i ran "mnsecret" on my home machine and copied only the results to the VPS. You need the PK to get the secret, but after that, you can use the secret on any wallet.
Title: Re: Step-by-step: Masternode on VPS
Post by: vertoe on January 30, 2015, 01:44:46 PM
This command is incorrect:
echo "mnstart=`spreadcoind mnsecret 7f7bbb802daa9723b1e060cfa28b6e1a1b6d5ad68f1136ca8f6aa9450edee6f7:1`" >> ~/.spreadtestcoin/spreadcoin.conf
You should put actual mnsecret instead of `spreadcoind mnsecret 7f7bbb802daa9723b1e060cfa28b6e1a1b6d5ad68f1136ca8f6aa9450edee6f7:1`
indeed, fixed OP.
Title: Re: Step-by-step: Masternode on VPS
Post by: MyFarm on January 30, 2015, 03:50:40 PM
We're getting close!  :)  A few minor things:

VPS: Generate a masternode secret from the transaction input. if input:0 fails, try:1, and so on until you get what you want:
Code: [Select]
mnsecret 7f7bbb802daa9723b1e060cfa28b6e1a1b6d5ad68f1136ca8f6aa9450edee6f7:1

I believe this step should refer to creating the mnsecret in the wallet console, not the VPS, correct?


On the VPS, put it directly into the config file:
Code: [Select]
echo "mnstart=7f7bbb802daa9723b1e060cfa28b6e1a1b6d5ad68f1136ca8f6aa9450edee6f7:1:1c574e216511919b4578586843198d6c006171592001003986fccae864a3db9b78b6e08037f30fcbbfd33aeec23a6d2130e06556ae66a4796c731b778ad790f0d6:925EuDdYmiQvgq1S6em6kQ1WR5wU5qB8t7treVVFBhwxFLrkN27" >> ~/.spreadtestcoin/spreadcoin.conf[/url]

... wait for 50 confirmations ...

Are you sure 50 confirms have to be waited for here?  I didn't wait and was given, "True"

In Tao's masternode guide: https://darkcointalk.org/threads/taos-masternode-setup-guide-for-dummies.2680/ they chmod a couple times for added security.  Would that be beneficial here?
Title: Re: Step-by-step: Masternode on VPS
Post by: GilAlexander on January 30, 2015, 07:58:25 PM
I believe this step should refer to creating the mnsecret in the wallet console, not the VPS, correct?
Yes.

Are you sure 50 confirms have to be waited for here?  I didn't wait and was given, "True"
50 confirms for transaction that is in mnsecret. 50 confirms is the protocol-level rule. I believe the daemon is trying to start/"prolong" masternode when mnstart's are in .conf.

In Tao's masternode guide: https://darkcointalk.org/threads/taos-masternode-setup-guide-for-dummies.2680/ they chmod a couple times for added security.  Would that be beneficial here?
I wonder for what that step is - in .conf there's nothing more valuable than your vps credentials. Nevermind.
Title: Re: Step-by-step: Masternode on VPS
Post by: def15 on January 31, 2015, 08:32:36 AM
So is the guide 100% fool proof from start to finish?

Does the guide explain adding multiple masternodes to one vps?

Thanks vertoe!
Title: Re: Step-by-step: Masternode on VPS
Post by: MyFarm on January 31, 2015, 09:23:22 AM
So is the guide 100% fool proof from start to finish?

Does the guide explain adding multiple masternodes to one vps?

Thanks vertoe!

Not quite yet.  A couple minor edits need to be made.

It doesn't explain adding multiple masternodes yet.  I was hoping to bounty that as well.
Title: Re: Step-by-step: Masternode on VPS
Post by: GilAlexander on January 31, 2015, 11:38:52 AM
It doesn't explain adding multiple masternodes yet.

If you have multiple mns, your .conf will be:
Code: [Select]
mnstart=
mnstart=
mnstart=
That's all about multiple masternodes.
Title: Re: Step-by-step: Masternode on VPS
Post by: def15 on January 31, 2015, 03:31:17 PM
It doesn't explain adding multiple masternodes yet.

If you have multiple mns, your .conf will be:
Code: [Select]
mnstart=
mnstart=
mnstart=
That's all about multiple masternodes.

mnstart=[output]
or
mnstart=[privkey]?
Title: Re: Step-by-step: Masternode on VPS
Post by: GilAlexander on January 31, 2015, 03:33:08 PM
It doesn't explain adding multiple masternodes yet.

If you have multiple mns, your .conf will be:
Code: [Select]
mnstart=
mnstart=
mnstart=
That's all about multiple masternodes.

mnstart=[output]
or
mnstart=[privkey]?
mnstart=mnsecret (output of mnsecret command)
Title: Re: Step-by-step: Masternode on VPS
Post by: Strumpet! on January 31, 2015, 07:09:45 PM
It doesn't explain adding multiple masternodes yet.

If you have multiple mns, your .conf will be:
Code: [Select]
mnstart=
mnstart=
mnstart=
That's all about multiple masternodes.

mnstart=[output]
or
mnstart=[privkey]?

Under the Masternode tab, find your potential MN (one with a checkbox) and ctrl+C to copy the output column for that input. Then go to Tools > Debug console and type:
'mnsecret <ctrl+V>'
You will get an ever bigger string spat out. That's what you put in the 'mnstart=...' line in your spreadcoin.conf.
Title: Re: Step-by-step: Masternode on VPS
Post by: def15 on January 31, 2015, 07:10:15 PM
It doesn't explain adding multiple masternodes yet.

If you have multiple mns, your .conf will be:
Code: [Select]
mnstart=
mnstart=
mnstart=
That's all about multiple masternodes.

mnstart=[output]
or
mnstart=[privkey]?
mnstart=mnsecret (output of mnsecret command)

mnsecret command, what's that?
What is the command?
Where do i enter the command?

I may sound retarded, but i'm not going to be the only one asking these questions.
Could vertoe add the method of obtaining the mnsecret and where to add it, to the guide?
Title: Re: Step-by-step: Masternode on VPS
Post by: def15 on January 31, 2015, 07:12:17 PM
It doesn't explain adding multiple masternodes yet.

If you have multiple mns, your .conf will be:
Code: [Select]
mnstart=
mnstart=
mnstart=
That's all about multiple masternodes.

mnstart=[output]
or
mnstart=[privkey]?

Under the Masternode tab, find your potential MN (one with a checkbox) and ctrl+C to copy the output column for that input. Then go to Tools > Debug console and type:
'mnsecret <ctrl+V>'
You will get an ever bigger string spat out. That's what you put in the 'mnstart=...' line in your spreadcoin.conf.

Awesome, exactly what should be added to the guide  ;D
Title: Re: Step-by-step: Masternode on VPS
Post by: georgem on February 01, 2015, 02:54:36 PM
I don't seem to be able to compile on my ubuntu server.

Not even 5 sec after the compilation start it stopped with the following error:

(http://i.imgur.com/YSnu3rE.png?1)

Here as copy paste:

Code: [Select]
[email protected]:/usr/spreadcoin/src# make -j4 -f makefile.unix USE_UPNP=
/bin/sh ../share/genbuild.sh obj/build.h
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/checkpoints.d -o obj/checkpoints.o checkpoints.cpp
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/db.d -o obj/db.o db.cpp
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/init.d -o obj/init.o init.cpp
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/main.d -o obj/main.o main.cpp
In file included from checkpoints.cpp:10:0:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
In file included from db.h:8:0,
                 from db.cpp:6:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
In file included from db.h:8:0,
                 from main.cpp:8:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
In file included from txdb.h:8:0,
                 from init.cpp:6:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
main.cpp: In member function ‘bool CBlock::CheckBlock(CValidationState&, bool, bool) const’:
main.cpp:2638:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
main.cpp: In function ‘void SpreadCoinMiner(CWallet*)’:
main.cpp:5325:49: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.6/backward/auto_ptr.h:87) [-Wdeprecated-declarations]
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/checkpoints.o] Error 1
make: *** Waiting for unfinished jobs....
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/db.o] Error 1
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/init.o] Error 1
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/main.o] Error 1
[email protected]:/usr/spreadcoin/src#
Title: Re: Step-by-step: Masternode on VPS
Post by: girino on February 01, 2015, 03:07:04 PM
I don't seem to be able to compile on my ubuntu server.

Not even 5 sec after the compilation start it stopped with the following error:

(http://i.imgur.com/YSnu3rE.png?1)

Here as copy paste:

Code: [Select]
[email protected]:/usr/spreadcoin/src# make -j4 -f makefile.unix USE_UPNP=
/bin/sh ../share/genbuild.sh obj/build.h
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/checkpoints.d -o obj/checkpoints.o checkpoints.cpp
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/db.d -o obj/db.o db.cpp
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/init.d -o obj/init.o init.cpp
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/main.d -o obj/main.o main.cpp
In file included from checkpoints.cpp:10:0:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
In file included from db.h:8:0,
                 from db.cpp:6:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
In file included from db.h:8:0,
                 from main.cpp:8:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
In file included from txdb.h:8:0,
                 from init.cpp:6:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
main.cpp: In member function ‘bool CBlock::CheckBlock(CValidationState&, bool, bool) const’:
main.cpp:2638:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
main.cpp: In function ‘void SpreadCoinMiner(CWallet*)’:
main.cpp:5325:49: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.6/backward/auto_ptr.h:87) [-Wdeprecated-declarations]
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/checkpoints.o] Error 1
make: *** Waiting for unfinished jobs....
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/db.o] Error 1
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/init.o] Error 1
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/main.o] Error 1
[email protected]:/usr/spreadcoin/src#

You seem to have the wrong version of libboost. What version of ubuntu are you using?

or maybe you didn't install libboost?
Code: [Select]
sudo apt-get install libboost-all-dev
Title: Re: Step-by-step: Masternode on VPS
Post by: georgem on February 01, 2015, 03:13:57 PM
You seem to have the wrong version of libboost. What version of ubuntu are you using?

or maybe you didn't install libboost?
Code: [Select]
sudo apt-get install libboost-all-dev

If I do this, it tells me that I already have the newest version.

Code: [Select]
[email protected]:/usr/spreadcoin/src# apt-get install libboost-all-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libboost-all-dev is already the newest version.
The following packages were automatically installed and are no longer required:
  linux-image-3.2.0-73-generic linux-image-3.2.0-68-generic linux-image-3.2.0-60-generic linux-headers-3.2.0-70-generic
  linux-headers-3.2.0-65-generic linux-image-3.2.0-63-generic linux-headers-3.2.0-60 linux-headers-3.2.0-61
  linux-headers-3.2.0-63 linux-headers-3.2.0-64 linux-headers-3.2.0-59 linux-headers-3.2.0-70 linux-headers-3.2.0-65
  linux-headers-3.2.0-72 linux-headers-3.2.0-73 linux-headers-3.2.0-68 linux-headers-3.2.0-69
  linux-headers-3.2.0-73-generic linux-headers-3.2.0-68-generic linux-headers-3.2.0-60-generic
  linux-headers-3.2.0-63-generic linux-image-3.2.0-69-generic linux-image-3.2.0-35-generic linux-image-3.2.0-61-generic
  linux-image-3.2.0-64-generic linux-image-3.2.0-59-generic linux-headers-3.2.0-69-generic
  linux-headers-3.2.0-61-generic linux-image-3.2.0-72-generic linux-headers-3.2.0-64-generic
  linux-headers-3.2.0-59-generic linux-headers-3.2.0-72-generic linux-image-3.2.0-70-generic
  linux-image-3.2.0-65-generic
Use 'apt-get autoremove' to remove them.
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.

My ubuntu version is this:

Code: [Select]
[email protected]:/usr/spreadcoin/src# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.5 LTS"

My boost version is:

Code: [Select]
[email protected]:/usr/spreadcoin/src# dpkg -s libboost-dev | grep 'Version'
Version: 1.48.0.2
Title: Re: Step-by-step: Masternode on VPS
Post by: GilAlexander on February 01, 2015, 03:14:31 PM
I don't seem to be able to compile on my ubuntu server.

I'm fine with
Code: [Select]
sudo apt-get install qt4-qmake libqt4-dev build-essential libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev libdb++-dev libminiupnpc-dev
git clone -b mn-test https://github.com/spreadcoin-project/spreadcoin/ && cd spr*/src/ && make -j4 -f makefile.unix USE_UPNP=
Some deps are redundant (qt) but I was bored (that was copied from some manual for darkcoin).
Title: Re: Step-by-step: Masternode on VPS
Post by: georgem on February 01, 2015, 03:18:03 PM
Well, what version of boost do we need exactly for spreadcoin to compile correctly?
Is there a list that mentions the versions of all necessary moduls?
Title: Re: Step-by-step: Masternode on VPS
Post by: GilAlexander on February 01, 2015, 03:26:31 PM
Well, what version of boost do we need exactly for spreadcoin to compile correctly?
Is there a list that mentions the versions of all necessary moduls?
https://github.com/spreadcoin-project/spreadcoin/blob/mn-test/doc/build-unix.md must describe that (if Mr. Spread actualized it).
Did you tried plain "make -f makefile.unix"?
Title: Re: Step-by-step: Masternode on VPS
Post by: georgem on February 01, 2015, 03:30:54 PM
Well, what version of boost do we need exactly for spreadcoin to compile correctly?
Is there a list that mentions the versions of all necessary moduls?
https://github.com/spreadcoin-project/spreadcoin/blob/mn-test/doc/build-unix.md must describe that (if Mr. Spread actualized it).
Did you tried plain "make -f makefile.unix"?

Same errors.

I checked the link you gave me earlier, it is just a copy from some older bitcoin related version I believe. I don't think that Mr. Spread has updated it. (Except changed the word bitcoin to spreadcoin) because it talks about Boost Version 1.37 which most certainly is too old.
Title: Re: Step-by-step: Masternode on VPS
Post by: GilAlexander on February 01, 2015, 03:45:14 PM
Same errors.

I checked the link you gave me earlier, it is just a copy from some older bitcoin related version I believe. I don't think that Mr. Spread has updated it. (Except changed the word bitcoin to spreadcoin) because it talks about Boost Version 1.37 which most certainly is too old.

I have:
Code: [Select]
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"
# dpkg -s libboost-dev | grep 'Version'
Version: 1.54.0.1ubuntu1
Title: Re: Step-by-step: Masternode on VPS
Post by: georgem on February 01, 2015, 03:50:03 PM
Same errors.

I checked the link you gave me earlier, it is just a copy from some older bitcoin related version I believe. I don't think that Mr. Spread has updated it. (Except changed the word bitcoin to spreadcoin) because it talks about Boost Version 1.37 which most certainly is too old.

I have:
Code: [Select]
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"
# dpkg -s libboost-dev | grep 'Version'
Version: 1.54.0.1ubuntu1

I assume my "precise" ubuntu version is much more unforgiving then your "trusty" version, lol...

ok, i'll do an upgrade to 14.04
Title: Re: Step-by-step: Masternode on VPS
Post by: girino on February 01, 2015, 06:22:37 PM
Same errors.

I checked the link you gave me earlier, it is just a copy from some older bitcoin related version I believe. I don't think that Mr. Spread has updated it. (Except changed the word bitcoin to spreadcoin) because it talks about Boost Version 1.37 which most certainly is too old.

I have:
Code: [Select]
# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"
# dpkg -s libboost-dev | grep 'Version'
Version: 1.54.0.1ubuntu1

I assume my "precise" ubuntu version is much more unforgiving then your "trusty" version, lol...

ok, i'll do an upgrade to 14.04

Before that you can try to update your boost to a newer version. I think you can do

Code: [Select]
apt-get install libboost1.51-all-dev
(or something newer than 1.51). The default for 12.04 is boost 1.48, that is quite outdated.
Title: Re: Step-by-step: Masternode on VPS
Post by: georgem on February 01, 2015, 07:21:07 PM

Before that you can try to update your boost to a newer version. I think you can do

Code: [Select]
apt-get install libboost1.51-all-dev
(or something newer than 1.51). The default for 12.04 is boost 1.48, that is quite outdated.

It seems that my server has a general problem with the repositories. I need to fix that.
Title: Re: Step-by-step: Masternode on VPS
Post by: vertoe on February 01, 2015, 08:38:30 PM
so, was away for the weekend. fixed the one error in OP. anything else missing?
Title: Re: Step-by-step: Masternode on VPS
Post by: MyFarm on February 01, 2015, 09:18:03 PM
so, was away for the weekend. fixed the one error in OP. anything else missing?

Could you change:
Quote
Local: Generate a masternode secret from the transaction input. if input:0 fails, try:1, and so on until you get what you want:

To

Quote
Local: Generate a masternode secret from the transaction input by going to the console at tools > debug console. if input:0 fails, try:1, and so on until you get what you want:


Is the address in the original post where you want the SPR sent still?  I'll send it as soon as you confirm.

For another 200 SPR, would you be game to add how to get multiple masternodes going on the VPS?
Title: Re: Step-by-step: Masternode on VPS
Post by: georgem on February 02, 2015, 01:03:36 AM

Before that you can try to update your boost to a newer version. I think you can do

Code: [Select]
apt-get install libboost1.51-all-dev
(or something newer than 1.51). The default for 12.04 is boost 1.48, that is quite outdated.

It seems that my server has a general problem with the repositories. I need to fix that.

I gave up trying to compile it directly on the server.
Instead I used virtualbox, and downloaded an iso of ubuntu 14, and ran it as a virtual instance on my pc. And then I did the compiling there, in a virtual box.
And it worked immediately.
Then I uploaded the daemon to the server. Voila.
Why didn't I think so earlier.  8)

Title: Re: Step-by-step: Masternode on VPS
Post by: vertoe on February 02, 2015, 09:14:39 AM
so, was away for the weekend. fixed the one error in OP. anything else missing?

Could you change:
Quote
Local: Generate a masternode secret from the transaction input. if input:0 fails, try:1, and so on until you get what you want:

To

Quote
Local: Generate a masternode secret from the transaction input by going to the console at tools > debug console. if input:0 fails, try:1, and so on until you get what you want:


Is the address in the original post where you want the SPR sent still?  I'll send it as soon as you confirm.

For another 200 SPR, would you be game to add how to get multiple masternodes going on the VPS?

Fixed and added instructions for multimasternodesetups, there is quite a nice bounty piling up already lol :-)
Title: Re: Step-by-step: Masternode on VPS
Post by: elbandi on February 02, 2015, 09:41:27 AM
I don't seem to be able to compile on my ubuntu server.

Not even 5 sec after the compilation start it stopped with the following error:

Here as copy paste:

Code: [Select]
[email protected]:/usr/spreadcoin/src# make -j4 -f makefile.unix USE_UPNP=
/bin/sh ../share/genbuild.sh obj/build.h
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/checkpoints.d -o obj/checkpoints.o checkpoints.cpp
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/db.d -o obj/db.o db.cpp
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/init.d -o obj/init.o init.cpp
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/main.d -o obj/main.o main.cpp
In file included from checkpoints.cpp:10:0:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
In file included from db.h:8:0,
                 from db.cpp:6:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
In file included from db.h:8:0,
                 from main.cpp:8:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
In file included from txdb.h:8:0,
                 from init.cpp:6:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
main.cpp: In member function ‘bool CBlock::CheckBlock(CValidationState&, bool, bool) const’:
main.cpp:2638:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
main.cpp: In function ‘void SpreadCoinMiner(CWallet*)’:
main.cpp:5325:49: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.6/backward/auto_ptr.h:87) [-Wdeprecated-declarations]
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/checkpoints.o] Error 1
make: *** Waiting for unfinished jobs....
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/db.o] Error 1
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/init.o] Error 1
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/main.o] Error 1
[email protected]:/usr/spreadcoin/src#

You need at least ubuntu precise for build spreadcoin. (boost 1.48 version).
And there is a "missing include bug", this line sould be added to main.h:
Code: [Select]
#include <boost/functional/hash_fwd.hpp>

like here:
Code: [Select]
#include <list>
#include <algorithm>
#include <boost/lexical_cast.hpp>
#include <boost/functional/hash_fwd.hpp>

Elbandi
Title: Re: Step-by-step: Masternode on VPS
Post by: MyFarm on February 02, 2015, 04:32:30 PM
800 SPR sent.  Thank you Vertoe!
Title: Re: Step-by-step: Masternode on VPS
Post by: georgem on February 02, 2015, 10:33:05 PM
I don't seem to be able to compile on my ubuntu server.

Not even 5 sec after the compilation start it stopped with the following error:

Here as copy paste:

Code: [Select]
[email protected]:/usr/spreadcoin/src# make -j4 -f makefile.unix USE_UPNP=
/bin/sh ../share/genbuild.sh obj/build.h
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/checkpoints.d -o obj/checkpoints.o checkpoints.cpp
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/db.d -o obj/db.o db.cpp
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/init.d -o obj/init.o init.cpp
g++ -c -O2 -pthread -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -std=gnu++0x -Wno-literal-suffix -g -DBOOST_SPIRIT_THREADSAFE -D_FILE_OFFSET_BITS=64 -I/usr/spreadcoin/src -I/usr/spreadcoin/src/obj -DUSE_IPV6=1 -I/usr/spreadcoin/src/leveldb/include -I/usr/spreadcoin/src/leveldb/helpers -DHAVE_BUILD_INFO -fno-stack-protector -fstack-protector-all -Wstack-protector -D_FORTIFY_SOURCE=2  -MMD -MF obj/main.d -o obj/main.o main.cpp
In file included from checkpoints.cpp:10:0:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
In file included from db.h:8:0,
                 from db.cpp:6:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
In file included from db.h:8:0,
                 from main.cpp:8:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
In file included from txdb.h:8:0,
                 from init.cpp:6:
main.h: In function ‘std::size_t hash_value(COutPoint)’:
main.h:345:5: error: ‘hash_combine’ is not a member of ‘boost’
main.cpp: In member function ‘bool CBlock::CheckBlock(CValidationState&, bool, bool) const’:
main.cpp:2638:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
main.cpp: In function ‘void SpreadCoinMiner(CWallet*)’:
main.cpp:5325:49: warning: ‘auto_ptr’ is deprecated (declared at /usr/include/c++/4.6/backward/auto_ptr.h:87) [-Wdeprecated-declarations]
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/checkpoints.o] Error 1
make: *** Waiting for unfinished jobs....
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/db.o] Error 1
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/init.o] Error 1
At global scope:
cc1plus: warning: unrecognised command line option "-Wno-literal-suffix" [enabled by default]
make: *** [obj/main.o] Error 1
[email protected]:/usr/spreadcoin/src#

You need at least ubuntu precise for build spreadcoin. (boost 1.48 version).
And there is a "missing include bug", this line sould be added to main.h:
Code: [Select]
#include <boost/functional/hash_fwd.hpp>

like here:
Code: [Select]
#include <list>
#include <algorithm>
#include <boost/lexical_cast.hpp>
#include <boost/functional/hash_fwd.hpp>

Elbandi

Thanks for explaining this error.
It helped alot.

So I edited the main.h and restarted the build process on my ubuntu 12 precise version and it went on for 2 minutes or so, until a new error along the same lines appeared:
This time complaining about a missing boost/chrono.cpp in masternodes.cpp.

Code: [Select]
masternodes.cpp:1:28: fatal error: boost/chrono.hpp: No such file or directory
compilation terminated.

So I thought, maybe this file is missing an include too, but as it seems masternodes.cpp does have a boost/chrono.hpp included...

Code: [Select]
#include <boost/chrono.hpp>
So what is the problem now?
Title: Re: Step-by-step: Masternode on VPS
Post by: elbandi on February 02, 2015, 10:42:44 PM
So I edited the main.h and restarted the build process on my ubuntu 12 precise version and it went on for 2 minutes or so, until a new error along the same lines appeared:
This time complaining about a missing boost/chrono.cpp in masternodes.cpp.

Code: [Select]
masternodes.cpp:1:28: fatal error: boost/chrono.hpp: No such file or directory
compilation terminated.

So I thought, maybe this file is missing an include too, but as it seems masternodes.cpp does have a boost/chrono.hpp included...

Code: [Select]
#include <boost/chrono.hpp>
So what is the problem now?
Is libboost1.48-dev package installed?

http://packages.ubuntu.com/search?searchon=contents&keywords=chrono.hpp&mode=exactfilename&suite=precise&arch=any

Elbandi
Title: Re: Step-by-step: Masternode on VPS
Post by: georgem on February 02, 2015, 10:46:54 PM
So I edited the main.h and restarted the build process on my ubuntu 12 precise version and it went on for 2 minutes or so, until a new error along the same lines appeared:
This time complaining about a missing boost/chrono.cpp in masternodes.cpp.

Code: [Select]
masternodes.cpp:1:28: fatal error: boost/chrono.hpp: No such file or directory
compilation terminated.

So I thought, maybe this file is missing an include too, but as it seems masternodes.cpp does have a boost/chrono.hpp included...

Code: [Select]
#include <boost/chrono.hpp>
So what is the problem now?
Is libboost1.48-dev package installed?

http://packages.ubuntu.com/search?searchon=contents&keywords=chrono.hpp&mode=exactfilename&suite=precise&arch=any

Elbandi

Yes, I think so.

If I do a

Code: [Select]
dpkg -s libboost-dev | grep 'Version'
it tells me I have:

Code: [Select]
Version: 1.48.0.2
Title: Re: Step-by-step: Masternode on VPS
Post by: georgem on February 02, 2015, 10:50:40 PM
Where does the boost library have to be located?

If I do a

Code: [Select]
locate boost
I get

Code: [Select]
/usr/lib/libboost_iostreams.so.1.46.1
/usr/share/doc/libboost-iostreams1.46.1
/usr/share/doc/libboost-iostreams1.46.1/NEWS.Debian.gz
/usr/share/doc/libboost-iostreams1.46.1/README.Debian.gz
/usr/share/doc/libboost-iostreams1.46.1/changelog.Debian.gz
/usr/share/doc/libboost-iostreams1.46.1/copyright
/usr/share/lintian/overrides/libboost-iostreams1.46.1
/usr/src/linux-headers-3.2.0-59/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-59/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-59/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-60/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-60/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-60/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-61/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-61/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-61/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-63/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-63/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-63/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-64/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-64/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-64/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-65/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-65/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-65/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-67/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-67/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-67/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-68/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-68/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-68/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-69/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-69/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-69/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-70/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-70/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-70/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-72/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-72/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-72/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-73/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-73/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-73/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-74/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-74/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-74/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/usr/src/linux-headers-3.2.0-75/scripts/rt-tester/t4-l2-pi-deboost.tst
/usr/src/linux-headers-3.2.0-75/scripts/rt-tester/t5-l4-pi-boost-deboost-setsche                         d.tst
/usr/src/linux-headers-3.2.0-75/scripts/rt-tester/t5-l4-pi-boost-deboost.tst
/var/lib/dpkg/info/libboost-iostreams1.46.1.list
/var/lib/dpkg/info/libboost-iostreams1.46.1.md5sums
/var/lib/dpkg/info/libboost-iostreams1.46.1.postinst
/var/lib/dpkg/info/libboost-iostreams1.46.1.postrm
/var/lib/dpkg/info/libboost-iostreams1.46.1.shlibs

Is this correct? Or are my locations messed up?
Title: Re: Step-by-step: Masternode on VPS
Post by: elbandi on February 02, 2015, 11:47:23 PM
If I do a

Code: [Select]
dpkg -s libboost-dev | grep 'Version'
it tells me I have:

Code: [Select]
Version: 1.48.0.2
Oh, f*cking ubuntu... something is wrong on precise :(

http://packages.ubuntu.com/precise/libboost-dev depend on wrong package: libboost1.46-dev not libboost1.48-dev

You have to remove all 1.46 boost library/dev (old wrong package)
Code: [Select]
dpkg -l|grep 1.46
And install this: http://packages.ubuntu.com/precise/libboost1.48-all-dev
Title: Re: Step-by-step: Masternode on VPS
Post by: vertoe on February 03, 2015, 09:49:22 AM
Just use arch linux and all the pain will go away :-)

edit, thanks myfarm & def15
Title: Re: Step-by-step: Masternode on VPS
Post by: Mikolo on February 09, 2015, 02:12:01 PM
Assuming i'm storing coins in my local wallet and use masternode secret on VPS, will I need to keep my local computer running all the time?
Title: Re: Step-by-step: Masternode on VPS
Post by: GilAlexander on February 09, 2015, 03:37:33 PM
Assuming i'm storing coins in my local wallet and use masternode secret on VPS, will I need to keep my local computer running all the time?
No.
Title: Re: Step-by-step: Masternode on VPS
Post by: Strumpet! on February 09, 2015, 06:37:45 PM
For anyone running a VPS or using the daemon locally, here's a quick little python script for building your spreadcoin.conf. Much faster than buggering about guessing output numbers for multiple Masternodes.

1. Place magic.py (cut and paste the code at the bottom of this post into a text file called magic.py) in your .spreadtest2coin directory of your local machine. If it isn't already, place your spreadcoind daemon in there too.

2. Use the QT client to cut and paste all your MN outputs into a text file "outputs.conf" in the .spreadtest2coin directory - no blank lines, just one output on each line.
3. Close the QT client.

4. On your local machine, make sure you have a basic spreadcoin.conf in your /home/user/.spreadtest2coin directory:
Code: [Select]
rpcuser=you
rcpassword=blah
rpcallowip=127.0.0.1
server=1
daemon=1

5. Start spreadcoind on your local machine
Code: [Select]
./spreadcoind

6. Unlock your wallet if required
Code: [Select]
./spreadcoind walletpassphrase <passphrase> 60

7. Run magic.py - it will run 'mnsecret' for all the outputs in your outputs.txt and add the correct 'mnstart=...' line to your spreadcoin.conf.
Code: [Select]
python magic.py

8. Copy the generated spreadcoin.conf to your VPS:
Code: [Select]
scp spreadcoin.conf [email protected]:/home/user/.spreadtest2coin

9. Restart spreadcoind on your VPS to start all your Masternodes.
Code: [Select]
./spreadcoind stop
./spreadcoind

magic.py:
Code: [Select]
#!/usr/bin/python

import sys, os, subprocess

def magic():
m = 'outputs.txt'
with open(m, mode="r") as f:
a = [line.strip() for line in f]
for line in a:
try:
cmd = './spreadcoind mnsecret ' + line
print cmd
r = subprocess.check_output(cmd, shell=True)
print r
with open("spreadcoin.conf", mode="a") as conf:
conf.write("mnstart=" + str(r))
except:
print 'Error! - check spreadcoind is running, you have rpcuser=blah and rpcpassword=blahblah lines in your spreadcoin.conf, your wallet is unlocked and the outputs in your outputs.txt are yours. You will also get this error if you have blank lines in your outputs.txt.'
sys.exit()

magic()
Title: Re: Step-by-step: Masternode on VPS
Post by: needmoney on February 19, 2015, 07:12:28 PM
Is there windows vps guide ?