Pages:
Author

Topic: [XPM] [ANN] Primecoin Pool Software (Read 5182 times)

hero member
Activity: 637
Merit: 500
January 22, 2014, 06:07:25 AM
#29
Hi all,
I finally went with Java and almost finished a getwork pool proxy that I'll re-use to implement getblocktemplate and a first draft of a stratum-like protocol.
The proxy currently act as a blank pool on top of primecoind daemon, so no reward scheme implemented at all. Therefore all "workers" point to the proxy server address:port and payments are madeto XPM address given at a JSON payment config file.
It will be possible to configure many addresses with percentage of reward associated. Default is equivalent reward for all addresses.
I currently polish/refactor proxy server and look into stratum code to "fork" it. Reward system will come next, but probably not released with proxy server which I intent to keep simple as stratum-server is.

Sorry for being a necromancer with this thread but I was looking for some open source primecoin pool software and can't find any.
Did you ever release anything ? If not does anyone know where can I find it ?
hero member
Activity: 532
Merit: 500
August 19, 2013, 06:32:14 PM
#28
The big problem for making pool is shares check....
Example: If you mine 9-er chain and submit 6-er chains as share you'll get about 20 6-er chains in a hour.
Exactly! A miner properly optimized for short chains (to get the best possible reward from pool) would have low performance on 9+ chains. Sort of withholding attack from pool's point of view.
Looks like someone was stupid enough to make one of these... Ypool has come out with new share rewards:

6-chains are now worth .000976
7-chains are now worth .03125
8-chains are now worth 1
9-chains are now worth 32
10-chains are now worth 1024

God you gotta love fools and their stupidity and greed.  Ya just F'd yourselves.
sr. member
Activity: 248
Merit: 251
August 14, 2013, 02:38:57 AM
#27

You cant give 100% reward to someone, that would mean the others won't get anything.
Or I didn't get from what you are taking your 100% ...

What I meant by 100% reward is share value of an exactly diff matching submitted chain.

Still don't get it sorry, but may be it's because you are referring to your way of calculation.

Anyway, the reward should try to match a % of the chain/day that the miner have, if this indicator is proven to be reliable.
But since chain/day cannot be used as a prof of work, you will have to finely tune the repartition of the shares.
chain/day is probably a deterministic model, the  I could look at Sunny code and implement it on pool side I think. But as it's not accurate, does it worth it ?

I don't think so, but it can be used to see if the reward system is fair for small miners.

if we allocate different value for each length, we should take :
S(L) = percentage of share allocated at length L.
C(L) = number of chain of length L found by all the pool miners.
M = block value in XPM

If a miner found F chain of length L he will gain for this length :
G(L) = M*F(L)*S(L)/C(L)
Your model is nice, but it's still discrete; to be reliable, share value need to be continuous as proof of work and diff are in primecoin network. That was my previous point.

No the difficulty been continuous is because we need it to be like that so it can be increased/decreased continuously.
But it's merely an artefact that work by accepting only a % of the chains at right length.
But the effort to calculate it is the same so it should be rewarded the same.

.../
But S is also function of total chains accepted during a round. If we call R the network block reward and Ci, each of these chains therefore we have to calculate S such as sum of all Ci weighted by internal reward percentage equal R.
/...

In my formula M is the network block reward and is equal to the sum of all weighted shares, by design.

As a side note, I would like to emphasis that in a fair-play situation, you should reward more the lower chain length (globally), so that small miners are taken into account.
Big miner won't be harmed, because they also mine a proportionally high number of smaller chain too.

May be I should write it this way :

G(L) = M*S(L) * F(L)/C(L)

With M*S(L) being the allocated XPM for length L,
and F(L)/C(L) being the ratio the miner got for length L.
newbie
Activity: 47
Merit: 0
August 13, 2013, 09:53:02 PM
#26

You cant give 100% reward to someone, that would mean the others won't get anything.
Or I didn't get from what you are taking your 100% ...

What I meant by 100% reward is share value of an exactly diff matching submitted chain.

Anyway, the reward should try to match a % of the chain/day that the miner have, if this indicator is proven to be reliable.
But since chain/day cannot be used as a prof of work, you will have to finely tune the repartition of the shares.
chain/day is probably a deterministic model, the  I could look at Sunny code and implement it on pool side I think. But as it's not accurate, does it worth it ?

if we allocate different value for each length, we should take :
S(L) = percentage of share allocated at length L.
C(L) = number of chain of length L found by all the pool miners.
M = block value in XPM

If a miner found F chain of length L he will gain for this length :
G(L) = M*F(L)*S(L)/C(L)
Your model is nice, but it's still discrete; to be reliable, share value need to be continuous as proof of work and diff are in primecoin network. That was my previous point. I give an example

Given a difficulty d
Let's call M(d) the value of a submitted share at difficulty d
Let's also call Dc the current diff and S the share value of a Dc-lenght chain

M(Dc)=S

In my previous post I stated M(Dc)=S as my reference share for all the other chain submitted. The share that worth 100%, and then calibrate reward system (M(d)) on this 100%-share with an exponential function. Let's call c the calibrated exponential function such as c(Dc)=1.

We therefore have M(Dc)= S . 1 = S . (c(Dc))

For example saying we accept share of [Dc-3] if we found S to be worth 2,5 XPM at diff 9.75 and choose a calibration of 1% for a 6.75-chain, 10% for 7.75-chain, 50% for a 8.75-chain, we have:

M(Dc=9.75) = 2,5  
M(8.75)      = 2.5 * 50%
M(7.75)      = 2.5 * 10%
M(6.75)      = 2.5 * 1%

That was my point.

But S is also function of total chains accepted during a round. If we call R the network block reward and Ci, each of these chains therefore we have to calculate S such as sum of all Ci weighted by internal reward percentage equal R.

That was my first idea of a more realistic reward for XPM pool. But I still think that others could bring something better  Grin


newbie
Activity: 47
Merit: 0
August 13, 2013, 08:36:50 PM
#25
Hi all,
I finally went with Java and almost finished a getwork pool proxy that I'll re-use to implement getblocktemplate and a first draft of a stratum-like protocol.
The proxy currently act as a blank pool on top of primecoind daemon, so no reward scheme implemented at all. Therefore all "workers" point to the proxy server address:port and payments are madeto XPM address given at a JSON payment config file.
It will be possible to configure many addresses with percentage of reward associated. Default is equivalent reward for all addresses.
I currently polish/refactor proxy server and look into stratum code to "fork" it. Reward system will come next, but probably not released with proxy server which I intent to keep simple as stratum-server is.
 
hero member
Activity: 524
Merit: 500
August 13, 2013, 06:29:48 PM
#24
The big problem for making pool is shares check....
Example: If you mine 9-er chain and submit 6-er chains as share you'll get about 20 6-er chains in a hour.
Exactly! A miner properly optimized for short chains (to get the best possible reward from pool) would have low performance on 9+ chains. Sort of withholding attack from pool's point of view.
Optimizing a miner to search only short chains is kinda dumb.  Let's say ALL the miners adopt it... suddenly no blocks are found and no one makes anything.  Face it, why are 5-chains no longer accepted?  Flooding the pool with 6 chains will give you a short term increase in XPM followed by either a lockout of 6 chains or a loss of the big dogs finding blocks who get disgusted funding all the small timers who will never find a block stealing all the XPM.  The end result of both options is  a subsequent decrease in XPM.  Greed is always it's own reward.
Private short chain miner running on pool will increase mining profit at expense of other pool users.
Short chain miner released to the public will damage or kill pools, at least they will be forced to increase commission.
Right now scaring casual CPU miners off the pools will lead to more hashpower for other CPU-only coins.
Overall decrease of primecoin hashpower will lead to more profit for solominers. And the block reward for primecoin increases when difficulty decreases.
I see eldentyrell's trick of using signcrypton as the best way to run primecoin pool.

EDIT: link to tricone mining thread
https://bitcointalksearch.org/topic/algorithmically-placed-fpga-miner-255mhschip-supports-all-known-boards-49971
hero member
Activity: 532
Merit: 500
August 13, 2013, 05:37:36 PM
#23
The big problem for making pool is shares check....
Example: If you mine 9-er chain and submit 6-er chains as share you'll get about 20 6-er chains in a hour.
Exactly! A miner properly optimized for short chains (to get the best possible reward from pool) would have low performance on 9+ chains. Sort of withholding attack from pool's point of view.
Optimizing a miner to search only short chains is kinda dumb.  Let's say ALL the miners adopt it... suddenly no blocks are found and no one makes anything.  Face it, why are 5-chains no longer accepted?  Flooding the pool with 6 chains will give you a short term increase in XPM followed by either a lockout of 6 chains or a loss of the big dogs finding blocks who get disgusted funding all the small timers who will never find a block stealing all the XPM.  The end result of both options is  a subsequent decrease in XPM.  Greed is always it's own reward.
sr. member
Activity: 248
Merit: 251
August 13, 2013, 04:37:04 PM
#22
The big problem for making pool is shares check....
Example: If you mine 9-er chain and submit 6-er chains as share you'll get about 20 6-er chains in a hour.
Exactly! A miner properly optimized for short chains (to get the best possible reward from pool) would have low performance on 9+ chains. Sort of withholding attack from pool's point of view.

Well you can check if someone is getting a fast paced flow of 6-er chains and nothing else, then the pool put his share on old, until either the luck is coming back, or he is proved to be unfaithful.
hero member
Activity: 524
Merit: 500
August 13, 2013, 06:57:03 AM
#21
The big problem for making pool is shares check....
Example: If you mine 9-er chain and submit 6-er chains as share you'll get about 20 6-er chains in a hour.
Exactly! A miner properly optimized for short chains (to get the best possible reward from pool) would have low performance on 9+ chains. Sort of withholding attack from pool's point of view.
member
Activity: 60
Merit: 10
August 13, 2013, 04:49:45 AM
#20
The big problem for making pool is shares check....

Example: If you mine 9-er chain and submit 6-er chains as share you'll get about 20 6-er chains in a hour.

If i use same block data and replace in miner to search for 6-er chains you'll find 200-300 6-er chains in a hour Smiley

why ? well sieve is working like this ... it tryes sieve out all numbers that definitly don't make 9-er chain, this means if it makes 6-er chain but next number in chain is devided by any prime of primes in the sieve-check it will don't ever bother with check this chain, so no share.

The pool should tell client exactly where to search... like this ...
search with hash XXXX, with primorial multiplier YY, in the range of multipliers [NNN-MMM](bounds for min and max of Sieve) with exactly check of min (2.....XXXX) primes.

The checking of share is problem .... you have to check would be this chain sieved out, if it's so - this share is illegal.
so this means
you have to factorize all next Numbers from the share chain ( numbers if it would be 7-er, 8-er,9-er chain), and check they dividable by primes from [2....XXXX]. It isn't trivial and means really a lot of work for pool software ... I have no idea how make it better atm, probably take 7-er, 8-er chains as share ...

I hope i've made myself understandable, my english isn't that good.

P.S. i think this is the one of the causes that Ypool doesn't work good for really miners.
sr. member
Activity: 252
Merit: 250
August 13, 2013, 03:59:05 AM
#19
yea but it ridicules at what one gets i have found 5 blocks in 3 days and only have 12 primecoins 
sr. member
Activity: 248
Merit: 251
August 08, 2013, 10:01:50 PM
#18
.../
On reward side, after discussions with mtrlt and mikaelh_ on IRC, I decided go with and exponential-based scheme with diff-3+1 (the +1 part is like a modulo and bonus parameter). As we have to deal with the integer nature of primecoin chains and the exponential diff adjustments, diff based reward needs to be differently calibrated.

For example at current difficulty (9.5) submitting 6-chain would give you 1% reward while submitting a 10-or-more-chain will give you more than 100% because 100% reward will be target to match the actual decimal number of diff and therefore the more we get closer to diff 10.0 the less your 9-chain worth.
/....

You cant give 100% reward to someone, that would mean the others won't get anything.
Or I didn't get from what you are taking your 100% ...

Anyway, the reward should try to match a % of the chain/day that the miner have, if this indicator is proven to be reliable.
But since chain/day cannot be used as a prof of work, you will have to finely tune the repartition of the shares.
if we allocate different value for each length, we should take :
S(L) = percentage of share allocated at length L.
C(L) = number of chain of length L found by all the pool miners.
M = block value in XPM

If a miner found F chain of length L he will gain for this length :
G(L) = M*F(L)*S(L)/C(L)

For example :

S(9) = 10%
S(8) = 20%
S(7) = 70%

C(9) = 4 chain of length 9 found buy all miners
C(8) = 160
C(7) = 4000

M = 10 XPM

If a miner found 1 chain of length 9 he will gain for this length :
G(9) = 10*1*0.10/4 = 0.25 XPM

40 chain of 8 :
G(8) = 10*40*0.20/160 = 0.50 XPM

1000 of 7 :
G(7) = 10*1000*0.70/4000 = 1.75 XPM

Total : 2.5 XPM

sr. member
Activity: 420
Merit: 250
August 08, 2013, 05:55:29 PM
#17
Primecoin is desperate for pools. Competition is a must.

Competition keeps pool owners honest and prevents 51% attacks.

