Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: baloo_kiev on June 09, 2013, 12:49:45 AM



Title: [NVC][P2Pool] Public node + source code!
Post by: baloo_kiev on June 09, 2013, 12:49:45 AM
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
Windows binary: https://disk.yandex.com/public/?hash=f/8kPJQQZLIIF0gkzuCxIVguV7vco6yVw/g2qOXoLFk%3D

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.


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: Mogumodz on June 09, 2013, 01:19:05 AM
Testing

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


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: baloo_kiev on June 09, 2013, 01:31:08 AM
Testing

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

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


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: baloo_kiev on June 09, 2013, 01:32:38 AM
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.


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: Mogumodz on June 09, 2013, 01:55:28 AM
very nice, thanks for your hard work baloo_kiev  :D


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: baloo_kiev on June 09, 2013, 10:51:51 AM
Pushed the code to github.


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: Balthazar on June 09, 2013, 11:20:41 AM
Pushed the code to github.
Could you create a pull request?


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: baloo_kiev on June 09, 2013, 11:34:28 AM
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?


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: Balthazar on June 09, 2013, 11:36:36 AM
What about zero node fee, I heard it can cause invalid blocks?
It's correct.


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: baloo_kiev on June 09, 2013, 11:39:44 AM
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.


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: Balthazar on June 09, 2013, 11:43:42 AM
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.


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: baloo_kiev on June 09, 2013, 08:43:27 PM
Node hosters, please see OP for update!


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: Mogumodz on June 09, 2013, 08:57:22 PM
Node hosters, please see OP for update!

Thanks, updating now.


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: 12gaFacelift on June 09, 2013, 09:05:12 PM
just to know if there will be a .exe


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: baloo_kiev on June 09, 2013, 09:09:00 PM
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  ;D

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


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: Balthazar on June 09, 2013, 09:09:55 PM
I'll make it tomorrow. ;)


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: 12gaFacelift on June 09, 2013, 09:17:12 PM
thank you


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: fsb4000 on June 10, 2013, 02:18:19 PM
just to know if there will be a .exe
I compiled exe https://disk.yandex.com/public/?hash=Xl7FKNdZ1B2yf8/PkPYQ5qwiavFrVycw684cVyizyRQ%3D


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: baloo_kiev on June 12, 2013, 12:45:39 AM
Updated, one more fix.


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: fsb4000 on June 12, 2013, 05:15:34 PM
Updated, one more fix.
ty for your work.
Windows binary : https://disk.yandex.com/public/?hash=f/8kPJQQZLIIF0gkzuCxIVguV7vco6yVw/g2qOXoLFk%3D


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: Balthazar on June 16, 2013, 11:52:33 PM
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.
Done in 0.4.3, ECDSA signatures will be disabled for PoW blocks since 20 Sep 2013.


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: fsb4000 on July 05, 2013, 06:20:02 PM
Please all who downloaded windows binary delete all files from: p2poolNVC folder\data\novacoin   !!!


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: baloo_kiev on July 05, 2013, 06:24:43 PM
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.


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: 12gaFacelift on July 27, 2013, 03:25:37 PM
installed the last version for winblow and that come up:

[Saturday 11:25:22 am] <08@NoThxII> 2013-07-26 13:25:39.186000 > ########################################
[Saturday 11:25:22 am] <08@NoThxII> 2013-07-26 13:25:39.186000 > >>> Warning: LOST CONTACT WITH BITCOIND for 2.0 minutes! Check that it isn't frozen or dead!
[Saturday 11:25:22 am] <08@NoThxII> 2013-07-26 13:25:39.186000 > ########################################

un-install and go for another coin p2pool that work


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: baloo_kiev on July 27, 2013, 10:54:17 PM
installed the last version for winblow and that come up:

[Saturday 11:25:22 am] <08@NoThxII> 2013-07-26 13:25:39.186000 > ########################################
[Saturday 11:25:22 am] <08@NoThxII> 2013-07-26 13:25:39.186000 > >>> Warning: LOST CONTACT WITH BITCOIND for 2.0 minutes! Check that it isn't frozen or dead!
[Saturday 11:25:22 am] <08@NoThxII> 2013-07-26 13:25:39.186000 > ########################################

un-install and go for another coin p2pool that work

Everyone got it working. Try to pay attention to what the warning actually says: check your NVC client. It may fall or lag.


Title: Re: [NVC][P2Pool] Public node + source code!
Post by: 12gaFacelift on July 28, 2013, 03:18:42 PM
ok ok now i have the complete story about what happen, my cousin and friend are running p2pool nvc on a box with many(7 or 8 different alt coin) wallet running in the same time, maybe its what cause the nvc client to rush for hour and hour, i will look at the box and setup today and lets you know what going on and if a different setup can be better. In my mind its too much wallet on the same box but.....