Pages:
Author

Topic: How to build your own Multipool - the Open Source Way - page 2. (Read 35459 times)

newbie
Activity: 1
Merit: 0
Very interesting subject, I'd like to hear more!  Grin
full member
Activity: 579
Merit: 102
So any idea what is causing this error?

TypeError: Cannot call method 'toString' of undefined
    at resolveDefs (/home/james/nomp/node_modules/dot/doT.js:52:55)
    at Object.doT.template (/home/james/nomp/node_modules/dot/doT.js:90:33)
    at /home/james/nomp/libs/website.js:84:33
    at fs.js:207:20
    at Object.oncomplete (fs.js:107:15)

I did notice to that in the section where you have the code for stats.js it appears to that you are wanting us to create a new website.js.  I did that and removed the code from stats.js

[/code

Delete the stock website.js file as well, make a new one:
/code]

Were you ever able to resolve this error?
sr. member
Activity: 378
Merit: 254
small fry
to anyone who is considering trying to do this on a "home built" pc think again unless you have a LOT of money invested into your rig. I'm running an i7 3970x at 4.5ghz with 28 gb of ram. and only 21 for the VM. currently the VM still maxes out the memory and ends up maxing out my entire pc memory. i have seen loads on my cpu upwards of 70% and have finally gotten them to lower doing some adjustments to the configs. ANOTHER THING
if you want your damn database to save so that when you restart your redis server?

add this to the bottom of EVERY single one of those scripts that paradigmflux posted and the database will save every 5 or 10 minutes how ever often you set it.

redis-cli save
It's a lot easier to just configure redis to save every X number of writes.
inside your redis.conf file, make sure that you have this section exactly like this:

Code:
# Save the DB on disk:
#
#   save
#
#   Will save the DB if both the given number of seconds and the given
#   number of write operations against the DB occurred.
#
#   In the example below the behaviour will be to save:
#   after 900 sec (15 min) if at least 1 key changed
#   after 300 sec (5 min) if at least 10 keys changed
#   after 60 sec if at least 10000 keys changed
#
#   Note: you can disable saving at all commenting all the "save" lines.
#
#   It is also possible to remove all the previously configured save
#   points by adding a save directive with a single empty string argument
#   like in the following example:
#
#   save ""

save 900 1
save 300 10
save 60 10000

also make sure you bind your local redis instance to 127.0.0.1 with this in that same config file:
Code:
bind 127.0.0.1


Then as long as you have it set up like this, it should automatically reload all of the redis data as soon as you re-start redis-server with the same redis.conf file:
Code:
# The filename where to dump the DB
dbfilename dump.rdb

# The working directory.
#
# The DB will be written inside this directory, with the filename specified
# above using the 'dbfilename' configuration directive.
#
# The Append Only File will also be created inside this directory.
#
# Note that you must specify a directory here, not a file name.
dir /var/lib/redis/
legendary
Activity: 964
Merit: 1000
to anyone who is considering trying to do this on a "home built" pc think again unless you have a LOT of money invested into your rig. I'm running an i7 3970x at 4.5ghz with 28 gb of ram. and only 21 for the VM. currently the VM still maxes out the memory and ends up maxing out my entire pc memory. i have seen loads on my cpu upwards of 70% and have finally gotten them to lower doing some adjustments to the configs. ANOTHER THING
if you want your damn database to save so that when you restart your redis server?

add this to the bottom of EVERY single one of those scripts that paradigmflux posted and the database will save every 5 or 10 minutes how ever often you set it.

redis-cli save
hero member
Activity: 630
Merit: 500
OK will do some testing on one of my boxes, I really interested in algo switching, has this all been ironed out?, I'd like to quota mine X11 multicoin + diamond on my boxes, I currently quota mine on all DMD pools, just finishing up my US mirror of miningfield.com pools and all my DMD hashrate goin to my mirror right now ... http://utahjohn.ddns.net, so far still beta see https://bitcointalksearch.org/topic/m.9178778
Only pool I have finished on my US mirror is DMD right now, and just beta testing it.
This was in regards to sgminer-dev v5 with stock NOMP+MPOS,
I want a multipool profit switching NOMP LOL Smiley and coin->BTC->coin of choice payout (DMD)

