Pages:
Author

Topic: [ANN][YAC] YACoin ongoing development - page 83. (Read 379983 times)

newbie
Activity: 25
Merit: 0
March 20, 2014, 10:49:33 PM
After mhps's comment I dug down into the code and came to the conclusion mhps was right. That is, a 1000 day old chunk of 100 coins will get get 1000 days worth of interest. And there is no limit to the number of days. If you don't open your client for 10 years, and YACoin is still around in 10 years, then you will get 10 years worth of interest.

Thanks for taking time to confirm. Just a comment -- the good thing about giving you 10 years' worth of interest if you open your wallet once in 10 years is that people are attracted by the easy interest and become a long term user of the coin; the bad thing about it is that the savers would tend to open wallet once in a long while hence lending little support to the network through being a POS minting node. There are some relevant discussions here in the contect of PPC https://bitcointalksearch.org/topic/m.1360154
That is interesting reading. I personally don't think we (YACoin) should force people to keep their clients open all the time. And I am at a complete loss how POS is supposed to be some kind of security utopia, especially when POS it nearly killed us. We neutered POS at block 420000, so It's behaving itself nicely now. What I have to say about security goes for every crypto currency. If you want security, then wait for more confirmations. Job done.  If someone was buying your house with YAC,  you should probably wait for at least an hour's worth of confirmations before you sign your title over. Selling someone a cup of coffee? An instant unconfirmed transaction will do.
hero member
Activity: 516
Merit: 500
CAT.EX Exchange
March 20, 2014, 01:17:51 AM
After mhps's comment I dug down into the code and came to the conclusion mhps was right. That is, a 1000 day old chunk of 100 coins will get get 1000 days worth of interest. And there is no limit to the number of days. If you don't open your client for 10 years, and YACoin is still around in 10 years, then you will get 10 years worth of interest.

Thanks for taking time to confirm. Just a comment -- the good thing about giving you 10 years' worth of interest if you open your wallet once in 10 years is that people are attracted by the easy interest and become a long term user of the coin; the bad thing about it is that the savers would tend to open wallet once in a long while hence lending little support to the network through being a POS minting node. There are some relevant discussions here in the contect of PPC https://bitcointalksearch.org/topic/m.1360154
sr. member
Activity: 260
Merit: 251
March 20, 2014, 12:06:20 AM
Quote
...
...
Is it possible to run the wallet in a debugger and watch how it works?
Yes.
Quote
Quote
Sure there is. Follow the instructions at https://github.com/yacoin/yacoin/blob/master/doc/build-msw.txt. At step 26 use Makefile.Debug instead of Makefile.Release
Code:
...
1381        static unsigned int nStakeSplitAge = (60 * 60 * 24 * 90);
...
This will take longer then usual because we are running in debug mode. When it finally fires up you will get:
Code:
Breakpoint 1,CWallet::CreateCoinstake......
(gdb) list
......
(gdb) n
1384     CBigNum +;
(gdb) print +
$1 = 7776000
(gdb)
Note that 7,760,000 is = 60 * 60 * 24 * 90 seconds I presume???  And further, if one searches the sources one finds that CBigNum bnTargetPerCoinDay is instantiated locally in CheckStakeKernelHash() in kernel.cpp and in CWallet::CreateCoinStake() in wallet.cpp.  Though interestingly, the latter doesn't seem to be used!?

Ron
newbie
Activity: 25
Merit: 0
March 19, 2014, 10:19:20 PM
I wrote a How-To for determining how many coins in your wallet are being mined for POS interest.
I show how to use Coin Control get your total number of coins being minded by the YACoin client.

You can find the How-To here:
http://yacointalk.grokonet.com:8090/t/calculate-your-staked-coins-with-coin-control/41

I am not familiar with YAC POS calculation. I see this line here
Quote
Each chunk of eligible coins has it's interest calculated based on the chunk's age in the range between 30 and 90 days.

Does it mean for POS generation if I have 100 YACs in the wallet for 1000 days I can only expect 100 * 90* 5% / 365 reward if a POS block is found? In PPC POS calculation the probability of finding a POS block is based on coin age capped by 90 days but the reward value itself is not capped. In the above example I would expect 100 * (1000 - 30) * 1% / 365 reward.
I think you are right. I will update the post.

Groko - that is a great post on yacointalk.  I've been mining YAC since the launch, and I learned a few things from your overview.  Thanks!  Smiley

And I believe mhps is right - I think YAC caps POS at 90 days.  So a 100 YAC transaction at 1000 days would produce the same interest as at 90 days (100 * 90 / 365 * 0.05 YAC = 24.65 coin years * 0.05 YAC => 24 years * 0.05 = 1.20 YAC gained). 

Again the guide is very well written, but it maybe helpful to add an example, or two, of how the 5% interest is calculated.  Things like the coin-year rounding down to the nearest whole year weren't initiative to me when I originally started.  From the example above, I would have expected 1.23 YAC instead of 1.20 - it boggled my mind why all POS were 'rounded' to the lowest 0.05.  I figure if we can save someone an hour of sifting through the forums, it will benefit the community. Smiley
Thanks aso118. I had lots of trouble figuring out what POS was all about, especially with the confusing way the YACoin client has been reporting earnings from POS blocks. I've been working hard to fix how the client reports POS earning. It sounds like a new release of the YACoin client is coming soon. If all goes as planned, the new client will have a transaction record that matches to the last decimal point how much YACoin is actually in your wallet.

After mhps's comment I dug down into the code and came to the conclusion mhps was right. That is, a 1000 day old chunk of 100 coins will get get 1000 days worth of interest. And there is no limit to the number of days. If you don't open your client for 10 years, and YACoin is still around in 10 years, then you will get 10 years worth of interest.

However, the probability of finding a POS block for those 100 coins started at a low point at 30 days, and increased gradually until the coins got 90 days old. After 90 days the coin's continue to accrue interest, but the probability of finding a POS block for those coins stays at a constant maximum probability from day 90 until day 1000.  If a POS block were found on day 1000, I would expect the interest to be (100)*(0.05)*(1000)/(365) or 13.698.
hero member
Activity: 802
Merit: 1003
GCVMMWH
March 19, 2014, 02:11:48 PM
OK thanks. I will work to get a Windows build up soon. Nothing has changed in the way coins are minted except it now just takes a check mark (and password if wallet is encrypted to unlock for stake minting only) to enable  Wink
hero member
Activity: 809
Merit: 501
March 19, 2014, 01:58:48 PM
.
OK, I added the stake function to testing. I tested it over the past few days and everything looks good. Test it out if you can (you'll need to build), and if no problems, I will release it (including a windows build) soon.

https://github.com/yacoin/yacoin/commit/eb8c27f5a8caa0a21618d00d5f63fecfa1d782e8

Has anyone been able to try this out? Are you all waiting for a compiled version? I've already minted a few blocks  Cool

I'm waiting anxiously for the compiled version! Thanks so much, Joe. Nothing has changed the way coins are minted right? Just the interface?




if someone is still interested in my case Smiley....the coins arrived at last.

i opened the third ticket, and i was a little bit rude and sarcastic, maybe that helped, but,
agent Leah, again excalated ticket to tier 2agent, Mullick.
He said that these problematic transactions have gotten stuck in their wallet due to being to large to fit into a block (too many inputs).
he resent them and now, after two months, YACs are my wallet.

That is great news! And thank you for the update. The name of the game is finding the least corrupt exchange. Keep voting on cryptorush.in. I'm voting everyday.
hero member
Activity: 693
Merit: 500
March 19, 2014, 01:51:32 PM
OK, I added the stake function to testing. I tested it over the past few days and everything looks good. Test it out if you can (you'll need to build), and if no problems, I will release it (including a windows build) soon.

https://github.com/yacoin/yacoin/commit/eb8c27f5a8caa0a21618d00d5f63fecfa1d782e8

Has anyone been able to try this out? Are you all waiting for a compiled version? I've already minted a few blocks  Cool

If I could compile it I would - I used to fail when trying to compile for windows under MingGW - the whole QT thing never worked for me. 
hero member
Activity: 802
Merit: 1003
GCVMMWH
March 19, 2014, 01:45:13 PM
OK, I added the stake function to testing. I tested it over the past few days and everything looks good. Test it out if you can (you'll need to build), and if no problems, I will release it (including a windows build) soon.

https://github.com/yacoin/yacoin/commit/eb8c27f5a8caa0a21618d00d5f63fecfa1d782e8

Has anyone been able to try this out? Are you all waiting for a compiled version? I've already minted a few blocks  Cool
hero member
Activity: 516
Merit: 500
CAT.EX Exchange
March 18, 2014, 08:34:00 PM

it's just rescanning the whole blockchain to add all transactions associated with that address to your new wallet. you can import you private keys in bulk faster like this:



Thanks. I was suspect that it was doing something like that. I have done the same with XPM and PPC wallets and they always finish in a matter of seconds. So is it a YAC wallet specific thing that I am seeing?

Code:
importprivkey THEPRIVATEKEY '' false
I just tried the command.  The wallet doesn't support the third ( 'false') option...
sr. member
Activity: 406
Merit: 250
One does not simply mine Bitcoins
March 18, 2014, 02:06:57 PM
My wallet v0.4.2 runs on 32bit win 7. If I imported a private key to the wallet and the console stops executing any commands.
What I did is this:
run wallet;
dumpprivkey of an address, save the private key;
quit wallet;
rename wallet.dat to wallet1.dat;
restart wallet and generate a new empty wallet;
wait for wallet to sync;
importprivkey;
[wallet stops executing any commands e.g. getinfo]

I can see the wallet using 20% of CPU time, non-stop. It seems that the wallet couldn't finish importing the priv key.
Can anyone confirm this?
it's just rescanning the whole blockchain to add all transactions associated with that address to your new wallet. you can import you private keys in bulk faster like this:
Code:
importprivkey THEPRIVATEKEY '' false
the empty single quotes are the account label to add them to (default being the nameless account) while the false option tells bitcoind not to rescan the blockchain.
after you finish importing your private keys, shut down the node and start it up with "-rescan" commandline argument (this will launch the blockchain rescan of all blocks for missing wallet transactions)

if your're importing just one private key, then this won't help you much as you still need the whole rescan.
hero member
Activity: 516
Merit: 500
CAT.EX Exchange
March 18, 2014, 01:20:43 PM
My wallet v0.4.2 runs on 32bit win 7. If I imported a private key to the wallet and the console stops executing any commands.
What I did is this:
run wallet;
dumpprivkey of an address, save the private key;
quit wallet;
rename wallet.dat to wallet1.dat;
restart wallet and generate a new empty wallet;
wait for wallet to sync;
importprivkey;
[wallet stops executing any commands e.g. getinfo]

I can see the wallet using 20% of CPU time, non-stop. It seems that the wallet couldn't finish importing the priv key.
Can anyone confirm this?
legendary
Activity: 1918
Merit: 1012
★Nitrogensports.eu★
March 18, 2014, 12:55:00 PM
I wrote a How-To for determining how many coins in your wallet are being mined for POS interest.
I show how to use Coin Control get your total number of coins being minded by the YACoin client.

You can find the How-To here:
http://yacointalk.grokonet.com:8090/t/calculate-your-staked-coins-with-coin-control/41

I am not familiar with YAC POS calculation. I see this line here
Quote
Each chunk of eligible coins has it's interest calculated based on the chunk's age in the range between 30 and 90 days.

Does it mean for POS generation if I have 100 YACs in the wallet for 1000 days I can only expect 100 * 90* 5% / 365 reward if a POS block is found? In PPC POS calculation the probability of finding a POS block is based on coin age capped by 90 days but the reward value itself is not capped. In the above example I would expect 100 * (1000 - 30) * 1% / 365 reward.
I think you are right. I will update the post.

Groko - that is a great post on yacointalk.  I've been mining YAC since the launch, and I learned a few things from your overview.  Thanks!  Smiley

And I believe mhps is right - I think YAC caps POS at 90 days.  So a 100 YAC transaction at 1000 days would produce the same interest as at 90 days (100 * 90 / 365 * 0.05 YAC = 24.65 coin years * 0.05 YAC => 24 years * 0.05 = 1.20 YAC gained). 

Again the guide is very well written, but it maybe helpful to add an example, or two, of how the 5% interest is calculated.  Things like the coin-year rounding down to the nearest whole year weren't initiative to me when I originally started.  From the example above, I would have expected 1.23 YAC instead of 1.20 - it boggled my mind why all POS were 'rounded' to the lowest 0.05.  I figure if we can save someone an hour of sifting through the forums, it will benefit the community. Smiley
newbie
Activity: 25
Merit: 0
March 16, 2014, 08:49:13 AM
I wrote a How-To for determining how many coins in your wallet are being mined for POS interest.
I show how to use Coin Control get your total number of coins being minded by the YACoin client.

You can find the How-To here:
http://yacointalk.grokonet.com:8090/t/calculate-your-staked-coins-with-coin-control/41

I am not familiar with YAC POS calculation. I see this line here
Quote
Each chunk of eligible coins has it's interest calculated based on the chunk's age in the range between 30 and 90 days.

Does it mean for POS generation if I have 100 YACs in the wallet for 1000 days I can only expect 100 * 90* 5% / 365 reward if a POS block is found? In PPC POS calculation the probability of finding a POS block is based on coin age capped by 90 days but the reward value itself is not capped. In the above example I would expect 100 * (1000 - 30) * 1% / 365 reward.
I think you are right. I will update the post.
sr. member
Activity: 288
Merit: 260
March 15, 2014, 11:53:16 AM
if someone is still interested in my case Smiley....the coins arrived at last.
it's good news! Congrats!!

i opened the third ticket, and i was a little bit rude and sarcastic, maybe that helped, but,
agent Leah, again excalated ticket to tier 2agent, Mullick.
He said that these problematic transactions have gotten stuck in their wallet due to being to large to fit into a block (too many inputs).
he resent them and now, after two months, YACs are my wallet.
I've got only promises from Mullick 24 days ago but nothing in my wallet..
I will open another ticket!
hero member
Activity: 516
Merit: 500
CAT.EX Exchange
March 15, 2014, 11:21:22 AM
I wrote a How-To for determining how many coins in your wallet are being mined for POS interest.
I show how to use Coin Control get your total number of coins being minded by the YACoin client.

You can find the How-To here:
http://yacointalk.grokonet.com:8090/t/calculate-your-staked-coins-with-coin-control/41

I am not familiar with YAC POS calculation. I see this line here
Quote
Each chunk of eligible coins has it's interest calculated based on the chunk's age in the range between 30 and 90 days.

Does it mean for POS generation if I have 100 YACs in the wallet for 1000 days I can only expect 100 * 90* 5% / 365 reward if a POS block is found? In PPC POS calculation the probability of finding a POS block is based on coin age capped by 90 days but the reward value itself is not capped. In the above example I would expect 100 * (1000 - 30) * 1% / 365 reward.
newbie
Activity: 7
Merit: 0
March 15, 2014, 04:10:45 AM
if someone is still interested in my case Smiley....the coins arrived at last.

i opened the third ticket, and i was a little bit rude and sarcastic, maybe that helped, but,
agent Leah, again excalated ticket to tier 2agent, Mullick.
He said that these problematic transactions have gotten stuck in their wallet due to being to large to fit into a block (too many inputs).
he resent them and now, after two months, YACs are my wallet.
hero member
Activity: 802
Merit: 1003
GCVMMWH
March 14, 2014, 11:18:30 PM
OK, I added the stake function to testing. I tested it over the past few days and everything looks good. Test it out if you can (you'll need to build), and if no problems, I will release it (including a windows build) soon.

https://github.com/yacoin/yacoin/commit/eb8c27f5a8caa0a21618d00d5f63fecfa1d782e8
newbie
Activity: 25
Merit: 0
March 12, 2014, 11:57:55 AM
Quote

I made a lot of progress on the stake function for Qt today.  I can see why no one did it in the past, it's a real pain  Tongue but will be cool when done.

Also, forum.yacoin.org is now live. Thanks to Sahtor for doing all the work to get it going again!
I know your pain Joe_Bowers. I tried totaling up up all the inputs eligible for staking in CWallet::CreateCoinStake (in wallet.cpp) then printing the result out the log each time it's called. But the total just jumps around randomly. I can't figure out if there is a bug in that function, or I just don't understand how that function goes about finding inputs that should be checked for possible POS block generation. There is supposed to be some unpredictability function so people can't game their POS blocks for some kind of timed attack. Perhaps that's whats making it tricky to understand.

Is it possible to run the wallet in a debugger and watch how it works?
Sure there is. Follow the instructions at https://github.com/yacoin/yacoin/blob/master/doc/build-msw.txt. At step 26 use Makefile.Debug instead of Makefile.Release
Code:
c:\yacoin>mingw32-make -f Makefile.Debug
c:\yacoin>cd debug
c:\yacoin\debug>copy ..\release\*.dll .
c:\yacoin\debug>gdb yacoin-qt.exe
(gdb) list CWallet::CreateCoinStake
1373        return CreateTransaction(vecSend, wtxNew, reservekey, nFeeRet, coinControl);
1374    }
1375
1376    // ppcoin: create coin stake transaction
1377    bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int64 nSearchInterval, CTransaction
& txNew)
1378    {
1379        // The following split & combine thresholds are important to security
1380        // Should not be adjusted if you don't understand the consequences
1381        static unsigned int nStakeSplitAge = (60 * 60 * 24 * 90);
1382        int64 nCombineThreshold = GetProofOfWorkReward(GetLastBlockIndex(pindexBest, false)->nBits) / 3;
(gdb) b 1381
Breakpoint 1 at 0x491442: file src\wallet.cpp, line 1381.
(gdb) run    
This will take longer then usual because we are running in debug mode. When it finally fires up you will get:
Code:
Breakpoint 1,CWallet::CreateCoinstake......
(gdb) list
......
(gdb) n
1384     CBigNum bnTargetPerCoinDay;
(gdb) print nStakeSplitAge
$1 = 7776000
(gdb)
sr. member
Activity: 288
Merit: 260
March 12, 2014, 07:16:06 AM
I made a lot of progress on the stake function for Qt today.  I can see why no one did it in the past, it's a real pain  Tongue but will be cool when done.

It's great news!
Can you provide an option not to split staked coins on two parts?
newbie
Activity: 25
Merit: 0
March 12, 2014, 01:21:12 AM
I wrote a How-To for determining how many coins in your wallet are being mined for POS interest.
I show how to use Coin Control get your total number of coins being minded by the YACoin client.

You can find the How-To here:
http://yacointalk.grokonet.com:8090/t/calculate-your-staked-coins-with-coin-control/41
Pages:
Jump to: