Bitcoin Forum
May 07, 2024, 07:35:22 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 [37] 38 »
  Print  
Author Topic: [OFFLINE]P2Pmining.com-Hybrid P2Pool-NO FEE!!!-BTC/NMC/IXC/I0C/DEV/LTC  (Read 56567 times)
eroxors
Legendary
*
Offline Offline

Activity: 924
Merit: 1000


Think. Positive. Thoughts.


View Profile WWW
June 11, 2013, 03:14:47 PM
 #721

Has anyone built the database from the code? I'd happily pay a small bounty for it. Smiley

1715067322
Hero Member
*
Offline Offline

Posts: 1715067322

View Profile Personal Message (Offline)

Ignore
1715067322
Reply with quote  #2

1715067322
Report to moderator
1715067322
Hero Member
*
Offline Offline

Posts: 1715067322

View Profile Personal Message (Offline)

Ignore
1715067322
Reply with quote  #2

1715067322
Report to moderator
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.
1715067322
Hero Member
*
Offline Offline

Posts: 1715067322

View Profile Personal Message (Offline)

Ignore
1715067322
Reply with quote  #2

1715067322
Report to moderator
1715067322
Hero Member
*
Offline Offline

Posts: 1715067322

View Profile Personal Message (Offline)

Ignore
1715067322
Reply with quote  #2

1715067322
Report to moderator
daemondazz
Sr. Member
****
Offline Offline

Activity: 448
Merit: 250



View Profile
June 12, 2013, 01:34:04 AM
 #722

Should be pretty close, although I'm still testing and haven't tested very thoroughly yet:

Code:
CREATE TABLE `devcoin_blocks` (
  `id` int(11) NOT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `type` varchar(16) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `confirmations` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `devcoin_payouts` (
  `id` int(11) NOT NULL,
  `address` varchar(48) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `paid` varchar(48) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `devcoin_reg` (
  `BTC_address` varchar(48) NOT NULL,
  `NMC_address` varchar(48) DEFAULT NULL,
  PRIMARY KEY (`BTC_address`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `i0coin_blocks` (
  `id` int(11) NOT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `type` varchar(16) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `confirmations` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `i0coin_payouts` (
  `id` int(11) NOT NULL,
  `address` varchar(48) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `paid` varchar(48) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `i0coin_reg` (
  `BTC_address` varchar(48) NOT NULL,
  `NMC_address` varchar(48) DEFAULT NULL,
  PRIMARY KEY (`BTC_address`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `ixcoin_blocks` (
  `id` int(11) NOT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `type` varchar(16) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `confirmations` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `ixcoin_payouts` (
  `id` int(11) NOT NULL,
  `address` varchar(48) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `paid` varchar(48) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `ixcoin_reg` (
  `BTC_address` varchar(48) NOT NULL,
  `NMC_address` varchar(48) DEFAULT NULL,
  PRIMARY KEY (`BTC_address`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `lminer_hist` (
  `id` int(11) NOT NULL,
  `address` varchar(48) DEFAULT NULL,
  `hashrate` bigint(20) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `lpayouts` (
  `id` int(11) DEFAULT NULL,
  `address` varchar(48) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `paddress` varchar(48) DEFAULT NULL,
  `paid` varchar(64) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `lpool_blocks` (
  `id` int(11) NOT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `type` varchar(16) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `confirmations` int(11) DEFAULT NULL,
  `blk_num` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `lpool_data` (
  `id` int(11) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `hashrate` bigint(20) DEFAULT NULL,
  `shares` int(11) DEFAULT NULL,
  `stale_doa` int(11) DEFAULT NULL,
  `stale_orphan` int(11) DEFAULT NULL,
  `p2pool_hashrate` bigint(20) DEFAULT NULL,
  `p2pool_stale_rate` int(11) DEFAULT NULL,
  `block_value` decimal(16,8) DEFAULT NULL,
  `peers_out` int(11) DEFAULT NULL,
  `peers_in` int(11) DEFAULT NULL,
  `current_payout` decimal(16,8) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `miner_data` (
  `id` int(11) NOT NULL,
  `address` varchar(48) DEFAULT NULL,
  `hashrate` bigint(20) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `miner_hist` (
  `id` int(11) NOT NULL,
  `address` varchar(48) DEFAULT NULL,
  `hashrate` bigint(20) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `namecoin_blocks` (
  `id` int(11) NOT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `type` varchar(16) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `confirmations` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `namecoin_payouts` (
  `id` int(11) NOT NULL,
  `address` varchar(48) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `paid` varchar(48) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `namecoin_reg` (
  `BTC_address` varchar(48) NOT NULL,
  `NMC_address` varchar(48) DEFAULT NULL,
  PRIMARY KEY (`BTC_address`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `pay_address` (
  `address` varchar(48) NOT NULL,
  `paddress` varchar(48) DEFAULT NULL,
  PRIMARY KEY (`address`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `payouts` (
  `id` int(11) DEFAULT NULL,
  `address` varchar(48) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `paddress` varchar(48) DEFAULT NULL,
  `paid` varchar(64) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `pool_blocks` (
  `id` int(11) NOT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `type` varchar(16) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `confirmations` int(11) DEFAULT NULL,
  `blk_num` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `pool_data` (
  `id` int(11) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `hashrate` bigint(20) DEFAULT NULL,
  `shares` int(11) DEFAULT NULL,
  `stale_doa` int(11) DEFAULT NULL,
  `stale_orphan` int(11) DEFAULT NULL,
  `p2pool_hashrate` bigint(20) DEFAULT NULL,
  `p2pool_stale_rate` int(11) DEFAULT NULL,
  `block_value` decimal(16,8) DEFAULT NULL,
  `peers_out` int(11) DEFAULT NULL,
  `peers_in` int(11) DEFAULT NULL,
  `current_payout` decimal(16,8) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `signtime` (
  `address` varchar(48) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`address`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Computers, Amateur Radio, Electronics, Aviation - 1dazzrAbMqNu6cUwh2dtYckNygG7jKs8S
flowice
Full Member
***
Offline Offline

Activity: 208
Merit: 100


View Profile WWW
June 12, 2013, 02:05:46 AM
 #723

Should be pretty close, although I'm still testing and haven't tested very thoroughly yet:

Code:
CREATE TABLE `devcoin_blocks` (
  `id` int(11) NOT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `type` varchar(16) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `confirmations` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `devcoin_payouts` (
  `id` int(11) NOT NULL,
  `address` varchar(48) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `paid` varchar(48) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `devcoin_reg` (
  `BTC_address` varchar(48) NOT NULL,
  `NMC_address` varchar(48) DEFAULT NULL,
  PRIMARY KEY (`BTC_address`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `i0coin_blocks` (
  `id` int(11) NOT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `type` varchar(16) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `confirmations` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `i0coin_payouts` (
  `id` int(11) NOT NULL,
  `address` varchar(48) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `paid` varchar(48) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `i0coin_reg` (
  `BTC_address` varchar(48) NOT NULL,
  `NMC_address` varchar(48) DEFAULT NULL,
  PRIMARY KEY (`BTC_address`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `ixcoin_blocks` (
  `id` int(11) NOT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `type` varchar(16) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `confirmations` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `ixcoin_payouts` (
  `id` int(11) NOT NULL,
  `address` varchar(48) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `paid` varchar(48) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `ixcoin_reg` (
  `BTC_address` varchar(48) NOT NULL,
  `NMC_address` varchar(48) DEFAULT NULL,
  PRIMARY KEY (`BTC_address`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `lminer_hist` (
  `id` int(11) NOT NULL,
  `address` varchar(48) DEFAULT NULL,
  `hashrate` bigint(20) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `lpayouts` (
  `id` int(11) DEFAULT NULL,
  `address` varchar(48) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `paddress` varchar(48) DEFAULT NULL,
  `paid` varchar(64) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `lpool_blocks` (
  `id` int(11) NOT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `type` varchar(16) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `confirmations` int(11) DEFAULT NULL,
  `blk_num` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `lpool_data` (
  `id` int(11) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `hashrate` bigint(20) DEFAULT NULL,
  `shares` int(11) DEFAULT NULL,
  `stale_doa` int(11) DEFAULT NULL,
  `stale_orphan` int(11) DEFAULT NULL,
  `p2pool_hashrate` bigint(20) DEFAULT NULL,
  `p2pool_stale_rate` int(11) DEFAULT NULL,
  `block_value` decimal(16,8) DEFAULT NULL,
  `peers_out` int(11) DEFAULT NULL,
  `peers_in` int(11) DEFAULT NULL,
  `current_payout` decimal(16,8) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `miner_data` (
  `id` int(11) NOT NULL,
  `address` varchar(48) DEFAULT NULL,
  `hashrate` bigint(20) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `miner_hist` (
  `id` int(11) NOT NULL,
  `address` varchar(48) DEFAULT NULL,
  `hashrate` bigint(20) DEFAULT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `namecoin_blocks` (
  `id` int(11) NOT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `type` varchar(16) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `confirmations` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `namecoin_payouts` (
  `id` int(11) NOT NULL,
  `address` varchar(48) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `paid` varchar(48) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `namecoin_reg` (
  `BTC_address` varchar(48) NOT NULL,
  `NMC_address` varchar(48) DEFAULT NULL,
  PRIMARY KEY (`BTC_address`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `pay_address` (
  `address` varchar(48) NOT NULL,
  `paddress` varchar(48) DEFAULT NULL,
  PRIMARY KEY (`address`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `payouts` (
  `id` int(11) DEFAULT NULL,
  `address` varchar(48) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `paddress` varchar(48) DEFAULT NULL,
  `paid` varchar(64) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `pool_blocks` (
  `id` int(11) NOT NULL,
  `txid` varchar(64) DEFAULT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `type` varchar(16) DEFAULT NULL,
  `amount` decimal(16,8) DEFAULT NULL,
  `confirmations` int(11) DEFAULT NULL,
  `blk_num` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `pool_data` (
  `id` int(11) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `hashrate` bigint(20) DEFAULT NULL,
  `shares` int(11) DEFAULT NULL,
  `stale_doa` int(11) DEFAULT NULL,
  `stale_orphan` int(11) DEFAULT NULL,
  `p2pool_hashrate` bigint(20) DEFAULT NULL,
  `p2pool_stale_rate` int(11) DEFAULT NULL,
  `block_value` decimal(16,8) DEFAULT NULL,
  `peers_out` int(11) DEFAULT NULL,
  `peers_in` int(11) DEFAULT NULL,
  `current_payout` decimal(16,8) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE `signtime` (
  `address` varchar(48) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`address`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

Good job !

The most secure web wallet. 2 factor auth, PIN keypad, session management, email authorization, GPG auth.. http://1v.io/flowice
Jude Austin
Legendary
*
Offline Offline

Activity: 1140
Merit: 1000


The Real Jude Austin


View Profile WWW
September 24, 2013, 11:03:03 PM
 #724

Does anyone have the modified main.py for this to work?

I am not a Python expert, at all.

I have a modified work.py but when I run run_p2pool.py I get this error:

Code:
2013-09-25 02:56:48.747774 >   File "/root/p2pool/p2pool/main.py", line 213, in main
2013-09-25 02:56:48.747785 >     wb = work.WorkerBridge(node, my_pubkey_hash, args.donation_percentage, merged_urls, args.worker_fee)
2013-09-25 02:56:48.747799 > exceptions.TypeError: __init__() takes exactly 17 arguments (6 given)

I know this is in relation to my work.py file which can be seen here:
http://pastebin.com/ab5JgmMw

Here is the default main.py:
https://github.com/forrestv/p2pool/blob/master/p2pool/main.py

Am I supposed to replace the entire line 213 on main.py with starting at line 17 through 49 from work.py?

I don't quite understand how to implement it.

Any help would be greatly appreciated.

Buy or sell $100 of Crypto and get $10!
JayCoin (OP)
Sr. Member
****
Offline Offline

Activity: 409
Merit: 251


Crypt'n Since 2011


View Profile WWW
September 25, 2013, 01:14:23 AM
 #725

to modify the p2pool code to run a litecoin pool with p2pool mining

add the following after line 420 received_header_hashes.add(header_hash) in work.py  

Code:
               try:
                    dbf_user = request.getUser()
                    dbuser_items = dbf_user.split('+')
                    db_diff = bitcoin_data.target_to_difficulty(target) * 1000000000
                    proxy_db = MySQLdb.connect(host="localhost",user="jason",passwd="p2pool2012",db="p2pmining")
                    pdb_c = proxy_db.cursor()
                    pdb_c.execute("""INSERT INTO lminer_data (id,address,hashrate,timestamp,difficulty,ontime) VALUES (NULL, %s , %s , UNIX_TIMESTAMP() , %s, %s)""", (dbuser_items[0], db_diff * on_time, db_diff , on_time ) )
                    proxy_db.close()
                except:
                    log.err(None, 'Error with database:')
                ###


 Indent (spaces) the code to line up with line 420
Change the database info to match your database. As you can see, you will need a table called lminer_data.

Also make sure you add import MySQLdb somewhere at the beginning of the work.py file with the other imports and also make sure you have python mysql support installed. No changes to the main.py required.

Hello There!
daemondazz
Sr. Member
****
Offline Offline

Activity: 448
Merit: 250



View Profile
September 25, 2013, 01:34:07 AM
 #726

Another option would be to clone from my github repo at https://github.com/daemondazz/p2pool and then write an external python module to perform the logging for you. This is the module that I use to log shares to a Django database:

Code:
## FILE: share_logger.py

import csv, time
from django.core.management import call_command

FALLBACK_FILE = '/tmp/p2pool-shares.csv'


def logger(submitted_hash, submitted_diff, found_block, found_share, miner_username, miner_rate, debug=False):
    args = (time.time(), submitted_hash, submitted_diff, found_block, found_share, miner_username, int(miner_rate))
    try:
        call_command('pool_logshare', *args)
    except:
        if debug:
            raise
        fh = csv.writer(open(FALLBACK_FILE, 'ab'))
        fh.writerow(args)
        print 'Share Logger: WARNING: Wrote share submission to %s' % FALLBACK_FILE

This can then be utilised by passing in the --share-logging-function argument to p2pool:

/usr/bin/python /var/lib/p2pool/p2pool/run_p2pool.py [otheroptions] --share-logging-function share_logger.logger

I have submitted the changes in my repo back to forrestv for inclusion upstream.

Computers, Amateur Radio, Electronics, Aviation - 1dazzrAbMqNu6cUwh2dtYckNygG7jKs8S
Jude Austin
Legendary
*
Offline Offline

Activity: 1140
Merit: 1000


The Real Jude Austin


View Profile WWW
September 25, 2013, 01:38:52 AM
 #727

to modify the p2pool code to run a litecoin pool with p2pool mining

add the following after line 420 received_header_hashes.add(header_hash) in work.py  

Code:
               try:
                    dbf_user = request.getUser()
                    dbuser_items = dbf_user.split('+')
                    db_diff = bitcoin_data.target_to_difficulty(target) * 1000000000
                    proxy_db = MySQLdb.connect(host="localhost",user="jason",passwd="p2pool2012",db="p2pmining")
                    pdb_c = proxy_db.cursor()
                    pdb_c.execute("""INSERT INTO lminer_data (id,address,hashrate,timestamp,difficulty,ontime) VALUES (NULL, %s , %s , UNIX_TIMESTAMP() , %s, %s)""", (dbuser_items[0], db_diff * on_time, db_diff , on_time ) )
                    proxy_db.close()
                except:
                    log.err(None, 'Error with database:')
                ###


 Indent (spaces) the code to line up with line 420
Change the database info to match your database. As you can see, you will need a table called lminer_data.

Also make sure you add import MySQLdb somewhere at the beginning of the work.py file with the other imports and also make sure you have python mysql support installed. No changes to the main.py required.


And what about Bitcoin mining?


Buy or sell $100 of Crypto and get $10!
daemondazz
Sr. Member
****
Offline Offline

Activity: 448
Merit: 250



View Profile
September 25, 2013, 01:46:56 AM
 #728

And what about Bitcoin mining?

With my changes, you can have a different logging function for each instance of p2pool that you run, bitcoin, litecoin, terracoin, etc. No specific changes need to be made to the p2pool codebase for each coin.

Computers, Amateur Radio, Electronics, Aviation - 1dazzrAbMqNu6cUwh2dtYckNygG7jKs8S
Jude Austin
Legendary
*
Offline Offline

Activity: 1140
Merit: 1000


The Real Jude Austin


View Profile WWW
September 25, 2013, 01:53:07 AM
 #729

And what about Bitcoin mining?

With my changes, you can have a different logging function for each instance of p2pool that you run, bitcoin, litecoin, terracoin, etc. No specific changes need to be made to the p2pool codebase for each coin.

I can't write my own Python, lol.

Buy or sell $100 of Crypto and get $10!
daemondazz
Sr. Member
****
Offline Offline

Activity: 448
Merit: 250



View Profile
September 25, 2013, 02:05:22 AM
 #730

I can't write my own Python, lol.

Post a bounty Smiley

I'd be happy to write a simple logging function for a bit of a tip.

Computers, Amateur Radio, Electronics, Aviation - 1dazzrAbMqNu6cUwh2dtYckNygG7jKs8S
Jude Austin
Legendary
*
Offline Offline

Activity: 1140
Merit: 1000


The Real Jude Austin


View Profile WWW
September 25, 2013, 04:46:48 AM
 #731

to modify the p2pool code to run a litecoin pool with p2pool mining

add the following after line 420 received_header_hashes.add(header_hash) in work.py  

Code:
               try:
                    dbf_user = request.getUser()
                    dbuser_items = dbf_user.split('+')
                    db_diff = bitcoin_data.target_to_difficulty(target) * 1000000000
                    proxy_db = MySQLdb.connect(host="localhost",user="jason",passwd="p2pool2012",db="p2pmining")
                    pdb_c = proxy_db.cursor()
                    pdb_c.execute("""INSERT INTO lminer_data (id,address,hashrate,timestamp,difficulty,ontime) VALUES (NULL, %s , %s , UNIX_TIMESTAMP() , %s, %s)""", (dbuser_items[0], db_diff * on_time, db_diff , on_time ) )
                    proxy_db.close()
                except:
                    log.err(None, 'Error with database:')
                ###


 Indent (spaces) the code to line up with line 420
Change the database info to match your database. As you can see, you will need a table called lminer_data.

Also make sure you add import MySQLdb somewhere at the beginning of the work.py file with the other imports and also make sure you have python mysql support installed. No changes to the main.py required.


I did this and now I get this in the P2Pool console:

Code:
2013-09-25 08:44:51.865402 > --- <exception caught here> ---
2013-09-25 08:44:51.865414 >   File "/root/p2pool/p2pool/work.py", line 423, in got_response
2013-09-25 08:44:51.865426 >     dbf_user = request.getUser()
2013-09-25 08:45:14.890163 > exceptions.NameError: global name 'request' is not defined


Buy or sell $100 of Crypto and get $10!
JayCoin (OP)
Sr. Member
****
Offline Offline

Activity: 409
Merit: 251


Crypt'n Since 2011


View Profile WWW
September 25, 2013, 01:52:25 PM
 #732

I'll check on that error, must be a change to the newer version of p2pool. I'll post a fix soon.

Hello There!
Jude Austin
Legendary
*
Offline Offline

Activity: 1140
Merit: 1000


The Real Jude Austin


View Profile WWW
September 25, 2013, 04:14:06 PM
 #733

I'll check on that error, must be a change to the newer version of p2pool. I'll post a fix soon.

Thank you!

Buy or sell $100 of Crypto and get $10!
JayCoin (OP)
Sr. Member
****
Offline Offline

Activity: 409
Merit: 251


Crypt'n Since 2011


View Profile WWW
September 25, 2013, 08:52:14 PM
 #734

Delete

dbf_user = request.getUser()
dbuser_items = dbf_user.split('+')


Replace

pdb_c.execute("""INSERT INTO lminer_data (id,address,hashrate,timestamp,difficulty,ontime) VALUES (NULL, %s , %s , UNIX_TIMESTAMP() , %s, %s)""", (dbuser_items[0], db_diff * on_time, db_diff , on_time ) )

With

pdb_c.execute("""INSERT INTO lminer_data (id,address,hashrate,timestamp,difficulty,ontime) VALUES (NULL, %s , %s , UNIX_TIMESTAMP() , %s, %s)""", (user, db_diff * on_time, db_diff , on_time ) )

Good Luck!


Hello There!
Jude Austin
Legendary
*
Offline Offline

Activity: 1140
Merit: 1000


The Real Jude Austin


View Profile WWW
September 25, 2013, 11:07:46 PM
 #735

Delete

dbf_user = request.getUser()
dbuser_items = dbf_user.split('+')


Replace

pdb_c.execute("""INSERT INTO lminer_data (id,address,hashrate,timestamp,difficulty,ontime) VALUES (NULL, %s , %s , UNIX_TIMESTAMP() , %s, %s)""", (dbuser_items[0], db_diff * on_time, db_diff , on_time ) )

With

pdb_c.execute("""INSERT INTO lminer_data (id,address,hashrate,timestamp,difficulty,ontime) VALUES (NULL, %s , %s , UNIX_TIMESTAMP() , %s, %s)""", (user, db_diff * on_time, db_diff , on_time ) )

Good Luck!



Did this.

I had to add the columns difficulty and ontime to my table.

Once I did this I now get the error saying that id can't be NULL.

Buy or sell $100 of Crypto and get $10!
JayCoin (OP)
Sr. Member
****
Offline Offline

Activity: 409
Merit: 251


Crypt'n Since 2011


View Profile WWW
September 26, 2013, 02:33:31 AM
 #736

You need to set the id column in you database table to auto increment.

Hello There!
Jude Austin
Legendary
*
Offline Offline

Activity: 1140
Merit: 1000


The Real Jude Austin


View Profile WWW
September 26, 2013, 02:41:29 AM
 #737

You need to set the id column in you database table to auto increment.

Trying this now.

Buy or sell $100 of Crypto and get $10!
Jude Austin
Legendary
*
Offline Offline

Activity: 1140
Merit: 1000


The Real Jude Austin


View Profile WWW
September 26, 2013, 03:00:36 AM
 #738

Excellent, thank you so much!

No more issues in P2Pool console.

Now issues with displaying the current miners and litecoin blocks tabs.

Been digging through all the code and can't seem to find the issue.

I am guessing it has something to do with the database.

If you want to see it in action: http://192.3.117.102/index.php?method=lpool

Again thank you for your help.

Buy or sell $100 of Crypto and get $10!
JayCoin (OP)
Sr. Member
****
Offline Offline

Activity: 409
Merit: 251


Crypt'n Since 2011


View Profile WWW
September 26, 2013, 03:17:40 AM
 #739

is share data showing up in lminer_data table?

Hello There!
Jude Austin
Legendary
*
Offline Offline

Activity: 1140
Merit: 1000


The Real Jude Austin


View Profile WWW
September 26, 2013, 03:20:21 AM
Last edit: September 26, 2013, 04:33:58 AM by Jude Austin
 #740

is share data showing up in lminer_data table?

Ha, nope.

For an FYI I am using the database structure a few posts above.

Buy or sell $100 of Crypto and get $10!
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 [37] 38 »
  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!