Bitcoin Forum
May 06, 2024, 10:26:04 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1] 2 »  All
  Print  
Author Topic: [NVC][P2Pool] Public node + source code!  (Read 4494 times)
baloo_kiev (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
June 09, 2013, 12:49:45 AM
Last edit: July 05, 2013, 06:24:02 PM by baloo_kiev
 #1

Summary. As you may know, current version of NVC p2pool (adapted for NVC by the coin's developer Balthazar, https://github.com/CryptoManiac/p2pool) does not support mining on a public node to custom address. I post a simple patch which allows mining on a public node, which can be tested on my zero-fee host.

Technical background. What is known as address (that string of symblols) is encoded hash of ECDSA public key. Address can be derived from corresponding public key but not vice versa. Unlike other coins, in NVC (and PPC I believe), generation transaction is forced to send coins to full public keys. So mining to a given address is just impossible. However, one can mine to specific public key!

To launch a public node get the code from https://github.com/baloo-kiev/p2pool/tree/nvc:
Code:
$ git clone -b nvc https://github.com/baloo-kiev/p2pool.git

To mine on a public node. Get a new pubkey from your NVC client with 'getnewpubkey' command in debug console or by RPC. Validate it vith 'validatepubkey' command to find out address associated with it.
It looks like this:
Code:
$ ./novacoind getnewpubkey
0283f63d8e2988b76cbab6b69c81471db70598a16748ce08091abbcc50b254a353
$ ./novacoind validatepubkey 0283f63d8e2988b76cbab6b69c81471db70598a16748ce08091abbcc50b254a353
{
    "isvalid" : true,
    "address" : "4FPVq9hX5HEE4SdmWF3g5DLo2xBCrJ5xuv",
    "ismine" : true,
    "iscompressed" : true,
    "isscript" : false,
    "pubkey" : "0283f63d8e2988b76cbab6b69c81471db70598a16748ce08091abbcc50b254a353",
    "iscompressed" : true,
    "account" : ""
}

Use it as your username when connecting to the node.

You can test it on my zero-fee node at http://78.27.191.182:8347/

Happy mining!

UPDATE Code updated, please update your nodes! To avoid generation of invalid blocks, miners now mine to the node's default address until it has minimal payout (0.01 NVC). With current network hashrate this is equivalent to minimal fee of 50 kH/s distributed across all node's miners. You are free to set any custom fee percentage for your node (including zero), but this minimal fee will apply anyway.

UPDATE 12/06 Fixed miner's pubkey validation.

UPDATE 13/06

UPDATE 05/07
IMPORTANT

Everyone who downloaded Windows binaries before this update must clear their data/novacoin directory. Accidentally, it contains a cached public key, which will be used as your node's default mining address if you don't delete it! Download link fixed.

PGP: 6EC48BA7
Welcome to my p2pool: BTC
1715034364
Hero Member
*
Offline Offline

Posts: 1715034364

View Profile Personal Message (Offline)

Ignore
1715034364
Reply with quote  #2

1715034364
Report to moderator
Activity + Trust + Earned Merit == The Most Recognized Users on Bitcointalk
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Mogumodz
Sr. Member
****
Offline Offline

Activity: 290
Merit: 250



View Profile
June 09, 2013, 01:19:05 AM
 #2

Testing

"address" : "4TzKhcFbBLeD7hrMc5uRoMSRQWefjkfd51",
"pubkey" : "03a807497d1e3eeb3ed915c3d2eb6c8a2f87a581a96333c788b14bb0de0ab5d2cc",

Bitcoin OTC rating GPG ID: 3E7974A1 P2Pool statistics: p2pool.info
baloo_kiev (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
June 09, 2013, 01:31:08 AM
 #3

Testing

"address" : "4TzKhcFbBLeD7hrMc5uRoMSRQWefjkfd51",
"pubkey" : "03a807497d1e3eeb3ed915c3d2eb6c8a2f87a581a96333c788b14bb0de0ab5d2cc",

Congrats! Your first share http://78.27.191.182:8347/static/share.html#00000001914cc68014719e256e72788a44a72072527981b8239ea284416eebac

PGP: 6EC48BA7
Welcome to my p2pool: BTC
baloo_kiev (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
June 09, 2013, 01:32:38 AM
 #4

Testing

"address" : "4TzKhcFbBLeD7hrMc5uRoMSRQWefjkfd51",
"pubkey" : "03a807497d1e3eeb3ed915c3d2eb6c8a2f87a581a96333c788b14bb0de0ab5d2cc",

Congrats! Your first share http://78.27.191.182:8347/static/share.html#00000001914cc68014719e256e72788a44a72072527981b8239ea284416eebac

Now you are in payout list but with 0 payout, you need one more share for it to be non-zero.

PGP: 6EC48BA7
Welcome to my p2pool: BTC
Mogumodz
Sr. Member
****
Offline Offline

Activity: 290
Merit: 250



View Profile
June 09, 2013, 01:55:28 AM
 #5

very nice, thanks for your hard work baloo_kiev  Cheesy

Bitcoin OTC rating GPG ID: 3E7974A1 P2Pool statistics: p2pool.info
baloo_kiev (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
June 09, 2013, 10:51:51 AM
 #6

Pushed the code to github.

PGP: 6EC48BA7
Welcome to my p2pool: BTC
Balthazar
Legendary
*
Offline Offline

Activity: 3108
Merit: 1358



View Profile
June 09, 2013, 11:20:41 AM
 #7

Pushed the code to github.
Could you create a pull request?
baloo_kiev (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
June 09, 2013, 11:34:28 AM
 #8

Pushed the code to github.
Could you create a pull request?

Done. There's a complete mess in commit chain (a total of 13), because I ported it to Bitbar and then back to NVC.

What about zero node fee, I heard it can cause invalid blocks?

PGP: 6EC48BA7
Welcome to my p2pool: BTC
Balthazar
Legendary
*
Offline Offline

Activity: 3108
Merit: 1358



View Profile
June 09, 2013, 11:36:36 AM
 #9

What about zero node fee, I heard it can cause invalid blocks?
It's correct.
baloo_kiev (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
June 09, 2013, 11:39:44 AM
 #10

What about zero node fee, I heard it can cause invalid blocks?
It's correct.

Could you please explain briefly why is that? I'm quite familliar with NVC code.

PGP: 6EC48BA7
Welcome to my p2pool: BTC
Balthazar
Legendary
*
Offline Offline

Activity: 3108
Merit: 1358



View Profile
June 09, 2013, 11:43:42 AM
 #11

What about zero node fee, I heard it can cause invalid blocks?
It's correct.

Could you please explain briefly why is that? I'm quite familliar with NVC code.
It's because of protocol limitations. Coinbase outputs should contain at least one owned by node, which created the block.

We have a plan to remove this limitation in 0.4.3+, because it has no sense anymore.
baloo_kiev (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
June 09, 2013, 08:43:27 PM
 #12

Node hosters, please see OP for update!

PGP: 6EC48BA7
Welcome to my p2pool: BTC
Mogumodz
Sr. Member
****
Offline Offline

Activity: 290
Merit: 250



View Profile
June 09, 2013, 08:57:22 PM
 #13

Node hosters, please see OP for update!

Thanks, updating now.

Bitcoin OTC rating GPG ID: 3E7974A1 P2Pool statistics: p2pool.info
12gaFacelift
Sr. Member
****
Offline Offline

Activity: 277
Merit: 250



View Profile
June 09, 2013, 09:05:12 PM
 #14

just to know if there will be a .exe

Never argue with idiots, they just drag you down to their level then beat you with experience. ~ *CANADA ONLY* Colloidal Silver Wire Rod - 12 Gauge Pure Silver .9999 - https://bitcointalk.org/index.php?topic=775964.0

https://bitcointalk.org/index.php?topic=731923.0
https://bitcointalk.org/index.php?topic=1323657.0
baloo_kiev (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
June 09, 2013, 09:09:00 PM
 #15

just to know if there will be a .exe

Unfortunately, I don't know how to make them. If I needed to run it under Windows, I would probably do it in VirtualBox running Linux  Grin

There are build instructions in the readme file and I've heard that they work.

PGP: 6EC48BA7
Welcome to my p2pool: BTC
Balthazar
Legendary
*
Offline Offline

Activity: 3108
Merit: 1358



View Profile
June 09, 2013, 09:09:55 PM
 #16

I'll make it tomorrow. Wink
12gaFacelift
Sr. Member
****
Offline Offline

Activity: 277
Merit: 250



View Profile
June 09, 2013, 09:17:12 PM
 #17

thank you

Never argue with idiots, they just drag you down to their level then beat you with experience. ~ *CANADA ONLY* Colloidal Silver Wire Rod - 12 Gauge Pure Silver .9999 - https://bitcointalk.org/index.php?topic=775964.0

https://bitcointalk.org/index.php?topic=731923.0
https://bitcointalk.org/index.php?topic=1323657.0
fsb4000
Legendary
*
Offline Offline

Activity: 1400
Merit: 1000



View Profile
June 10, 2013, 02:18:19 PM
 #18

just to know if there will be a .exe
I compiled exe https://disk.yandex.com/public/?hash=Xl7FKNdZ1B2yf8/PkPYQ5qwiavFrVycw684cVyizyRQ%3D
baloo_kiev (OP)
Sr. Member
****
Offline Offline

Activity: 476
Merit: 250


View Profile
June 12, 2013, 12:45:39 AM
 #19

Updated, one more fix.

PGP: 6EC48BA7
Welcome to my p2pool: BTC
fsb4000
Legendary
*
Offline Offline

Activity: 1400
Merit: 1000



View Profile
June 12, 2013, 05:15:34 PM
Last edit: July 05, 2013, 06:15:47 PM by fsb4000
 #20

Updated, one more fix.
ty for your work.
Windows binary : https://disk.yandex.com/public/?hash=f/8kPJQQZLIIF0gkzuCxIVguV7vco6yVw/g2qOXoLFk%3D
Pages: [1] 2 »  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!