I'll add a port at my end, on another VM for DMD multipool, dunno if miningfield is interested but I am Smiley
sr. member
Activity: 378
Merit: 254
small fry
Sorry for not updating in forever.
Thanks for the people who have been messaging me with thanks.
To the others who are asking to hire me to set them up a pool - eventually I will get this all in the public domain, then I would appreciate any donations made.
Smiley
i will see about getting a github repo with everything checked into it before I shut down the http://burstmultipool.com site.

My other, main pool, is http://hashrate.org (it was my first and is pretty much my only long term pool - it's for NXT)
hero member
Activity: 630
Merit: 500
Bump ... Where is our lead dev from OP Huh
hero member
Activity: 752
Merit: 500
to have a github repo for this would be awesome!
sr. member
Activity: 680
Merit: 255
WOW!!! Based on your post, took the time to get Redis-Commander working and it's fantastic.  Had it on a test vm on digital ocean and couldn't get to it.  Then figured out it was my TMG2010 outbound rules.  Fixed that and it worked.  Repeated the process on what will become my public host that I'm using privately at the moment with 10+ coins, and WOW!!

So much info!  I'm a lot more familiar with SQL Server and would love to work out dumping the data to that and run background jobs on 1 to 5 minute intervals but I'm going to spend some time with Redis.  Thanks for the PUSH  Smiley
hero member
Activity: 630
Merit: 500
I like the tutorial format Smiley please continue and get git up Smiley
sr. member
Activity: 680
Merit: 255
All I can say is FANTASTIC JOB!!!  Got me waiting for the next one!!
Thanks!!
sr. member
Activity: 378
Merit: 254
small fry
Time for some extremely long posts again.

Let's go into some background first on how it is that NOMP works.
I strongly suggest each of you set up redis-commander, and use it to look at your database.  Be careful to use a good password, as someone could maliciously log into your instance of redis-commander and wipe your entire redis db.
https://www.npmjs.org/package/redis-commander

With NOMP, each coin that you have configured is going to have a seperate redis key.  Let's start with what is redis?
Redis is an in-memory key-value store, which means that it exists solely in RAM. This is the reason that NOMP is so much better than MPOS, which uses an on-disk SQL database.  Redis can scale up to millions of transactions a second easily, SQL cannot.

So in NOMP, each coin is going to have it's own seperate key.
Inside that key, you will see several other keys:

blocksConfirmed - these are previously solved blocks.
blocksKicked - for all intensive purposes, these are the same as blocksOrphaned
blocksOrphaned - solved blocks that wound up being orphans.
shares - this will usually consist of only a single key, roundCurrent which will contain numerous fields.  Each of your workers will be the name of a field, and their appropriate value will be the number of shares that they have successfully submitted for the current round.
hashrate - this will be a live log of the shares that are being submitted by each worker.  This is where the hashrate calculation are done from.  This is sorted set where the scores are the epoch timestamps, and the values are a string made up of the share difficulty, the worker name and the full javascript epoch time (down to milliseconds).
balances - This is where NOMP keeps track of who has earned what.  As blocks are solved, the block reward is divided up proportionately amongst the miners (ie, the currentRound key is checked and all of the value numbers are added together.  Each worker then is credited with their particular number of shares (ie, their value in the currentRound divided by the total of all of the values in the currentRound) multiplied by the block reward. This number is then added to any existing balance that may already exist in the balances key (so that a worker can have their reward for multiple blocks in a row add up) -  when a payout process happens, this key has to be cleared in order to prevent duplicate payouts.

In my pools, every single payout each coin has it's balances key renamed to the format Prev:::balances - this leaves a good audit trail as you can always look back at any previous round and see exactly how many coins each miner has earned, in any previous round.
hero member
Activity: 630
Merit: 500
Once I get a clone of your pool modified, I will be working on API to UseCryptos exchange for buying DMD, we just got listed there recently Smiley (a few weeks ago) and need to build some volume there.
We have been using Cryptsy for ages but they are way slow to respond to support tickets and keeping Wallet daemon up to date LOL, sometimes weeks with no deposit/withdraw available ...
sr. member
Activity: 378
Merit: 254
small fry

Come on folks
I've googled it a bit unsuccessfully
haha
I wanted to get the whole new burstmultipool.com source onto a git today if possible.


okay..This is for ubuntu linux, the same principles apply elsewhere.

First go to github site and get yourself a new account there.

You'll then have your own place there, say https://github.com/paradigmflux

Next open a terminal and get git on your local machine

Code:
sudo apt-get install git

Go to your github place, go to your repositories, click New (the large green button)
From then on do as instructed. Github will ask the repo name then give you
the commands to be executed on your terminal.

Alternatively, once you've got your github page and git installed,
You can also push the repo entirely from the terminal (without using the browser)
with these commands:

(Let's say you want to make repository called "multipool"..)

Change to the directory where your code is, then

generate data that git needs
Code:
git init
add all your files to be pushed to repo
Code:
git add .
commit your changes and insert a comment
Code:
git commit -m "first commit"
tell where the repo is - where to upload
Code:
git remote add origin https://github.com/paradigmflux/multipool.git
upload the stuff
Code:
git push -u origin master

you'll then be asked for username and password that you gave when
you signed up at Github, and then your code will be moved to your new repo.

Hope this helps.






ty for the crash course, I think i have this almost figured out.
I will update this thread once I have some of it committed.
legendary
Activity: 996
Merit: 1013

Come on folks
I've googled it a bit unsuccessfully
haha
I wanted to get the whole new burstmultipool.com source onto a git today if possible.


okay..This is for ubuntu linux, the same principles apply elsewhere.

First go to github site and get yourself a new account there.

You'll then have your own place there, say https://github.com/paradigmflux

Next open a terminal and get git on your local machine

Code:
sudo apt-get install git

Go to your github place, go to your repositories, click New (the large green button)
From then on do as instructed. Github will ask the repo name then give you
the commands to be executed on your terminal.

Alternatively, once you've got your github page and git installed,
You can also push the repo entirely from the terminal (without using the browser)
with these commands:

(Let's say you want to make repository called "multipool"..)

Change to the directory where your code is, then

generate data that git needs
Code:
git init
add all your files to be pushed to repo
Code:
git add .
commit your changes and insert a comment
Code:
git commit -m "first commit"
tell where the repo is - where to upload
Code:
git remote add origin https://github.com/paradigmflux/multipool.git
upload the stuff
Code:
git push -u origin master

you'll then be asked for username and password that you gave when
you signed up at Github, and then your code will be moved to your new repo.

Hope this helps.




hero member
Activity: 630
Merit: 500
BTW I have successfully installed redis and node.js on a windows server 2008 R2 box Smiley
Have not tried using nomp on windows yet ...

Already have a running nomp pool on a linux box Smiley
sr. member
Activity: 680
Merit: 255
I'm in the same boat.  git is easy, I got lost in the dox for putting it up there.  If I weren't trying to catch up on 2 weeks work for my day job, I'd spend today trying to figure it out.  Hopefully someone will come through.  It will benefit all of us!!

Thanks for coming back!!!!
hero member
Activity: 630
Merit: 500
all I know about git is how to git clone the source from it, but I think that would be the best place for open source, then others can add issues, requests, and create sub forks and submit pull requests to main tree for your consideration ...
sr. member
Activity: 680
Merit: 255
Someone PLEASE help!  I would If I knew how  Sad
sr. member
Activity: 378
Merit: 254
small fry
Hey thx for coming back Smiley
I want to build a multipool for Diamond (DMD), have basic NOMP running and a selection of coins ready to go (X11).
Will you be starting a github for this? 

lol
if someone wants to be so kind as to post in this thread a nice and simple guide (or a link to a guide) for how to actually use git
that isn't some stupid verbose 500 page man article
i will most certainly use github


Come on folks
I've googled it a bit unsuccessfully
haha
I wanted to get the whole new burstmultipool.com source onto a git today if possible.
Pages:
Jump to: