Bitcoin Forum
July 22, 2018, 06:06:34 AM *
News: Latest stable version of Bitcoin Core: 0.16.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 [All]
  Print  
Author Topic: [Pushpool Web Frontend] Simplecoin v5.0 Opensource PHP/MySQL - NEW RELEASE  (Read 56858 times)
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 07, 2011, 09:03:26 PM
#1

Simplecoin web mining framework

(Initially a fork of Xenland's Mining Pool v1)

Features:
  • Proportional or PPLastNShares
  • Instant or Automatic cashout available with positive balance!
  • Worker monitor for less downtime
  • Current Round Payout estimation
  • JSON account/worker monitoring API
  • Dynamic stats/setting caching (more responsive/less overhead)
  • Live round stats.
  • Stats charting
  • Memcached support
  • Process locking
  • Handling large stats on replication server
  • Email notification
  • Used by several growing pools

Upcoming features in next version:
Multi-coin, Multi-Pool, Merged Mining, SMPPS

Forum (discussion & support):
forum.simplecoin.us (will need a login from simplecoin.us first)

Demonstration:
Visit simplecoin.us to try out the live implementation and see latest development.

Download latest stable release
Simplecoin v5.0

Download latest experimental version (possibly unstable)
Simplecoin Experimental
Notes:
Not for the feint hearted, you will need to be very comfortable with php & mysql to use this. Often lacks new database changes/fields.

Source Repository
Github

Requirements:
Simplecoin relies on an existing and working bitcoin and pushpool installation. Before attempting to run simplecoin, please setup the following.
PHP5
Mysql
Memcached
Bitcoin: http://bitcoin.org
Pushpool: http://forum.bitcoin.org/index.php?topic=8707.0

Installation:
1. Extract files into web root directory
2. Create simplecoin database in you mysql instance
3. Run simplecoin.sql in your simplecoin database (This will be used for pushpool & simplcoin)
4. Edit includes/requiredFunctions.php and set the bitcoin & database login info
5. Edit all files in the cronjob folder, set $includesDirectory to the correct server path.
6. setup cronjobs on a staggered schedule. I currently run cronjob every minute and the others every 10-30 minutes. I run payout and archive twice daily.

Current Focus:
Multi-pool/coin support

Donations:
Bitcoin Donations: 163Pv9cUDJTNUbadV4HMRQSSj3ipwLURRc
Hashrate donations at https://simplecoin.us are always appreciated.

Affordable, Dependable Xen VPS & Dedicated hosting
PhotonVPS

Projects forked from simplecoin:
Ozco.in: https://github.com/Wayno/Ozcoin
MMCFE  (Mainframe Mining Cooperative Front End) SVN: http://mmcfe.mfis.net

Standard disclaimer
Code:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
I do not claim to be a PHP guru, I simply used PHP due to it's common availability.
Before using your implementation publicly, I recommend you run through a security audit.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
1532239594
Hero Member
*
Offline Offline

Posts: 1532239594

View Profile Personal Message (Offline)

Ignore
1532239594
Reply with quote  #2

1532239594
Report to moderator
1532239594
Hero Member
*
Offline Offline

Posts: 1532239594

View Profile Personal Message (Offline)

Ignore
1532239594
Reply with quote  #2

1532239594
Report to moderator
fair bitcoin games | pvp - pve - solo pve games | faucet |
Free satoshi code btcoon500
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 08, 2011, 08:33:01 PM
#2

v1 active!

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 09, 2011, 12:48:16 AM
#3

Automated payments added to source

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
Coaster
Member
**
Offline Offline

Activity: 70
Merit: 10


View Profile
June 09, 2011, 05:46:30 AM
#4

truly awesome, thanks for contributing this.

MyFarm
Hero Member
*****
Offline Offline

Activity: 854
Merit: 1000


View Profile
June 09, 2011, 08:43:57 PM
#5

Thank you SO MUCH for this!  Great job.

When I try to access the adminpanel, I get this error:

Warning: Cannot modify header information - headers already sent by (output started at /home/username/public_html/includes/header.php:33) in /home/username/public_html/adminPanel.php on line 26

Any ideas?
warweed
Full Member
***
Offline Offline

Activity: 130
Merit: 100


View Profile
June 09, 2011, 09:01:42 PM
#6

Anyone willing to put together a package for us not so Linux friendly bastards ?

Debian preferably something that installs apache SQL and all the rest on a fresh install phpmyadmin you know a simple point and click ?

Or write up a step by step on a fresh debian install from start to finish after debian has been installed


Also to the developer great job keep up the excellent work Smiley
Might I suggest a db backup feature if not already included as well as a one click update or version checker in the admincp Smiley

Cheers

James
d3c0n808
Full Member
***
Offline Offline

Activity: 378
Merit: 101


View Profile
June 09, 2011, 09:33:24 PM
#7

Anyone willing to put together a package for us not so Linux friendly bastards ?

Debian preferably something that installs apache SQL and all the rest on a fresh install phpmyadmin you know a simple point and click ?

Or write up a step by step on a fresh debian install from start to finish after debian has been installed


Also to the developer great job keep up the excellent work Smiley
Might I suggest a db backup feature if not already included as well as a one click update or version checker in the admincp Smiley

Cheers

James

You could install xamp on a windows machine.  It comes with mysql, phpadmin, php, and apache.   From there its pretty straight forward, open some ports install the tar.gz to your htdocs or index, import the sql document using phpadmin.   and you should be good to go.
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 09, 2011, 09:34:14 PM
#8

Thank you SO MUCH for this!  Great job.

When I try to access the adminpanel, I get this error:

Warning: Cannot modify header information - headers already sent by (output started at /home/username/public_html/includes/header.php:33) in /home/username/public_html/adminPanel.php on line 26

Any ideas?

The admin flag must be set in the db along with a valid cookie, or else you cannot access it.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
warweed
Full Member
***
Offline Offline

Activity: 130
Merit: 100


View Profile
June 09, 2011, 09:36:20 PM
#9

Anyone willing to put together a package for us not so Linux friendly bastards ?

Debian preferably something that installs apache SQL and all the rest on a fresh install phpmyadmin you know a simple point and click ?

Or write up a step by step on a fresh debian install from start to finish after debian has been installed


Also to the developer great job keep up the excellent work Smiley
Might I suggest a db backup feature if not already included as well as a one click update or version checker in the admincp Smiley

Cheers

James

You could install xamp on a windows machine.  It comes with mysql, phpadmin, php, and apache.   From there its pretty straight forward, open some ports install the tar.gz to your htdocs or index, import the sql document using phpadmin.   and you should be good to go.




Yeah though about that Smiley cheers but then what do I do about the cron jobs ?
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 09, 2011, 09:37:40 PM
#10

Anyone willing to put together a package for us not so Linux friendly bastards ?

Debian preferably something that installs apache SQL and all the rest on a fresh install phpmyadmin you know a simple point and click ?

Or write up a step by step on a fresh debian install from start to finish after debian has been installed


Also to the developer great job keep up the excellent work Smiley
Might I suggest a db backup feature if not already included as well as a one click update or version checker in the admincp Smiley

Cheers

James

You could install xamp on a windows machine.  It comes with mysql, phpadmin, php, and apache.   From there its pretty straight forward, open some ports install the tar.gz to your htdocs or index, import the sql document using phpadmin.   and you should be good to go.




Yeah though about that Smiley cheers but then what do I do about the cron jobs ?

put together scheduled tasks that point to the web location Wink

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
warweed
Full Member
***
Offline Offline

Activity: 130
Merit: 100


View Profile
June 09, 2011, 10:09:04 PM
#11

Actually quick google shows a project called cronw for wind0ze cron jobs
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 09, 2011, 11:09:49 PM
#12

Just FYI: On my setups I'm using a wget address outputting to /dev/null to initiate the cronjobs.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 10, 2011, 05:59:13 AM
#13

Thank you for your continued support.  My pool is live at www.ecocoin.org -- we donate our fees to buy trees and rainforest land to offset all the electricity everyone is using to mine.  Anyway, someone replied to my thread with the following:

http://forum.bitcoin.org/index.php?topic=14343.msg194621#msg194621

Wow, such a simple idea, I love it.  If you did block payouts like Eligius, I'd totally switch.
Can you please explain how the block payouts differ and why it's better?  I'd be happy to refer your thoughts to the software developer if it is indeed a superior system.  Thank you.

Here's a block solved by the Eligius pool:

http://blockexplorer.com/block/000000000000026210a972387c00e6db801346b32a815a996d698211d71a197c

The software keeps a virtual tally of your unpaid balance.  Once this crosses 1btc, you're paid out on the next generated block, RIGHT there, in the generation block.  The money never sits in some intermediary account held by the pool-owner.  There's a lot less required trust, because while the pool owner can still shut down the pool before you get your "fair share" (aka virtual balance), HE doesn't get anything out of it.  It's a very subtle and clever system, so I suggest you (or the developer) spend some time thinking about it to understand why it truly works, and I won't use a pool without it.  Obviously, you can incorporate the 3% fees as just taking 3% off the top of the generation block to your own address.  Eligius itself has no fees, but since your fees would be going to an actual cause, I might not mind as much.

I don't know if that methodology of processing blocks/payments is of interest to you, but if it is indeed superior, it may be something for you to consider.  But again, I can't thank you enough for open sourcing this software and providing me the opportunity to hopefully help the environment via Bitcoin Smiley

To be honest, I'm not sure how this works, but I'd be more than willing to incorporate it. I've already added a threshold, so that part is done. If I could make that work with generated block that'd be great.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
MyFarm
Hero Member
*****
Offline Offline

Activity: 854
Merit: 1000


View Profile
June 10, 2011, 06:33:47 AM
#14

To be honest, I'm not sure how this works, but I'd be more than willing to incorporate it. I've already added a threshold, so that part is done. If I could make that work with generated block that'd be great.
You're amazing Smiley  The person who suggested it said to PM him if you had any questions.  He's happy to help or point you in the right direction. 
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 10, 2011, 03:07:52 PM
#15

Some questions and help:

1.  Out of curiosity, is it possible to tell WHO found a block with this software?  

2.  I noticed you extended cookie timeout to 7 days in your simplecoin.us thread.  How do I do that?

3.  My understanding is your software supports Long Polling.  How do I turn that on?  We're experiencing a LOT of invalid shares.

4.  We had a user (user id 19 below) join with a huge pool of miners for awhile.  He's currently showing a hash rate of 135363.  Thing is, here is the lifetime shares:

User Id   Shares
19   47
12   9396
3   3020
17   1761

He is ranked number 1 but only has 47 shares.  Any idea what may have happened?

Thank you so much.  I've sent a bitcoin your way out of appreciation for everything you're doing Smiley

1. shares_history upstream_result = 'Y'
2. login.php time
3. That is part of pushpool, it should be enabled.
4. I'm not sure about that.... I'd wait to see if it evened out.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
lemonginger
Full Member
***
Offline Offline

Activity: 210
Merit: 100


firstbits: 121vnq


View Profile
June 10, 2011, 03:49:14 PM
#16

I would like to start a bounty for development of good documentation for this. On the one hand, I do not think running a pool will ever be point and click, and we should be wary about people with very little server admin experience running pools. On the other hand, I think that more pools is a great thing.

+ 1 BTC for good documentation. Encourage to add bitcoins for docs or for features.
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 10, 2011, 06:58:27 PM
#17

Just pushed some updates. One greatly improves performance of worker cronjob.

Also greatly improves estimate earnings.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
MyFarm
Hero Member
*****
Offline Offline

Activity: 854
Merit: 1000


View Profile
June 10, 2011, 07:29:47 PM
#18

Just pushed some updates. One greatly improves performance of worker cronjob.
Thank you very much!  Updated, no problems here.
genewitch
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
June 11, 2011, 07:41:27 AM
#19

I got it installed, mysql set up, i was able to log in, but i had two questions. Now, i'm going to be doing this for nearly no vigorish, only EC2 costs of the pool hardware.

1) How do i set admin flag for an account? do i have to do that from mysql? Would it be too much to ask what the command is for that?
2) maybe this was just a cookie issue on the server, but whenever i logged out, and reloaded index.php it always showed me as logged in. I set the cookie name and / as the directory and the FQDN of the ec2 instance as the domain with a . in front. Is this the right way to do that? i tried looking at the linked page but it just said i needed a dot if i had example.com and .www.example.com

I'm more of an administrator of infrastructure and security than a programmer or DB admin, as you may have guessed; so i shall be thankful for any responses!

also, and this isn't mentioned, pushpool has to be set up, i didn't realize that for about 30 minutes after i got simplecoin working  Grin
Drefsab
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
June 11, 2011, 03:46:18 PM
#20

You might want to install something like phpmyadmin, use it to have a look at the database there will be table called webUsers. All the users in are in there, in that table there is a field called admin, if this is set to 0 the user is not an admin if its set to 1 they are Smiley

Im having a play with it myself at the moment its quite good though im having an issue where when I goto the admin page look at the settings if I try to change them with my admin users auth pin it doesnt error out but it doesnt change the settings, I can simply change the settings in the database directly but I guess I did something wrong will have a look through though.

Sharecoin: SSZRJLeMA9yNSmWjwVnHeppXY9JwbiGkW1
ius
Jr. Member
*
Offline Offline

Activity: 56
Merit: 0


View Profile
June 11, 2011, 04:26:15 PM
#21

Unfortunately, a quick audit of the source code reveals that many secure coding practices were incorrectly and inconsistenly applied or neglected completely. Running this frontend in it's current state is not safe (to say the least - you could end up losing your users' data and bitcoins).

PGP: 0xCC06E446 Bitcoin: 19kdfgW1KXQgV7SCLEPAojtHxN9xotGkGH
Jine
Sr. Member
****
Offline Offline

Activity: 405
Merit: 250


View Profile
June 11, 2011, 04:56:07 PM
#22

I totally agree with ius on this matter.

--

Regards, Jim

Previous founder of Bit LC Inc. | I've always loved the idea of bitcoin.
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 11, 2011, 05:32:02 PM
#23

Well, it's open source, rather than just saying it's unsafe, why not pm me with the issues you see.

I'm not a php dev, and this is the first php project I've done in about 8 years. I write enterprise .net apps for a living, and that's a whole different ballgame.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
genewitch
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
June 11, 2011, 06:18:34 PM
#24

i noticed that there wasn't much in the way of input sanitizing, but that was at a cursory glance and not being an expert on such things.
I will install phpmyadmin to edit the database so i don't have to use sql to do it. Thanks for the tip.

I'm hoping that pushpool will work on Natty, today. :-)

edit: please advise. Do i set the pushpool databasename to the same one simplecoin is using or are they seperate databases? IE i call my database simcoi for simplecoin, should i make another database called ppool for pushpool or point it at simcoi?

Ok i think i have to go talk to pushpool people now. Thanks for bearing with me :-)
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 11, 2011, 07:06:41 PM
#25

i noticed that there wasn't much in the way of input sanitizing, but that was at a cursory glance and not being an expert on such things.
I will install phpmyadmin to edit the database so i don't have to use sql to do it. Thanks for the tip.

I'm hoping that pushpool will work on Natty, today. :-)

edit: please advise. Do i set the pushpool databasename to the same one simplecoin is using or are they seperate databases? IE i call my database simcoi for simplecoin, should i make another database called ppool for pushpool or point it at simcoi?

Ok i think i have to go talk to pushpool people now. Thanks for bearing with me :-)

np. The input should be somewhat sanitized by mysql_escape

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
ius
Jr. Member
*
Offline Offline

Activity: 56
Merit: 0


View Profile
June 11, 2011, 07:10:18 PM
#26

I'm not a php dev, and this is the first php project I've done in about 8 years.

I value the open source spirit and like what you're doing (the idea behind it), but if you're unsure about your capabilities of publishing/writing/maintaining safe PHP code, then add a disclaimer or find someone willing to maintain/audit your work. Besides, SQL injection and XSS aren't isolated to just PHP..

People could lose user data and/or bitcoins (and more), and will then blame you/simplecoin..

Check your PM for some details.

PGP: 0xCC06E446 Bitcoin: 19kdfgW1KXQgV7SCLEPAojtHxN9xotGkGH
genewitch
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
June 11, 2011, 07:36:17 PM
#27

The php pages aren't showing any worker stats even though a worker is connected to the pushpoold backend using the username and password set on the account details page. Did i screw a database step up?

edit: i ran all the cronjob/*.php stuff just to make sure.
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 11, 2011, 07:36:55 PM
#28

I'm not a php dev, and this is the first php project I've done in about 8 years.

I value the open source spirit and like what you're doing (the idea behind it), but if you're unsure about your capabilities of publishing/writing/maintaining safe PHP code, then add a disclaimer or find someone willing to maintain/audit your work. Besides, SQL injection and XSS aren't isolated to just PHP..

People could lose user data and/or bitcoins (and more), and will then blame you/simplecoin..

Check your PM for some details.

Got it, will definitely fix the holes you recommended and add a disclaimer, thank you for your input.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 11, 2011, 07:37:38 PM
#29

The php pages aren't showing any worker stats even though a worker is connected to the pushpoold backend using the username and password set on the account details page. Did i screw a database step up?

sounds like the workers.php cronjob isn't running. this updates that stat.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 11, 2011, 09:16:12 PM
#30

Update to source:
bug fix on adminPanel.
Some security fixes in place such as anti XSS injection and additional sql escaping.


Security fixes are untested, but I thought I should include them before calling it a day.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
genewitch
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
June 11, 2011, 10:36:14 PM
#31

The php pages aren't showing any worker stats even though a worker is connected to the pushpoold backend using the username and password set on the account details page. Did i screw a database step up?

sounds like the workers.php cronjob isn't running. this updates that stat.

Nah, it's like the database for pushpool can't see the database for simplecoin and vice versa, because my worker is connected and has done 800 shares, but neither the main hasrate nor my account details have any indication that any work has been done - IE no payment. Is there something i am missing? there's no documentation for any of this stuff!!!
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 11, 2011, 10:43:47 PM
#32

The php pages aren't showing any worker stats even though a worker is connected to the pushpoold backend using the username and password set on the account details page. Did i screw a database step up?

sounds like the workers.php cronjob isn't running. this updates that stat.

Nah, it's like the database for pushpool can't see the database for simplecoin and vice versa, because my worker is connected and has done 800 shares, but neither the main hasrate nor my account details have any indication that any work has been done - IE no payment. Is there something i am missing? there's no documentation for any of this stuff!!!

Ah, pushpool & simplecoin should be using the same database.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
genewitch
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
June 11, 2011, 10:47:25 PM
#33

The php pages aren't showing any worker stats
sounds like the workers.php cronjob isn't running.
Nah, it's like the database for pushpool can't see the database for simplecoin and vice versa
Ah, pushpool & simplecoin should be using the same database.
they are, i called it sc and a user called pushpool was granted all permissions on it. Both simplecoin and pushpool use 'pushpool'@'localhost' as the database login, and i know pushpool can see the database because it allows my worker to login via -u genewitch.1 --pass=x.
what actually has the accounting, pushpool? Maybe i can dig through your PHP to see where the accounting database calls are and try the queries in a mysql prompt to see if there are the correct values in there. If you need any of my json or config files i can provide them.

Thanks for helping me, by the way. I'm setting this up for #xkcd on foonetic. :-)
Code:
mysql> show tables;
+----------------+
| Tables_in_sc   |
+----------------+
| accountBalance |
| networkBlocks  |
| pool_worker    |
| settings       |
| shares         |
| shares_history |
| webUsers       |
+----------------+
7 rows in set (0.00 sec)

mysql> select * from sc.accountBalance;
+----+--------+---------+------------------------------------+------+-----------+
| id | userId | balance | sendAddress                        | paid | threshold |
+----+--------+---------+------------------------------------+------+-----------+
|  1 |      1 | 0       | 1CfUcB7yKKWpco3BPjzHjveyrR1rBmvmEp | 0    |         0 |
+----+--------+---------+------------------------------------+------+-----------+
1 row in set (0.00 sec)

mysql> select * from sc.shares;
Empty set (0.00 sec)

mysql> select * from sc.shares_history;
Empty set (0.00 sec)

Edit: hey, am i supposed to add anything to pushpool to take care of accounting? like add sql commands somewhere or something? Or does simplecoin use logs to determine shares and activity and set the mysql stuff itself? I know all the frontend (for payments) is NOT handled by pushpool stock install, so maybe i missed a step where i move a config file from simplecoin to somewhere else. I did run mysql sc <simplecoin.sql
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 11, 2011, 11:03:38 PM
#34

right, pushpool uses the shares & pool_worker tables and should share them with simplecoin.

If you want, you could in theory remove shares & pool_worker from the sc database

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
genewitch
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
June 11, 2011, 11:36:59 PM
#35

right, pushpool uses the shares & pool_worker tables and should share them with simplecoin.

If you want, you could in theory remove shares & pool_worker from the sc database

Right, sc.pool_worker is sort of working as intended, as my worker can log in with genewitch.1 and x as the password. But you see how the active and hashrate aren't set? What sets those? pushpool?
Do i have to code that logic myself?
Code:
mysql> select * from sc.pool_worker;
+----+------------------+-------------+----------+--------+----------+
| id | associatedUserId | username    | password | active | hashrate |
+----+------------------+-------------+----------+--------+----------+
|  1 |                1 | genewitch.1 | x        |      0 |        0 |
+----+------------------+-------------+----------+--------+----------+
1 row in set (0.00 sec)

and shares is empty, is pushpool supposed to populate this? the reason i ask is i can go pester the pushpool developers :-)
Code:
mysql> select * from sc.shares;
Empty set (0.00 sec)

simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 12, 2011, 12:36:57 AM
#36

yes, pushpool fills shares, gets worker info from pool_worker.

sc fills the rest with cronjobs & user input.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
genewitch
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
June 12, 2011, 03:32:43 AM
#37

hey you updated the git repo while i was making a patch:

http://paste.ubuntu.com/624849/

or
Code:
55c55
< $authPin = (int) $_POST["authPin"];
---
> $authPin = (string) $_POST["authPin"];
89c89
< if(!is_int($authPin)){
---
> if(!is_numeric($authPin)){

in register.php

This makes it so your pin can start with zero. or 2 zeros. or 3. this affected 2 out of three people on my new pool already :-p
gigabytecoin
Sr. Member
****
Offline Offline

Activity: 280
Merit: 250


View Profile
June 12, 2011, 06:37:04 AM
#38

Is simplecoin.us being ddos'd? I can't access it and haven't been able to for the last 2 hours.
genewitch
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
June 12, 2011, 07:15:36 AM
#39

Is simplecoin.us being ddos'd? I can't access it and haven't been able to for the last 2 hours.
most likely. and the owner is AFK (he mentioned this might happen and apologized)
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 12, 2011, 04:28:17 PM
#40

Is simplecoin.us being ddos'd? I can't access it and haven't been able to for the last 2 hours.

It was being ddos'd, I took it down to fix Wink Now that it is down, I'm going to take a few extra days to lock my server down. The site will be up before the pool, and I'm thinking about creating a testnet site for demoing/testing the newer versions.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 12, 2011, 04:43:45 PM
#41

hey you updated the git repo while i was making a patch:

http://paste.ubuntu.com/624849/

or
Code:
55c55
< $authPin = (int) $_POST["authPin"];
---
> $authPin = (string) $_POST["authPin"];
89c89
< if(!is_int($authPin)){
---
> if(!is_numeric($authPin)){

in register.php

This makes it so your pin can start with zero. or 2 zeros. or 3. this affected 2 out of three people on my new pool already :-p

Thanks for that, I'll make sure it gets in the repo Wink

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 12, 2011, 05:27:39 PM
#42

Anyone know how to tag a specific commit? This is my 1st run using git for version control.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 13, 2011, 06:51:36 PM
#43

So far with the latest code, I'm passing security audits with flying colors.

If anyone notices anything, please let me know in a PM or feel free to send your own commits to the source for me to review.

Version 2 is well under way with db changes that will hopefully reduce mysqls requirements.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 13, 2011, 08:32:57 PM
#44

Big bugfix to the main cronjob!

was setting the counted enum by int.

to fix affected records:
stop cronjob
apply patch

get latest confirmed block
select blockNumber from networkBlocks where confirms > 119

update shares_history
update settings_history set counted='1' where counted=1 and blockNumber <= (above last blocknumber)
update settings_history set counted='0' where counted=0 and blockNumber > (above last blocknumber)

start cronjob


I don't think affected payouts, but it should have played hell with stats. However, to be sure, I'm disclosing the issue.

The entire shares_history workings are already very overhauled for v2. I'm implementing a condesed shares_counted table to keep shares_history much leaner.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
genewitch
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
June 13, 2011, 09:48:53 PM
#45

I tried to use the git version of adminPanel with my existing install (not latest git) - it doesn't show anything... the old adminPanel didn't do anything.

How do i reset a user's password?

Can i go into the sql database and add shares into a table to make up for the fact that i had to delete the user's duplicate entries?

Also
BUG: You can register the same username more than once.  Undecided
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 13, 2011, 10:43:08 PM
#46

I tried to use the git version of adminPanel with my existing install (not latest git) - it doesn't show anything... the old adminPanel didn't do anything.

How do i reset a user's password?

Can i go into the sql database and add shares into a table to make up for the fact that i had to delete the user's duplicate entries?

Also
BUG: You can register the same username more than once.  Undecided

What is the php error from adminPanel? It should display if you have the admin flag.

I haven't implemented password reset, I'll add that to the adminPanel and a user option based on email.
If you want to do it manually, update the pass in webUsers to sha256 of pw+your salt.

your best bet for solving miner-related issues is to update shares or shares_history username to the new miner id, but dummy shares should work.

As for the bug, set your username in webUsers to unique. That should stop duplicates for now. I'll add a proper check in the next version.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 14, 2011, 04:23:17 AM
#47

Just added some minor updates I wanted to roll in before v2 and the required sql changes.  Smiley

v2 is well under way. I may roll it out before I finish all the sql optimizations. However, the biggest optimization will be included (read: archiving shares_history once counted).

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
genewitch
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
June 14, 2011, 07:03:22 AM
#48

I tried to use the git version of adminPanel with my existing install (not latest git) - it doesn't show anything... the old adminPanel didn't do anything.

How do i reset a user's password?

Can i go into the sql database and add shares into a table to make up for the fact that i had to delete the user's duplicate entries?

Also
BUG: You can register the same username more than once.  Undecided

What is the php error from adminPanel? It should display if you have the admin flag.

Nothing, i get a blank area where the panel normally is, but the rest of the page loads fine (the template.) I have admin set on the account. the reason i updated is you said you fixed some things and security.

is v2 going to allow seamless upgrade from v1?
d3c0n808
Full Member
***
Offline Offline

Activity: 378
Merit: 101


View Profile
June 14, 2011, 07:05:59 AM
#49

I updated from git repo and each time i try to register it says user already exists, even though the database is empty.  I don't think its a issue of php not talking to mysql because if that were the case it wouldnt show anything I imagine.  Is anyone else having this issue?
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 14, 2011, 02:28:11 PM
#50

I tried to use the git version of adminPanel with my existing install (not latest git) - it doesn't show anything... the old adminPanel didn't do anything.

How do i reset a user's password?

Can i go into the sql database and add shares into a table to make up for the fact that i had to delete the user's duplicate entries?

Also
BUG: You can register the same username more than once.  Undecided

What is the php error from adminPanel? It should display if you have the admin flag.

Nothing, i get a blank area where the panel normally is, but the rest of the page loads fine (the template.) I have admin set on the account. the reason i updated is you said you fixed some things and security.

is v2 going to allow seamless upgrade from v1?

You could downgrade the adminPanel to the previous version, the fixes to adminpanel were antiXSS related. If you are the only admin, cross-site scripting shouldn't be an issue on that page.

Can you momentarily turn on php display_errors to see what's hangning? or check the apache log?


For v2 it will not be seamless, it will require DB changes. I will create an upgrade sql script though.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
Lightspeed
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
June 14, 2011, 07:39:45 PM
#51

hey

wanted to take a look but site doesn't appear to be working

is ozco.in an implementation of your stuff?

cheers

Overclocking = money? Greatest full time hobby ever!
1AR2eheP4nckS3tuzZHG6ARYndeddxmeDg
AnnihilaT
Full Member
***
Offline Offline

Activity: 210
Merit: 100



View Profile
June 14, 2011, 08:27:34 PM
#52

Hey Mike,

I like where you are going with this but the cookie implementation appears to be broken and your register function is currently broken as well.   Is the latest master supposed to be a working checkout or are you in the middle or reworking things?  Some things i noticed:

- register.php simply doesnt work i had to make the following changes to get it to work:
Code:
                $testUserQ = mysql_query("SELECT id FROM webUsers WHERE username = '".$username."' LIMIT 1");
                        //If not, create new user
                        //if (!$testUserQ) {
                        if (($testUserQ == false) || (mysql_num_rows($testUserQ) == 0)) {

- logout.php simply doesnt work.  Once logged in its impossible to logout without the session either timing out (didnt try to wait for this) or manually updateding/removing the timestamp in the webUser table.  Also you use a meta refresh in logout and login but wouldnt a
         header("Location: /index.php");
be nicer? Or something alike ?

Im curious who is doing your security audit?  You mention that you are getting one done but no details about this.... this might be a good point to expand on since security with web apps are always difficult to get right.   Also you might want to look into the webmin running on your server...if its v1.54, its vulnerable to an XSS attack that can result in root user priveleges for a remote attacker.
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 15, 2011, 04:33:50 AM
#53

Hey Mike,

I like where you are going with this but the cookie implementation appears to be broken and your register function is currently broken as well.   Is the latest master supposed to be a working checkout or are you in the middle or reworking things?  Some things i noticed:

- register.php simply doesnt work i had to make the following changes to get it to work:
Code:
               $testUserQ = mysql_query("SELECT id FROM webUsers WHERE username = '".$username."' LIMIT 1");
                        //If not, create new user
                        //if (!$testUserQ) {
                        if (($testUserQ == false) || (mysql_num_rows($testUserQ) == 0)) {

- logout.php simply doesnt work.  Once logged in its impossible to logout without the session either timing out (didnt try to wait for this) or manually updateding/removing the timestamp in the webUser table.  Also you use a meta refresh in logout and login but wouldnt a
         header("Location: /index.php");
be nicer? Or something alike ?

Im curious who is doing your security audit?  You mention that you are getting one done but no details about this.... this might be a good point to expand on since security with web apps are always difficult to get right.   Also you might want to look into the webmin running on your server...if its v1.54, its vulnerable to an XSS attack that can result in root user priveleges for a remote attacker.

I think a few unintended things snuck into the last checkout. I'm about halfway through with the v2 code, and I'm trying to keep it out of master for now.

I had an outpatient spinal procedure done today, so nothing will be checked in tonight. Hopefully I can have a demo of the new work on the test-net soon for some real-world testing and viewing.

As for the security audit, I'm handling them. I'm using internal tools from my professional work, along with acunetix & nmap so far. The current v2(&1.1) code checks out clear so far. If you have any additional recommendations, I'd love to hear them.

I'm not using webmin 1.54 on my production machines. Once back in production, ssh should suffice for the live server. I like to keep production running as lean as possible.



In the future, I'll branch new code and keep the master at the latest 100% stable version.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
Wayno
Member
**
Offline Offline

Activity: 61
Merit: 10


View Profile
June 18, 2011, 03:15:44 AM
#54

Hello forums peoples,

I have been using simple coin to run a site and well it isn't working as it should. for starts the shares system is off as i found out after some days of testing and manual calculation, when 2 blocks are found with in a time frame the confirms STOP working on the older block, the cronjob system is hectic as it is if the db is updating the shares and the account balance part the system can run 2 cronjobs and you can get double payouts on the same block.

we have spent the last 48 hrs fixing the code to run correct and make things smoother. just a warning on this if u are planing to use the this code to run ur own large pool.

i found out the hard way Wink

its a great front end but a lot of minor and large bugs to be found and isolated as well.

YinCoin YangCoin ☯☯First Ever POS/POW Alternator! Multipool! ☯ ☯ http://yinyangpool.com/ 
Free Distribution! https://bitcointalk.org/index.php?topic=623937
dcconsulting
Jr. Member
*
Offline Offline

Activity: 41
Merit: 0


View Profile
June 18, 2011, 06:25:47 AM
#55

Hi Wayno,

It Would be great in the spirit of Open Source to publish the fixed code to us. I am also running a pool on the Simplecoin Frontend and this makes me worry. Have not solved a block yet so it would be greatly appreciated before that.

Regards

ZA Bitcoin Mining Pool - JOIN US !!  www.zabitcoin.co.za  0% FEE !
South Africa's own mining pool Smiley
Spirals
Newbie
*
Offline Offline

Activity: 15
Merit: 0


View Profile WWW
June 18, 2011, 10:46:39 AM
#56

There seems to be a bug in accountsettings.php. Changing line 151:
Code:
}else if($inputAuthPin != $authPin && $act){

to:

Code:
}else if($inputAuthPin != $authPin && $act != "addWorker"){

fixes the warning about 'invalid authorization pin' when adding a worker.

http://wallstreetcrypto.net
Wayno
Member
**
Offline Offline

Activity: 61
Merit: 10


View Profile
June 18, 2011, 05:12:51 PM
#57

dcconsulting we have solved 5 so far in 10 days running, and oh boy wat a problem it was sorting everything out. the only big issue we had was that i am running bitcoind 3.22 and the backend needs to be changed to generate to immature on looking for blocks, we found 2 blocks on the same day 5 hours apart this is were all the fun started Wink

be warned my code has been changed ALOT

https://github.com/Wayno

i havent uploaded the new db changes yet i will do that later on tonight

YinCoin YangCoin ☯☯First Ever POS/POW Alternator! Multipool! ☯ ☯ http://yinyangpool.com/ 
Free Distribution! https://bitcointalk.org/index.php?topic=623937
dcconsulting
Jr. Member
*
Offline Offline

Activity: 41
Merit: 0


View Profile
June 19, 2011, 08:21:44 AM
#58

Thank You Wayno !

edit : HAHA writings of a mad man !

ZA Bitcoin Mining Pool - JOIN US !!  www.zabitcoin.co.za  0% FEE !
South Africa's own mining pool Smiley
Wayno
Member
**
Offline Offline

Activity: 61
Merit: 10


View Profile
June 19, 2011, 10:33:33 AM
#59

i have uploaded the db and new code.

YinCoin YangCoin ☯☯First Ever POS/POW Alternator! Multipool! ☯ ☯ http://yinyangpool.com/ 
Free Distribution! https://bitcointalk.org/index.php?topic=623937
dcconsulting
Jr. Member
*
Offline Offline

Activity: 41
Merit: 0


View Profile
June 19, 2011, 10:49:07 AM
#60

Wayno,

Running the cronjob.php I get the following

PHP Fatal error:  Call to undefined function lock() in /var/www/cronjobs/cronjob.php on line 25

In Cronjob Line 25 = lock("cronjob.php");

Any ideas ?

ZA Bitcoin Mining Pool - JOIN US !!  www.zabitcoin.co.za  0% FEE !
South Africa's own mining pool Smiley
Wayno
Member
**
Offline Offline

Activity: 61
Merit: 10


View Profile
June 19, 2011, 12:40:21 PM
#61

requiredFunctions.php u need to have my copy theres a fucntion in there called lock

line 163

YinCoin YangCoin ☯☯First Ever POS/POW Alternator! Multipool! ☯ ☯ http://yinyangpool.com/ 
Free Distribution! https://bitcointalk.org/index.php?topic=623937
dcconsulting
Jr. Member
*
Offline Offline

Activity: 41
Merit: 0


View Profile
June 19, 2011, 01:03:06 PM
#62

Ah thanks

Now I am getting this error,

Output from command php /var/www/cronjobs/cronjob.php ..

PHP Notice:  Trying to get property of non-object in /var/www/cronjobs/cronjob.php on line 157
XML-RPC: xmlrpcmsg::parseResponseHeaders: HTTP error, got response: HTTP/1.1 500 Internal Server Error
PHP Fatal error:  Uncaught BitcoinClientException:
  • : Didn't receive 200 OK from remote server. (HTTP/1.1 500 Internal Server Error)

  thrown in  on line 0


Probably because I have not solved any block yet.

ZA Bitcoin Mining Pool - JOIN US !!  www.zabitcoin.co.za  0% FEE !
South Africa's own mining pool Smiley
dcconsulting
Jr. Member
*
Offline Offline

Activity: 41
Merit: 0


View Profile
June 19, 2011, 01:04:04 PM
#63

By the way Excellent work, the site just seems to be smoother.

ZA Bitcoin Mining Pool - JOIN US !!  www.zabitcoin.co.za  0% FEE !
South Africa's own mining pool Smiley
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 20, 2011, 04:41:04 PM
#64

Nice, a fork!

I haven't been able to do much lately, but it looks like I'll probably get around to getting v2 up and running this week.

I'll definitely take a look at Wayno's code too, to see if it makes sense to bring anything over

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
BurningToad
Full Member
***
Offline Offline

Activity: 207
Merit: 100


View Profile
June 20, 2011, 11:32:34 PM
#65

i have uploaded the db and new code.

Thanks Wayno!

Wayno
Member
**
Offline Offline

Activity: 61
Merit: 10


View Profile
June 21, 2011, 04:10:07 AM
#66

Updated db and code base, lotsa fixs and stuff.

YinCoin YangCoin ☯☯First Ever POS/POW Alternator! Multipool! ☯ ☯ http://yinyangpool.com/ 
Free Distribution! https://bitcointalk.org/index.php?topic=623937
froggy
Full Member
***
Offline Offline

Activity: 127
Merit: 100


View Profile WWW
June 21, 2011, 12:34:17 PM
#67

drrconsulting, regarding ozcoin's cronjob.php error, ozcoin seems to be using an amended version of bitcoin.inc.php  .  I was getting similar errors but replaced ozcoin's /includes/bitcoinController/bitcoin.inc.php with the bitcoin.inc.php from Xenland's current code and no more cronjob.php errors.

The /cronjobs/shares.php seems to hve an error.  I'm getting
Code:
PHP Warning:  implode(): Invalid arguments passed in [PATH-TO]/cronjobs/shares.php on line 69

Bit confused as to what's going on with 'id' in that script.
Wayno
Member
**
Offline Offline

Activity: 61
Merit: 10


View Profile
June 21, 2011, 04:23:18 PM
#68

oh yeah i forgot i changed the standard port 8332 to 8335

better change that in bitcoin.inc.php

YinCoin YangCoin ☯☯First Ever POS/POW Alternator! Multipool! ☯ ☯ http://yinyangpool.com/ 
Free Distribution! https://bitcointalk.org/index.php?topic=623937
frizzl
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
June 22, 2011, 06:46:00 AM
#69

My stats seems off a bit,can any tell me what the "settings" table is used for ..its currently blank and I see it referenced quite a bit in the php code.  Do I need to add something?  So far everything else is working good but i have no server stats and some workers show wrong.  Cron jobs are setup and run fine, what times is anyone using?  Good job everyone btw.
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 22, 2011, 07:20:18 PM
#70

My stats seems off a bit,can any tell me what the "settings" table is used for ..its currently blank and I see it referenced quite a bit in the php code.  Do I need to add something?  So far everything else is working good but i have no server stats and some workers show wrong.  Cron jobs are setup and run fine, what times is anyone using?  Good job everyone btw.

yes, there is an insert line in the setup sql (try running just that line).

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
frizzl
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
June 23, 2011, 01:29:30 PM
#71

Wayno i cannot get it to report online miners corretly.  I added the above fix from simplexoin and that claered up a bunch of the stat issues but still have miners online reporting incorrect.  Can u upload ur settings db config?  All time stats are not quite working right either it seems.  I am mining w 3 miners currentlyw2 different test accounts.  Thanks
Wayno
Member
**
Offline Offline

Activity: 61
Merit: 10


View Profile
June 24, 2011, 05:25:39 AM
#72

go into admin panel and change cheating to proportional as i haven't removed it.

when u upload the database it will be cleaned u need to add all the settings in.

YinCoin YangCoin ☯☯First Ever POS/POW Alternator! Multipool! ☯ ☯ http://yinyangpool.com/ 
Free Distribution! https://bitcointalk.org/index.php?topic=623937
frizzl
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
June 24, 2011, 08:14:33 PM
#73

Wayno, what rows are included in settings same as in original simplecoin i have:

currenthashrate    
currentroundshares    
currentworkers    
mtgoxlast    
pagetitle
sitebalance    
sitepayoutaddress    
sitepercent    
siterewardtype    
slogan    
statstime    
websitename

thanks for all ur help
Wayno
Member
**
Offline Offline

Activity: 61
Merit: 10


View Profile
June 25, 2011, 02:46:14 AM
#74

currenthashrate    43379
currentroundshares    1215632
currentworkers    124
mtgoxlast    1
pagetitle    Ozco.in
sitebalance    0
sitepayoutaddress    1GG9HQZchCRxPSBV5SwZ9GoYEVq9vVLGqU
sitepercent    1
siterewardtype    1
slogan    Making Bitcoins Simple
statstime    1308969381
websitename    Ozco.in

thats wat it currently looks like

statstime    1308969381 is the only one i added

YinCoin YangCoin ☯☯First Ever POS/POW Alternator! Multipool! ☯ ☯ http://yinyangpool.com/ 
Free Distribution! https://bitcointalk.org/index.php?topic=623937
frizzl
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile
June 25, 2011, 03:00:28 AM
#75

Ok thanks for verifying, i found statstime in the code making sure there wasn't any others.  Thanks for your help
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 25, 2011, 06:58:00 AM
#76

Version 2 beta is available from github!

There are several sql changes and you will need to manually enter them if you choose to upgrade an existing install.
Note: counted in shares history is now an enum.
To convert update existing- UPDATE shares_history set counted='1' where counted=1; update shares_history set counted='0' where counted=0
ONLY RUN if your shares_history counted is not an enum after updating tables

There could be stats errors, and some unchanged terminology that needs updating. That said, payouts & balance figures should be correct!

Please note any issues you have (or an update sql script if you have the time!!! I hate writing those by hand).

Thanks, and more features coming Smiley

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
froggy
Full Member
***
Offline Offline

Activity: 127
Merit: 100


View Profile WWW
June 25, 2011, 05:53:41 PM
#77

Yayy!  Thanks Simplecoin - trying it now.

A tip for testing....
Code:
I was getting errors when testing the crobjobs via command line ssh:
[code]
 PHP Notice:  Undefined index: REMOTE_ADDR

so I've password protected the cronjobs folder using htacess.

You should then be able to safely change the code in the cronjobs from :
Code:

//Check that script is run locally
$ip = $_SERVER['REMOTE_ADDR'];
if ($ip != "127.0.0.1") {
echo "cronjobs can only be run locally.";
exit;
}

to
Code:

if (isset( $_SERVER['REMOTE_ADDR']))
 {
$ip = $_SERVER['REMOTE_ADDR'];
if ($ip != "127.0.0.1")
      {
echo "cronjobs can only be run locally.";
exit;
      }
  }

...which will enable you to test the cronjobs via the command line.[/code]
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 25, 2011, 10:54:50 PM
#78

Yayy!  Thanks Simplecoin - trying it now.

A tip for testing....
Code:
I was getting errors when testing the crobjobs via command line ssh:
[code]
 PHP Notice:  Undefined index: REMOTE_ADDR

so I've password protected the cronjobs folder using htacess.

You should then be able to safely change the code in the cronjobs from :
Code:

//Check that script is run locally
$ip = $_SERVER['REMOTE_ADDR'];
if ($ip != "127.0.0.1") {
echo "cronjobs can only be run locally.";
exit;
}

to
Code:

if (isset( $_SERVER['REMOTE_ADDR']))
 {
$ip = $_SERVER['REMOTE_ADDR'];
if ($ip != "127.0.0.1")
      {
echo "cronjobs can only be run locally.";
exit;
      }
  }

...which will enable you to test the cronjobs via the command line.[/code]

Thanks, I didn't have any problems running wget http://localhost/cronjobs/...., but I'm happy to implement that. Seems like a harmless addition.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
AnnihilaT
Full Member
***
Offline Offline

Activity: 210
Merit: 100



View Profile
June 26, 2011, 09:22:21 AM
#79

Hi Mike,

I've been hacking on your code a bit for the last day again and testing everything on a private testnet in a box setup with 2 nodes and there are some things puzzling me about how the cronjob.php code works.  Mainly in the logic.  Ill try and explain each on separately.

Checking if we found a block.
Here we query bitcoind with a listtransactions query with no extra arguments so we get a default count of the last 10 transactions.  We check if the category is "generate" and if so we assume we may have found a block and start doing some logic to make sure of that.  

This is where i already dont get it.   On my testnet setup,  when we find a new block its category is immature and remains that way until it receives 120 confirmations at which point it changes from "immature" to "generate".  see below:

Code:
   {
        "account" : "",
        "category" : "generate",
        "amount" : 50.00000000,
        "confirmations" : 120,
        "txid" : "47a833ba9e311a839988136a283d9e6a8d05f7c609cc5ec26de397f352472751",
        "time" : 1300079031
    },
    {
        "account" : "",
        "category" : "immature",
        "amount" : 50.00000000,
        "confirmations" : 119,
        "txid" : "c31c89383ec77234cc2c2cbeca87edbc2b6348edba9d0e6c343fc34f1ed730ff",
        "time" : 1300079115
    },

This means that by the time we have a transaction with the "generate" category it will have long ago fallen out of the data returned by the listtransactions query since that only shows the last 10 transactions.  I realize that works a bit different on an active live network but it still seems odd to me that at least the way im reading the code that you rely on the assumption that we wont find more than 10 blocks out of 120 (or something like this - maybe i made a math error).  If i leave it set like this on a private testnet the side effect is that no blocks are ever seen as found and the round never ends because by the time the block has changed from immature to generate it has fallen out of the list of the last 10 transactions because our pool is finding every single block.   Does this make sense?  

Updateing confirms
The next part also confuses me for a similar reason.  NExt we go through all the transactions and update their confirms.  Here again we check the category if its set to "receive" but from what i can see an immature or generated block will never have this category.  Its category is always either generate or immature (on testnet).  see below:

here is a closer look at a txid which has matured
Code:
# bitcoind -datadir=testnet/1 gettransaction 47a833ba9e311a839988136a283d9e6a8d05f7c609cc5ec26de397f352472751

{
    "amount" : 50.00000000,
    "confirmations" : 120,
    "txid" : "47a833ba9e311a839988136a283d9e6a8d05f7c609cc5ec26de397f352472751",
    "time" : 1300079031,
    "details" : [
        {
            "account" : "",
            "category" : "generate",
            "amount" : 50.00000000
        }
    ]
}

and a closer look at one right after it with only 119 confirms and will be maturing next round:
Code:
# bitcoind -datadir=testnet/1 gettransaction c31c89383ec77234cc2c2cbeca87edbc2b6348edba9d0e6c343fc34f1ed730ff

{
    "amount" : 0.00000000,
    "confirmations" : 119,
    "txid" : "c31c89383ec77234cc2c2cbeca87edbc2b6348edba9d0e6c343fc34f1ed730ff",
    "time" : 1300079115,
    "details" : [
        {
            "account" : "",
            "category" : "immature",
            "amount" : 50.00000000
        }
    ]
}

so the effect here is that nothing will ever get its confirms updated unless your check is changed to immature or generate.   Can you explain to me the "receive" category and why you are using this as a check?  

Calculating payouts and ending the round
This part seems to be pretty straightforward assuming that the previous 2 steps went right with the exception that it looks like in this part of the code is where we close out the round (am i wrong here).   It seems that the round doesnt get closed out properly if this part of the code doesnt run (for example because there are not yet enough confirms on any of the blocks.)   Is it true that this is where the round ends or at least some part of the logic for ending a round is in here?  Or is that completely all up top of the code where we move all old shares to shares_history.  

Other random questions
Wouldnt it be better to track 2 balance amounts - an unconfirmed and a confirmed amount and only allow payout of course on the confirmed balance?  It seems the way the code is written now that a user will have no idea they might have earned until all found blocks have at least 120 confirms.   So if you are just starting up a new pool, your new users will show a 0 balance until at least 120 or so blocks have been found on the network which would confuse them and maybe scare them off right from the start as it would look like they arent earning anything.   Am i correct about it working like this?  

I hope im explaining this well enough for you to get my point.  It;s late and i know i might not be making myself very clear.   Thanks for any clarification you can give!! Maybe im missing something very simple here. Smiley
drontus
Jr. Member
*
Offline Offline

Activity: 56
Merit: 0



View Profile
June 26, 2011, 09:51:45 AM
#80

workers wan't connect to pool =\ help plz
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 26, 2011, 04:07:56 PM
#81

Hi Mike,

I've been hacking on your code a bit for the last day again and testing everything on a private testnet in a box setup with 2 nodes and there are some things puzzling me about how the cronjob.php code works.  Mainly in the logic.  Ill try and explain each on separately.

Checking if we found a block.
Here we query bitcoind with a listtransactions query with no extra arguments so we get a default count of the last 10 transactions.  We check if the category is "generate" and if so we assume we may have found a block and start doing some logic to make sure of that.  

This is where i already dont get it.   On my testnet setup,  when we find a new block its category is immature and remains that way until it receives 120 confirmations at which point it changes from "immature" to "generate".  see below:

Code:
   {
        "account" : "",
        "category" : "generate",
        "amount" : 50.00000000,
        "confirmations" : 120,
        "txid" : "47a833ba9e311a839988136a283d9e6a8d05f7c609cc5ec26de397f352472751",
        "time" : 1300079031
    },
    {
        "account" : "",
        "category" : "immature",
        "amount" : 50.00000000,
        "confirmations" : 119,
        "txid" : "c31c89383ec77234cc2c2cbeca87edbc2b6348edba9d0e6c343fc34f1ed730ff",
        "time" : 1300079115
    },

This means that by the time we have a transaction with the "generate" category it will have long ago fallen out of the data returned by the listtransactions query since that only shows the last 10 transactions.  I realize that works a bit different on an active live network but it still seems odd to me that at least the way im reading the code that you rely on the assumption that we wont find more than 10 blocks out of 120 (or something like this - maybe i made a math error).  If i leave it set like this on a private testnet the side effect is that no blocks are ever seen as found and the round never ends because by the time the block has changed from immature to generate it has fallen out of the list of the last 10 transactions because our pool is finding every single block.   Does this make sense?  

Updateing confirms
The next part also confuses me for a similar reason.  NExt we go through all the transactions and update their confirms.  Here again we check the category if its set to "receive" but from what i can see an immature or generated block will never have this category.  Its category is always either generate or immature (on testnet).  see below:

here is a closer look at a txid which has matured
Code:
# bitcoind -datadir=testnet/1 gettransaction 47a833ba9e311a839988136a283d9e6a8d05f7c609cc5ec26de397f352472751

{
    "amount" : 50.00000000,
    "confirmations" : 120,
    "txid" : "47a833ba9e311a839988136a283d9e6a8d05f7c609cc5ec26de397f352472751",
    "time" : 1300079031,
    "details" : [
        {
            "account" : "",
            "category" : "generate",
            "amount" : 50.00000000
        }
    ]
}

and a closer look at one right after it with only 119 confirms and will be maturing next round:
Code:
# bitcoind -datadir=testnet/1 gettransaction c31c89383ec77234cc2c2cbeca87edbc2b6348edba9d0e6c343fc34f1ed730ff

{
    "amount" : 0.00000000,
    "confirmations" : 119,
    "txid" : "c31c89383ec77234cc2c2cbeca87edbc2b6348edba9d0e6c343fc34f1ed730ff",
    "time" : 1300079115,
    "details" : [
        {
            "account" : "",
            "category" : "immature",
            "amount" : 50.00000000
        }
    ]
}

so the effect here is that nothing will ever get its confirms updated unless your check is changed to immature or generate.   Can you explain to me the "receive" category and why you are using this as a check?  

Calculating payouts and ending the round
This part seems to be pretty straightforward assuming that the previous 2 steps went right with the exception that it looks like in this part of the code is where we close out the round (am i wrong here).   It seems that the round doesnt get closed out properly if this part of the code doesnt run (for example because there are not yet enough confirms on any of the blocks.)   Is it true that this is where the round ends or at least some part of the logic for ending a round is in here?  Or is that completely all up top of the code where we move all old shares to shares_history.  

Other random questions
Wouldnt it be better to track 2 balance amounts - an unconfirmed and a confirmed amount and only allow payout of course on the confirmed balance?  It seems the way the code is written now that a user will have no idea they might have earned until all found blocks have at least 120 confirms.   So if you are just starting up a new pool, your new users will show a 0 balance until at least 120 or so blocks have been found on the network which would confuse them and maybe scare them off right from the start as it would look like they arent earning anything.   Am i correct about it working like this?  

I hope im explaining this well enough for you to get my point.  It;s late and i know i might not be making myself very clear.   Thanks for any clarification you can give!! Maybe im missing something very simple here. Smiley


Yes, that's on the agenda. The code was based around modifications to Xenlands original. After seeing it in action, I think there are better ways to implement it. Thanks for the input, I'll definitely put some weight to it.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
AnnihilaT
Full Member
***
Offline Offline

Activity: 210
Merit: 100



View Profile
June 26, 2011, 09:48:26 PM
#82

Hi Mike,

Maybe i didnt make it clear that im implementing these things also where i think they make sense so maybe we should talk about working together on the project?  Also,  i had alot of questions in there as well for you and wonder if you could maybe (if you have time) answer some of my questions and let me know if things are actually as i understand them to be or if im making some wrong assumptions.  While i am testing the changes im making,  i also want to be sure that im not making some false assumptions about how it all works.   

Particularly im interested to hear your thoughts about the whole cronjob logic because im planning on making some significant changes here and would be nice to hear another opinion from someone who has used the code live.  I can only test on testnet.   

Can you verify that under normal operation with the code you run that indeed shares just keep counting up until the first block we found has 120 confirms and that maybe some other things work kind of weird as well until we hit the first block with 120 confirms?   Perhaps with my changes ive intoduced some oddities and want to make sure that the problems im "fixing" arent self induced Smiley

Anni
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 26, 2011, 10:26:31 PM
#83

Hi Mike,

Maybe i didnt make it clear that im implementing these things also where i think they make sense so maybe we should talk about working together on the project?  Also,  i had alot of questions in there as well for you and wonder if you could maybe (if you have time) answer some of my questions and let me know if things are actually as i understand them to be or if im making some wrong assumptions.  While i am testing the changes im making,  i also want to be sure that im not making some false assumptions about how it all works.  

Particularly im interested to hear your thoughts about the whole cronjob logic because im planning on making some significant changes here and would be nice to hear another opinion from someone who has used the code live.  I can only test on testnet.  

Can you verify that under normal operation with the code you run that indeed shares just keep counting up until the first block we found has 120 confirms and that maybe some other things work kind of weird as well until we hit the first block with 120 confirms?   Perhaps with my changes ive intoduced some oddities and want to make sure that the problems im "fixing" arent self induced Smiley

Anni

As far as working together, currently I want to personally check any code that comes through before it posts. That said, I tend to implement just about any pull request that is beneficial and benign.

I'm currently going through the cronjob logic myself. It works currently since blocks aren't generated very often, but it needed a heavy overhaul.

I'm changing the way it checks confirms & generations. The initial block now looks at generate and immature in the past 200 txs. The second block will look through networkblocks and not transactions. it will check bitcoind against txid to count confirms if less than 120 in networkblocks.

After that is all said and done, I intend to fork bitcoin & pushpool into one codebase to cut down on getwork traffic and expose new rpc commands to filter transactions based on category.

To answer your other questions:
calculating payouts: yes this ends the round. by setting counted='1' the shares are now invalid for the current round.
confirmed & unconfirmed balances: I think that would just add further confusion. Estimated balances alone have caused confusion that is a real pain. I'm tempted to even remove that from my own pool as it seems to anger people when they can't cashout a non-existent balance.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 26, 2011, 11:17:34 PM
#84

Here is my proposed improved method...

Code:
//Get list of transactions
$transactions = $bitcoinController->query("listtransactions \"*\" 200");

//Go through all the transactions check if there is 50BTC inside
$numAccounts = count($transactions);

for($i = 0; $i < $numAccounts; $i++) {
//Check for 50BTC inside only if they are in the generate category
if($transactions[$i]["amount"] >= 50 && ($transactions[$i]["category"] == "generate" || $transactions[$i]["category"] == "immature")) {
//At this point we may or may not have found a block,
//Check to see if this account addres is already added to `networkBlocks`
$accountExistsQ = mysql_query("SELECT id FROM networkBlocks WHERE accountAddress = '".$transactions[$i]["txid"]."' ORDER BY blockNumber DESC LIMIT 0,1")or die(mysql_error());
$accountExists = mysql_num_rows($accountExistsQ);

    //Insert txid into latest network block
if (!$accountExists) {
//Get last winning block
$lastSuccessfullBlockQ = mysql_query("SELECT n.id FROM networkBlocks n, winning_shares w where n.blockNumber = w.blockNumber ORDER BY w.id DESC LIMIT 1");
$lastSuccessfullBlockR = mysql_fetch_object($lastSuccessfullBlockQ);
$lastEmptyBlock = $lastSuccessfullBlockR->id;

$insertBlockSuccess = mysql_query("UPDATE networkBlocks SET accountAddress = '".$transactions[$i]["txid"]."' WHERE id = $lastEmptyBlock")or die(mysql_error());

//Update site balance for tx fee
$poolReward = $transactions[$i]["amount"] - $bonusCoins;
mysql_query("UPDATE settings SET value = value + $poolReward WHERE setting='sitebalance'");
}
}
}

//Go through networkblocks and update confirms as needed
$winningAccountQ = mysql_query("SELECT id, accountAddress FROM networkBlocks WHERE accountAddress <> '' AND confirms < 120");
while ($winningAccountR = mysql_fetch_object($winningAccountQ)) {
$txInfo = $bitcoinController->gettransaction($winningAccountR->accountAddress);
if (count($txInfo["confirmations"]) > 0) {
mysql_query("UPDATE networkBlocks SET confirms = ".$txInfo["confirmations"]." WHERE id = $winningAccountR->id");
}
}

Also, I'm thinking of ways to remove shares_history, I hate having so many table joins slowing things down.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
AnnihilaT
Full Member
***
Offline Offline

Activity: 210
Merit: 100



View Profile
June 27, 2011, 12:39:40 AM
#85


As far as working together, currently I want to personally check any code that comes through before it posts. That said, I tend to implement just about any pull request that is beneficial and benign.

Makes sense.  Ill have to see if i can get up to speed on GIT.  I always use SVN myself. 

Quote
I'm currently going through the cronjob logic myself. It works currently since blocks aren't generated very often, but it needed a heavy overhaul.

I'm changing the way it checks confirms & generations. The initial block now looks at generate and immature in the past 200 txs. The second block will look through networkblocks and not transactions. it will check bitcoind against txid to count confirms if less than 120 in networkblocks.

Funny...ive been sitting here doing the exact same thing for the last couple hours and finally think i have it working quite nicely. I think 200 might be a bit excessive and have set mine for now to 60 i think.  This seems to catch everything.  Certainly alot better than 10 Smiley

Quote
After that is all said and done, I intend to fork bitcoin & pushpool into one codebase to cut down on getwork traffic and expose new rpc commands to filter transactions based on category.

Sounds good.

Quote
To answer your other questions:
calculating payouts: yes this ends the round. by setting counted='1' the shares are now invalid for the current round.
confirmed & unconfirmed balances: I think that would just add further confusion. Estimated balances alone have caused confusion that is a real pain. I'm tempted to even remove that from my own pool as it seems to anger people when they can't cashout a non-existent balance.

RE: ending the round... Yes this makes sense.  It only seems to make more sense to my brain at this very moment to end the round immediately when a block is found and we start counting confirms rather than wait until we have 120 confirms on our first block to end a round.  I just think its going to cause lots of confusion to users of someone who starts up a brand new pool.  It should work completely normally and intuitive once you get to your first 120 confirms on that first found block but before that.... yeah... weird.   Or do i misunderstand how it works?   For the rest of what you say i agree with! Smiley
AnnihilaT
Full Member
***
Offline Offline

Activity: 210
Merit: 100



View Profile
June 27, 2011, 12:57:35 AM
#86

Here is my proposed improved method...

Code:
//Get list of transactions
$transactions = $bitcoinController->query("listtransactions \"*\" 200");

//Go through all the transactions check if there is 50BTC inside
$numAccounts = count($transactions);

for($i = 0; $i < $numAccounts; $i++) {
//Check for 50BTC inside only if they are in the generate category
if($transactions[$i]["amount"] >= 50 && ($transactions[$i]["category"] == "generate" || $transactions[$i]["category"] == "immature")) {
//At this point we may or may not have found a block,
//Check to see if this account addres is already added to `networkBlocks`
$accountExistsQ = mysql_query("SELECT id FROM networkBlocks WHERE accountAddress = '".$transactions[$i]["txid"]."' ORDER BY blockNumber DESC LIMIT 0,1")or die(mysql_error());
$accountExists = mysql_num_rows($accountExistsQ);

    //Insert txid into latest network block
if (!$accountExists) {
//Get last winning block
$lastSuccessfullBlockQ = mysql_query("SELECT n.id FROM networkBlocks n, winning_shares w where n.blockNumber = w.blockNumber ORDER BY w.id DESC LIMIT 1");
$lastSuccessfullBlockR = mysql_fetch_object($lastSuccessfullBlockQ);
$lastEmptyBlock = $lastSuccessfullBlockR->id;

$insertBlockSuccess = mysql_query("UPDATE networkBlocks SET accountAddress = '".$transactions[$i]["txid"]."' WHERE id = $lastEmptyBlock")or die(mysql_error());

//Update site balance for tx fee
$poolReward = $transactions[$i]["amount"] - $bonusCoins;
mysql_query("UPDATE settings SET value = value + $poolReward WHERE setting='sitebalance'");
}
}
}

//Go through networkblocks and update confirms as needed
$winningAccountQ = mysql_query("SELECT id, accountAddress FROM networkBlocks WHERE accountAddress <> '' AND confirms < 120");
while ($winningAccountR = mysql_fetch_object($winningAccountQ)) {
$txInfo = $bitcoinController->gettransaction($winningAccountR->accountAddress);
if (count($txInfo["confirmations"]) > 0) {
mysql_query("UPDATE networkBlocks SET confirms = ".$txInfo["confirmations"]." WHERE id = $winningAccountR->id");
}
}

Also, I'm thinking of ways to remove shares_history, I hate having so many table joins slowing things down.

Funny!  I was just doing more or less the same.  My code looks almost identical.

Code:
//Query bitcoind for list of transactions
$transactions = $bitcoinController->query('listtransactions', '', '60');

//Go through all the transactions check if there is 50BTC inside
$numAccounts = count($transactions);

for($i = 0; $i < $numAccounts; $i++){
        //Check for 50BTC in each transaction (even when immature so we can start tracking confirms)
        if($transactions[$i]["amount"] >= 50 && ($transactions[$i]["category"] == "generate" || $transactions[$i]["category"] == "immature")) {



Also it look like the mtgox.php is broken.  Not sure why so i hacked this in real quick.  It depends on having curl installed at the command line:

Code:
// Update MtGox last price via curl, 3 second timeout on connection
$mtgox_ticker = exec("/usr/bin/curl -q -s --connect-timeout 3 'https://mtgox.com/code/data/ticker.php'");
if (!is_null($mtgox_ticker)) {
        $ticker_obj = json_decode($mtgox_ticker);
        if (intval($ticker_obj->ticker->last) > 0) {
                $settings->setsetting('mtgoxlast', $ticker_obj->ticker->last);
        }
}

Furthur:  logout.php is completely broken for me (or was).  It was impossible to logout. Im using this instead.  Does this look sane to you?
Code:
//Include site functions
include("includes/requiredFunctions.php");
include("includes/universalChecklogin.php");

$user = $userInfo->username;
$checkPassQ = mysql_query("SELECT id FROM webUsers WHERE username = '".$user."' LIMIT 0,1");
$checkPass = mysql_fetch_object($checkPassQ);
$userid = $checkPass->id;

setcookie($cookieName, false);
unset($cookieValid);
mysql_query("UPDATE `webUsers` SET `sessionTimeoutStamp` = '0' WHERE `id` = '" .$userid. "'");
header("Location: /index.php");



Some of the other things ive done so far are:
- added worker deletion and improved layout of account details a bit
- logout menu item
- rewritten the stats leftsidebar thing
- started working on some nicer admin features and stats
- improved layout of the stats page
- Fixed a security issue (maybe introduced 1 or 2 as well Cheesy)
- gotten rid of the login.php refresh page and replace it with a 2 second sleep after each login attempt (plans to make this safer)
- prolly lots more...  anyway ive been busy Smiley

simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 27, 2011, 02:40:48 PM
#87

New updates for v2 checked in.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 27, 2011, 03:04:53 PM
#88

Some of the other things ive done so far are:
- added worker deletion and improved layout of account details a bit
did you merge the workers existing uncounted shares to another worker? Also, did you make sure that there is at least 1 worker (to keep from losing all shares)?

Quote
- Fixed a security issue (maybe introduced 1 or 2 as well Cheesy)

Security is my biggest priority. If you could forward anything you see it is greatly appreciated.

Quote
- gotten rid of the login.php refresh page and replace it with a 2 second sleep after each login attempt (plans to make this safer)
Good idea, I was thinking a captcha after 2 unsuccessful logins by any 1 ip.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 27, 2011, 03:27:33 PM
#89

More updates to v2.

Currently folding in parts of Ozco.in fork to the v2 code where it makes sense.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
AnnihilaT
Full Member
***
Offline Offline

Activity: 210
Merit: 100



View Profile
June 27, 2011, 06:03:10 PM
#90

Quote
did you merge the workers existing uncounted shares to another worker? Also, did you make sure that there is at least 1 worker (to keep from losing all shares)?

Oh! Good point! Ill have to have another look at how i did that Smiley

Quote
Security is my biggest priority. If you could forward anything you see it is greatly appreciated.

not sure if its a huge issue but this is one that pops to mind:
Code:
//Check if the cookie is set, if so check if the cookie is valid
if(isSet($_COOKIE[$cookieName])){
        $cookieValid = false;
        $ip = $_SERVER['REMOTE_ADDR']; //Get Ip address for cookie validation
        $validateCookie = new checkLogin();
        $cookieValid = $validateCookie->checkCookie(mysql_real_escape_string($_COOKIE[$cookieName]), $ip);
        $userId = $validateCookie->returnUserId($_COOKIE[$cookieName]);

        //ensure userId is integer to prevent sql injection attack
        if (!is_numeric($userId)) {
                $userId = 0;
                exit;
        }


Quote
Quote
- gotten rid of the login.php refresh page and replace it with a 2 second sleep after each login attempt (plans to make this safer)
Good idea, I was thinking a captcha after 2 unsuccessful logins by any 1 ip.

I hate captcha's.  Gonna try to think of something nicer... for now im just sleeping 2 secs and then header("Location:") back to index.php.

simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 27, 2011, 06:17:53 PM
#91

Many Ozcoin improvements merged into main tree. Excellent work by Wayno & tom lightspeed!

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 27, 2011, 06:28:57 PM
#92

Anni, that security fix is in the repo Wink

Also, worker update/delete is there from ozcoin code. (it doesn't roll in old workers yet though).

The login attempt ban is also now in place.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 28, 2011, 02:10:12 PM
#93

Version 2 stable released, includes upgrade script from simplecoin 1.0 database.

All sql files are now in the sql/ directory.

Cheers!

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
AnnihilaT
Full Member
***
Offline Offline

Activity: 210
Merit: 100



View Profile
June 28, 2011, 05:52:14 PM
#94

Mike,

I think ive decided to fork the codebase you have maintained into a new project as i see you heading in a different direction with v2 than what originally attracted me in the first place.  Ill be keeping a SVN repo up and open so that my changes will be also available.   I will still probably borrow from your project as you can do from mine where and when applicable.  

At this point i have more than 1390 lines of differences to the original v1 code that i checked out and so this just seems to make more sense to me.   Also if you are curious, my version is running at http://mining.mainframe.nl/

Let me know if you have any questions or concerns.

Anni
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 28, 2011, 07:11:05 PM
#95

Mike,

I think ive decided to fork the codebase you have maintained into a new project as i see you heading in a different direction with v2 than what originally attracted me in the first place.  Ill be keeping a SVN repo up and open so that my changes will be also available.   I will still probably borrow from your project as you can do from mine where and when applicable.  

At this point i have more than 1390 lines of differences to the original v1 code that i checked out and so this just seems to make more sense to me.   Also if you are curious, my version is running at http://btc.mfis.net

Let me know if you have any questions or concerns.

Anni

Fork away Smiley

Let me know where your repo is and I'll put a link up on the OP.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 28, 2011, 11:09:12 PM
#96

Experimental branch created in github. All new development will go here until it is merged into a new version.

That said, just added Server load stats to the experimental branch. Should be good and stable. No db changes required.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
AnnihilaT
Full Member
***
Offline Offline

Activity: 210
Merit: 100



View Profile
June 29, 2011, 12:50:55 AM
#97

Mike,

I think ive decided to fork the codebase you have maintained into a new project as i see you heading in a different direction with v2 than what originally attracted me in the first place.  Ill be keeping a SVN repo up and open so that my changes will be also available.   I will still probably borrow from your project as you can do from mine where and when applicable.  

At this point i have more than 1390 lines of differences to the original v1 code that i checked out and so this just seems to make more sense to me.   Also if you are curious, my version is running at http://btc.mfis.net

Let me know if you have any questions or concerns.

Anni

Fork away Smiley

Let me know where your repo is and I'll put a link up on the OP.


Should be up at:  svn://svn.mfis.net/btc/
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 29, 2011, 03:05:28 AM
#98

oops, server load stat was was 100x too high, thanks jine for pointing that out.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
Bullethead21
Member
**
Offline Offline

Activity: 63
Merit: 10



View Profile
June 29, 2011, 04:33:52 PM
#99

Hi, building new forum server and was wondering which version of Pushpoold I should install that would work best with your fronttttt end latest release ver 2.0? Pushpoold has version 4.1 up to 5.1 available now?

Also, it looks like you got the stats page looking sweet now! I like the way it list the usernames and all the different data fields...awesome!

Cant wait to get your fron end installed. Have only bitcoind and pushpoold to install now as I have installed all dependencies....like jansson and the others....just wondering which version of pushpoold to compile and install?

Thanks!

Forgot to ask, how stable would your experimental version be on on a new install/build of a Ubuntu box version 11.04...there latest release? I mainly worry about the stats page displaying properly.....
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 29, 2011, 04:56:35 PM

pushpool v5, bitcoin v0.3.23 (or if you are comfortable compiling add the multi-thread diff from the 20btc bounty project page)

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
Bullethead21
Member
**
Offline Offline

Activity: 63
Merit: 10



View Profile
June 30, 2011, 01:14:08 AM

Thanks, got everything up and running. Only problem is when I try and access the admin page I get a 500 error...I have set the flag to 1 in the database ....any idea why I get this error only when trying to access the admin panel?

Thanks!
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 30, 2011, 07:07:38 AM

Thanks, got everything up and running. Only problem is when I try and access the admin page I get a 500 error...I have set the flag to 1 in the database ....any idea why I get this error only when trying to access the admin panel?

Thanks!

your best bet is to turn on display_errors in php.ini

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
Bullethead21
Member
**
Offline Offline

Activity: 63
Merit: 10



View Profile
June 30, 2011, 11:05:59 AM

did that already.....got nothing. I dont get it...the file is there...the path is correct.

I also cant seem to get clients to connect .....is there anything else that needs to be done with the database to get clients to connect? Maybe you could clear up the pool workers username and password...what is with the "." ? When you setup rpc should you include the "."?
 
Example if my website username is bean and I want to create a pool worker called pea, why do I end up with a worker called "bean.pea"? And how should I set up my RPC config file to connect? With a username of bean.pea or just pea?

The way it is, is confusing.....please help
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
June 30, 2011, 07:05:10 PM

did that already.....got nothing. I dont get it...the file is there...the path is correct.

I also cant seem to get clients to connect .....is there anything else that needs to be done with the database to get clients to connect? Maybe you could clear up the pool workers username and password...what is with the "." ? When you setup rpc should you include the "."?
 
Example if my website username is bean and I want to create a pool worker called pea, why do I end up with a worker called "bean.pea"? And how should I set up my RPC config file to connect? With a username of bean.pea or just pea?

The way it is, is confusing.....please help

The workers contain "." so that worker logins are based on simplecoin usernames. This keep people from fighting over worker names and having to guess one that's not already taken.

the rpc user/pass only relates to bitcoin.conf, pushpool.conf, & requiredFunctions, not a simplecoin user. just pick a name/pass and make it match in all 3 places.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
AnnihilaT
Full Member
***
Offline Offline

Activity: 210
Merit: 100



View Profile
July 01, 2011, 03:12:01 PM

Hi mike,

version 1 of my fork released:

MMCFE SVN - http://mmcfe.mfis.net  (Mainframe Mining Cooperative Front End)

Maybe you can update the original post with correct link and name of project?    

Anni
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 01, 2011, 06:06:36 PM

Hi mike,

version 1 of my fork released:

MMCFE SVN - http://mmcfe.mfis.net  (Mainframe Mining Cooperative Front End)

Maybe you can update the original post with correct link and name of project?    

Anni

Done! Too bad it's not a Git Fork.... it'd be too easy to move code back and forth. I'll peek around soon and see what to bring back from your fork.

Also: going to be adding bitcoin account locking, and email notifications.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
gnaget
Full Member
***
Offline Offline

Activity: 154
Merit: 100


View Profile
July 02, 2011, 05:27:48 PM

I'm trying to get simplecoin setup for my private mining farm.  Following the instructions, I can get to the website now, but when I try to register a user, I get the following error in the log:

PHP Warning:  mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/gnaget/simplecoin/includes/settings.php on line 29

It says user was created, but the user does not exist in the webUsers table.

Any idea what I might have missed?
gnaget
Full Member
***
Offline Offline

Activity: 154
Merit: 100


View Profile
July 02, 2011, 05:40:14 PM

my bad, forgot to grant access to mysql user
AnnihilaT
Full Member
***
Offline Offline

Activity: 210
Merit: 100



View Profile
July 04, 2011, 08:56:32 PM

Hey Mike,

found a bit of a nasty one...at least from a stats perspective and could maybe even cause some mayhem with payouts:

------------------------------------------------------------------------
r18 | annihilat | 2011-07-04 22:54:36 +0200 (Mon, 04 Jul 2011) | 3 lines
Changed paths:
   M /trunk/www/accountdetails.php

- make sure the user cannot set a lower than 0% donation fee


------------------------------------------------------------------------

You might want to check into that.   Smiley

Ive fixed it simply by adding a less than 0 check and forcing it to 0 if true.  see below:

Code:
if($act == "updateDetails"){
                        //Update user's details
                        $newSendAddress = mysql_real_escape_string($_POST["paymentAddress"]);
                        $newDonatePercent = mysql_real_escape_string($_POST["donatePercent"]);
                        $newPayoutThreshold = mysql_real_escape_string($_POST["payoutThreshold"]);
                        if ($newPayoutThreshold > 25)
                                $newPayoutThreshold = 25;
                        if ($newPayoutThreshold < 1)
                                $newPayoutThreshold = 0;
                        if ($newDonatePercent < 0)
                                $newDonatePercent = 0;

Bullethead21
Member
**
Offline Offline

Activity: 63
Merit: 10



View Profile
July 04, 2011, 10:10:52 PM

Thanks! Got the clients to connect succesfully! Do you have an example of about how long or in how many minutes I should run each cronjob file? I know in the thread it states from 10 to 30 minutes but how about the workers.php one for example? I like the stats to update frequently but I do not want to create to much or uneeded database traffic either...

Thanks again for all your help!

Anyone else having issues accessing the admin page? I have my account flag set to 1 in the database? Cant seem to figure that one out.

Peace!
Bullethead21
Member
**
Offline Offline

Activity: 63
Merit: 10



View Profile
July 05, 2011, 06:35:37 AM

It seems also some of the cronjobs are failing with a exit code/status of 255?

Only 2 cronjobs I get these errors on is when payout.php is tried to be executed by cron and also cronjob.php gives me this error...the rest run without errors from cron....only those 2 php files cause this cron error with a exiting code/status of 255?

I looked at the directoryinclude and all the cronjob files are setup the same....why only those 2 error out?

Please help!

Thanks!
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 05, 2011, 02:51:08 PM

Thanks! Got the clients to connect succesfully! Do you have an example of about how long or in how many minutes I should run each cronjob file? I know in the thread it states from 10 to 30 minutes but how about the workers.php one for example? I like the stats to update frequently but I do not want to create to much or uneeded database traffic either...

Thanks again for all your help!

Anyone else having issues accessing the admin page? I have my account flag set to 1 in the database? Cant seem to figure that one out.

Peace!

The key to the cron jobs is to space them out enough that it doesn't keep mysql bogged down. I've tried to space them out into separate files to help, but really I kept a watch on 'top' to try and keep the cpu/mem usage down.

as for the admin page not working, it could be a missing setting row in the settings table. turn errors on for a second and see if you can get an idea of the issue.

The 225 errors, never seen them, I'd check file owner/permissions.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 05, 2011, 03:30:48 PM

Hey Mike,

found a bit of a nasty one...at least from a stats perspective and could maybe even cause some mayhem with payouts:

------------------------------------------------------------------------
r18 | annihilat | 2011-07-04 22:54:36 +0200 (Mon, 04 Jul 2011) | 3 lines
Changed paths:
   M /trunk/www/accountdetails.php

- make sure the user cannot set a lower than 0% donation fee


------------------------------------------------------------------------

You might want to check into that.   Smiley

Ive fixed it simply by adding a less than 0 check and forcing it to 0 if true.  see below:

Code:
if($act == "updateDetails"){
                        //Update user's details
                        $newSendAddress = mysql_real_escape_string($_POST["paymentAddress"]);
                        $newDonatePercent = mysql_real_escape_string($_POST["donatePercent"]);
                        $newPayoutThreshold = mysql_real_escape_string($_POST["payoutThreshold"]);
                        if ($newPayoutThreshold > 25)
                                $newPayoutThreshold = 25;
                        if ($newPayoutThreshold < 1)
                                $newPayoutThreshold = 0;
                        if ($newDonatePercent < 0)
                                $newDonatePercent = 0;


Thanks, it's in the experimental branch now Smiley

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
Bullethead21
Member
**
Offline Offline

Activity: 63
Merit: 10



View Profile
July 05, 2011, 05:07:43 PM

Will try that out again and see if I can get it to give me something other than internal server error 500 which is what I usually get.....is there a way I can check my tables for something missing maybe? I imported the .sql file included in the download with no errors. Was there any additional steps I needed to take maybe in creating any extra tables possibly?

Thanks again Mike! You can expect a donation for sure! Awseome stuff!

Peace!
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 05, 2011, 05:23:54 PM

Will try that out again and see if I can get it to give me something other than internal server error 500 which is what I usually get.....is there a way I can check my tables for something missing maybe? I imported the .sql file included in the download with no errors. Was there any additional steps I needed to take maybe in creating any extra tables possibly?

Thanks again Mike! You can expect a donation for sure! Awseome stuff!

Peace!

There shouldn't be anything I missed in the v2 sql. That admin page loves to give errors though.... Since I usually change things in sql, sometimes little admin things slip through.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 06, 2011, 10:42:47 PM

Looks like BurningToad is going to share his MaxPPS code, so hopefully we'll have MaxPPS as a payout option soon.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
Kris
Donator
Hero Member
*
Offline Offline

Activity: 645
Merit: 500


View Profile
July 06, 2011, 11:45:23 PM

Nice initiative, if I didn't have to pay so many damn bills Ill probably open-source mine as well.

Tell me if you need help with anything.

Kind regards
Kris
Rob P.
Member
**
Offline Offline

Activity: 84
Merit: 10



View Profile WWW
July 07, 2011, 12:24:56 PM

Mike,

Been a lurker on the thread, and now trying to setup Simplecoin.

I have everything working, and in fact, my tests with one of my rigs appears to be working fine.

However, I cannot load the Admin Panel.  I have the link on my login, but when clicked it's a blank page and I get this error in the Apache error.log:

Code:
[Thu Jul 07 02:36:39 2011] [error] PHP Parse error:  syntax error, unexpected T_VARIABLE in /htdocs/adminPanel.php on line 43

Any thoughts, that line in my version of the code is:

Code:
        //Make sure an authPin is set and valid when $act is active^M
        if($_POST["act"] && $_$authPin == $inputAuthPin){

I'm thinking it doesn't think my account has a valid $authPin?  But it does...  Am I missing something?


--

If you like what I've written here, consider tipping the messenger:
1GZu4CtHa6ai8iWoWiVFxV5VVoNte4SkoG

If you don't like what I've written, send me a Tip and I'll stop talking.
AnnihilaT
Full Member
***
Offline Offline

Activity: 210
Merit: 100



View Profile
July 07, 2011, 12:54:58 PM

Mike,

Been a lurker on the thread, and now trying to setup Simplecoin.

I have everything working, and in fact, my tests with one of my rigs appears to be working fine.

However, I cannot load the Admin Panel.  I have the link on my login, but when clicked it's a blank page and I get this error in the Apache error.log:

Code:
[Thu Jul 07 02:36:39 2011] [error] PHP Parse error:  syntax error, unexpected T_VARIABLE in /htdocs/adminPanel.php on line 43

Any thoughts, that line in my version of the code is:

Code:
       //Make sure an authPin is set and valid when $act is active^M
        if($_POST["act"] && $_$authPin == $inputAuthPin){



typo in your code (or mikes).   Change $_$authPin to $authPin


Rob P.
Member
**
Offline Offline

Activity: 84
Merit: 10



View Profile WWW
July 07, 2011, 01:17:23 PM

Typo in your code (or mikes).   Change $_$authPin to $authPin
I'm thinking it doesn't think my account has a valid $authPin?  But it does...  Am I missing something?

I should have caught that.  Thank you, that fixed it.

That typo is in "simplecoin-simplecoin-v2.0-0-g361c13d.tar.gz", that's the rev I pulled.

--

If you like what I've written here, consider tipping the messenger:
1GZu4CtHa6ai8iWoWiVFxV5VVoNte4SkoG

If you don't like what I've written, send me a Tip and I'll stop talking.
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 07, 2011, 01:37:21 PM

Nice catch. The salting in the OS version is slightly different than my sites implementation (hooray obscurity!). Fixing in repo now.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
sergio
Sr. Member
****
Offline Offline

Activity: 308
Merit: 250


View Profile WWW
July 08, 2011, 05:38:19 AM

Great job, for simplecoin.

One thing that is important to know is that security by obscurity is a very bad thing, most of the times there are problems with the design and even when the design of the algorithm is good, there are security holes that go undetected until the cracker finds out.

Open source security algorithms are the best, for example take a look at the security of the bitcoin network, it is very solid, and in the rare event that a security was found most likely it would be in the implementation and it would be fixed within hours.

There are a lot of commercial security closed source programs that use the vigenere cipher, of course that is a secret, the vigenere cipher is very easy to implement and it provides security against the average person, but by design it is insecure, it is used a lot due to its simplicity,  in closed source it is very hard to tell it uses the vigenere chipher, until someone does some reverse engineering, and after that the security completely colapses, any good cracker will crack the algorithm no very easy but doable. There are other algorithm that are also very simple and easy to implement used in closed source programs like rot13, or substitution cipher both very insecure and worse than vigenere.

Then there the famous one time pad very secure only algorithm proven to be unbreakable but also not very practical.

The there are the good ones, but more complex idea, rsa, blowfish, etc, these can only be broken by brute force attacks, extremely difficult specially is the keys are large.

I used to be a cryptographer in the mid 90, so I am not up to date with the latest algorithms, but one thing I learned is that most close source packages are very insecure, and there are packages that break the security of those closed source programs, there was a programmer I do not remember his name that wrote software to unlock the locks, he was arrested in las vegas by the fbi after he gave a conference in defcon, he would talk a lot about insecure close source software with mathematical proofs, he sold unlock software for most closed source commerical packages.

The lesson to be learned is that for the most security it is best to rely on a good algorithm, and not by security by obscurity, therefore most secure algorithms are usually open source. In theory if a person is a brilliant genius a close source security software could be secure, but for most of us, and most real world cases, open source is the way to go for security.

In many companies managers believe on closed source, the only reason for that is ignorance, they are usually not cryptographers, and know very little about programming, when working for a company like that vigenere cipher is great makes the manager happy and you are done quickly with the job, but for a job well done it is all in the algorithm and its implementation  and it takes more work when you have security in mind.





 
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 08, 2011, 06:45:03 AM

It's not really different for obscurity, but moreso that I used a different algorithm when I setup my initial site before open-sourcing it.

I just haven't gotten around to changing it Wink

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
ziomik
Legendary
*
Offline Offline

Activity: 1960
Merit: 1004


https://blog.comprarebitcoin.info


View Profile WWW
July 09, 2011, 01:03:13 PM

Hi,
my server error in /var/log/apache2/error.log
Statistics on the site are empty.
Thank's for help.

Code:
[Sat Jul 09 14:27:48 2011] [error] [client xx.xx.xx.xx] PHP Warning:  mysql_data_seek(): Offset 0 is invalid for MySQL result index 28 (or the query data is unbuffered) in /var/www/stats.php on line 353, referer: http://xx.xx.xx.xx/accountdetails.php
[Sat Jul 09 14:29:33 2011] [error] [client xx.xx.xx.xx] PHP Warning:  mysql_data_seek(): Offset 0 is invalid for MySQL result index 28 (or the query data is unbuffered) in /var/www/stats.php on line 353, referer: http://xx.xx.xx.xx/accountdetails.php
[Sat Jul 09 14:29:46 2011] [error] [client xx.xx.xx.xx] PHP Warning:  mysql_data_seek(): Offset 0 is invalid for MySQL result index 28 (or the query data is unbuffered) in /var/www/stats.php on line 353, referer: http://xx.xx.xx.xx/accountdetails.php
[Sat Jul 09 14:30:11 2011] [error] [client xx.xx.xx.xx] PHP Notice:  Undefined variable: cookieName in /var/www/includes/universalChecklogin.php on line 23, referer: http://xx.xx.xx.xx/includes/
[Sat Jul 09 14:35:51 2011] [error] [client xx.xx.xx.xx] PHP Warning:  mysql_data_seek(): Offset 0 is invalid for MySQL result index 28 (or the query data is unbuffered) in /var/www/stats.php on line 353, referer: http://xx.xx.xx.xx/accountdetails.php
[Sat Jul 09 14:35:59 2011] [error] [client xx.xx.xx.xx] PHP Warning:  mysql_data_seek(): Offset 0 is invalid for MySQL result index 28 (or the query data is unbuffered) in /var/www/stats.php on line 353, referer: http://xx.xx.xx.xx/my_stats.php
[Sat Jul 09 14:39:31 2011] [error] [client xx.xx.xx.xx] PHP Warning:  mysql_data_seek(): Offset 0 is invalid for MySQL result index 28 (or the query data is unbuffered) in /var/www/stats.php on line 353, referer: http://xx.xx.xx.xx/accountdetails.php
[Sat Jul 09 14:43:12 2011] [error] [client xx.xx.xx.xx] PHP Parse error:  syntax error, unexpected T_VARIABLE in /var/www/adminPanel.php on line 42, referer: http://xx.xx.xx.xx/index.php
[Sat Jul 09 14:43:39 2011] [error] [client xx.xx.xx.xx] PHP Warning:  mysql_data_seek(): Offset 0 is invalid for MySQL result index 28 (or the query data is unbuffered) in /var/www/stats.php on line 353, referer: http://xx.xx.xx.xx/index.php
[Sat Jul 09 14:43:42 2011] [error] [client xx.xx.xx.xx] PHP Warning:  mysql_data_seek(): Offset 0 is invalid for MySQL result index 28 (or the query data is unbuffered) in /var/www/stats.php on line 353, referer: http://xx.xx.xx.xx/index.php

and error cron log syslog:
Code:
Jul  9 15:50:01 bitcoinitalia CRON[11981]: (root) CMD (/var/www/cronjobs/cronjob.php)
Jul  9 15:50:01 bitcoinitalia CRON[11980]: (root) CMD (/var/www/cronjobs/archive.php)
Jul  9 15:50:01 bitcoinitalia CRON[11978]: (CRON) error (grandchild #11981 failed with exit status 126)
Jul  9 15:50:01 bitcoinitalia CRON[11979]: (CRON) error (grandchild #11980 failed with exit status 126)

"Se domani senti due massaie che parlano di bitcoin tra di loro dal macellaio, forse e' il momento di vendere.. se pero' le sentirai fra 10 anni forse staranno solo pagando il conto" GBianchi
---- +++ ----
https://www.comprarebitcoin.info | https://blog.comprarebitcoin.info | https://www.bitcoinitalia.com
openrune
Member
**
Offline Offline

Activity: 62
Merit: 10


View Profile WWW
July 10, 2011, 02:52:52 AM

hey everyone

when i cronjob any of the cronjob php files manualy trough command line i get this error:

Code:
Cannot load the ionCube PHP Loader - it was built with configuration 2.2.0, whereas running engine is API220090626,NTS

Deprecated: Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0

Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0

Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0

There is an other bug in the Admin Page, its not possible to change any value since the pin nbr dnt gets accepted, but it works fine on the account details site
We have allso a bug since the first block was found on the stats.php:

Code:
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in .../httpdocs/stats.php on line 298
where the blocks per week box was.

on news.php:
Code:
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in .../httpdocs/news.php on line 25
on users.php
Code:
Warning: include() [function.include]: Filename cannot be empty in .../httpdocs/users.php on line 82

Warning: include() [function.include]: Failed opening '' for inclusion (include_path='.:') in .../httpdocs/users.php on line 82

Since the block was found it isnt possible to see the personal stats page anymore, and the left sidebar keeps counting on the same block even when the block is allready shown as found





0 Fee TENOBIS MINE
http://mine.tenobis.com
Dnt mind any donation!
19gD6ZNxSReeNf18A2ftYeDK5uuJ5VDKnu
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 10, 2011, 07:08:09 PM

Ok, btc account locking is now in the experimental repo. You will need to add an enum field to webUsers: btc_lock (0,1) and the locks table (fields - varchar: name, tinyint locked) if you wish to use it.


To answer the issues:

Statistics on the site are empty.

Without the cronjobs running, there will be no stats. Do you have pushpool/bitcoind up and running?

when i cronjob any of the cronjob php files manualy trough command line i get this error:

Code:
Cannot load the ionCube PHP Loader - it was built with configuration 2.2.0, whereas running engine is API220090626,NTS

Deprecated: Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0

Deprecated: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0

Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0
I'm not familiar with ionCube PHP. I recommend running the cronjobs using wget through your apache interface.

Quote
There is an other bug in the Admin Page, its not possible to change any value since the pin nbr dnt gets accepted, but it works fine on the account details site

This issue should be fixed in the experimental branch.

Quote
We have allso a bug since the first block was found on the stats.php:

Code:
Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in .../httpdocs/stats.php on line 298
where the blocks per week box was.

on news.php:
Code:
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in .../httpdocs/news.php on line 25
on users.php
Code:
Warning: include() [function.include]: Filename cannot be empty in .../httpdocs/users.php on line 82

Warning: include() [function.include]: Failed opening '' for inclusion (include_path='.:') in .../httpdocs/users.php on line 82

Since the block was found it isnt possible to see the personal stats page anymore, and the left sidebar keeps counting on the same block even when the block is allready shown as found


I'll look into this.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
openrune
Member
**
Offline Offline

Activity: 62
Merit: 10


View Profile WWW
July 10, 2011, 10:47:33 PM

Quote
There is an other bug in the Admin Page, its not possible to change any value since the pin nbr dnt gets accepted, but it works fine on the account details site

This issue should be fixed in the experimental branch.

This solved it perfectly thank you!

But i discovered an other problem when i run cronjob.php:
Code:
Fatal error: Uncaught BitcoinClientException: [0]: Didn't receive 200 OK from remote server. (HTTP/1.1 404 Not Found) thrown in on line 0

guess thats why the mine keeps counting on the same block!

I use pushpool 5 and bitcoin 0.3.23
The rpc values works with the requiredFunctions.php i can see on the stats page difficulty and blockcount etc.. just the cronjob.php gives me the 200 error

0 Fee TENOBIS MINE
http://mine.tenobis.com
Dnt mind any donation!
19gD6ZNxSReeNf18A2ftYeDK5uuJ5VDKnu
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 10, 2011, 11:31:33 PM

hmm, it should be getting 200 transactions from the server. you can take the other parameters out and just leave in the listtransactions call. The only downfall to this is if you get too many transactions it knocks it off the list.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
openrune
Member
**
Offline Offline

Activity: 62
Merit: 10


View Profile WWW
July 11, 2011, 12:38:02 AM

I deleted the additional parameters but that didnt solve the problem, i usualy had this error with the miningfarm from xenland, but in that case was a wrong rpc value the problem.

I cheched requiredFunctions.php if the values are correct what they indeed are. So there is probably just a small bug what doesnt allows the cronjob.php to communicate with bitcoind.

The right include path is set aswell in the cronjobs.

0 Fee TENOBIS MINE
http://mine.tenobis.com
Dnt mind any donation!
19gD6ZNxSReeNf18A2ftYeDK5uuJ5VDKnu
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 11, 2011, 01:30:50 AM

I deleted the additional parameters but that didnt solve the problem, i usualy had this error with the miningfarm from xenland, but in that case was a wrong rpc value the problem.

I cheched requiredFunctions.php if the values are correct what they indeed are. So there is probably just a small bug what doesnt allows the cronjob.php to communicate with bitcoind.

The right include path is set aswell in the cronjobs.

It sounds like a possible server issue. Are you running this on a typical linux/apache/mysql setup?

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
openrune
Member
**
Offline Offline

Activity: 62
Merit: 10


View Profile WWW
July 11, 2011, 01:38:06 AM

yes - debian lenny apache2 php5.3,

I tested the cronjob.php from ivasilov's github if there is a btc comunication problem (200 OK ) and that one works with out any error but ofcourse i dnt get a result...



0 Fee TENOBIS MINE
http://mine.tenobis.com
Dnt mind any donation!
19gD6ZNxSReeNf18A2ftYeDK5uuJ5VDKnu
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 11, 2011, 03:35:41 AM

yes - debian lenny apache2 php5.3,

I tested the cronjob.php from ivasilov's github if there is a btc comunication problem (200 OK ) and that one works with out any error but ofcourse i dnt get a result...




Sorry I haven't had the chance to chat, it's been a busy day.

What version of simplecoin are you using? 1,2,experimental? I'm looking at the experimental code personally.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
openrune
Member
**
Offline Offline

Activity: 62
Merit: 10


View Profile WWW
July 11, 2011, 08:45:36 AM

Im using the 2 version with some adjustments (for example Admin is taken from the experimental) but that has nothing in common with the problem since this problem was there before i did the update from the admin page to experimental

0 Fee TENOBIS MINE
http://mine.tenobis.com
Dnt mind any donation!
19gD6ZNxSReeNf18A2ftYeDK5uuJ5VDKnu
coingenuity
Member
**
Offline Offline

Activity: 64
Merit: 10


View Profile WWW
July 11, 2011, 10:59:29 AM

Very nice project! I'll keep an eye on this project's progress, and probably use it + donate if I ever start a pool. Smiley

somebadger
Member
**
Offline Offline

Activity: 186
Merit: 10



View Profile
July 11, 2011, 02:31:17 PM

congrats on simplecoin, i'm running a varient of it on pool.betcoin.co with a bunch of wayno's modifications and a large mix of my own Smiley

I'll be donating to both you and wayno once we solve a block, keep up the good work.

If you want the code for my cacheable images, let me know.

simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 11, 2011, 04:51:09 PM

congrats on simplecoin, i'm running a varient of it on pool.betcoin.co with a bunch of wayno's modifications and a large mix of my own Smiley

I'll be donating to both you and wayno once we solve a block, keep up the good work.

If you want the code for my cacheable images, let me know.

Of course I want the code for cacheable images Smiley I plan on having everything cacheable, it's just a matter of available time.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
smoothie
Legendary
*
Offline Offline

Activity: 2100
Merit: 1003


LEALANA Monero Physical Silver Coins


View Profile
July 15, 2011, 07:30:33 AM

Wish I could get pushpoold to work. I keep hitting every possible roadblock.

███████████████████████████████████████

            ,╓p@@███████@╗╖,           
        ,p████████████████████N,       
      d█████████████████████████b     
    d██████████████████████████████   
  ,█████████████████████████████████, 
 ,█████  ╙████████████████████╨  █████y
 ██████    `████████████████`    ██████
║██████       ███████████`      ███████
███████         ╩██████         ███████
███████    ▐▄     ██╩     a▌    ███████
╢██████    ▐▓█▄          ▄█▓▌    ███████
 ██████    ▐▓▓▓▓▌,     ▄█▓▓▓▌    ██████─
           ▐▓▓▓▓▓▓█,,▄▓▓▓▓▓▓▌          
           ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌          
    ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓─  
     ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓╩    
        ▀▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▀       
           ▀▀▓▓▓▓▓▓▓▓▓▓▓▓▀▀`          
                                    
███████████████████████████████████████

. ★☆ WWW.LEALANA.COM        My PGP fingerprint is A764D833.        SMOOTHIE'S HEALTH AND FITNESS JOURNAL          History of Monero development Visualization ★☆ .
LEALANA  PHYSICAL MONERO COINS 999 FINE SILVER.
 
Rob P.
Member
**
Offline Offline

Activity: 84
Merit: 10



View Profile WWW
July 15, 2011, 12:28:55 PM

Wish I could get pushpoold to work. I keep hitting every possible roadblock.

Very helpful.  With the thorough amount of detail you've provided, I'm sure we'll have you up and running in no time!

--

If you like what I've written here, consider tipping the messenger:
1GZu4CtHa6ai8iWoWiVFxV5VVoNte4SkoG

If you don't like what I've written, send me a Tip and I'll stop talking.
smoothie
Legendary
*
Offline Offline

Activity: 2100
Merit: 1003


LEALANA Monero Physical Silver Coins


View Profile
July 15, 2011, 05:42:30 PM

Wish I could get pushpoold to work. I keep hitting every possible roadblock.

Very helpful.  With the thorough amount of detail you've provided, I'm sure we'll have you up and running in no time!

Hey jack-wagon, I've posted Here --> http://forum.bitcoin.org/index.php?topic=10321.0 multiple times.

███████████████████████████████████████

            ,╓p@@███████@╗╖,           
        ,p████████████████████N,       
      d█████████████████████████b     
    d██████████████████████████████   
  ,█████████████████████████████████, 
 ,█████  ╙████████████████████╨  █████y
 ██████    `████████████████`    ██████
║██████       ███████████`      ███████
███████         ╩██████         ███████
███████    ▐▄     ██╩     a▌    ███████
╢██████    ▐▓█▄          ▄█▓▌    ███████
 ██████    ▐▓▓▓▓▌,     ▄█▓▓▓▌    ██████─
           ▐▓▓▓▓▓▓█,,▄▓▓▓▓▓▓▌          
           ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌          
    ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓─  
     ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓╩    
        ▀▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▀       
           ▀▀▓▓▓▓▓▓▓▓▓▓▓▓▀▀`          
                                    
███████████████████████████████████████

. ★☆ WWW.LEALANA.COM        My PGP fingerprint is A764D833.        SMOOTHIE'S HEALTH AND FITNESS JOURNAL          History of Monero development Visualization ★☆ .
LEALANA  PHYSICAL MONERO COINS 999 FINE SILVER.
 
Rob P.
Member
**
Offline Offline

Activity: 84
Merit: 10



View Profile WWW
July 15, 2011, 07:42:45 PM

Hey jack-wagon, I've posted Here --> http://forum.bitcoin.org/index.php?topic=10321.0 multiple times.

Huh, and you're not getting help?  How odd.

--

If you like what I've written here, consider tipping the messenger:
1GZu4CtHa6ai8iWoWiVFxV5VVoNte4SkoG

If you don't like what I've written, send me a Tip and I'll stop talking.
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 16, 2011, 12:06:49 AM

Sorry for the delays in new code, just trying to implement a handful of new features.

I was going to call this next release 2.1, but since it affects so much it'll be 3.0.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
openrune
Member
**
Offline Offline

Activity: 62
Merit: 10


View Profile WWW
July 16, 2011, 07:03:33 PM

Hello all, after the last weeks expirience with both miningpools the miningfarm 5.0 and the simplcoin frontend, i realized that i would love to have both merged together; so here is my suggestion;

Why dnt use the miningfarm 5 database and cronjobs, the nice charts and combine it with the details that simplecoin provides on the stats page. The miningfarm 5 database is quite stable, of course everything can be more optimized.

At least for the Stats i see quite i nice result from the programming cooperation of this two projects


Tenobis
http://mine.tenobis.com/




The code is here
https://github.com/Xenland/MiningFarm/

0 Fee TENOBIS MINE
http://mine.tenobis.com
Dnt mind any donation!
19gD6ZNxSReeNf18A2ftYeDK5uuJ5VDKnu
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 17, 2011, 07:30:41 AM

Hello all, after the last weeks expirience with both miningpools the miningfarm 5.0 and the simplcoin frontend, i realized that i would love to have both merged together; so here is my suggestion;

Why dnt use the miningfarm 5 database and cronjobs, the nice charts and combine it with the details that simplecoin provides on the stats page. The miningfarm 5 database is quite stable, of course everything can be more optimized.

At least for the Stats i see quite i nice result from the programming cooperation of this two projects


Tenobis
http://mine.tenobis.com/




The code is here
https://github.com/Xenland/MiningFarm/

If you wish to merge them, you are more than welcome. Both codebases have moved in different directions and have slightly different licensing now.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
Paul4games
Jr. Member
*
Offline Offline

Activity: 46
Merit: 0


View Profile
July 17, 2011, 10:24:01 AM

Simplecoin i'll wait until you release the version 3 and after that i will report some security bugs, i won\t report them now ebcause i have to talk with an friend to help me to exploit an possible SQLi.
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 18, 2011, 03:00:38 PM

Simplecoin i'll wait until you release the version 3 and after that i will report some security bugs, i won\t report them now ebcause i have to talk with an friend to help me to exploit an possible SQLi.

Please pm me with any security concerns, so I can ensure they reach the codebase quickly.

As for sql injection, I've run quite a few products against the code with no injection vulnerabilities found.

Security is priority one, I will fix known exploits before implementing new features.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
froggy
Full Member
***
Offline Offline

Activity: 127
Merit: 100


View Profile WWW
July 18, 2011, 06:26:18 PM

Are there any good products you'd recommend to check for sql injection vulnerability?  I've seen the SQL Inject Me Firefox addon at https://addons.mozilla.org/en-US/firefox/addon/sql-inject-me/   - seems to be marked as Experimental though, so not quite confident about using that.
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 18, 2011, 07:39:15 PM

Are there any good products you'd recommend to check for sql injection vulnerability?  I've seen the SQL Inject Me Firefox addon at https://addons.mozilla.org/en-US/firefox/addon/sql-inject-me/   - seems to be marked as Experimental though, so not quite confident about using that.

acunetix has a thorough security package.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
mich
Legendary
*
Offline Offline

Activity: 1162
Merit: 1007


Tokenize Fantasy Sports


View Profile
July 19, 2011, 09:56:47 AM

"Past shares" and "Past invalid" takes values after finding block only? In table "Top 30 Lifetime Shares" column "Shares" is 0. It is correct, in case of Round shares already much more then 0?

Update Main Page Settings does not work in Admin Panel Sad

▄▄▄███████▄▄▄
▄▄████▒▒▒▒▒▒▒▒▒████▄▄
▄███▒▒▒▒█████████▒▒▒▒███▄
▄██▒▒▒█████████████████▒▒▒██▄
██▒▒████████████████████▒▒██
██▒▒████████▄▄███▄▄████████▒▒██
██▒▒███████████████████████████▒▒██
██▒▒███████████████████████████▒▒██
██▒▒██████████▀▀▀▀▀▀▀█▀▀█████████▒▒██
██▒▒████████████████████████████▒▒██
██▒▒████████▄███████▄████████████▒▒██
██▒▒████████▀███▀▀▀▀▀████████████▒▒██
██▒▒███████▄███████▄███████████▒▒██
██▒▒███████▀▀███▀▀▀▀███████████▒▒██
██▒▒██████████████▄██████████▒▒██
██▒▒███████████▀▀▀█████████▒▒██
▀██▒▒▒█████▄████▄██████▒▒▒██▀
▀███▒▒▒▒█████████▒▒▒▒███▀
▀▀████▒▒▒▒▒▒▒▒▒████▀▀
▀▀▀███████▀▀▀
.STRYKZ     THE TOKEN FOR ALL FOOTBALL FANS.
..TOKENISING FANTASY SPORTS▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬....











█████████████▄
██   ▄▄   ██▀██▄
██ ▄█▀▀█▄ ██▒▒▀██▄
██ ▀█▄▄█▀ ██▒▒▒▒▀██
██   ▀▀   █████████
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██               ██
███████████████████
Whitelist
WHITELIST
BOUNTIES












▄▄████████▄▄
▄████████████████▄
▄████████████████████▄
▄████████████████████████▄
▄██████████████████▀▀▀█████▄
█████████████▀▀▀      ██████
████████▀▀▀       ▄    ███████
█████▄         ▄█▀    ████████
████████▄    ▄█▀      ████████
███████████▄█▀       █████████
████████████  ▄     ████████
▀███████████ ███▄  ████████▀
▀████████████████████████▀
▀████████████████████▀
▀████████████████▀
▀▀████████▀▀
MEDIUM
FACEBOOK
YOUTUBE
[                      █     █     █
                      ██▄ ▄███▄ ▄██
                       ███████████
                       ███████████
                        ▄▄▄▄▄▄▄ ▄▄
                       ████████ ██
                      ▄███████▀ ███
                      ████▄▄▄▄▄ ███
                      ▀███████▀  ██
                      █████▄▄▄▄▄
                      ▀████████▀
                       ▀████▄▄▄▄
                         ▀█████▀
STRYKING
]
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 19, 2011, 03:36:57 PM

"Past shares" and "Past invalid" takes values after finding block only? In table "Top 30 Lifetime Shares" column "Shares" is 0. It is correct, in case of Round shares already much more then 0?

Update Main Page Settings does not work in Admin Panel Sad

Yes, past is relative to shares before current round. This avoids a nasty amount of sql overhead.
I'll have Admin Panel working again shortly.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
mich
Legendary
*
Offline Offline

Activity: 1162
Merit: 1007


Tokenize Fantasy Sports


View Profile
July 19, 2011, 05:23:31 PM



Yes, past is relative to shares before current round. This avoids a nasty amount of sql overhead.
I'll have Admin Panel working again shortly.
[/quote]

I've change default value "NULL" in table 'webUsers' col's 'share_count' and 'stale_share_count' to 0 - now table shows current shares

▄▄▄███████▄▄▄
▄▄████▒▒▒▒▒▒▒▒▒████▄▄
▄███▒▒▒▒█████████▒▒▒▒███▄
▄██▒▒▒█████████████████▒▒▒██▄
██▒▒████████████████████▒▒██
██▒▒████████▄▄███▄▄████████▒▒██
██▒▒███████████████████████████▒▒██
██▒▒███████████████████████████▒▒██
██▒▒██████████▀▀▀▀▀▀▀█▀▀█████████▒▒██
██▒▒████████████████████████████▒▒██
██▒▒████████▄███████▄████████████▒▒██
██▒▒████████▀███▀▀▀▀▀████████████▒▒██
██▒▒███████▄███████▄███████████▒▒██
██▒▒███████▀▀███▀▀▀▀███████████▒▒██
██▒▒██████████████▄██████████▒▒██
██▒▒███████████▀▀▀█████████▒▒██
▀██▒▒▒█████▄████▄██████▒▒▒██▀
▀███▒▒▒▒█████████▒▒▒▒███▀
▀▀████▒▒▒▒▒▒▒▒▒████▀▀
▀▀▀███████▀▀▀
.STRYKZ     THE TOKEN FOR ALL FOOTBALL FANS.
..TOKENISING FANTASY SPORTS▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬....











█████████████▄
██   ▄▄   ██▀██▄
██ ▄█▀▀█▄ ██▒▒▀██▄
██ ▀█▄▄█▀ ██▒▒▒▒▀██
██   ▀▀   █████████
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██               ██
███████████████████
Whitelist
WHITELIST
BOUNTIES












▄▄████████▄▄
▄████████████████▄
▄████████████████████▄
▄████████████████████████▄
▄██████████████████▀▀▀█████▄
█████████████▀▀▀      ██████
████████▀▀▀       ▄    ███████
█████▄         ▄█▀    ████████
████████▄    ▄█▀      ████████
███████████▄█▀       █████████
████████████  ▄     ████████
▀███████████ ███▄  ████████▀
▀████████████████████████▀
▀████████████████████▀
▀████████████████▀
▀▀████████▀▀
MEDIUM
FACEBOOK
YOUTUBE
[                      █     █     █
                      ██▄ ▄███▄ ▄██
                       ███████████
                       ███████████
                        ▄▄▄▄▄▄▄ ▄▄
                       ████████ ██
                      ▄███████▀ ███
                      ████▄▄▄▄▄ ███
                      ▀███████▀  ██
                      █████▄▄▄▄▄
                      ▀████████▀
                       ▀████▄▄▄▄
                         ▀█████▀
STRYKING
]
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 19, 2011, 05:44:42 PM



Yes, past is relative to shares before current round. This avoids a nasty amount of sql overhead.
I'll have Admin Panel working again shortly.

I've change default value "NULL" in table 'webUsers' col's 'share_count' and 'stale_share_count' to 0 - now table shows current shares
[/quote]

Good to know. I had solved shares before this was implemented, so it never came up.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
mich
Legendary
*
Offline Offline

Activity: 1162
Merit: 1007


Tokenize Fantasy Sports


View Profile
July 21, 2011, 04:57:55 PM

Button "Lost Password" is there just for anturage? I haven't found any code serves this event...

▄▄▄███████▄▄▄
▄▄████▒▒▒▒▒▒▒▒▒████▄▄
▄███▒▒▒▒█████████▒▒▒▒███▄
▄██▒▒▒█████████████████▒▒▒██▄
██▒▒████████████████████▒▒██
██▒▒████████▄▄███▄▄████████▒▒██
██▒▒███████████████████████████▒▒██
██▒▒███████████████████████████▒▒██
██▒▒██████████▀▀▀▀▀▀▀█▀▀█████████▒▒██
██▒▒████████████████████████████▒▒██
██▒▒████████▄███████▄████████████▒▒██
██▒▒████████▀███▀▀▀▀▀████████████▒▒██
██▒▒███████▄███████▄███████████▒▒██
██▒▒███████▀▀███▀▀▀▀███████████▒▒██
██▒▒██████████████▄██████████▒▒██
██▒▒███████████▀▀▀█████████▒▒██
▀██▒▒▒█████▄████▄██████▒▒▒██▀
▀███▒▒▒▒█████████▒▒▒▒███▀
▀▀████▒▒▒▒▒▒▒▒▒████▀▀
▀▀▀███████▀▀▀
.STRYKZ     THE TOKEN FOR ALL FOOTBALL FANS.
..TOKENISING FANTASY SPORTS▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬....











█████████████▄
██   ▄▄   ██▀██▄
██ ▄█▀▀█▄ ██▒▒▀██▄
██ ▀█▄▄█▀ ██▒▒▒▒▀██
██   ▀▀   █████████
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██               ██
███████████████████
Whitelist
WHITELIST
BOUNTIES












▄▄████████▄▄
▄████████████████▄
▄████████████████████▄
▄████████████████████████▄
▄██████████████████▀▀▀█████▄
█████████████▀▀▀      ██████
████████▀▀▀       ▄    ███████
█████▄         ▄█▀    ████████
████████▄    ▄█▀      ████████
███████████▄█▀       █████████
████████████  ▄     ████████
▀███████████ ███▄  ████████▀
▀████████████████████████▀
▀████████████████████▀
▀████████████████▀
▀▀████████▀▀
MEDIUM
FACEBOOK
YOUTUBE
[                      █     █     █
                      ██▄ ▄███▄ ▄██
                       ███████████
                       ███████████
                        ▄▄▄▄▄▄▄ ▄▄
                       ████████ ██
                      ▄███████▀ ███
                      ████▄▄▄▄▄ ███
                      ▀███████▀  ██
                      █████▄▄▄▄▄
                      ▀████████▀
                       ▀████▄▄▄▄
                         ▀█████▀
STRYKING
]
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 21, 2011, 05:38:08 PM

Button "Lost Password" is there just for anturage? I haven't found any code serves this event...

It's just a relic from mining pool v1.... Looks like it was a stub. I'll get to it in the next version.

Which reminds me....

v3 features not yet in repo:
Memcached support
No more shares_history (what a nightmare that was)
Improved block handling.
Dynamic stats/setting caching (more responsive/less overhead)
Process locking
Drastically improved cronjobs.
Live round stats.
Just to name a few improvements....

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
AnnihilaT
Full Member
***
Offline Offline

Activity: 210
Merit: 100



View Profile
July 22, 2011, 08:53:48 AM

Button "Lost Password" is there just for anturage? I haven't found any code serves this event...

It's just a relic from mining pool v1.... Looks like it was a stub. I'll get to it in the next version.

Which reminds me....

v3 features not yet in repo:
Memcached support
No more shares_history (what a nightmare that was)
Improved block handling.
Dynamic stats/setting caching (more responsive/less overhead)
Process locking
Drastically improved cronjobs.
Live round stats.
Just to name a few improvements....


Looking forward to seeing how you have tackled this.... im in the midst of dealing with these same issues... especially the whole shares_history nightmare and the associated monster queries.
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 22, 2011, 04:32:51 PM

Button "Lost Password" is there just for anturage? I haven't found any code serves this event...

It's just a relic from mining pool v1.... Looks like it was a stub. I'll get to it in the next version.

Which reminds me....

v3 features not yet in repo:
Memcached support
No more shares_history (what a nightmare that was)
Improved block handling.
Dynamic stats/setting caching (more responsive/less overhead)
Process locking
Drastically improved cronjobs.
Live round stats.
Just to name a few improvements....


Looking forward to seeing how you have tackled this.... im in the midst of dealing with these same issues... especially the whole shares_history nightmare and the associated monster queries.

Good news then.... I just pushed the initial v3 to the expiremental repo. This is no upgrade script, nor a simple upgrade path... yet. You'll need to merge these as appropriate.

As for moving shares history back into shares (AFTER adding new shares fields), I used this sql:
INSERT INTO shares (username, our_result, time, blockNumber, score) SELECT username, our_result, time, blockNumber, score FROM shares_history WHERE shares_history.counted = '0'

Also, I recommend using a separate instance of memcache than pushpool. Don't want your pool cache eaten by web data.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
oseido
Newbie
*
Offline Offline

Activity: 24
Merit: 0


www.democraziammt.info


View Profile WWW
July 26, 2011, 12:33:38 PM

Hi to all.
We are very impressive about Simplecoin Pushpool Web Frontend. We have start an italian minig pool with this amazing opensource software, and we are in testig. We are also meditating to enable ssl support, but because certificate was self-signed (we have a L.A.M.P system redyrected on dyndns.org) we are finding a way for make certificate not affected about the orrible browser ssl self-signed warning.
We hope tath people can test the server.
Tnx a lot for simplecoin again!!

oseido

Chemtrail Italia Cooperative Bitcoin Mining Pool

http://chemtrail.dyndns.org:8080/
Mining Port = 8332

Giancarlo Algieri, MMT activist
Donation
1CDiXSchfveGv7UqvxsLE8TFnyrSrXS8AJ
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 26, 2011, 03:06:45 PM

Added a forum for discussion and support since I'm often afk in irc. Feel free to give your fellow admins help and share your solutions.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 27, 2011, 09:00:33 PM

More updates to v3 pushed to repo.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
July 28, 2011, 09:49:28 PM

Just added capability to offload heavy stats to replicated server (less stress on your pool sql server).

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
Paul4games
Jr. Member
*
Offline Offline

Activity: 46
Merit: 0


View Profile
August 04, 2011, 02:12:34 PM

Siplecoin here is a feature request:
-add an api so that an application could create an new worker when he wants(for example you have 5 computers and you want to create an application that when it's run on that computer it will automatically create an new username+password from that computer+link it to you're account, for example that worker to be linked to my account or so)&retrive them from the server.Or if i'm mining with 2 pcs and using the same username+password is there any problem?or this would work to?
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
August 04, 2011, 07:58:34 PM

Siplecoin here is a feature request:
-add an api so that an application could create an new worker when he wants(for example you have 5 computers and you want to create an application that when it's run on that computer it will automatically create an new username+password from that computer+link it to you're account, for example that worker to be linked to my account or so)&retrive them from the server.Or if i'm mining with 2 pcs and using the same username+password is there any problem?or this would work to?

While the idea sounds great, it's also seems like it might add an exploit.

However, you can use the same miner name/pass on multiple workers.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
Paul4games
Jr. Member
*
Offline Offline

Activity: 46
Merit: 0


View Profile
August 04, 2011, 09:35:27 PM

Siplecoin here is a feature request:
-add an api so that an application could create an new worker when he wants(for example you have 5 computers and you want to create an application that when it's run on that computer it will automatically create an new username+password from that computer+link it to you're account, for example that worker to be linked to my account or so)&retrive them from the server.Or if i'm mining with 2 pcs and using the same username+password is there any problem?or this would work to?

While the idea sounds great, it's also seems like it might add an exploit.

However, you can use the same miner name/pass on multiple workers.
Could you please explain futher what exploit it could add?and i see that you fixed the full path disclousure bugs, good job!
phorensic
Hero Member
*****
Offline Offline

Activity: 630
Merit: 500



View Profile
August 04, 2011, 10:32:51 PM

Button "Lost Password" is there just for anturage? I haven't found any code serves this event...

It's just a relic from mining pool v1.... Looks like it was a stub. I'll get to it in the next version.

Which reminds me....

v3 features not yet in repo:
Memcached support
No more shares_history (what a nightmare that was)
Improved block handling.
Dynamic stats/setting caching (more responsive/less overhead)
Process locking
Drastically improved cronjobs.
Live round stats.
Just to name a few improvements....


Looking forward to seeing how you have tackled this.... im in the midst of dealing with these same issues... especially the whole shares_history nightmare and the associated monster queries.

Good news then.... I just pushed the initial v3 to the expiremental repo. This is no upgrade script, nor a simple upgrade path... yet. You'll need to merge these as appropriate.

As for moving shares history back into shares (AFTER adding new shares fields), I used this sql:
INSERT INTO shares (username, our_result, time, blockNumber, score) SELECT username, our_result, time, blockNumber, score FROM shares_history WHERE shares_history.counted = '0'

Also, I recommend using a separate instance of memcache than pushpool. Don't want your pool cache eaten by web data.

This is interesting.  Can you explain further why you axed shares_history and what shares_counted is for?  Is it just a lighter version of shares_history?  How big does your original shares table get?  I mean, where are your old shares held?  I also noticed shares_counted is MyISAM instead of InnoDB, is that because it's a temporary table?
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
August 05, 2011, 04:32:57 AM

Shares history was essentially an extension of shares, but it required lots of additional joins and unions. It made queries painfully processor intensive when they didn't need to be.

Shares counted is the counted sum of valid/invalid shares per round.

As for MyIsam, that was an oversight, I'll fix that before the code is finalized.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
phorensic
Hero Member
*****
Offline Offline

Activity: 630
Merit: 500



View Profile
August 05, 2011, 08:13:34 AM

How does your new setup query faster if "sahres" is larger than two tables - "shares" and "shares_history"...besides indexing.  Xenland and I have discussed and applied indexing to our setups, so I'm curious.
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
August 05, 2011, 05:11:22 PM

shares is only as large as the current round. Why split that data into 2 tables, when you need to join or union them every time?

after the current round confirms I condense the shares into shares_counted to drastically lower the amount of data.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
phorensic
Hero Member
*****
Offline Offline

Activity: 630
Merit: 500



View Profile
August 07, 2011, 04:37:20 PM

Hmm, you must have been using shares_history different that I am.  My "shares" is only as large as the current round, old round gets cut and pasted into history.  Never have to do joins or unions.

So you throw away the hash data for shares counted?  I haven't been brave enough to do that on my history.
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
August 07, 2011, 06:35:15 PM

Hmm, you must have been using shares_history different that I am.  My "shares" is only as large as the current round, old round gets cut and pasted into history.  Never have to do joins or unions.

So you throw away the hash data for shares counted?  I haven't been brave enough to do that on my history.

I do, once it the round is paid out it's already been verified. I don't see much historical value in past blocks outside of share counts and block finder.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
August 10, 2011, 12:19:25 AM

Holy incoming updates!

I may have to deem this release 4.0 because the changes are that drastic!

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
Paul4games
Jr. Member
*
Offline Offline

Activity: 46
Merit: 0


View Profile
August 10, 2011, 09:51:21 AM

Holy incoming updates!

I may have to deem this release 4.0 because the changes are that drastic!
Looking forward for this update.
sareea
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
August 10, 2011, 06:18:34 PM

Hello,
When will you release the new updated version ? And will it have sql injection security ?
I really wanna use simplecoin , and if i install the current one is it upgradable to 4 ? I am looking up to open my pool today or tomorrow .
Please answer me Smiley Thanks !
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
August 10, 2011, 06:22:29 PM

Hello,
When will you release the new updated version ? And will it have sql injection security ?
I really wanna use simplecoin , and if i install the current one is it upgradable to 4 ? I am looking up to open my pool today or tomorrow .
Please answer me Smiley Thanks !

Currently there will not be an easy upgrade path from 2-4. The database changes are drastic.
Version 2 should have sql injection security as should the expirimental branch in the repository.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
sareea
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
August 10, 2011, 06:25:31 PM

Hello,
When will you release the new updated version ? And will it have sql injection security ?
I really wanna use simplecoin , and if i install the current one is it upgradable to 4 ? I am looking up to open my pool today or tomorrow .
Please answer me Smiley Thanks !

Currently there will not be an easy upgrade path from 2-4. The database changes are drastic.
Version 2 should have sql injection security as should the expirimental branch in the repository.
So what do you suggest ?
I wanna work with simplecoin !! Smiley
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
August 10, 2011, 06:44:57 PM

Hello,
When will you release the new updated version ? And will it have sql injection security ?
I really wanna use simplecoin , and if i install the current one is it upgradable to 4 ? I am looking up to open my pool today or tomorrow .
Please answer me Smiley Thanks !

Currently there will not be an easy upgrade path from 2-4. The database changes are drastic.
Version 2 should have sql injection security as should the expirimental branch in the repository.
So what do you suggest ?
I wanna work with simplecoin !! Smiley

I'm ironing out the last bits now. I'll have v4 in the repository soon enough.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
sareea
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
August 10, 2011, 06:54:44 PM

Hello,
When will you release the new updated version ? And will it have sql injection security ?
I really wanna use simplecoin , and if i install the current one is it upgradable to 4 ? I am looking up to open my pool today or tomorrow .
Please answer me Smiley Thanks !

Currently there will not be an easy upgrade path from 2-4. The database changes are drastic.
Version 2 should have sql injection security as should the expirimental branch in the repository.
So what do you suggest ?
I wanna work with simplecoin !! Smiley

I'm ironing out the last bits now. I'll have v4 in the repository soon enough.
OOOO ok i will wait man Smiley
mich
Legendary
*
Offline Offline

Activity: 1162
Merit: 1007


Tokenize Fantasy Sports


View Profile
August 11, 2011, 06:18:05 AM

Just testing new 3rd version, and got this mistakes:

Warning: array_key_exists() expects parameter 2 to be array, boolean given in /var/www/includes/stats.php on line 150

Warning: Division by zero in /var/www/includes/header.php on line 99

PS: It was until pool accept shares from worker.
PPS: When no one worker conected the same mistakes ((((

▄▄▄███████▄▄▄
▄▄████▒▒▒▒▒▒▒▒▒████▄▄
▄███▒▒▒▒█████████▒▒▒▒███▄
▄██▒▒▒█████████████████▒▒▒██▄
██▒▒████████████████████▒▒██
██▒▒████████▄▄███▄▄████████▒▒██
██▒▒███████████████████████████▒▒██
██▒▒███████████████████████████▒▒██
██▒▒██████████▀▀▀▀▀▀▀█▀▀█████████▒▒██
██▒▒████████████████████████████▒▒██
██▒▒████████▄███████▄████████████▒▒██
██▒▒████████▀███▀▀▀▀▀████████████▒▒██
██▒▒███████▄███████▄███████████▒▒██
██▒▒███████▀▀███▀▀▀▀███████████▒▒██
██▒▒██████████████▄██████████▒▒██
██▒▒███████████▀▀▀█████████▒▒██
▀██▒▒▒█████▄████▄██████▒▒▒██▀
▀███▒▒▒▒█████████▒▒▒▒███▀
▀▀████▒▒▒▒▒▒▒▒▒████▀▀
▀▀▀███████▀▀▀
.STRYKZ     THE TOKEN FOR ALL FOOTBALL FANS.
..TOKENISING FANTASY SPORTS▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬....











█████████████▄
██   ▄▄   ██▀██▄
██ ▄█▀▀█▄ ██▒▒▀██▄
██ ▀█▄▄█▀ ██▒▒▒▒▀██
██   ▀▀   █████████
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██               ██
███████████████████
Whitelist
WHITELIST
BOUNTIES












▄▄████████▄▄
▄████████████████▄
▄████████████████████▄
▄████████████████████████▄
▄██████████████████▀▀▀█████▄
█████████████▀▀▀      ██████
████████▀▀▀       ▄    ███████
█████▄         ▄█▀    ████████
████████▄    ▄█▀      ████████
███████████▄█▀       █████████
████████████  ▄     ████████
▀███████████ ███▄  ████████▀
▀████████████████████████▀
▀████████████████████▀
▀████████████████▀
▀▀████████▀▀
MEDIUM
FACEBOOK
YOUTUBE
[                      █     █     █
                      ██▄ ▄███▄ ▄██
                       ███████████
                       ███████████
                        ▄▄▄▄▄▄▄ ▄▄
                       ████████ ██
                      ▄███████▀ ███
                      ████▄▄▄▄▄ ███
                      ▀███████▀  ██
                      █████▄▄▄▄▄
                      ▀████████▀
                       ▀████▄▄▄▄
                         ▀█████▀
STRYKING
]
sareea
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
August 11, 2011, 05:14:45 PM

Any updates Simplecoin ? i am very curious about this Smiley
Thanks !
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
August 11, 2011, 07:24:40 PM

Version 4 is now in the master and experimental branches!

There is no clear upgrade path from 2.0-4.0, It would be faster to migrate the shares/user data over manually than to rely on a script that may take hours to run.

Additionally version 4 is not without a few bugs, but overall it is more stable and usable than version 2 or 3.

There is a known issue with the stats, share count doesn't seem to be going up. This doesn't affect payout, just a quirk with the stats page.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
sareea
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
August 11, 2011, 09:12:19 PM

The other files of the script are not running, all i see is a white screen , all i see is the header and thats it . nothing else .

I am checking what is not installed , i am having everything being running fine .

Please help !
Code:
[Fri Aug 12 16:11:18 2011] [error] [client 109.66.112.62
] PHP Warning:  fopen(/var/www/api/pool/speed): failed t
o open stream: No such file or directory in /var/www/inc
ludes/stats.php on line 62

[Fri Aug 12 16:11:19 2011] [error] [client 109.66.112.62
] PHP Warning:  fopen(/var/www/api/pool/speed): failed t
o open stream: No such file or directory in /var/www/inc
ludes/stats.php on line 62, referer: http://78.47.162.16
4/register.php

[Fri Aug 12 16:11:21 2011] [error] [client 109.66.112.62
] PHP Warning:  fopen(/var/www/api/pool/speed): failed t
o open stream: No such file or directory in /var/www/inc
ludes/stats.php on line 62, referer: http://78.47.162.16
4/stats.php

PHP Warning:  fopen(/var/www/api/pool/speed): failed t
o open stream: No such file or directory in /var/www/inc
ludes/stats.php on line 62, referer: http://78.47.162.16
4/gettingstarted.php

[error] [client 58.218.199.22
7] script '/var/www/proxyheader.php' not found or unable
 to stat

[Fri Aug 12 16:10:52 2011] [error] [client 109.66.112.62
] PHP Warning:  fopen(/var/www/api/pool/speed): failed t
o open stream: No such file or directory in /var/www/inc
ludes/stats.php on line 62, referer: http://78.47.162.16
4/register.php

[Fri Aug 12 16:11:13 2011] [error] [client 109.66.112.62
] PHP Warning:  fopen(/var/www/api/pool/speed): failed t
o open stream: No such file or directory in /var/www/inc
ludes/stats.php on line 62, referer: http://78.47.162.16
4/register.php

[Fri Aug 12 16:11:16 2011] [error] [client 109.66.112.62
] PHP Warning:  fopen(/var/www/api/pool/speed): failed t
o open stream: No such file or directory in /var/www/inc
ludes/stats.php on line 62, referer: http://78.47.162.16
4/register.

] PHP Warning:  fopen(/var/www/api/pool/speed): failed t
o open stream: No such file or directory in /var/www/inc
ludes/stats.php on line 62, referer: http://78.47.162.16
4/about.php

[Fri Aug 12 16:10:49 2011] [error] [client 109.66.112.62
] PHP Warning:  fopen(/var/www/api/pool/speed): failed t
o open stream: No such file or directory in /var/www/inc
ludes/stats.php on line 62, referer: http://78.47.162.16
4/about.php

[Fri Aug 12 16:10:51 2011] [error] [client 109.66.112.62
] PHP Warning:  fopen(/var/www/api/pool/speed): failed t
o open stream: No such file or directory in /var/www/inc
ludes/stats.php on line 62, referer: http://78.47.162.16
4/stats.php

What are these ?
sareea
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
August 12, 2011, 01:28:19 PM

I checked in this file
https://github.com/simplecoin/simplecoin/blob/master/includes/stats.php

and i think the source of this is here : ( it is true that this file doesn't exist :S )
Code:
setCache("pool_hashrate", $currenthashrate, 300);
try {
$fileName = "/var/www/api/pool/speed";
$fileHandle = fopen($fileName, 'w') or die("can't open file");
fwrite($fileHandle, ($currenthashrate/1000));
fclose($fileHandle);
} catch (Exception $e) {
//echo $e->getMessage();
}

Sorry for the double post
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
August 12, 2011, 03:49:12 PM

it's a hashrate file used by stats sites.

make the missing directory.  Wink

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
sareea
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
August 12, 2011, 04:36:52 PM

speed is a file or a directory ?
Thanks
Can you take a look please?
http://78.47.162.164/

And should i uncomment this line ?
//echo $e->getMessage();
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
August 14, 2011, 05:01:28 AM

speed is a file or a directory ?
Thanks
Can you take a look please?
http://78.47.162.164/

And should i uncomment this line ?
//echo $e->getMessage();

Speed is a file, generated by stats, you can stop it's creation in incudes/stats.php if you wish.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
DiamondPlus
Member
**
Offline Offline

Activity: 68
Merit: 10


View Profile
August 15, 2011, 01:34:41 AM

Great job, for simplecoin.

One thing that is important to know is that security by obscurity is a very bad thing, most of the times there are problems with the design and even when the design of the algorithm is good, there are security holes that go undetected until the cracker finds out.

-DiamondPlus

Open source security algorithms are the best, for example take a look at the security of the bitcoin network, it is very solid, and in the rare event that a security was found most likely it would be in the implementation and it would be fixed within hours.

There are a lot of commercial security closed source programs that use the vigenere cipher, of course that is a secret, the vigenere cipher is very easy to implement and it provides security against the average person, but by design it is insecure, it is used a lot due to its simplicity,  in closed source it is very hard to tell it uses the vigenere chipher, until someone does some reverse engineering, and after that the security completely colapses, any good cracker will crack the algorithm no very easy but doable. There are other algorithm that are also very simple and easy to implement used in closed source programs like rot13, or substitution cipher both very insecure and worse than vigenere.

Then there the famous one time pad very secure only algorithm proven to be unbreakable but also not very practical.

-DiamondPlus

The there are the good ones, but more complex idea, rsa, blowfish, etc, these can only be broken by brute force attacks, extremely difficult specially is the keys are large.

I used to be a cryptographer in the mid 90, so I am not up to date with the latest algorithms, but one thing I learned is that most close source packages are very insecure, and there are packages that break the security of those closed source programs, there was a programmer I do not remember his name that wrote software to unlock the locks, he was arrested in las vegas by the fbi after he gave a conference in defcon, he would talk a lot about insecure close source software with mathematical proofs, he sold unlock software for most closed source commerical packages.

-DiamondPlus

The lesson to be learned is that for the most security it is best to rely on a good algorithm, and not by security by obscurity, therefore most secure algorithms are usually open source. In theory if a person is a brilliant genius a close source security software could be secure, but for most of us, and most real world cases, open source is the way to go for security.

In many companies managers believe on closed source, the only reason for that is ignorance, they are usually not cryptographers, and know very little about programming, when working for a company like that vigenere cipher is great makes the manager happy and you are done quickly with the job, but for a job well done it is all in the algorithm and its implementation  and it takes more work when you have security in mind.

-DiamondPlus
Lolcust
Member
**
Offline Offline

Activity: 112
Merit: 10


Hillariously voracious


View Profile
August 18, 2011, 09:29:03 AM

Hey, just a quick question - are there "noob-friendly" instructions on how to set this baby up, and what are the approximate sys.reqirements (how big a VPS would I need to play around with this baby) ?

Geist Geld, the experimental cryptocurrency, is ready for yet another SolidCoin collapse Wink

Feed the Lolcust!
NMC: N6YQFkH9Gn9CTm4mpGwuLB5zLzqWTWFw67
BTC: 15F8xbgRBA1XZ4hmtdFDUasroa2A5rYg8M
GEG: gK5Lx6ypWgr69Gw9yGzE6dsA7kcuCRZRK
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
August 18, 2011, 02:06:04 PM

Hey, just a quick question - are there "noob-friendly" instructions on how to set this baby up, and what are the approximate sys.reqirements (how big a VPS would I need to play around with this baby) ?

No, there are currently no noob-friendly instructions. In fact, I don't recommend anyone trying to setup a public pool without significant development and network knowledge.

For a small pool a 1gb-2core vps might suffice.

I run my install on 4 servers. 1x8core sql, 1x8core pool, 2x2core web & replication

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
Lolcust
Member
**
Offline Offline

Activity: 112
Merit: 10


Hillariously voracious


View Profile
August 18, 2011, 03:19:20 PM

Hey, just a quick question - are there "noob-friendly" instructions on how to set this baby up, and what are the approximate sys.reqirements (how big a VPS would I need to play around with this baby) ?

No, there are currently no noob-friendly instructions. In fact, I don't recommend anyone trying to setup a public pool without significant development and network knowledge.

For a small pool a 1gb-2core vps might suffice.

I run my install on 4 servers. 1x8core sql, 1x8core pool, 2x2core web & replication

Well, you see, I am contemplating  the creation of a somewhat audacious bitcoin fork, and the way it seems to be coming out, it would be best if it had a pool at "day zero". Thing is, I'm not very rich (otherwise I would have hired a decent coder instead of trying to recall the long foregone days when I tried to learn the mysterious art of making computers do my bidding Wink )

I might convince a close friend to start up a virtualbox vm with 1+ gb RAM on her box in the beginning, but she will likely eventually kill it so she can play Crysis and that other popular shooty thing with more comfort.
Thus, I am looking into possibility of renting a relatively frugal VM for the purpose of my experiment.

Geist Geld, the experimental cryptocurrency, is ready for yet another SolidCoin collapse Wink

Feed the Lolcust!
NMC: N6YQFkH9Gn9CTm4mpGwuLB5zLzqWTWFw67
BTC: 15F8xbgRBA1XZ4hmtdFDUasroa2A5rYg8M
GEG: gK5Lx6ypWgr69Gw9yGzE6dsA7kcuCRZRK
Paul4games
Jr. Member
*
Offline Offline

Activity: 46
Merit: 0


View Profile
August 19, 2011, 09:50:37 AM

Simplecoin i have some questions:
1.Am i allowed to mine from different ips(i mean if i'm running 4 rigs i don't want them to get banned because of different ips or so)?
2.If i'm not allowedt o mine form more ips, tell me what's the limit(i mean like 2 ips per worker or 1 ip per worker)?
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
August 19, 2011, 05:00:52 PM

Simplecoin i have some questions:
1.Am i allowed to mine from different ips(i mean if i'm running 4 rigs i don't want them to get banned because of different ips or so)?
2.If i'm not allowedt o mine form more ips, tell me what's the limit(i mean like 2 ips per worker or 1 ip per worker)?


That is based on the pool software you use. My frontend is only for the web. The only IP restriction is one ip logged into the web server at a time, none of this will cause a ban.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
sareea
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
August 20, 2011, 09:15:46 AM

Hello,
I am getting these warnings

Code:
] PHP Warning:  Invalid argument supplied for foreach()
in /var/www/includes/stats.php on line 89

and
Code:
] PHP Warning:  Invalid argument supplied for foreach()
in /var/www/stats.php on line 75

[Sat Aug 13 11:47:01 2011] [error] [client 84.228.254.88
] PHP Fatal error:  Call to a member function fetch() on
 a non-object in /var/www/includes/stats.php on line 42,

Some one told me that

Quote
Probably this query is not returning a value, so it gives an error.
Code:
$sql = "SELECT count(id) FROM shares WHERE id > $lastwinningshare AND our_result='N'";
Most likely it will go away as soon as it returns something.
( from this article :
https://bitcointalk.org/index.php?topic=36672.0
)

Please help ! It is urgent
thanks !
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
August 25, 2011, 05:46:24 AM

Sorry for the delays. I'm trying to lock-down some things for 4.1.

Also, forum link has changed.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
sareea
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
August 26, 2011, 06:21:52 AM

Any updates Smiley ?

And can you please provide me a solution for the php fatal error for the that member function ?
I have been stuck for 2 weeks on my pool just because of this .i really thank you for the help
AnnihilaT
Full Member
***
Offline Offline

Activity: 210
Merit: 100



View Profile
August 26, 2011, 12:41:35 PM

Sareea,

I really suggest that you dont even bother trying to start a pool simply because if a problem like this gets you stuck for more than two weeks you dont have the technical ability to run a pool.  There will be much larger day to day problems than this one that arise while running a pool.  Its not install and forget software.  You need to be able to program and understand the code because there will be problems and you will need to fix them yourself.  I dont mean to be mean but you are clearly not qualified to run a pool.  Im just being honest and trying to save you alot more pain down the road.
Keninishna
Hero Member
*****
Offline Offline

Activity: 556
Merit: 500



View Profile WWW
August 27, 2011, 08:57:41 AM

ok I almost have your pool up I have one sql issue thats causing the site to fail. I get
Code:
PHP Fatal error:  Call to a member function fetch() on a non-object in /var/www/simplecoin/includes/stats.php on line 276

So I google some and take a look at line 276, I see its under function usersharecount()
Code:
if ($currentSharesR = $currentSharesQ->fetch()) {

Apparently when the fetch fails it returns a false, and its expecting an object so the error causes more errors  Grin
I think my understanding fails at the SQL code above it here:

Code:
$sql = "SELECT count(id) as id FROM shares WHERE id > $lastwinningshare AND username in ('".implode("','",$workers)."')";

I have the database set up properly, it has all the tables, pushpoold is working away I can create a worker (if I comment out the above code) and login and submit shares. Thanks for any help.

edit:
nevermind I found out it was because there was no $lastwinningshare I manually set it to 1 now everything is good (untill i find a block lol)
sareea
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
August 27, 2011, 07:11:11 PM

ok I almost have your pool up I have one sql issue thats causing the site to fail. I get
Code:
PHP Fatal error:  Call to a member function fetch() on a non-object in /var/www/simplecoin/includes/stats.php on line 276

So I google some and take a look at line 276, I see its under function usersharecount()
Code:
if ($currentSharesR = $currentSharesQ->fetch()) {

Apparently when the fetch fails it returns a false, and its expecting an object so the error causes more errors  Grin
I think my understanding fails at the SQL code above it here:

Code:
$sql = "SELECT count(id) as id FROM shares WHERE id > $lastwinningshare AND username in ('".implode("','",$workers)."')";

I have the database set up properly, it has all the tables, pushpoold is working away I can create a worker (if I comment out the above code) and login and submit shares. Thanks for any help.

edit:
nevermind I found out it was because there was no $lastwinningshare I manually set it to 1 now everything is good (untill i find a block lol)

Can you please explain to me how you exactly fixed it ? I am still  a newbie learning the business Smiley

Edit : Solved it Cheesy
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
August 30, 2011, 03:54:24 AM

Version 5 is released  Cool

A lot of bug fixes, especially for new pools!
Even more optimization to sql (especially for multi-million share rounds )
Main cronjob can run every minute with very little impact.
Winning shares are much more easily handled.
Also unconfirmed shares are perfectly accurate.

Tested with lastnpps scoring, will be testing prop soon.

Now to get multi-pool/coin support into the base.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
sareea
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
August 31, 2011, 12:16:14 PM

Thanks for the effort.
How can i upgrade from v4 to v5?
simplecoin
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile WWW
August 31, 2011, 04:37:21 PM

You'll need to add the new table (unrewarded_shares) and look for other sql changes.

Donations: 1VjGJHPtLodwCFBDWsHJMdEhqRcRKdBQk
sareea
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
September 01, 2011, 10:24:40 AM

i tested it , it doesn't have the problems v4 had !
Thanks a lot !

I faced few things though :
- Resetting the password with lostpassword didn't work for me, i edited it to be http:// and not https:// as it is in lostpassword.php.
It even ruins the password, even the old password stops working. What should i do ?
I think it is because lostpassword.php uses sha256 encryption and the login.php uses the $salt thing ?

- in accountdetails.php , you added the field ( current password ) to change the password, but even though you put the password it says " you must put your current password" , it doesn't  recognize it .

Thanks a lot simplecoin ! you are awesome ! Smiley
mich
Legendary
*
Offline Offline

Activity: 1162
Merit: 1007


Tokenize Fantasy Sports


View Profile
September 01, 2011, 12:01:26 PM

- Resetting the password with lostpassword didn't work for me, i edited it to be http:// and not https:// as it is in lostpassword.php.
It even ruins the password, even the old password stops working. What should i do ?
I think it is because lostpassword.php uses sha256 encryption and the login.php uses the $salt thing ?

lostpassword.php, line 53 must be like:
$result = mysql_query("UPDATE webUsers SET pass='".hash("sha256", $pass.$salt)."', accountFailedAttempts = 0 WHERE  username='$resetUsername' AND emailAuthPin='$resetAuth' ");

▄▄▄███████▄▄▄
▄▄████▒▒▒▒▒▒▒▒▒████▄▄
▄███▒▒▒▒█████████▒▒▒▒███▄
▄██▒▒▒█████████████████▒▒▒██▄
██▒▒████████████████████▒▒██
██▒▒████████▄▄███▄▄████████▒▒██
██▒▒███████████████████████████▒▒██
██▒▒███████████████████████████▒▒██
██▒▒██████████▀▀▀▀▀▀▀█▀▀█████████▒▒██
██▒▒████████████████████████████▒▒██
██▒▒████████▄███████▄████████████▒▒██
██▒▒████████▀███▀▀▀▀▀████████████▒▒██
██▒▒███████▄███████▄███████████▒▒██
██▒▒███████▀▀███▀▀▀▀███████████▒▒██
██▒▒██████████████▄██████████▒▒██
██▒▒███████████▀▀▀█████████▒▒██
▀██▒▒▒█████▄████▄██████▒▒▒██▀
▀███▒▒▒▒█████████▒▒▒▒███▀
▀▀████▒▒▒▒▒▒▒▒▒████▀▀
▀▀▀███████▀▀▀
.STRYKZ     THE TOKEN FOR ALL FOOTBALL FANS.
..TOKENISING FANTASY SPORTS▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬....











█████████████▄
██   ▄▄   ██▀██▄
██ ▄█▀▀█▄ ██▒▒▀██▄
██ ▀█▄▄█▀ ██▒▒▒▒▀██
██   ▀▀   █████████
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██               ██
███████████████████
Whitelist
WHITELIST
BOUNTIES












▄▄████████▄▄
▄████████████████▄
▄████████████████████▄
▄████████████████████████▄
▄██████████████████▀▀▀█████▄
█████████████▀▀▀      ██████
████████▀▀▀       ▄    ███████
█████▄         ▄█▀    ████████
████████▄    ▄█▀      ████████
███████████▄█▀       █████████
████████████  ▄     ████████
▀███████████ ███▄  ████████▀
▀████████████████████████▀
▀████████████████████▀
▀████████████████▀
▀▀████████▀▀
MEDIUM
FACEBOOK
YOUTUBE
[                      █     █     █
                      ██▄ ▄███▄ ▄██
                       ███████████
                       ███████████
                        ▄▄▄▄▄▄▄ ▄▄
                       ████████ ██
                      ▄███████▀ ███
                      ████▄▄▄▄▄ ███
                      ▀███████▀  ██
                      █████▄▄▄▄▄
                      ▀████████▀
                       ▀████▄▄▄▄
                         ▀█████▀
STRYKING
]
sareea
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
September 01, 2011, 01:14:56 PM

- Resetting the password with lostpassword didn't work for me, i edited it to be http:// and not https:// as it is in lostpassword.php.
It even ruins the password, even the old password stops working. What should i do ?
I think it is because lostpassword.php uses sha256 encryption and the login.php uses the $salt thing ?

lostpassword.php, line 53 must be like:
$result = mysql_query("UPDATE webUsers SET pass='".hash("sha256", $pass.$salt)."', accountFailedAttempts = 0 WHERE  username='$resetUsername' AND emailAuthPin='$resetAuth' ");
Yeah it works now Smiley thanks .

The only problem left is in changing the password , any idea ? It doesn't recognize that i inserted my current password ...
sareea
Member
**
Offline Offline

Activity: 76
Merit: 10


View Profile
September 02, 2011, 07:24:39 AM

I tried to do this to fix the changing password problem .

I changed this line
$oldPass = hash("sha256", mysql_real_escape_string($_POST["currentPassword"]));
to
$oldPass = hash("sha256", $oldPass.$salt, mysql_real_escape_string($_POST["currentPassword"]));

But it didn't work.

The update process starts with
if($oldPass == $hashedPass){

I tried to define $hashedPass and fetch the password from the DB to  it .
Still didn't work .

And says
"You must type in the correct current password before you can set a new password. "

Please help
mich
Legendary
*
Offline Offline

Activity: 1162
Merit: 1007


Tokenize Fantasy Sports


View Profile
September 02, 2011, 08:55:05 AM

I tried to do this to fix the changing password problem .

I changed this line
$oldPass = hash("sha256", mysql_real_escape_string($_POST["currentPassword"]));
to
$oldPass = hash("sha256", $oldPass.$salt, mysql_real_escape_string($_POST["currentPassword"]));

But it didn't work.

The update process starts with
if($oldPass == $hashedPass){

I tried to define $hashedPass and fetch the password from the DB to  it .
Still didn't work .

And says
"You must type in the correct current password before you can set a new password. "

Please help

$oldPass = hash("sha256", mysql_real_escape_string($_POST["currentPassword"]).$salt);

▄▄▄███████▄▄▄
▄▄████▒▒▒▒▒▒▒▒▒████▄▄
▄███▒▒▒▒█████████▒▒▒▒███▄
▄██▒▒▒█████████████████▒▒▒██▄
██▒▒████████████████████▒▒██
██▒▒████████▄▄███▄▄████████▒▒██
██▒▒███████████████████████████▒▒██
██▒▒███████████████████████████▒▒██
██▒▒██████████▀▀▀▀▀▀▀█▀▀█████████▒▒██
██▒▒████████████████████████████▒▒██
██▒▒████████▄███████▄████████████▒▒██
██▒▒████████▀███▀▀▀▀▀████████████▒▒██
██▒▒███████▄███████▄███████████▒▒██
██▒▒███████▀▀███▀▀▀▀███████████▒▒██
██▒▒██████████████▄██████████▒▒██
██▒▒███████████▀▀▀█████████▒▒██
▀██▒▒▒█████▄████▄██████▒▒▒██▀
▀███▒▒▒▒█████████▒▒▒▒███▀
▀▀████▒▒▒▒▒▒▒▒▒████▀▀
▀▀▀███████▀▀▀
.STRYKZ     THE TOKEN FOR ALL FOOTBALL FANS.
..TOKENISING FANTASY SPORTS▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬....











█████████████▄
██   ▄▄   ██▀██▄
██ ▄█▀▀█▄ ██▒▒▀██▄
██ ▀█▄▄█▀ ██▒▒▒▒▀██
██   ▀▀   █████████
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██  ▄▄▄▄▄▄▄▄▄▄▄  ██
██               ██
███████████████████
Whitelist
WHITELIST
BOUNTIES












▄▄████████▄▄
▄████████████████▄
▄████████████████████▄
▄████████████████████████▄
▄██████████████████▀▀▀█████▄
█████████████▀▀▀      ██████
████████▀▀▀       ▄    ███████
█████▄         ▄█▀    ████████
████████▄    ▄█▀      ████████
███████████▄█▀       █████████
████████████  ▄     ████████
▀███████████ ███▄  ████████▀
▀████████████████████████▀
▀████████████████████▀
▀████████████████▀
▀▀████████▀▀
MEDIUM
FACEBOOK
YOUTUBE
[          &