Pages:
Author

Topic: Avalon users: bitcoind and slush's/generalfaults mining pool setup - page 7. (Read 39216 times)

legendary
Activity: 1764
Merit: 1002
so in this part doesn't the username and password have to match that in the bitcoin.conf file?

"you should be able to point your miner at

http://YOURHOSTNAMEORIPADDRESS:3333

eg cgminer -o yourhostnameORIPADRESS:3333 -u guest -p guest

(the guest can bereplaced by any username/password you want)"
full member
Activity: 176
Merit: 100
The database libraries havent been installed, more then likely this one libdb4.8++-dev

its one of the .deb packages you download and installed with sudo dpkg -i

You will have to install libdb4.8++ first

Just double check all the dependencies are installed

Code:
sudo apt-get install build-essential
sudo apt-get install libssl-dev
sudo apt-get install libboost-all-dev
sudo apt-get install libminiupnpc-dev

wget https://launchpad.net/~bitcoin/+archive/bitcoin/+files/libdb4.8_4.8.30-quantal2_i386.deb
wget https://launchpad.net/~bitcoin/+archive/bitcoin/+files/libdb4.8-dev_4.8.30-quantal2_i386.deb
wget https://launchpad.net/~bitcoin/+archive/bitcoin/+files/libdb4.8%2B%2B_4.8.30-quantal2_i386.deb
wget https://launchpad.net/~bitcoin/+archive/bitcoin/+files/libdb4.8%2B%2B-dev_4.8.30-quantal2_i386.deb

sudo dpkg -i libdb4.8_4.8.30-quantal2_i386.deb
sudo dpkg -i libdb4.8-dev_4.8.30-quantal2_i386.deb
sudo dpkg -i libdb4.8++_4.8.30-quantal2_i386.deb
sudo dpkg -i libdb4.8++-dev_4.8.30-quantal2_i386.deb

If its a 64bit install use the 64bit libraries in the other post.
legendary
Activity: 1764
Merit: 1002
i'm reinstalling on new ssd.  when i try to build with:

Code:
make -f makefile.unix

i get this:

Code:
In file included from db.cpp:6:0:
db.h:14:20: fatal error: db_cxx.h: No such file or directory
compilation terminated.
make: *** [obj/db.o] Error 1
cypher@server:~/git/bitcoin/src$

full member
Activity: 176
Merit: 100
I have changed the git repo from gavins to the bitcoin one and changed the version to currrent release 0.8.1

You may wish to to rebuild,
once logged in
Code:

cd git
rm -rf bitcoind-git

git clone https://github.com/bitcoin/bitcoin.git
git checkout 0.8.1

cd bitcoin/src
make -f makefile.unix

once it has done copy it over the current bitcoind

Code:
sudo cp bitcoind /usr/local/bin/bitcoind

cool thanks for the script for the pool server, its running it as root though. People may want to change that when they use it.
sr. member
Activity: 490
Merit: 255
I have been playing around with an upstart script for the pool tonight.

Code:
description "Start and stop slush on bitcoind start"

respawn
expect fork

start on started bitcoind
stop on stopped bitcoind

pre-start script
   sleep 30
end script

chdir /pool/build/slushbuild/stratum-mining
exec twistd --syslog -ny launcher.tac &


You will need to change the "chdir" to the path to your stratum mining directory to have this work for you.
Copy the edited content into /etc/init/slushpool.conf

I put in a 30 second delay in the pre-start, so bitcoind has a opportunity to get started enough to accept the RCP calls.  I was finding that slushpool was starting up too early and not able to communicate with bitcoind.

Feel free to see if it works for you guys too.
full member
Activity: 176
Merit: 100


This is from this thread https://bitcointalksearch.org/topic/ubuntudebian-startup-script-965

Thanks to  phungus and gigavps

Code:
sudo pico /etc/init/bitcoind.conf

Then paste this into the file
Code:
# bitcoind upstart script for Ubuntu

description "Bitcoin daemon"

start on runlevel [2345]
stop on runlevel [!2345]

respawn
exec su -c "/usr/local/bin/bitcoind" - joe

For a testnet version replace  the above exec line
with this
Code:
exec su -c "/usr/local/bin/bitcoind -testnet" - joe

