6
|
Alternate cryptocurrencies / Announcements (Altcoins) / Re: DNotes 2.0 - Bridging the Gap Between the Centralized and Decentralized World
|
on: February 28, 2018, 10:07:10 PM
|
Minor correction, since nSubsidy starts out as an int64, the math should be pow(0.95,4)*2500000000 == 2036265624.9999998, which is being cast back to an int64 type at https://github.com/DNotesCoin/DNotes/blob/master/src/main.cpp#L853Expected behavior when casting a floating point value to an int is that the number is truncated (not rounded). See https://stackoverflow.com/questions/9695329/c-how-to-round-a-double-to-an-intPatching main.cpp in the following manner (assuming rounding is the desired behavior) appears to fix the issue: diff --git a/src/main.cpp b/src/main.cpp index 4773964..48d7b3c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -850,7 +850,7 @@ int64 static GetBlockValue(int nHeight, int64 nFees) { int yearsElapsed = nHeight / 525949; double nReductionPercentage = pow(0.95,yearsElapsed); - nSubsidy = nSubsidy * nReductionPercentage; + nSubsidy = (int64) ((nSubsidy * nReductionPercentage)+0.5); } return nSubsidy + nFees; } Appreciate it flound1129! There was 8 or so blocks that reported 20.36265624 reward after the reward change, all of the rest have been 20.36265625, and at the point where it was 20.36265625 is the block your node started rejecting blocks. There have been no other reports of incident since, so I assume the problem is isolated to your specific setup, or as for on the network your machine. The problem is to make changes to the block reward would require forking the network, which creates an even bigger problem and across the entire network. I'll have to check, but I don't believe this can be changed just on your side without impacting the rest of the network. This doesn't change the block reward, it fixes the truncation. Adding 0.5 is the recommended way to do this in c++. Again, see https://stackoverflow.com/questions/9695329/c-how-to-round-a-double-to-an-intnSubsidy is in satoshis. I don't know whether this will result in the correct behavior across all platforms, so you should probably pass it to your devs and/or do some quick testing to make sure the returned number is still correct on your systems. I'd also be happy with an official fix from the DNotes team.
|
|
|
7
|
Alternate cryptocurrencies / Announcements (Altcoins) / Re: DNotes 2.0 - Bridging the Gap Between the Centralized and Decentralized World
|
on: February 28, 2018, 07:32:04 PM
|
Minor correction, since nSubsidy starts out as an int64, the math should be pow(0.95,4)*2500000000 == 2036265624.9999998, which is being cast back to an int64 type at https://github.com/DNotesCoin/DNotes/blob/master/src/main.cpp#L853Expected behavior when casting a floating point value to an int is that the number is truncated (not rounded). See https://stackoverflow.com/questions/9695329/c-how-to-round-a-double-to-an-intPatching main.cpp in the following manner (assuming rounding is the desired behavior) appears to fix the issue: diff --git a/src/main.cpp b/src/main.cpp index 4773964..48d7b3c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -850,7 +850,7 @@ int64 static GetBlockValue(int nHeight, int64 nFees) { int yearsElapsed = nHeight / 525949; double nReductionPercentage = pow(0.95,yearsElapsed); - nSubsidy = nSubsidy * nReductionPercentage; + nSubsidy = (int64) ((nSubsidy * nReductionPercentage)+0.5); } return nSubsidy + nFees; }
|
|
|
8
|
Alternate cryptocurrencies / Announcements (Altcoins) / Re: DNotes 2.0 - Bridging the Gap Between the Centralized and Decentralized World
|
on: February 28, 2018, 07:20:59 AM
|
Another question -- how are you planning for people to redeem coins in 2.0? Will they simply load their existing DNotes wallets into the new client or is there some kind of transaction or swap that will take place?
It will be a 1:1 swap. DNotesVault is the recommended place to store your coins for participating in the swap without any further action, but there will be a manual process in place as well for those who don't use the DNotesVault. How will people send their coins into the vault after PoW ends?
|
|
|
10
|
Alternate cryptocurrencies / Announcements (Altcoins) / Re: DNotes 2.0 - Bridging the Gap Between the Centralized and Decentralized World
|
on: February 28, 2018, 05:46:29 AM
|
BTW, after patching that bug I am having another issue with block 2112868:
received block f92754272d97decab8f9 Difficulty Retarget - Gravity Well PastRateAdjustmentRatio = 1.03675 Before: 1b6e0383 00000000006e0383000000000000000000000000000000000000000000000000 After: 1b6e041c 00000000006e041c54ba374cbaf4bff21d62b9cf6d6c186d49d80f66e461ae64 ERROR: FetchInputs() : 55e029f6c8 prev tx cd8c9bac39 index entry not found InvalidChainFound: invalid block=f92754272d97decab8f9 height=2112868 work=1479669443777755434 date=02/27/18 23:13:05 InvalidChainFound: current best=b5b2df16b6a852dc161a height=2112867 work=1479666885287689994 date=02/27/18 23:10:39 ERROR: SetBestChain() : SetBestChainInner failed ERROR: AcceptBlock() : AddToBlockIndex failed ERROR: ProcessBlock() : AcceptBlock FAILED received block c884546d406238eba489 Difficulty Retarget - Gravity Well PastRateAdjustmentRatio = 1.03705 Before: 1b6e041c 00000000006e041c000000000000000000000000000000000000000000000000 After: 1b6dff50 00000000006dff50f9642ef50b6e7663ec33fe75a457dbe53e0fd8accd7b48ab Postponing 1 reconnects
|
|
|
13
|
Alternate cryptocurrencies / Announcements (Altcoins) / Re: DNotes 2.0 - Bridging the Gap Between the Centralized and Decentralized World
|
on: February 28, 2018, 12:21:07 AM
|
Still not getting past 2103808. This is 3rd try of deleting the entire .DNotes directory other than DNotes.conf.
debug.log has the following for every block after 2103808.
Let me see if I can replicate the issue on my end. Checkpoints updated as well if you want to rebuild and try again. In the meantime, would you mind emailing me your full debug.log at contact@dnotescoin.com? So far, I have been unable to replicate the issue, reset and downloaded from the beginning and it updated fine. The logs do not indicate any issues rebuilding the blockchain. As far as I can tell, everything else on the network seems to be running fine. I can upload the data files, and you may be able to send them to your server. full log from 3rd erase/resync WITH updated checkpoints: again stuck at 2103808 OS is Debian 9.2 with libboost 1.62 You might want to look at block 2103809 and think about why some nodes might think this block is invalid. Right, I was looking at the same: https://chainz.cryptoid.info/note/block.dws?5f6005b9bcb8b85afc122b5e20ce89c4cdb9619db6458736237fe616147daf84.htmFollowed the hashes in both directions about 20 blocks, and the data available. I'm not seeing a problem. I will PM you the data files, if you want to go that route. I use a couple different variations of ubuntu, so I don't think Debian would make a difference. I can't see how os would make a difference unless it couldn't compile properly. Based on network activity over the past 24hrs, this node appears to be running an unauthentic version of DNotes: addnode=23.94.48.23These are the valid nodes running v 1.2: addnode=100.34.15.63 addnode=148.74.101.211 addnode=162.243.225.90 addnode=179.158.92.153 addnode=35.169.69.183 addnode=38.66.210.199 addnode=50.39.204.123 addnode=73.241.9.60 addnode=73.26.177.243 addnode=77.58.52.185 Well, even if that node is misbehaving somehow, it doesn't appear to be altering the blockchain. My block 2103809 is identical to the one in the explorer.
|
|
|
14
|
Alternate cryptocurrencies / Announcements (Altcoins) / Re: DNotes 2.0 - Bridging the Gap Between the Centralized and Decentralized World
|
on: February 27, 2018, 06:43:04 PM
|
Still not getting past 2103808. This is 3rd try of deleting the entire .DNotes directory other than DNotes.conf.
debug.log has the following for every block after 2103808.
Let me see if I can replicate the issue on my end. Checkpoints updated as well if you want to rebuild and try again. In the meantime, would you mind emailing me your full debug.log at contact@dnotescoin.com? So far, I have been unable to replicate the issue, reset and downloaded from the beginning and it updated fine. The logs do not indicate any issues rebuilding the blockchain. As far as I can tell, everything else on the network seems to be running fine. I can upload the data files, and you may be able to send them to your server. full log from 3rd erase/resync WITH updated checkpoints: www.multipool.us/debug.log.gz again stuck at 2103808 OS is Debian 9.2 with libboost 1.62 You might want to look at block 2103809 and think about why some nodes might think this block is invalid.
|
|
|
15
|
Alternate cryptocurrencies / Announcements (Altcoins) / Re: DNotes 2.0 - Bridging the Gap Between the Centralized and Decentralized World
|
on: February 27, 2018, 01:20:13 AM
|
Still not getting past 2103808. This is 3rd try of deleting the entire .DNotes directory other than DNotes.conf.
debug.log has the following for every block after 2103808.
Before: 1b77af75 000000000077af75000000000000000000000000000000000000000000000000 After: 1b779481 0000000000779481ec194579430ee69e4f49ad519e634203785349c5e0a26e00 SetBestChain: new best=08e6e9dfe5f89394cd40 height=2103808 work=1458348923889783327 date=02/21/18 17:48:29 ProcessBlock: ACCEPTED received block 5f6005b9bcb8b85afc12 Difficulty Retarget - Gravity Well PastRateAdjustmentRatio = 0.937922 Before: 1b779481 0000000000779481000000000000000000000000000000000000000000000000 After: 1b7790d5 00000000007790d5df8663c91d6a8edf1bff4b781a627ee0243050908c6ba72d InvalidChainFound: invalid block=5f6005b9bcb8b85afc12 height=2103809 work=1458351278033644953 date=02/21/18 17:50:07 InvalidChainFound: current best=08e6e9dfe5f89394cd40 height=2103808 work=1458348923889783327 date=02/21/18 17:48:29 ERROR: SetBestChain() : SetBestChainInner failed ERROR: AcceptBlock() : AddToBlockIndex failed ERROR: ProcessBlock() : AcceptBlock FAILED received block 085525cad6aebf38338b Difficulty Retarget - Gravity Well PastRateAdjustmentRatio = 0.937427 Before: 1b7790d5 00000000007790d5000000000000000000000000000000000000000000000000 After: 1b77a2fb 000000000077a2fb2b559b0d76f53cd60402e3a93a1e8a25056649a02c567f33 Postponing 1 reconnects REORGANIZE REORGANIZE: Disconnect 0 blocks; 08e6e9dfe5f89394cd40..08e6e9dfe5f89394cd40 REORGANIZE: Connect 1 blocks; 08e6e9dfe5f89394cd40..5f6005b9bcb8b85afc12 ERROR: Reorganize() : ConnectBlock 5f6005b9bcb8b85afc12 failed InvalidChainFound: invalid block=085525cad6aebf38338b height=2103810 work=1458353630782526333 date=02/21/18 17:50:10 InvalidChainFound: current best=08e6e9dfe5f89394cd40 height=2103808 work=1458348923889783327 date=02/21/18 17:48:29 ERROR: SetBestChain() : Reorganize failed ERROR: AcceptBlock() : AddToBlockIndex failed ERROR: ProcessBlock() : AcceptBlock FAILED received block a38bc6ef402b41390865 Difficulty Retarget - Gravity Well PastRateAdjustmentRatio = 0.938313 Before: 1b77a2fb 000000000077a2fb000000000000000000000000000000000000000000000000 After: 1b778819 0000000000778819d32866852278cdbec56b63bd0bee16e1fbf9ed2d08384b5e Postponing 2 reconnects REORGANIZE REORGANIZE: Disconnect 0 blocks; 08e6e9dfe5f89394cd40..08e6e9dfe5f89394cd40 REORGANIZE: Connect 1 blocks; 08e6e9dfe5f89394cd40..5f6005b9bcb8b85afc12 ERROR: Reorganize() : ConnectBlock 5f6005b9bcb8b85afc12 failed InvalidChainFound: invalid block=a38bc6ef402b41390865 height=2103811 work=1458355985598345792 date=02/21/18 17:54:05 InvalidChainFound: current best=08e6e9dfe5f89394cd40 height=2103808 work=1458348923889783327 date=02/21/18 17:48:29 ERROR: SetBestChain() : Reorganize failed ERROR: AcceptBlock() : AddToBlockIndex failed ERROR: ProcessBlock() : AcceptBlock FAILED received block dd3a9be241ac3fcf1c37 Difficulty Retarget - Gravity Well PastRateAdjustmentRatio = 0.935837 Before: 1b778819 0000000000778819000000000000000000000000000000000000000000000000 After: 1b77db0f 000000000077db0ffaca416cab079ec3339d69bc571c9d9dfdd8f4ae91fcc03a Postponing 3 reconnects REORGANIZE REORGANIZE: Disconnect 0 blocks; 08e6e9dfe5f89394cd40..08e6e9dfe5f89394cd40 REORGANIZE: Connect 1 blocks; 08e6e9dfe5f89394cd40..5f6005b9bcb8b85afc12 ERROR: Reorganize() : ConnectBlock 5f6005b9bcb8b85afc12 failed InvalidChainFound: invalid block=dd3a9be241ac3fcf1c37 height=2103812 work=1458358334047207816 date=02/21/18 18:00:44 InvalidChainFound: current best=08e6e9dfe5f89394cd40 height=2103808 work=1458348923889783327 date=02/21/18 17:48:29
|
|
|
16
|
Alternate cryptocurrencies / Announcements (Altcoins) / Re: DNotes 2.0 - Bridging the Gap Between the Centralized and Decentralized World
|
on: February 26, 2018, 07:08:38 PM
|
I'm on version 1020000 and so are all my peers. I already had several of the addnodes you listed.
I'm running the latest code from //github.com/DNotesCoin/DNotes.git
$ DNotesd getpeerinfo|grep ver "version" : 1020000, "subver" : "/DNotes:1.2.0/", "version" : 1020000, "subver" : "/DNotes:1.2.0/", "version" : 1020000, "subver" : "/DNotes:1.2.0/", "version" : 1020000, "subver" : "/DNotes:1.2.0/", "version" : 1020000, "subver" : "/DNotes:1.2.0/", "version" : 1020000, "subver" : "/DNotes:1.2.0/", "version" : 1020000, "subver" : "/DNotes:1.2.0/",
Good, I would recommend reset and re-download the blockchain. Yes, as I said I have already done that. There is obviously a group of forked nodes out there so it would be great if you could update checkpoints.cpp. Also, why is DNotesd missing so many RPC calls? You're missing getchaintips, getcheckpoint, and several other useful ones. I will update checkpoints today. That is possible, but the network should ban bad nodes. We don't plan on adding any RPC calls, we are working on our DNotes 2.0 release, coming in about a month. Is 2.0 going to be a rebase on a more recent bitcoin/litecoin or is it compleltely new code?
|
|
|
17
|
Alternate cryptocurrencies / Announcements (Altcoins) / Re: DNotes 2.0 - Bridging the Gap Between the Centralized and Decentralized World
|
on: February 26, 2018, 05:54:21 PM
|
I'm on version 1020000 and so are all my peers. I already had several of the addnodes you listed.
I'm running the latest code from //github.com/DNotesCoin/DNotes.git
$ DNotesd getpeerinfo|grep ver "version" : 1020000, "subver" : "/DNotes:1.2.0/", "version" : 1020000, "subver" : "/DNotes:1.2.0/", "version" : 1020000, "subver" : "/DNotes:1.2.0/", "version" : 1020000, "subver" : "/DNotes:1.2.0/", "version" : 1020000, "subver" : "/DNotes:1.2.0/", "version" : 1020000, "subver" : "/DNotes:1.2.0/", "version" : 1020000, "subver" : "/DNotes:1.2.0/",
Good, I would recommend reset and re-download the blockchain. Yes, as I said I have already done that. There is obviously a group of forked nodes out there so it would be great if you could update checkpoints.cpp. Also, why is DNotesd missing so many RPC calls? You're missing getchaintips, getcheckpoint, and several other useful ones.
|
|
|
18
|
Alternate cryptocurrencies / Announcements (Altcoins) / Re: DNotes 2.0 - Bridging the Gap Between the Centralized and Decentralized World
|
on: February 26, 2018, 07:35:37 AM
|
I'm on version 1020000 and so are all my peers. I already had several of the addnodes you listed.
I'm running the latest code from //github.com/DNotesCoin/DNotes.git
$ DNotesd getpeerinfo|grep ver "version" : 1020000, "subver" : "/DNotes:1.2.0/", "version" : 1020000, "subver" : "/DNotes:1.2.0/", "version" : 1020000, "subver" : "/DNotes:1.2.0/", "version" : 1020000, "subver" : "/DNotes:1.2.0/", "version" : 1020000, "subver" : "/DNotes:1.2.0/", "version" : 1020000, "subver" : "/DNotes:1.2.0/", "version" : 1020000, "subver" : "/DNotes:1.2.0/",
|
|
|
|