Bitcoin Forum
May 06, 2024, 01:17:12 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
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] 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 ... 166 »
741  Bitcoin / Pools / Re: Double geometric method: Hopping-proof, low-variance reward system on: May 03, 2013, 05:47:02 AM
The method is as follows:
3. When a share is found, increase by p*s*B the score of the participant who found it.

b. Logarithmic scale
3. When a share is found, let lS = ls + log(exp(lS-ls) + pB) for the participant who found it.

For readability the first formula matches up to lS = log( exp(lS) + exp(ls) * pB ) but I assume you are doing it your way to have one less exp() call per calculation and/or to avoid huge/tiny numbers? My math skills are failing me to be sure both expressions are identical.
It's to make it numerically robust and avoid overflow. Both lS and ls eventually get so large that exp(lS) and exp(ls) cause overflow. But their difference lS-ls always manageable.

That's why we're using logarithmic scale in the first place, if you could handle exp(lS) directly you could simply work directly with S as in the original formulation.

Edit: I understand setting lS = -Inf for new miners if you are setting them up in your score table in advance. But if you aren't going to add them until they request their first block to work on, it is equivalent to change ls + log(exp(lS-ls) + pB) to ls + log(pB), right? Since exp(lS-ls) will be 0 for an unknown miner, with lS=-Inf.
Right.
742  Bitcoin / Pools / Re: Optimal pool abuse strategy. Proofs and countermeasures on: May 01, 2013, 03:00:21 PM
It's not an error, though tricky and somewhat unclear.

He is assuming that \xi is constant while n and D are variable. For \xi=2, for example, he is considering a case that the hashes calculated are twice the average needed; he then considers what happens when D, and correspondingly n, go to infinity (continuous case). In this case the chance of not finding a block is indeed exp(-2).
So, is there an implicit assumption that n and D are linearly related?

You see, I have no problem with the observation that finding a block has a Poisson distribution. But the "proof" provided as it stands is simply wrong, unless D is a function of n,  and \xi is the limit of their ration when n tends to infinity.
The assumption is explicit = \xi is defined as n / (2^32 D), meaning that D = n / (2^32 \xi).

And yes, in this calculation n and D both go to infinity at a specified ratio \xi. The assumption that \xi is fixed was not explicitly written but it follows from context.

D doesn't have to "go to" infinity in real life for the calculation to show that if D is sufficiently large, then for any n the probability of not finding a block is roughly exp ( - n / (2^32 D)).
743  Bitcoin / Pools / Re: Optimal pool abuse strategy. Proofs and countermeasures on: May 01, 2013, 06:49:29 AM
I have written a description of the optimal pool abuse strategy (for a single pool) with proofs and calculations. Available here:
http://bitcoin.atspace.com/poolcheating.pdf

Raulo, you have a mathematical error on page 1, in equation (4).

Your \xi depends on n. Consequently, you cannot pass to limit only in part of the expression.

The expression q:=1- (1/2^32* D)  is a real number < 1. Consequently, Q(n)=q^n -->0 as n --> \infty.

This makes perfect sense, because the probability that you will "almost surely" (in the sense of probability theory) find a block if you wait long enough (infinitely long).
It's not an error, though tricky and somewhat unclear.

He is assuming that \xi is constant while n and D are variable. For \xi=2, for example, he is considering a case that the hashes calculated are twice the average needed; he then considers what happens when D, and correspondingly n, go to infinity (continuous case). In this case the chance of not finding a block is indeed exp(-2).
744  Bitcoin / Bitcoin Discussion / Re: Wallet Hack on 4/25 on: April 29, 2013, 07:30:50 AM
Here is an example of my logins for banks and Mt. Gox:

Username: kl2uggsyf3yue9g4e2
Password: t#nocq2*l4c*b1yibxf%tazzh0^$)^ft0
Were you a victim of this? Are you providing evidence that this was not brute-force, or simply explaining how to properly choose passwords?
745  Bitcoin / Bitcoin Discussion / Re: Wallet Hack on 4/25 on: April 28, 2013, 01:51:17 PM
Update - after speaking some more with my affected customer I am no longer convinced his password was indeed strong enough.

Maybe passwords were brute-forced after all? silvereagle - just how strong was your password?

Will be happy to hear about any progress in figuring this out.
746  Economy / Service Discussion / Re: Meni Rosenfeld's vanity thread on: April 28, 2013, 08:18:49 AM
I, for one, am glad you made this point and found it quite interesting. As it turns out, my Masters thesis in Computer Science was also somewhat related to machine learning (summary, I used a naive Bayes classifier and some other tools to increase the click-through rate of ads on a web site). I suspect yours was far heavier on the math, though. Wink (My Bachelors's was also in C.S. with a minor in mathematics, but that feels so long ago.) I left the computer industry in 2001-2002 after the dot com implosion, but my hobbyist interest remains, likely for life.

I'm thankful for your contributions to the community and to mining pool compensation analysis.
Thank you, and you're welcome.

If you have some spare time, you don't have to speculate about the contents of my thesis - it's available at https://bitcoil.co.il/files/Thesis-Meni-f2.pdf.
747  Bitcoin / Pools / Re: Double geometric method: Hopping-proof, low-variance reward system on: April 28, 2013, 08:17:33 AM
Edit: Just occurred to me. Is the expected payout for next block given above if the miner stopped mining? So on average, D shares from now the payout to the miner would of course be much lower than the numbers I'm seeing (since the miner in my data sample kept mining away).
Yes, I should have clarified that, sorry.

If you want to assume he keeps mining, there are two factors to consider - his current score and his future proportion of the pool's hashrate. Taking them both into account requires some calculations. It's easier to just show what his reward will be if a block is found right now.
748  Bitcoin / Pools / Re: Double geometric method: Hopping-proof, low-variance reward system on: April 27, 2013, 07:50:55 PM
It's even simpler than that - you don't need to set S=S/o. The score will remain in its reduced state and only the actual payment will be cancelled, and if you pay in the coinbase this happens naturally when the block is orphaned.

What I'm struggling with getting my mind around is that work done before the orphan are at S*o and work done after the orphan is at S. When the orphan goes away and the payment is cancelled, aren't shares after the orphan worth more than the shares before it improperly? (If the orphan never happened and scores were never updated, then all work since last block (before or after the orphan that never happened) are all at S.)

I'm hoping you are indeed correct, since being able to ignore the score changes from the orphan event would be so easy. And you are normally correct. Wink
Shares submitted after the orphan will be worth more than those submitted before, and this is proper.

The orphan did happen and this is information that needs to be taken into account. The orphan blocks are not in addition to the valid blocks - they are instead, some of the blocks which should have been valid end up orphans instead. The correct comparison is not orphan vs. no block, but rather orphan vs. valid block.

When a block is found, all past shares have a chance to get a payday if it ends up valid. The cost of this chance at payment is the score reduction - even if, contingently, it ends up an orphan. Later shares never had a chance to profit from the block, and thus don't get their scores reduced for it.

This is similar to the situation with shares in general in a pool - when you submit a share, you are rewarded even if the particular share was of no use, because in finding a share you had a chance to benefit the pool - and you get an expected reward equal to your expected contribution.

Dust is an issue for everyone eventually I think (if I'm understanding correctly) since there's no 0-1 cutoff. We are going down by S=S*o every payout the scores for a miner who stops mining will approach zero but never actually get there, they will just have ever decreasing scores. (Eventually so low it's just dust, forever?)
Right. In practice you could trim scores which are below a very low threshold.

a. Periodic rescaling: The only thing that matters is the values of the scores relative to the variable s. Thus, if the values grow to large, all that is needed is to rescale them. This means dividing the scores of all participants by s, and then setting s=1. This should be done once in a while, the exact times do not matter (it can even be done for every share).

I was going to use logs so I didn't need to rescale, but it occurred to me that if I rescale every share I don't need to store s. Since s=s*r and s is always 1 going into the share, s is now always r. Thus, the payout becomes (S(r-1)(1-f))/(pr).

I guess the question is, do I really want to divide every score by r every share (updating hundreds of rows if there are hundreds of workers) vs storing s and using logs. It'd seem logs would be less impact to the database.
It seems you are suggesting that rescaling on every share is easier than rescaling once in a while, I don't see why.
I do recommend logs, they're less intuitive but more robust and probably less resource intensive.

Edit: Final question for now. Is there a formula to calculate the total expected future payouts for a miner if they stop mining? That is, given the current state of things like s, r, p, B, and their score, can you approximate "if you stop mining right now the sum of all of your future payments is expected to be X". Basically, the value of their capacitor discharging from the current state down to zero. I think miners might find that useful (in addition to expected payout on next block from S/s), so they have a sort of idea of the long-term trailing reward that offsets the slow startup as the capacitor charged.
S/s is not the expected payout from the next block. S/s (or more accurately (1-f)*(1-c)*S/s, accounting for fees) is what you asked about just now - the expected total eventual payout for already submitted shares.

The expected payout for the next block is S/s * (1 - c/(1-o+co)) * (1-f).
749  Bitcoin / Bitcoin Discussion / Re: Bitcoin Hack at 6:22pm EST on: April 26, 2013, 02:28:52 PM
I have a customer who is a victim of this particular theft.

Here are his answers to piuk's questions.

Quote
Do you have a bitcoin app on your android phone? No
Do you have a blockchain.info wallet holding the address in question? Yes
If you have a blockchain wallet do you use a public alias the same as your bitcointalk, bitcoin-otc or irc username? No
Do you have accounts on one of the following sites: BTC-e, bitcoin-central or mining.bitcoin.cz? No
Do you reuse the same wallet password on different websites (specifically the above sites)? No
Do you read the BTC-e chat box? No
Does your browser have Java enabled? http://isjavaenabled.com - I have JAVA but I manually choose each time whether to run it

He insists that he is keeping a secure environment and that neither his computer nor strong password were compromised.

Any leads on what could have caused this? Or who the thief is?

Will reimbursing affected users be considered?
750  Bitcoin / Pools / Re: Double geometric method: Hopping-proof, low-variance reward system on: April 26, 2013, 09:01:48 AM
For miners that have a very small payout due, it's best to not pay them at this time and rather let their payout grow higher first. Otherwise they collect too much "dust" and when they try to go spend those coins, the transfer fees eat it all up (or cost more than the inputs, making the dust useless). Is handling this as easy as skipping their payment and leaving their score alone?
Leaving the score alone won't work.

You could add to the worker's score in a way that compensates for the lost payment, but that is more complicated. It is simpler to keep a record for each miner of the total deferred payment, and when it is high enough make the physical payment via a normal transaction. Deferred payments will be kept in a designated address in your control.

If you are paying miners in the coinbase of the block found, you can't wait for confirmation of the block to adjust their scores (or you might pay them multiple times if you find multiple blocks in a row). In a *PPS system you mark the found block as a "payout" for the relevant shares, and if that block later becomes an orphan you mark those share back to unpaid. Piece of cake, conceptually. In DGM, is the way to handle this to go through everyone paid in that block and set S=S/o? The payout in effect never happened, and the only change in database before was S=S*o. Seems simple, but wanted to know if you agreed.
It's even simpler than that - you don't need to set S=S/o. The score will remain in its reduced state and only the actual payment will be cancelled, and if you pay in the coinbase this happens naturally when the block is orphaned.

I can see why it is intuitive to treat orphaned block as if they never happened - thus cancelling S=S*o - but the method invariant is based on the assumption that a share has a probability of d/D to be a block. If orphans exist this is no longer the case, shares actually have a lower chance of becoming a valid block. If orphans are ignored completely, the operator will pay out more than he should (the block rewards he actually receives are lower than the method assumes). I've done the math and if you simply cancel the payment specified for the orphan blocks, everything is just right. This assumes, however, that every block, once received by the pool, has the same chance to become an orphan.

A tricky part is how to combine this with the dust payments mentioned earlier. You can no longer rely on the network to cancel the orphan payments - you'll need to actually remember for each worker the reward per specific block, and if a block becomes an orphan remove that record yourself.
751  Bitcoin / Pools / Re: Double geometric method: Hopping-proof, low-variance reward system on: April 25, 2013, 08:12:32 PM
In other news, I've thought of a new framework which includes as special cases double geometric, 0-1 and linear PPLNS, and their extension to operator variance. Some parts of this I've known for months, others for weeks and a key part I've just thought about. I think in particular the extension of linear PPLNS will give the ultimate variance tradeoff (though it's not pure score-based). I'm so excited... And yet I really need to work on Bitcoil now. So much to do, so little time...
Did you ever write this up someplace? Smiley
Yeah, it's discussed in AoBPMRS.

Correct. But it wasn't a misunderstanding on your part either - if f<0 the operator can indeed pay out of his own pocket.

You can choose f=0 to avoid having to pay out of pocket, but it limits your options for reducing variance and maturity for miners. You could use something like f=0, c=0.01, o=0.99, it turns out similar to PPLNS. in core parameters.

So instead of a PPLNS pool with a fixed 3% (f=.03) fee, one could run DGM with f=0, c=.03, o=.97 to have a similar pool with average fee to operator of 3%, but less variance for the miners because the operator is taking on that variance.
Yes.

I didn't see it explicit in the OP, but does o need to equal 1-c?
It doesn't need to be but that generally gives a reasonable tradeoff between variance and maturity time. X in PPLNS is in some ways analogous to approximately c/(1-o).

I skimmed back over the thread, I thought I saw this discussed before but missed it just now if so, but if you are adjusting the parameters per-miner are there any specific constraints that must be observed? I'm specifically thinking of pools where the fee is based on the difficulty you are mining at. So as the user selectable difficulty rises, the pool's fee for that miner goes down. I wasn't sure if multiple miners all with f=0 but a variable c (and o=1-c?) would pose a problem.
It wasn't designed to work with variable c; I think we could make it happen if we change the way some things are parameterized, but it's easier to vary f (make it 0 for the high-difficulty-share miners, and slightly higher for the low-difficulty shares).
752  Bitcoin / Pools / Re: Double geometric method: Hopping-proof, low-variance reward system on: April 25, 2013, 04:28:40 PM
Or, if the total is higher than the block reward (only possible if f<0), the operator pays the difference out of his own funds.

In any case where f>=0, the operator will not be paying out of his own funds, is that accurate? I think I was misunderstanding "operator variance" as meaning the operator may be paying money out of his own funds like PPS in long rounds. Which I'm not willing to do. However, if it is simply variance in how much the operator earns without ever going negative, that's a totally different situation. Smiley I wouldn't mind my earnings (as an operator) going all over the place as long as the pool cannot ever go bankrupt in terms of payouts to miners like PPS.
Correct. But it wasn't a misunderstanding on your part either - if f<0 the operator can indeed pay out of his own pocket.

You can choose f=0 to avoid having to pay out of pocket, but it limits your options for reducing variance and maturity for miners. You could use something like f=0, c=0.01, o=0.99, it turns out similar to PPLNS. in core parameters.
753  Bitcoin / Pools / Re: PPLNS on: April 25, 2013, 03:52:31 PM
PPLNS is "supposed to be" a method where there is no operator risk, he just pays out the rewards for each block in some way. However, for the method (or any other method) to be hopping-proof even when the block reward changes, this is no longer the case.

Shares are still paid (Bd / DX) duntil the total of d/D reaches X. If, when a block is found, the reward is low in comparison to the reward at the time recent shares were submitted, the amount he has to pay according to the method is higher than the block reward, and he must pay the difference from his own pocket. And conversely, if the actual block reward is higher he keeps the difference.


If B is highly variable it can cause quite a lot of risk to the operator. It could be mitigated by basing the credit per share not only on the expected contribution but also the variance created.


In pay-once PPLNS you know the maximum amount you can be paid for a share, but you don't know whether you'll be paid it at all or not. It's not just that you don't know when you'll get it. Future B has no effect on whether you get paid and when.
754  Bitcoin / Pools / Re: Double geometric method: Hopping-proof, low-variance reward system on: April 25, 2013, 03:29:04 PM
It's d/D, and yes, d is for the share that solved the block.
Thanks, I assume the 'r' used in that calculation should be calculated using a 'p' adjusted for the difficulty of the share that solved the block too?
True.
755  Bitcoin / Pools / Re: Double geometric method: Hopping-proof, low-variance reward system on: April 24, 2013, 08:31:47 AM
Quote
4. If the share found happens to be a valid block, then after doing #3, also do the following for each participant: Give him a payout of (exp(lS-ls)*(r-1)*(1-f))/p. Set lS = lS + log(o).

Is the 'p' used here '1.0/D' or is it 'd/D' (where d is user's difficulty of submitted share). If it's 'd' how is it affected if a user has their difficulty changed part way through a block? Is it the 'd' for the most recent share submission?
It's d/D, and yes, d is for the share that solved the block.
756  Bitcoin / Pools / Re: PPLNS on: April 24, 2013, 08:23:32 AM
If you want a simple hopping-proof method, PPLNS is it (not the pay-once variant), assuming it's implemented correctly.
Is there a hopping proof way to implement the pay-once variant? Assuming you store d/D as your score for shares submitted as you outline in original post (this is the way I store share data already).
To be clear, when I said pay-once isn't it, I meant it's not simple, not that it's not hopping-proof.

I think if you follow the original method, and just cap the payment for each share to (sB/X), skipping already paid shares, it will work fine and be protected from hopping based on both pool past and future difficulty changes. You'll need to keep for each share not only whether it was paid, but how much, so if it was partially paid, it can be paid more in future blocks.

I added in a later comment that to be protected from hopping based on block reward (which will be critical when the reward is based on tx fees), B for each share needs to be chosen when the share is submitted, not when the block is found.
757  Bitcoin / Pools / Re: PPLNS on: April 23, 2013, 08:42:26 PM
I should probably force myself to go with DGM and be done with it. I just like the simplicity of CPPSRB.
If you want a simple hopping-proof method, PPLNS is it (not the pay-once variant), assuming it's implemented correctly. Or shift-PPLNS which is more scaleable.

Thank you for your time and for writing the Analysis paper.
You're welcome.
758  Bitcoin / Pools / Re: PPLNS on: April 23, 2013, 03:54:43 PM
Not really. If for example X=0.5 then still normally a block will be paid out 100% to recent miners - each share will be paid twice the PPS rate. But in lucky times when there aren't enough unpaid shares, past miners can be paid.

An X < 1 will further increase the time to maturity on old shares, won't it? Is there a way in a pay-once-PPLNS model to avoid an unbounded time to maturity?
It's variance, not maturity time. A miner submitting a share has a chance to get more than the PPS amount, but also a chance to get nothing at all, ever. If he does get paid, it will be with high probability in a short time.
759  Bitcoin / Pools / Re: PPLNS on: April 23, 2013, 10:16:21 AM
A substantially different variant is to pay for every share at most once. If, when going backwards in the list of shares, we encounter some that were already paid, we skip them and move on to older shares. X needs to be less than 1 to make sure that eventually we will have enough unpaid shares to draw on. I'm not sure what's the correct way to handle difficulty changes with this variant.
In effect, like a pool charging a 1% fee but paying that fee to past-due shares instead of it going to the operator?
Not really. If for example X=0.5 then still normally a block will be paid out 100% to recent miners - each share will be paid twice the PPS rate. But in lucky times when there aren't enough unpaid shares, past miners can be paid.

Payment always starts at the last share and continuously moves backward as much as possible, skipping any already paid shares.
760  Alternate cryptocurrencies / Altcoin Discussion / Re: Why Litecoin is more secure than Bitcoin (math inside) on: April 22, 2013, 06:37:06 PM
That post has some fundamental errors regarding how double-spending works (explained in a comment there).
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] 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 ... 166 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!