For anyone else wanting to use this replace joe with your username.

If you want to start, stop or restart it is one of the following commands, it should start it self automatically when the machine boots.

sudo start bitcoind
sudo stop bitcoind
sudo restart bitcoind


If you use bitcoind stop , the upstart script will auto restart it so if you want to stop it must use the above stop command.

For the pool server, I am not sure as it depends on how the include directories are set in launcher.tac, someone else might be able to help with that. I will have a poke at it over this week.
full member
Activity: 176
Merit: 100
The first part is so you can send the btc you mine straight to another valid wallet of yours. Leave is as False and use the local bitcoind wallet if you want.

 But if you don't understand how to send btc out of bitcoind and its also more secure in the end to send them to another wallet address YOU own(as it says in the the tute don't use the address listed there). Whether that is a windows/mac bitcoin client wallet or something like a block chain wallet or cold storage one?(don't know much about cold storage). Then set it to True

When you finished testing on testnet and you go to mine real btc you have to make sure you have one of your btc wallet addresses in the first line of config.py

Thanks for the tip Cheesy

Ill have a look at second part when I finish work there is a script somewhere already on he forums.
legendary
Activity: 1764
Merit: 1002
can you clarify these parts in the OP, please?:

"further down in the config.py file find this line ALLOW_NONLOCAL_WALLET = True                            # Allow valid, but NON-Local wallet's

change ALLOW_NONLOCAL_WALLET = False
to

ALLOW_NONLOCAL_WALLET = True"

"(On headless servers, You can use screen to run the server in so you can rettach back to screen and see the output of the server. just type screen on the command

line and it will lod up to a new command prompt, start the server as usal. when you done before you disccount or close your ssh session do a cntrl d  which will

detach screen. When you login next and want to look at the pool server output type screen -r on the command line.)"

"If the machine is rebooted for some reason you will have to start bitcoind and the pool server again. This can be automated if you want."

It would be cool if you could show us how to auto start bitcoind and the pool server in the event of a temporary power outage.

0.5 BTC tip sent.  Thanks.  Cheesy
legendary
Activity: 1764
Merit: 1002
They are in the unix timestamp format

You can use this to decode them.
http://www.unixtimestamp.com/index.php


more info http://en.wikipedia.org/wiki/Unix_time

blocknotify looks good, you change the prev_hash check time ?

yep.  to 60 like you said.
full member
Activity: 176
Merit: 100
They are in the unix timestamp format

You can use this to decode them.
http://www.unixtimestamp.com/index.php


more info http://en.wikipedia.org/wiki/Unix_time

blocknotify looks good, you change the prev_hash check time ?


edit:testnet coins if you dont have any use for them send them here http://tpfaucet.appspot.com/

Also a list of the bitcoind api calls https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list
legendary
Activity: 1764
Merit: 1002
looks ok, when the blocknotify runs from bitcoind does the out put say the same as when tested ? eg blocknotify done in 0.20 (the time changes)seconds?

joe@cypher:~/git/stratum-mining$ blocknotify: done in 0.397 sec
blocknotify: done in 0.436 sec
blocknotify: done in 0.338 sec
blocknotify: done in 0.404 sec
blocknotify: done in 0.393 sec
blocknotify: done in 0.350 sec
blocknotify: done in 0.310 sec
blocknotify: done in 0.412 sec
blocknotify: done in 0.424 sec
blocknotify: done in 0.473 sec
blocknotify: done in 0.395 sec
blocknotify: done in 0.361 sec
blocknotify: done in 0.385 sec

Quote
Also the passwords are different as you are meant to be using your passwords that you choose, not the ones in the tute.

You didnt use the rpc password from the tute ? you used the one bitcoind generated when you first ran it ?

If its the one from the tute page I would change it.

as i said, i'm just testing right now so i will change pwd's when my avalons come  Cheesy
full member
Activity: 176
Merit: 100
looks ok, when the blocknotify runs from bitcoind does the out put say the same as when tested ? eg blocknotify done in 0.20 (the time changes)seconds?

Also the passwords are different as you are meant to be using your passwords that you choose, not the ones in the tute.

You didnt use the rpc password from the tute ? you used the one bitcoind generated when you first ran it ?

If its the one from the tute page I would change it.
legendary
Activity: 1764
Merit: 1002
can you help me decipher these times from bitcoind listtransactions?:

Code:
"time" : 1365293126,
        "timereceived" : 1365293162
legendary
Activity: 1764
Merit: 1002
this looks good does it not?

Code:
9aea940cefe1faf5549840da80 (1) valid bitcoinrpc
2013-04-06 16:54:48,236 INFO interfaces # 00000000f8400ebc85c8eb041171b2d000a3930a52c46d4c69b0ecfbcdf6ec0b (1) valid bitcoinrpc
2013-04-06 16:55:19,929 INFO interfaces # 00000000505b58c68d9fc08ae1f87401fa6558dba4365bf72c6d4b132a491172 (3) valid bitcoinrpc
2013-04-06 16:55:21,250 INFO template_registry # We found a block candidate! 000000000179cce0c344803c172878b87a6ce63c8508b7c673e7564e78687040
2013-04-06 16:55:21,253 INFO interfaces # 000000000179cce0c344803c172878b87a6ce63c8508b7c673e7564e78687040 (173) valid bitcoinrpc
2013-04-06 16:55:21,486 INFO interfaces # Block 000000000179cce0c344803c172878b87a6ce63c8508b7c673e7564e78687040 ACCEPTED
2013-04-06 16:55:21,486 INFO DBInterface # Updating Found Block Share Record
2013-04-06 16:55:21,487 INFO DBInterface # Inserting 5 Share Records
2013-04-06 16:55:21,924 INFO stats # 2 peers connected, state changed 1 times
2013-04-06 16:55:21,925 INFO mining # New block notification received
2013-04-06 16:55:21,928 INFO stats # 1 peers connected, state changed 1 times
2013-04-06 16:55:21,934 INFO template_registry # New template for 000000000179cce0c344803c172878b87a6ce63c8508b7c673e7564e78687040
2013-04-06 16:55:21,934 INFO subscription # BROADCASTED to 1 connections in 0.000 sec
2013-04-06 16:55:21,934 INFO template_registry # Update finished, 0.002 sec, 1 txes
legendary
Activity: 1764
Merit: 1002
i think you have an inconsistency in the passwords used in tute; "somepassword" & "somepassword1"

messed me up since i am just testing right now cutting and pasting everything. Tongue
full member
Activity: 176
Merit: 100
I have edited it to fix it. How it is was written will work from your home directory, but following the tute means you  are already in the stratum mining directory.

This should work as well
Code:
/home/joe/git/stratum-mining/scripts/blocknotify.sh --password somepassword1 --host localhost --port 3333

This will be needed in the end if you put it in the bitcoin.conf file anyway.

Just remember on most linux distributions the user home directories are nearly always in the format of /home/username


I
legendary
Activity: 1764
Merit: 1002
per your instructions here:

at a new command prompt

Code:
./git/stratum-mining/scripts/blocknotify.sh --password somepassword1 --host localhost --port 3333

if its working it should display something like below (the amount of time it takes to notify will change each time)

blocknotify: done in 0.012 sec

i instead get this while server is running:

Code:
joe@cypher:~/git/stratum-mining$ ./git/stratum-mining/scripts/blocknotify.sh --password somepassword1 --host localhost --port 3333
bash: ./git/stratum-mining/scripts/blocknotify.sh: No such file or directory
joe@cypher:~/git/stratum-mining$
full member
Activity: 176
Merit: 100
Its in there.. its not in a code block though.

edit: the reason stats may not have been working properly before you mined, could be there was no values in the database for it to read and this was causing the error?
hero member
Activity: 481
Merit: 500
I didn't see this note in the writeup:  "PREVHASH_REFRESH_INTERVAL = to the same value as MERKLE_REFRESH_INTERVAL". I had mine set to 300 instead of the recommended 60. The web display is working now. Still getting mostly untracked shares though.
hero member
Activity: 481
Merit: 500
Thats a no to python3 as far as  I know, I havent seen the error before, did the stats still display?

Maybe ask in this https://bitcointalksearch.org/topic/ann-stratum-mining-protocol-asic-ready-108533

Its the forum for the pool software.

The stats screen displayed before I actually started mining (and it had no shares to display)
Pages:
Jump to: