Bitcoin Forum
September 26, 2017, 01:09:14 PM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 3 4 5 6 »  All
  Print  
Author Topic: Avalon users: bitcoind + eloipool configuration  (Read 35339 times)
jgarzik
Legendary
*
Offline Offline

Activity: 1470


View Profile
March 25, 2013, 03:20:38 PM
 #1

Here is the simple solo mining and mining farm configuration used here.  At current difficulty, ignoring variance, an Avalon should, on average, generate a block every...

Quote
The average time to generate a block at 68000.0 Mhps, given difficulty of 6695826.2826, is 4 days, 21 hours, 28 minutes, and 43 seconds

Pool is probably preferable to most, as you might have incredibly bad luck and not generate a block for a couple weeks.  In any case, here is the bitcoind + eloipool configuration on Linux.

If you like these instructions, there is a donation address in the sig.




bitcoind setup

1) Obtain a compiled bitcoind somehow.  Compiling your own is outside the scope of these instructions.  I'm told there is an Ubuntu PPA somewhere.

2) Decide on a data directory location.  It must be on a fast hard drive, preferably SSD, and have at least 10GB of free space.

3) In this directory, create bitcoin.conf text file, with the following contents:

Code:
rpcuser=MY_RPC_USERNAME
rpcpassword=MY_RPC_PASSWORD
logtimestamps=1

Obviously, change the MY_RPC_xxx to a username and password.

4) Create a newblock.sh script, with the following contents:

Code:
#!/bin/sh

killall -USR1 eloipool.py

Mark it executeable via "chmod 0755 newblock.sh"

5) Create a run-bitcoind.sh script, with the following contents:

Code:
#!/bin/sh

/spare/repo/bitcoin/src/bitcoind \
-datadir=/spare/bitcoin/data -daemon \
-blocknotify=/garz/repo/eloipool/newblock.sh

Mark it executeable via "chmod 0755 run-bitcoind.sh"

You must modify the (a) bitcoind path, (b) -datadir path, and (c) -blocknotify path to fit your local computer.

6) Run bitcoind via the run-bitcoind.sh script.  Watch debug.log in the data directory, to make sure it started the Initial Block Download (bitcoin network sync).  This might take a few hours, to download all the blocks.  If you are technically minded and motivated, you may download the blockchain torrent to give this process a jump-start.



eloipool setup

1) Download eloipool dependencies, either from your Linux packager, or directly:

Python 3                        http://python.org
python-bitcoinrpc       https://github.com/jgarzik/python-bitcoinrpc
python-base58           https://gitorious.org/bitcoin/python-base58
midstate                        http://gitorious.org/midstate/midstate

2) For python-bitcoinrpc, check out an older release,

Code:
$ cd /repo/python-bitcoinrpc
$ git checkout -b solo-mining 770881c8bd9b1f92427290270b37a28751cf9df0

3) Check out eloipool,

Code:
$ git clone git://gitorious.org/bitcoin/eloipool.git

4) Copy config.py.example to config.py, and make the following several edits,

a) change ServerName to something unique

b) increase share target (note increased '0' and decreased 'f'):
Code:
-ShareTarget = 0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff
+ShareTarget = 0x000000000fffffffffffffffffffffffffffffffffffffffffffffffffffffff

c) DynamicTargetting = 2

d) DynamicTargetGoal = 6

e) change TrackerAddr to YOUR bitcoin address

f) comment out CoinbaserCmd,

Code:
-CoinbaserCmd = 'echo -e "1\\n$((%d / 100))\\n1579aXhdwvKZEMrAKoCZhzGuqMa8EonuXU"'
+#CoinbaserCmd = 'echo -e "1\\n$((%d / 100))\\n1579aXhdwvKZEMrAKoCZhzGuqMa8EonuXU"'

g) update TemplateSources to point to your local bitcoind RPC, including chosen username/password, and comment out the secondary source:

Code:
@@ -57,41 +57,41 @@
 TemplateSources = (
        {
                'name': 'primary',
-               'uri': 'http://user:pass@localhost:8332',
+               'uri': 'http://MY_RPC_USERNAME:MY_RPC_PASSWORD@127.0.0.1:8332',
                'priority': 0,
                'weight': 1,
        },
-       {
-               'name': 'secondary',
-               'uri': 'http://user:pass@localhost:18332',
-               'priority': 1,
-               'weight': 1,
-       },
+#      {
+#              'name': 'secondary',
+#              'uri': 'http://user:pass@localhost:18332',
+#              'priority': 1,
+#              'weight': 1,
+#      },
 )

g) empty TemplateChecks (or comment out 100%),

Code:
TemplateChecks = (
 )

h) comment out or delete BlockSubmissions

i) change log settings, and switch from testnet3 mining to mainnet:

Code:
-DelayLogForUpstream = False
+DelayLogForUpstream = True
 
 # Bitcoin p2p server for announcing blocks found
-UpstreamBitcoindNode = ('127.0.0.1', 18333)  # testnet
+UpstreamBitcoindNode = ('127.0.0.1', 8333)
 
 # Network ID for the primary blockchain
 # Other known network IDs can be found at:
 #     https://en.bitcoin.it/wiki/Protocol_specification#Message_structure
-UpstreamNetworkId = b'\xFA\xBF\xB5\xDA'  # testnet
+UpstreamNetworkId = b'\xF9\xBE\xB4\xD9'

j) disable transaction-related bug workaround:

Code:
-POT = 2
+#POT = 2

k) update ShareLogging to reflect your desires.  The simplest is to delete all the SQL-related entries, leaving only the textfile logfile.  With solo mining, you don't care so much about shares.

Code:
ShareLogging = (
        {
                'type': 'logfile',
                'filename': 'share-logfile',
                'format': "{time} {Q(remoteHost)} {username} {YN(not(rejectReason))} {dash(YN(upstreamResult))} {dash(rejectReason)} {solution}\n",
        },
)

l) change log filename to something useful,

Code:
LogFile = {
-       'filename': 'filename.log',
+       'filename': 'eloipool.log',

m) Create a runit.sh script for eloipool, with the contents,

Code:
#!/bin/sh

PYTHONPATH=/spare/repo/python-bitcoinrpc:/garz/repo/python-base58:/garz/repo/midstate \
     nohup ./eloipool.py 2>&1 >/dev/null &

You must change the paths to suit your local system.

n) Run eloipool with runit.sh script

o) Let's assume you are running the pool software on 192.168.1.40 IP address.  Set up your miner configuration like this:

Pool X: stratum+tcp://192.168.1.40:3334
Pool X username: 1NqqjQWXDLAoNycAS2ZryueuhNLJtcjvGy
Pool X password: x


Jeff Garzik, bitcoin core dev team and BitPay engineer; opinions are my own, not my employer.
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
1506431354
Hero Member
*
Offline Offline

Posts: 1506431354

View Profile Personal Message (Offline)

Ignore
1506431354
Reply with quote  #2

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

Posts: 1506431354

View Profile Personal Message (Offline)

Ignore
1506431354
Reply with quote  #2

1506431354
Report to moderator
1506431354
Hero Member
*
Offline Offline

Posts: 1506431354

View Profile Personal Message (Offline)

Ignore
1506431354
Reply with quote  #2

1506431354
Report to moderator
jgarzik
Legendary
*
Offline Offline

Activity: 1470


View Profile
March 25, 2013, 03:25:37 PM
 #2

Reserved.

Jeff Garzik, bitcoin core dev team and BitPay engineer; opinions are my own, not my employer.
Donations / tip jar: 1BrufViLKnSWtuWGkryPsKsxonV2NQ7Tcj
BitSyncom
Sr. Member
****
Offline Offline

Activity: 336

Avalon ASIC Team


View Profile
March 25, 2013, 03:27:29 PM
 #3

much appreciated

wknight
Legendary
*
Offline Offline

Activity: 889


Bitcoin calls me an Orphan


View Profile WWW
March 25, 2013, 03:31:02 PM
 #4

Very nice work!

Mining Both Bitcoin and Litecoin.
Vicus
Hero Member
*****
Offline Offline

Activity: 798


View Profile
March 25, 2013, 03:32:54 PM
 #5

WoW, this is great manual! Thank you!
loshia
Legendary
*
Offline Offline

Activity: 1582


View Profile
March 25, 2013, 06:32:01 PM
 #6

WoW, this is great manual! Thank you!
+1

Please help the Led Boy aka Bicknellski to make us a nice Christmas led tree and pay WASP membership fee here:
https://bitcointalk.org/index.php?topic=643999.msg7191563#msg7191563
And remember Bicknellski is not collecting money from community;D
kaerf
Hero Member
*****
Offline Offline

Activity: 631


View Profile
March 25, 2013, 06:32:17 PM
 #7

thanks jeff. i'd previously set up eloipool by myself and it wasn't the most straight forward process. this will help a lot of people.

i just solo mined my first block with an avalon this morning...it took ~4 days across the diff change. it was a very nerve wracking experience. i'd tested eloipool on testnet and it worked, but wasn't sure if everything was working properly on mainnet. the variance is a killer! i lost a few BTC, but am happy to have a fresh block that I can store away for a rainy day Smiley

after the diff change, i actually split my hashing power between POT and solo because the variance was killing me (but i'm still a gambler!)...i was literally watching the eloipool log waiting for a block to be solved. (a watched pot never boils).

i'm back to pool mining now. don't have the stomach (or hashing power) for solo mining =P
kaerf
Hero Member
*****
Offline Offline

Activity: 631


View Profile
March 25, 2013, 06:41:18 PM
 #8

BTW, eloipool step 2 was a pain in the ass to figure out. took me a while to realize the code structure had changed. i think I used the json-compat branch though.
thorvald
Full Member
***
Offline Offline

Activity: 182


View Profile
March 27, 2013, 01:22:19 PM
 #9

do you think you can make a image of the install Cheesy
or a vitrual m
donation for the image will be made
cypherdoc
Legendary
*
Offline Offline

Activity: 1764



View Profile
March 27, 2013, 09:40:18 PM
 #10

do you think you can make a image of the install Cheesy
or a vitrual m
donation for the image will be made


i second that.
bennybong
Hero Member
*****
Offline Offline

Activity: 688



View Profile
March 27, 2013, 09:45:56 PM
 #11

I like this a LOT, can't wait to try it out...
wtfvanity
Hero Member
*****
Offline Offline

Activity: 504


WTF???


View Profile
March 29, 2013, 03:59:06 PM
 #12

do you think you can make a image of the install Cheesy
or a vitrual m
donation for the image will be made


i second that.

Yeah... I'll make you an image with no back doors or ways to steal all of your coins...

Just use a pool if you can't follow his easy to use step by step instructions.

          WTF!     Don't Click Here              
          .      .            .            .        .            .            .          .        .     .               .            .             .            .            .           .            .     .               .         .              .           .            .            .            .     .      .     .    .     .          .            .          .            .            .           .              .     .            .            .           .            .               .         .            .     .            .            .             .            .              .            .            .      .            .            .            .            .            .            .             .          .
loshia
Legendary
*
Offline Offline

Activity: 1582


View Profile
March 29, 2013, 07:03:43 PM
 #13

Guy's
Any word on merged mining - BTC+ NMC with this setup. I am aware of the fact namecoind is needed also but what about poll, does it support it?

I found out this is supported. I will paly with it and let you know if i found out how to do it

Please help the Led Boy aka Bicknellski to make us a nice Christmas led tree and pay WASP membership fee here:
https://bitcointalk.org/index.php?topic=643999.msg7191563#msg7191563
And remember Bicknellski is not collecting money from community;D
cypherdoc
Legendary
*
Offline Offline

Activity: 1764



View Profile
March 29, 2013, 07:48:59 PM
 #14

do you think you can make a image of the install Cheesy
or a vitrual m
donation for the image will be made


i second that.

Yeah... I'll make you an image with no back doors or ways to steal all of your coins...

Just use a pool if you can't follow his easy to use step by step instructions.

the problem is, many of us don't use linux, ok?

i'd trust Jeff to make an image.
loshia
Legendary
*
Offline Offline

Activity: 1582


View Profile
March 29, 2013, 08:18:28 PM
 #15

do you think you can make a image of the install Cheesy
or a vitrual m
donation for the image will be made


i second that.

Yeah... I'll make you an image with no back doors or ways to steal all of your coins...

Just use a pool if you can't follow his easy to use step by step instructions.

the problem is, many of us don't use linux, ok?

i'd trust Jeff to make an image.

Dude,
If you are not using linux, image will help you a lot but still will be not enough. Just install one for a start and get used to it first. Just my 2 cents

Please help the Led Boy aka Bicknellski to make us a nice Christmas led tree and pay WASP membership fee here:
https://bitcointalk.org/index.php?topic=643999.msg7191563#msg7191563
And remember Bicknellski is not collecting money from community;D
wtfvanity
Hero Member
*****
Offline Offline

Activity: 504


WTF???


View Profile
March 29, 2013, 08:41:41 PM
 #16

do you think you can make a image of the install Cheesy
or a vitrual m
donation for the image will be made


i second that.

Yeah... I'll make you an image with no back doors or ways to steal all of your coins...

Just use a pool if you can't follow his easy to use step by step instructions.

the problem is, many of us don't use linux, ok?

i'd trust Jeff to make an image.

The problem if you don't know how to use linux and follow the basic steps that are already in this post, are... well, how would you then run the pool? Even just for yourself?

At the very minimum, you would need to go in and delete the bitcoin wallet, because if Jeff made one obviously he wouldn't duplicate his own wallet into the image, it would be empty or a generic one. Are you comfortable doing that in linux? What about all of the SQL related stuff? Troubleshooting?

It seems like to me, if you don't know linux, you shouldn't run this pool. If you have one avalon, join an existing pool. If you have 3 avalons, run each of them solo. There will be variation but with the extra power, on average you'll still be able to pull some blocks down and with less variance than a single machine.

If you want to operate a public pool and do not know linux... then my arguments, well... just please don't.

          WTF!     Don't Click Here              
          .      .            .            .        .            .            .          .        .     .               .            .             .            .            .           .            .     .               .         .              .           .            .            .            .     .      .     .    .     .          .            .          .            .            .           .              .     .            .            .           .            .               .         .            .     .            .            .             .            .              .            .            .      .            .            .            .            .            .            .             .          .
cypherdoc
Legendary
*
Offline Offline

Activity: 1764



View Profile
March 30, 2013, 02:18:06 AM
 #17

do you think you can make a image of the install Cheesy
or a vitrual m
donation for the image will be made


i second that.

Yeah... I'll make you an image with no back doors or ways to steal all of your coins...

Just use a pool if you can't follow his easy to use step by step instructions.

the problem is, many of us don't use linux, ok?

i'd trust Jeff to make an image.

The problem if you don't know how to use linux and follow the basic steps that are already in this post, are... well, how would you then run the pool? Even just for yourself?

At the very minimum, you would need to go in and delete the bitcoin wallet, because if Jeff made one obviously he wouldn't duplicate his own wallet into the image, it would be empty or a generic one. Are you comfortable doing that in linux? What about all of the SQL related stuff? Troubleshooting?

It seems like to me, if you don't know linux, you shouldn't run this pool. If you have one avalon, join an existing pool. If you have 3 avalons, run each of them solo. There will be variation but with the extra power, on average you'll still be able to pull some blocks down and with less variance than a single machine.

If you want to operate a public pool and do not know linux... then my arguments, well... just please don't.

well i know enough to make me dangerous.  Wink  i've run my own small ubuntu server solo pool for a year now w/o any problems.

it's just the eloipool installation stuff above i've never seen before.  i'm sure once i get it installed it shouldn't be much of a problem to maintain.  getting an image installation would help alot of us.
cypherdoc
Legendary
*
Offline Offline

Activity: 1764



View Profile
March 30, 2013, 02:34:12 AM
 #18

do you think you can make a image of the install Cheesy
or a vitrual m
donation for the image will be made


i second that.

Yeah... I'll make you an image with no back doors or ways to steal all of your coins...

Just use a pool if you can't follow his easy to use step by step instructions.

the problem is, many of us don't use linux, ok?

i'd trust Jeff to make an image.

The problem if you don't know how to use linux and follow the basic steps that are already in this post, are... well, how would you then run the pool? Even just for yourself?

At the very minimum, you would need to go in and delete the bitcoin wallet, because if Jeff made one obviously he wouldn't duplicate his own wallet into the image, it would be empty or a generic one. Are you comfortable doing that in linux? What about all of the SQL related stuff? Troubleshooting?

It seems like to me, if you don't know linux, you shouldn't run this pool. If you have one avalon, join an existing pool. If you have 3 avalons, run each of them solo. There will be variation but with the extra power, on average you'll still be able to pull some blocks down and with less variance than a single machine.

If you want to operate a public pool and do not know linux... then my arguments, well... just please don't.


Yes, I would agree with this.  You actually don't need to use the SQL stuff if running solo but you need to be able to go in and configure things.  I am going to do it because I am a tinkerer and I am trying to learn all the details about Bitcoin.  I also set up someone to give me paid support if I need it so I probably won't end up saving any money.  Plus I am going to have to keep up with the threads about eloipool and avalons.  A pool is going to do all that stuff for you.  I was going to let others use my solo setup but once I saw that the end user can't control the block reward address I nixed the idea.  If something goes wrong and a block reward is lost (or perceived to be lost) I don't want some 12 page thread claiming I did something with someone's block reward.

don't you use your own block reward address?
Aseras
Hero Member
*****
Offline Offline

Activity: 658


View Profile
March 30, 2013, 03:22:50 AM
 #19

I would highly suggest that you keep the testnet setting in the config.py and configure your bitcoind to use testnet and mine a few blocks there to make sure your setup is working before you swap it over to the real network.

That's why testnet exists.
wtfvanity
Hero Member
*****
Offline Offline

Activity: 504


WTF???


View Profile
March 30, 2013, 04:01:41 PM
 #20

I would highly suggest that you keep the testnet setting in the config.py and configure your bitcoind to use testnet and mine a few blocks there to make sure your setup is working before you swap it over to the real network.

That's why testnet exists.


A very good suggestion. With the testnet difficulty and an avalon you can mine a hundred blocks in less than an hour.

          WTF!     Don't Click Here              
          .      .            .            .        .            .            .          .        .     .               .            .             .            .            .           .            .     .               .         .              .           .            .            .            .     .      .     .    .     .          .            .          .            .            .           .              .     .            .            .           .            .               .         .            .     .            .            .             .            .              .            .            .      .            .            .            .            .            .            .             .          .
Pages: [1] 2 3 4 5 6 »  All
  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!