peepee
|
|
October 24, 2012, 08:54:54 PM |
|
Wait...
... so if you get lucky and generate a POS block you lose control over those coins for 520 blocks?
What if I need those coins to pay somebody in the meantime? How fast are PPCoin blocks-- how long would I have to possibly wait?
From the FAQ: Because stake is withheld from spending for 520 blocks, if you do need to keep your balance around to be spent soon we provided a configuration option 'reservebalance' to help you keep your balance from being used by stake. You can add a line 'reservebalance=10000' to ppcoin.conf and restart your ppcoind. This way ppcoind would try to keep your balance above 10000 coins when generating stakes.
|
|
|
|
Sunny King (OP)
Legendary
Offline
Activity: 1205
Merit: 1010
|
|
October 25, 2012, 03:13:41 PM |
|
I tried valgrind on a testnet node with cgminer, but so far no luck finding useful clues.
Based on what I have heard so far, it seems this is related to getwork. Since a pool at most generate ~100 blocks a day, coinotron said he had to restart ppcoind once a day, I assume that ppcoind was eating >1gb a day, so this excludes the possibility the leak is related to valid blocks (each block taking about 10KB~100KB).
Now getwork does maintain a list of block candidates and a leak there could account for the rapid memory increase. I didn't change things related to allocation and delete of these block candidates and a code review there didn't reveal obvious problem either. I believe cs_main is also used to serialize getwork access so there shouldn't be concurrency issues with the block candidates.
Andy I seem to remember you were testing with some pool software earlier and also observed memory leak issue. Is there a simple way for me to set up a pool software and reproduce this situation? Can you all (Chris, coinotron, Andy) confirm my observations? How fast is ppcoind leaking memory in your production system? Is the leak speed roughly proportional to the number of getwork requests?
Thanks,
|
|
|
|
AndyRossy
|
|
October 25, 2012, 09:09:46 PM |
|
I tried valgrind on a testnet node with cgminer, but so far no luck finding useful clues.
Based on what I have heard so far, it seems this is related to getwork. Since a pool at most generate ~100 blocks a day, coinotron said he had to restart ppcoind once a day, I assume that ppcoind was eating >1gb a day, so this excludes the possibility the leak is related to valid blocks (each block taking about 10KB~100KB).
Now getwork does maintain a list of block candidates and a leak there could account for the rapid memory increase. I didn't change things related to allocation and delete of these block candidates and a code review there didn't reveal obvious problem either. I believe cs_main is also used to serialize getwork access so there shouldn't be concurrency issues with the block candidates.
Andy I seem to remember you were testing with some pool software earlier and also observed memory leak issue. Is there a simple way for me to set up a pool software and reproduce this situation? Can you all (Chris, coinotron, Andy) confirm my observations? How fast is ppcoind leaking memory in your production system? Is the leak speed roughly proportional to the number of getwork requests?
Thanks,
Didnt check if it was proportional to generate or getwork, as, hard to tell which - could even be to "mature", but I observed it as per below, prior to "mature" being reached. I was running a private pool for a while yes, I could set it up again, but the pool software wasnt the problem - I replicated the leaks with valgrind with just ppcoind on testnet, with a single GPU. If I pull out the valgrind logs / dumps for testnet on mining say 5 blocks, and again on 50 blocks, will it be of any use?
|
|
|
|
Sunny King (OP)
Legendary
Offline
Activity: 1205
Merit: 1010
|
|
October 25, 2012, 09:52:34 PM |
|
Didnt check if it was proportional to generate or getwork, as, hard to tell which - could even be to "mature", but I observed it as per below, prior to "mature" being reached.
I was running a private pool for a while yes, I could set it up again, but the pool software wasnt the problem - I replicated the leaks with valgrind with just ppcoind on testnet, with a single GPU.
If I pull out the valgrind logs / dumps for testnet on mining say 5 blocks, and again on 50 blocks, will it be of any use?
Dunno I feel there is quite a bit noise in the valgrind report. After generating ~100 blocks on my testnet node I got 3KB definitely lost, 6KB indirectly lost and 1KB possibly lost. And the stacks don't look plausible at causing GB range leak problems. It would most definitely help to have a reproducible setup where large amount of memory is known to have leaked.
|
|
|
|
AndyRossy
|
|
October 25, 2012, 10:05:00 PM |
|
Didnt check if it was proportional to generate or getwork, as, hard to tell which - could even be to "mature", but I observed it as per below, prior to "mature" being reached.
I was running a private pool for a while yes, I could set it up again, but the pool software wasnt the problem - I replicated the leaks with valgrind with just ppcoind on testnet, with a single GPU.
If I pull out the valgrind logs / dumps for testnet on mining say 5 blocks, and again on 50 blocks, will it be of any use?
Dunno I feel there is quite a bit noise in the valgrind report. After generating ~100 blocks on my testnet node I got 3KB definitely lost, 6KB indirectly lost and 1KB possibly lost. And the stacks don't look plausible at causing GB range leak problems. It would most definitely help to have a reproducible setup where large amount of memory is known to have leaked. OK I'll leave it mining on testnet tomorrow for a good few hours. I have a good hashrate I can throw at it.
|
|
|
|
doublec
Legendary
Offline
Activity: 1078
Merit: 1005
|
|
October 25, 2012, 10:51:48 PM |
|
Andy I seem to remember you were testing with some pool software earlier and also observed memory leak issue. Is there a simple way for me to set up a pool software and reproduce this situation? Can you all (Chris, coinotron, Andy) confirm my observations? How fast is ppcoind leaking memory in your production system? Is the leak speed roughly proportional to the number of getwork requests?
It does seem proportional to the getwork requests. When my pool hashrate was greater than 100Ghash it was losing 1GB of memory a day. Now that it's low I only need to restart the ppcoind once a week or so when it reaches 4-5GB of memory.
|
|
|
|
coinotron
Legendary
Offline
Activity: 1182
Merit: 1000
|
|
October 26, 2012, 09:23:05 AM |
|
Andy I seem to remember you were testing with some pool software earlier and also observed memory leak issue. Is there a simple way for me to set up a pool software and reproduce this situation? Can you all (Chris, coinotron, Andy) confirm my observations? How fast is ppcoind leaking memory in your production system? Is the leak speed roughly proportional to the number of getwork requests?
It does seem proportional to the getwork requests. When my pool hashrate was greater than 100Ghash it was losing 1GB of memory a day. Now that it's low I only need to restart the ppcoind once a week or so when it reaches 4-5GB of memory. I confirm. Relation to the total pool speed seems to be proportional. I prepared list of rpc methods pool calls: getwork getblockcount gettransaction getdifficulty
|
|
|
|
doublec
Legendary
Offline
Activity: 1078
Merit: 1005
|
|
October 26, 2012, 10:59:39 AM |
|
I prepared list of rpc methods pool calls: getwork getblockcount gettransaction getdifficulty
I use getwork, getdifficulty, sendtoaddress and getmemorypool.
|
|
|
|
AndyRossy
|
|
October 26, 2012, 12:05:23 PM |
|
It's defo not sendtoaddress or getmemorypool.
getblockcount is normally used to decide if to throw out a LP, or if cached "getworks" are valid (in some pool software)
im pretty sure, that it's to do with getwork call, when a new block is found.
|
|
|
|
doublec
Legendary
Offline
Activity: 1078
Merit: 1005
|
|
October 26, 2012, 11:44:55 PM |
|
im pretty sure, that it's to do with getwork call, when a new block is found.
Does it show up if you hack the client to not check the hash on blocks and to assume every submission is correct (running on a private testnet of course). This should help find it faster.
|
|
|
|
Cablez
Legendary
Offline
Activity: 1400
Merit: 1000
I owe my soul to the Bitcoin code...
|
|
October 27, 2012, 01:20:04 PM |
|
Sorry for the slight tangent. I was wondering how one actually generates a PoS block? Is the requirement just to leave your client running all the time? It is an interesting concept, good luck.
|
Tired of substandard power distribution in your ASIC setup??? Chris' Custom Cablez will get you sorted out right! No job too hard so PM me for a quote Check my products or ask a question here: https://bitcointalk.org/index.php?topic=74397.0
|
|
|
cunicula
Legendary
Offline
Activity: 1050
Merit: 1003
|
|
October 27, 2012, 02:01:15 PM |
|
How frequently are blocks being checkpointed currently?
Can we leave some space to allow for reorganizations to occur, say one checkpoint every 10 blocks maximum?
|
|
|
|
Sunny King (OP)
Legendary
Offline
Activity: 1205
Merit: 1010
|
|
October 27, 2012, 02:21:34 PM |
|
Sorry for the slight tangent. I was wondering how one actually generates a PoS block? Is the requirement just to leave your client running all the time? It is an interesting concept, good luck.
Yes leave client running would automatically generate stakes. Keep it running is better but you don't have to keep it running all the time. How frequently are blocks being checkpointed currently?
Can we leave some space to allow for reorganizations to occur, say one checkpoint every 10 blocks maximum?
Current checkpoint policy tries to checkpoint every proof-of-work block and up to the 6th consecutive proof-of-stake blocks or max 4-hour old block. When proof-of-stake blocks become more frequent there is some room for reorganization.
|
|
|
|
macbook-air
|
|
October 28, 2012, 01:58:26 AM |
|
Sorry I haven't read the paper. Correct me if I am wrong: I keep some ppcoins in my ppcoind and keep the daemon running, after a while, the proof-of-stake magically add more coins to my wallet or what? Otherwise, how the proof-of-stake wealth is distributed?
|
|
|
|
cunicula
Legendary
Offline
Activity: 1050
Merit: 1003
|
|
October 28, 2012, 03:49:22 AM |
|
Ignoring checkpoints, how does PPCoin compare competiting chains?
Say that the sum of consumed-coin age of all txns in chain 1 is s1 and another chain has s2.
Based on my reading of the paper, Chain 1 wins iff s1>s2.
Say we have the following fork at history point H. After H, two competing chains mine work blocks. Chain 1 is created first and chain 2 tries to displace it.
1) H-W1a-W2a-W3a
2) H-W1b
Fork 2 wins if W1b includes all the txns from blocks W1a, W2a, and W3a. Fork 2 would have all the txns from fork 1, but their consumed-age would be slightly higher. Or alternatively, if consumed-age is based on time stamps in txns rather than in blocks, then the two chains are tied.
Is this correct?
|
|
|
|
cunicula
Legendary
Offline
Activity: 1050
Merit: 1003
|
|
October 28, 2012, 03:51:48 AM |
|
Sorry I haven't read the paper. Correct me if I am wrong: I keep some ppcoins in my ppcoind and keep the daemon running, after a while, the proof-of-stake magically add more coins to my wallet?
Yes. Provided that your wallet is not encrypted.
|
|
|
|
Liquid
|
|
October 28, 2012, 12:10:00 PM |
|
POS ?
|
Bitcoin will show the world what hard money really is.
|
|
|
smoothie
Legendary
Offline
Activity: 2492
Merit: 1474
LEALANA Bitcoin Grim Reaper
|
|
October 30, 2012, 12:56:58 AM |
|
What was the starting difficulty of PPC? Was it 1? Or 256?
|
███████████████████████████████████████
,╓p@@███████@╗╖, ,p████████████████████N, d█████████████████████████b d██████████████████████████████æ ,████²█████████████████████████████, ,█████ ╙████████████████████╨ █████y ██████ `████████████████` ██████ ║██████ Ñ███████████` ███████ ███████ ╩██████Ñ ███████ ███████ ▐▄ ²██╩ a▌ ███████ ╢██████ ▐▓█▄ ▄█▓▌ ███████ ██████ ▐▓▓▓▓▌, ▄█▓▓▓▌ ██████─ ▐▓▓▓▓▓▓█,,▄▓▓▓▓▓▓▌ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓─ ²▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓╩ ▀▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▀ ²▀▀▓▓▓▓▓▓▓▓▓▓▓▓▀▀` ²²² ███████████████████████████████████████
| . ★☆ WWW.LEALANA.COM My PGP fingerprint is A764D833. History of Monero development Visualization ★☆ . LEALANA BITCOIN GRIM REAPER SILVER COINS. |
|
|
|
peepee
|
|
October 30, 2012, 01:01:27 AM |
|
|
|
|
|
smoothie
Legendary
Offline
Activity: 2492
Merit: 1474
LEALANA Bitcoin Grim Reaper
|
|
October 30, 2012, 01:17:01 AM |
|
Awwww wierded or scared?
|
███████████████████████████████████████
,╓p@@███████@╗╖, ,p████████████████████N, d█████████████████████████b d██████████████████████████████æ ,████²█████████████████████████████, ,█████ ╙████████████████████╨ █████y ██████ `████████████████` ██████ ║██████ Ñ███████████` ███████ ███████ ╩██████Ñ ███████ ███████ ▐▄ ²██╩ a▌ ███████ ╢██████ ▐▓█▄ ▄█▓▌ ███████ ██████ ▐▓▓▓▓▌, ▄█▓▓▓▌ ██████─ ▐▓▓▓▓▓▓█,,▄▓▓▓▓▓▓▌ ▐▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▌ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓─ ²▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓╩ ▀▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▀ ²▀▀▓▓▓▓▓▓▓▓▓▓▓▓▀▀` ²²² ███████████████████████████████████████
| . ★☆ WWW.LEALANA.COM My PGP fingerprint is A764D833. History of Monero development Visualization ★☆ . LEALANA BITCOIN GRIM REAPER SILVER COINS. |
|
|
|
|