Bitcoin Forum
April 23, 2024, 10:43:56 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 »  All
  Print  
Author Topic: OpenFaucet: The open source coin faucet implementation!  (Read 8791 times)
Zen00 (OP)
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
February 06, 2014, 02:32:15 AM
Last edit: February 06, 2014, 04:48:44 AM by Zen00
 #1

Hey all, it's time for me to unwrap this project I've been working on for the last couple weeks. Having just recently begun working with the MPOS dev team, this has been a great way for me to stretch my abilities and learn new ways of thinking about PHP.


OpenFaucet
The open source coin faucet implementation!




OpenFaucet is the culmination of a desire I've had since I first ran across a Bitcoin faucet many years ago. When I saw that people were actually giving away coins to people for nothing, it really sparked that charity button in me. I like giving things away, and do so whenever I have something to spare. It makes me feel good, and helps those I give to. Now you have the opportunity to share in that feeling as you too can give coins to friends, families, and anyone else on a fair and even distribution over a time span you set.

You may notice some similarities between this implementation and PHP-MPOS. That is because I built this site using the code from PHP-MPOS, and it shows in the amount of legacy code still sitting in the project, but more on that latter. I have taken screenshots of all parts of the website (12 in total) and a walk through of all the features is to be found in the break. Most of what is to be seen is placeholders that will be updated throughout the coming week, as the faucet itself is currently fully functional I will be taking time to work on appearances.








***************************************************************

The page in the main screenshot above is the index.php or home page for non-logged users. This is what people will see who are not registered for the website, which should be everyone except the site admin.




Once logged in, the admin will see the home page along with the administration bar.




Here the admin can see their wallet balance and information. Unfortunately the visible coins are all testnet coins, sadly I do not have 1000+ litecoin, maybe someone out there can rectify that for me. Tongue



Transactions are all kept so that you can see how visitors your site is getting.




Templates are easily editable through the web interface, though this is a feature I'm considering removing as it's not practicable for any serious developer anyways.




An optional about page where you can enter information about your coin for visitors to see and learn.




Monitor your crons, which are up, down, and around.




News can be posted just like in MPOS.




Settings can also be changed as needed through this panel.




Additional account settings can be changed as needed.




A contact form (optional) which users can use to let you know if there is a problem.




Your main dashboard, mainly for letting you know if there are any errors and if anyone other than you has logged in.

***************************************************************










What can you do to help?

As this project is only just entering open alpha testing, help with the following would be greatly appreciated. You can chat with me live in the #mpos-dev irc channel, just send me a PM at any time, though if I'm asleep a response is not guaranteed right away.

Critical Priority
  • Build a better repeat user detection system, currently the site relies on IP logging, but that is easily spoofabal.
  • Remove legacy code that is not needed for site functionality
High Priority
  • Prepare features for users such as warning messages that help guide along
  • Undock from PHP-MPOS such that OpenFaucet uses its own database and variables
Low Priority
  • Unify code style
  • Typo fixing, css fixes

Future plans:


Once the project is completely independent, the goal is to then refold it back into MPOS as a separate optional plugin for pool owners, such that a portion of their proceeds can be routed into funding the faucet.


If you find this project has been useful to you and your coin, I do accept donations at this address for LTC, a portion of all donations are routed back into running my own faucet.

LUdR1pN1M3eCpi2Gb1DKDzJhzmgqsGiZKk

Mine CasinoCoin with the CasinoCoin Slashers, daily backups, fast transactions, block finder rewards, secured server!
LTC: Lf57yviumAnFGP8NJ2MSMz9f2xLj2Hicxv                                CSC: CKnzrwrck2EFzvTLxmLhNkVcdZatKPmTgk
If the MPOS wiki has been useful to you, consider donating to me as thanks for maintaining.
There are several different types of Bitcoin clients. The most secure are full nodes like Bitcoin Core, but full nodes are more resource-heavy, and they must do a lengthy initial syncing process. As a result, lightweight clients with somewhat less security are commonly used.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713912236
Hero Member
*
Offline Offline

Posts: 1713912236

View Profile Personal Message (Offline)

Ignore
1713912236
Reply with quote  #2

1713912236
Report to moderator
1713912236
Hero Member
*
Offline Offline

Posts: 1713912236

View Profile Personal Message (Offline)

Ignore
1713912236
Reply with quote  #2

1713912236
Report to moderator
1713912236
Hero Member
*
Offline Offline

Posts: 1713912236

View Profile Personal Message (Offline)

Ignore
1713912236
Reply with quote  #2

1713912236
Report to moderator
super3
Legendary
*
Offline Offline

Activity: 1094
Merit: 1006


View Profile WWW
February 06, 2014, 04:32:37 AM
 #2

Source?

Bitcoin Dev / Storj - Decentralized Cloud Storage. Winner of Texas Bitcoin Conference Hackathon 2014. / Peercoin Web Lead / Primecoin Web Lead / Armory Guide Author / "Am I the only one that trusts Dogecoin more than the Federal Reserve?"
Zen00 (OP)
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
February 06, 2014, 04:42:09 AM
 #3

Source?

Doh!

Mine CasinoCoin with the CasinoCoin Slashers, daily backups, fast transactions, block finder rewards, secured server!
LTC: Lf57yviumAnFGP8NJ2MSMz9f2xLj2Hicxv                                CSC: CKnzrwrck2EFzvTLxmLhNkVcdZatKPmTgk
If the MPOS wiki has been useful to you, consider donating to me as thanks for maintaining.
RGBKey
Hero Member
*****
Offline Offline

Activity: 854
Merit: 658


rgbkey.github.io/pgp.txt


View Profile WWW
February 06, 2014, 04:43:47 AM
 #4

Wow, this is a great contribution to the community. Thank you alot for the work you put into this.
Zen00 (OP)
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
February 06, 2014, 05:07:21 AM
 #5

Wow, this is a great contribution to the community. Thank you alot for the work you put into this.
zens a great user and is amazing a contributing!
This is a great step for the community as a whole,
are the current reqs the same as mpos for running the system,?




No, you can run this implementation on much leaner hardware as it completely eliminates stratum and the huge amount of database calls required under it for things like stats and user account information.

Mine CasinoCoin with the CasinoCoin Slashers, daily backups, fast transactions, block finder rewards, secured server!
LTC: Lf57yviumAnFGP8NJ2MSMz9f2xLj2Hicxv                                CSC: CKnzrwrck2EFzvTLxmLhNkVcdZatKPmTgk
If the MPOS wiki has been useful to you, consider donating to me as thanks for maintaining.
maco
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250



View Profile
February 06, 2014, 06:35:16 AM
 #6

I want to get one of these up and running for 42 some day. Tongue
Zen00 (OP)
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
February 06, 2014, 09:06:43 PM
 #7

Just pushed a new update that will break everything. This update creates a new database, cuts out unused classes, finalizes a lot of presets, updates the config file, and more! Also it's guaranteed to not be working for at least another 8 hours until I've had time to debug it thoroughly.

Mine CasinoCoin with the CasinoCoin Slashers, daily backups, fast transactions, block finder rewards, secured server!
LTC: Lf57yviumAnFGP8NJ2MSMz9f2xLj2Hicxv                                CSC: CKnzrwrck2EFzvTLxmLhNkVcdZatKPmTgk
If the MPOS wiki has been useful to you, consider donating to me as thanks for maintaining.
Voodah
Sr. Member
****
Offline Offline

Activity: 266
Merit: 250



View Profile
February 07, 2014, 06:02:42 AM
 #8

Pretty cool. Let us know when it's fixed !
Zen00 (OP)
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
February 07, 2014, 09:35:24 AM
 #9

Pretty cool. Let us know when it's fixed !

It's working, but somehow I killed templates for logged in users, and admin authentication. I'll figure it out eventually though.

Mine CasinoCoin with the CasinoCoin Slashers, daily backups, fast transactions, block finder rewards, secured server!
LTC: Lf57yviumAnFGP8NJ2MSMz9f2xLj2Hicxv                                CSC: CKnzrwrck2EFzvTLxmLhNkVcdZatKPmTgk
If the MPOS wiki has been useful to you, consider donating to me as thanks for maintaining.
Zen00 (OP)
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
February 07, 2014, 07:48:27 PM
 #10

Got templates back up, there are still a few bugs to work out though, but for the most part everything seems to be working again, just some annoying error messages and displays that don't query right yet.

Mine CasinoCoin with the CasinoCoin Slashers, daily backups, fast transactions, block finder rewards, secured server!
LTC: Lf57yviumAnFGP8NJ2MSMz9f2xLj2Hicxv                                CSC: CKnzrwrck2EFzvTLxmLhNkVcdZatKPmTgk
If the MPOS wiki has been useful to you, consider donating to me as thanks for maintaining.
Zen00 (OP)
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
February 07, 2014, 09:17:20 PM
 #11

Transaction page is now back to normal, just need to work on the monitoring page to have everything up and running.

Mine CasinoCoin with the CasinoCoin Slashers, daily backups, fast transactions, block finder rewards, secured server!
LTC: Lf57yviumAnFGP8NJ2MSMz9f2xLj2Hicxv                                CSC: CKnzrwrck2EFzvTLxmLhNkVcdZatKPmTgk
If the MPOS wiki has been useful to you, consider donating to me as thanks for maintaining.
squiggie
Full Member
***
Offline Offline

Activity: 147
Merit: 100


View Profile WWW
February 14, 2014, 10:15:38 PM
 #12

I'm just curious how this is coming along. I'm currently looking for a good faucet software and there is a need for this.

I did get the latest git and am having issues with it working. I edited the global.inc.dist.php accordingly and then figured out I needed to rename it to global.inc.php but now all I get is a blank index.php page.

Any more instructions for setup would be great. Thanks for the work!

Zen00 (OP)
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
February 15, 2014, 05:47:43 AM
 #13

I'm just curious how this is coming along. I'm currently looking for a good faucet software and there is a need for this.

I did get the latest git and am having issues with it working. I edited the global.inc.dist.php accordingly and then figured out I needed to rename it to global.inc.php but now all I get is a blank index.php page.

Any more instructions for setup would be great. Thanks for the work!


Instructions are identical to those for setting up MPOS, minus the stratum mining portion.

Check your Apache error logs, the reason for your blank page is to be found in there.

The software works, though I would like some more help to do the debugging and fixing as really I need to be looking for a job of my own, I'm not really making any money doing this.

Mine CasinoCoin with the CasinoCoin Slashers, daily backups, fast transactions, block finder rewards, secured server!
LTC: Lf57yviumAnFGP8NJ2MSMz9f2xLj2Hicxv                                CSC: CKnzrwrck2EFzvTLxmLhNkVcdZatKPmTgk
If the MPOS wiki has been useful to you, consider donating to me as thanks for maintaining.
squiggie
Full Member
***
Offline Offline

Activity: 147
Merit: 100


View Profile WWW
February 15, 2014, 03:28:53 PM
 #14

I'd be happy to help you debug. I am experiencing the blank page still after redoing the install from the ground up. I followed the MPOS instructions excluding the stratum section so I hope I'm not missing something really simply.

First, you need to update the 000_base_structure.sql file. There is a syntax error preventing the final table creation. Remove the last comma from the syntax KEY `type` (`type`),.

Code:
CREATE TABLE IF NOT EXISTS `transactions` (
  `id` int(255) NOT NULL AUTO_INCREMENT,
  `type` varchar(25) DEFAULT NULL,
  `coin_address` varchar(255) DEFAULT NULL,
  `amount` double DEFAULT '0',
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `txid` varchar(256) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `type` (`type`),
) ENGINE=InnoDB DEFAULT CHARSET=utf8

becomes

Code:
CREATE TABLE IF NOT EXISTS `transactions` (
  `id` int(255) NOT NULL AUTO_INCREMENT,
  `type` varchar(25) DEFAULT NULL,
  `coin_address` varchar(255) DEFAULT NULL,
  `amount` double DEFAULT '0',
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `txid` varchar(256) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `type` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

Also, the blank page is providing the error:
Quote
PHP Fatal error:  Call to undefined method mysqli_stmt::get_result() in /var/www/openfaucet/public/include/classes/setting.class.php on line 16.

I'm not sure what this means. Any help is appreciated.

Zen00 (OP)
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
February 17, 2014, 03:05:22 PM
 #15

Alright, I updated that SQL typo you found and updated the settings class to the latest version, however I'm not having that issue you're having, so no idea what may be causing it. Maybe the update will fix it for you. As far as it goes, the statement referred to is a MySQLi statement, so it could be possible I messed something up, or possibly that you have the wrong user info somewhere in your config file, maybe you're using a none-admin account for your table?

Mine CasinoCoin with the CasinoCoin Slashers, daily backups, fast transactions, block finder rewards, secured server!
LTC: Lf57yviumAnFGP8NJ2MSMz9f2xLj2Hicxv                                CSC: CKnzrwrck2EFzvTLxmLhNkVcdZatKPmTgk
If the MPOS wiki has been useful to you, consider donating to me as thanks for maintaining.
ciocgun
Sr. Member
****
Offline Offline

Activity: 490
Merit: 250


View Profile WWW
February 19, 2014, 12:01:52 AM
 #16

i got the same error,

first time i've to set up my config file and rename it and run sql on database?

squiggie
Full Member
***
Offline Offline

Activity: 147
Merit: 100


View Profile WWW
February 19, 2014, 03:46:23 AM
 #17

Yea no dice for me. I get the same error after updating and also starting with a clean install.

Zen00 (OP)
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
February 19, 2014, 06:43:40 PM
 #18

So since I don't have this issue with my server which was already being used for other things, I'm going to start with a clean server as well to see if I can find the root of your issues.

Mine CasinoCoin with the CasinoCoin Slashers, daily backups, fast transactions, block finder rewards, secured server!
LTC: Lf57yviumAnFGP8NJ2MSMz9f2xLj2Hicxv                                CSC: CKnzrwrck2EFzvTLxmLhNkVcdZatKPmTgk
If the MPOS wiki has been useful to you, consider donating to me as thanks for maintaining.
ahmedjadoon
Legendary
*
Offline Offline

Activity: 1414
Merit: 1000


View Profile
February 19, 2014, 07:04:48 PM
 #19

Great contribution this is!
Zen00 (OP)
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
February 22, 2014, 12:25:22 AM
 #20

Okay, for all you people out there who have had trouble. I just went through the entire setup process with a fresh install of Ubuntu Server 12.0.4 and here are my findings.

You need to remember to install all dependencies, namely these ones in particular.

Code:
apt-get install php5-mysqlnd php5-curl build-essential libboost-all-dev libcurl4-openssl-dev libdb5.1-dev libdb5.1++-dev git

Additionally you need to remember to set file permissions, own your public folders with the Apache file group, www-data, and make your logging directory writable, for testing purposes I just 777'd all the files and folders, never do that on a production site. See MPOS setup for more information.

Code:
chown www-data public/templates/compile public/templates/cache logs


Also remember to update to the latest version of all things with apt-get update/upgrade.

This should clear up any errors you're having, if you experience any other errors, well let me know as usual.


And thanks to those who found bugs for this project and reported them.

Mine CasinoCoin with the CasinoCoin Slashers, daily backups, fast transactions, block finder rewards, secured server!
LTC: Lf57yviumAnFGP8NJ2MSMz9f2xLj2Hicxv                                CSC: CKnzrwrck2EFzvTLxmLhNkVcdZatKPmTgk
If the MPOS wiki has been useful to you, consider donating to me as thanks for maintaining.
Pages: [1] 2 3 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!