I'm here as a guinea pig if you need one.  Wink
hero member
Activity: 812
Merit: 1000
August 08, 2013, 05:47:05 PM
#16
Nice man, I'll keep an eye on your progress...ypool doesn't seem fair at all, really shady pool.
newbie
Activity: 47
Merit: 0
August 08, 2013, 04:17:07 PM
#15
First report

As I said before, I looked around bitcoin scheme and it's pretty impressive. Satoshi, what a man!
I got only part of internal math and yes working in investment bank get you dumb. But now I'm focusing only on what is needed to write a pool, and yes I'll write something from scratch first for official client and with some compatibility with mikaehl's HP miner. It's hard to say now how long this work will take but I should know this by the end of the week.

Nice initiative.

Yes Ypool use 6-chain or more as shares, and each length have a different share value I guess.
I don't know how it is balanced.

Something like P2Pool might be hard to do on Primecoin (https://en.bitcoin.it/wiki/P2Pool)

Since you want multiple client/server, we will have to write a protocol first !

I guess you submit the client with some already made block hash, so that he can't go solo mining if he found a block.
Then the client return the different chain he found.
Client can ask for another batch of block to test.

I guess the problem is high load on the server (from hash generation, and chain checking)
Chain check can be done by other client though.


Yeah! Basically this is what the pool server will do. I'll go with java or scala since it's easier to scale with (both scale-in and scale-out is achievable with standard methods).
Concerning protocol stuff, i'm currently looking into ypool x.pushthrough, but mine will first be getwork-based as it's much easier to comprehend.

Many people asked for a stratum fork protocol. I'll definitely get a look at this, but an optimized bandwith protocol is clearly not my first goal. Maybe after

On reward side, after discussions with mtrlt and mikaelh_ on IRC, I decided go with and exponential-based scheme with diff-3+1 (the +1 part is like a modulo and bonus parameter). As we have to deal with the integer nature of primecoin chains and the exponential diff adjustments, diff based reward needs to be differently calibrated.

For example at current difficulty (9.5) submitting 6-chain would give you 1% reward while submitting a 10-or-more-chain will give you more than 100% because 100% reward will be target to match the actual decimal number of diff and therefore the more we get closer to diff 10.0 the less your 9-chain worth.

I think it's a fair valuation method. I have to do some maths and benchmarks to calibrate this model but I think it should work.

I'll start to write code tomorrow, once I set all my coding stuff
hero member
Activity: 812
Merit: 1000
August 07, 2013, 01:07:09 PM
#14
Thanks, I have my stuff, need to install win again and I'll post back with results.

Looking forward to new pool soft, I'd gladly donate.
legendary
Activity: 1239
Merit: 1020
No surrender, no retreat, no regret.
August 07, 2013, 12:20:54 PM
#13
I'll keep an eye on this thread...I feel ypool is scamming people with it's strange mechanics.

I have 3 machines of about the same performance mining XPM. I have pointed one at Ypool and left two mining solo. 3 days passed, solo miners have found one block each (difficulty ~9, that's ~11 XPM per block). The 3rd machine at Ypool has only made ~2 XPM. Either they're very inefficient or you guess what.

Yeah, I'll solo mine once I install my i7 3820+x79-ud3.
What wallet? hp9?

HP7 and HP8, now HP9.
hero member
Activity: 812
Merit: 1000
August 07, 2013, 10:30:17 AM
#12
I'll keep an eye on this thread...I feel ypool is scamming people with it's strange mechanics.

I have 3 machines of about the same performance mining XPM. I have pointed one at Ypool and left two mining solo. 3 days passed, solo miners have found one block each (difficulty ~9, that's ~11 XPM per block). The 3rd machine at Ypool has only made ~2 XPM. Either they're very inefficient or you guess what.

Yeah, I'll solo mine once I install my i7 3820+x79-ud3.
What wallet? hp9?
legendary
Activity: 1239
Merit: 1020
No surrender, no retreat, no regret.
August 07, 2013, 08:22:37 AM
#11
I'll keep an eye on this thread...I feel ypool is scamming people with it's strange mechanics.

I have 3 machines of about the same performance mining XPM. I have pointed one at Ypool and left two mining solo. 3 days passed, solo miners have found one block each (difficulty ~9, that's ~11 XPM per block). The 3rd machine at Ypool has only made ~2 XPM. Either they're very inefficient or you guess what.
full member
Activity: 200
Merit: 100
August 07, 2013, 08:08:55 AM
#10
I'll keep an eye on this thread...I feel ypool is scamming people with it's strange mechanics.

+100500
We need a new pool for the Prime's
difficulty 6 is unfair! And incomprehensible system of charges of coins!
We look forward to NORMAL pool!
Pages:
Jump to: