Author

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

member
Activity: 103
Merit: 10
September 17, 2013, 06:39:39 PM
Out of curiosity, what is this saying that suggest an attack is going on rather than just people mining? I'm new to cryptocurrencies.
As an attacker you mine on your own chain for a while (without broadcasting it to all the others), then suddenly add your blocks and so overrule the legit chain. All transactions on the legit chain while that period will be reversed so you can buy stuff without actually loosing coins.
Well, this might not have been intentional. Someone could have had a lot of PoS blocks found all at once or some PoS blocks were not broadcast to all nodes (and with PoS having a higher priority than PoW, they easily overtook the chain). Also, this was happening a lot in the early days of YAC (diff = 0 and stuff).
The replacing blocks were AFIK all PoW so this isn't just a minor coincidence. It's either a attacker that wants to harm YAC or a serious bug. None of that should be taken too lightly. We will see.
Nope,
Code:
11.9.2013 16:54:36 REORGANIZE: Connect 1 blocks; 00000007c5835b4968bd..547db4922a8b8e71ff85
was a PoS block that wiped out 34 PoW blocks. (You see it's a PoS by the hash's first bytes - 547db4922a8b8e71ff85 - no leading zeroes = very lwo difficulty = PoS block).

My node switched to "~15 blocks remaining" mode, e.g. not synced, so it was not just ordinary PoS "overtake". Only after 15 more legit blocks
were found node went to synced mode.
This has been a known problem for months.  Check about 30 pages back or so (I don't care enough to find the link).  This would be a really trivial attack.  I think it's surprising that this hasn't be exploited more often.
Is this a problem?  Back reading it seems like a huge issue.
hero member
Activity: 802
Merit: 1003
GCVMMWH
September 17, 2013, 05:49:57 PM
I'll try making some code tweaks to show this in GUI.
Hmm... The best I seem to come up with is adding an RPC call to determine if PoS miner thread was started. Dunno how to interact with the Qt gui from the bitcoind code (not a GUI coder).

Signals and slots sairon... signals and slots   Wink   I will try to find some time to do this before the next release.
sr. member
Activity: 406
Merit: 250
One does not simply mine Bitcoins
September 17, 2013, 05:10:21 PM
I'll try making some code tweaks to show this in GUI.
Hmm... The best I seem to come up with is adding an RPC call to determine if PoS miner thread was started. Dunno how to interact with the Qt gui from the bitcoind code (not a GUI coder).
sr. member
Activity: 266
Merit: 250
September 17, 2013, 04:55:21 PM
Great.  Smiley

Thanks for the help BitMega and Sairon.
sr. member
Activity: 406
Merit: 250
One does not simply mine Bitcoins
September 17, 2013, 04:37:42 PM
Hi Sairon.

I've got two "CPUMiner started for proof-of-stake" in my debug.log since I installed the CC version yesterday. The time-stamp at the top looks like it might be in UNIX time since it doesn't match mine. So the PoS minting seems to be working.

Does the CPUminer just not use much of the CPU to mine PoS blocks? It's still sitting at 1-3% CPU usage.
Yeah, it's just trying every now and then - computes one hash, checks if it's suitable for a PoS block and then slacks off for a while (half a second). (I've had it running for over 100 days on my server with no coins and it consumed just around 60 hours of CPU time.)
sr. member
Activity: 266
Merit: 250
September 17, 2013, 04:35:42 PM
Hi Sairon.

I've got two "CPUMiner started for proof-of-stake" in my debug.log since I installed the CC version yesterday. The time-stamp at the top looks like it might be in UNIX time since it doesn't match mine. So the PoS minting seems to be working.

Does the CPUminer just not use much of the CPU to mine PoS blocks? It's still sitting at 1-3% CPU usage.
sr. member
Activity: 406
Merit: 250
One does not simply mine Bitcoins
September 17, 2013, 04:14:09 PM
Hi BitMega. I've had..

server=1
rpcuser=forsetifox
rpcpassword=coins
rpcallowip=192.168.*.*
rpcport=7687
maxconnections=24

In my yacoin.conf since the beginning. Adding "gen=0" will make it start to mine PoS blocks?
My CPU is at 1-2% usage right now. Doesn't seem to be working. =/
Dunno how you do it on Windows, but if you can manage to view process threads (and if Windows permits custom thread names), you will see a single thread named "bitcoin-miner" even if you're not PoW mining (if you are PoW mining in Yacoin-QT, then you'll see NUMBER_OF_CPUS + 1 bitcoin-miner threads) - this thread is the PoS miner.

EDIT: or simply search debug.log file for "CPUMiner started for proof-of-stake". I'll try making some code tweaks to show this in GUI.
sr. member
Activity: 266
Merit: 250
September 17, 2013, 03:58:51 PM
Hi BitMega. I've had..

server=1
rpcuser=forsetifox
rpcpassword=coins
rpcallowip=192.168.*.*
rpcport=7687
maxconnections=24

In my yacoin.conf since the beginning. Adding "gen=0" will make it start to mine PoS blocks?
My CPU is at 1-2% usage right now. Doesn't seem to be working. =/
sr. member
Activity: 266
Merit: 250
September 17, 2013, 03:27:47 AM
Hm.. I've had coins in my wallet for 34 days and no PoS blocks made yet. Is there something I need to do for that to happen?
hero member
Activity: 802
Merit: 1003
GCVMMWH
September 16, 2013, 04:02:32 PM
It's the DB. NVC is currently at 42081 and PPC is at 69666.     
sr. member
Activity: 406
Merit: 250
One does not simply mine Bitcoins
September 16, 2013, 03:33:39 PM
8 connections are plenty if you're not a pool or a miner. I once tweaked the node on my block explorer server to have as much connections as possible (it was hovering around 130 IIRC), but I saw no actual benefit, so I closed the port in firewall and allowed only outbound connection (thus reducing the chance on potential attackers).
Network can't exist if everyone allow just outbound connections.
True. However, I don't see myself reverting that decision as my VPS bill is 100% payment for I/O requests at the moment. Smiley More connections = more block requests from peers = more I/O load on my server = higher upkeep cost for me.
sr. member
Activity: 406
Merit: 250
One does not simply mine Bitcoins
September 16, 2013, 03:07:29 PM
I'm assuming he meant a user-friendly clicky GUI thingy. Wink
Not sure why that feat is removed in the first place?  Huh
No idea.
BTW, we should really switch from BerkeleyDB to LevelDB... These client start-up times are driving me crazy.
Why you think it is up to database? Bitcoin was using BerkeleyDB for years and even though blockchain size was in gigabytes and number of
transactions far exceeded any other cryptocoin I never experienced as long startups as with YACoin. Most LTC and NVC "clones" start much
faster than YACoin as well. Is there some kind of tool that could monitor what exactly is YACoin doing for those 6+ minutes at it's startup?
I'm not certain it's the DB, but I inserted debug statements into the loading code and most of the time was spent loading the blockchain into memory. IMHO the main reason is the number of blocks (we will be on par with BTC pretty soon, and BTC switched to LevelDB AGES ago). Dunno about the other coins though. Also the loading algorithms might be heavily outdated and thus slow. That said, this needs further investigation and a fix ASAP.

Some code references:
* https://github.com/yacoin/yacoin/blob/master/src/init.cpp#L671 (the comment in particular)
* https://github.com/yacoin/yacoin/blob/master/src/db.cpp#L824 (IIRC the slowest part of the code)
* https://github.com/yacoin/yacoin/blob/master/src/db.cpp#L642 (some heavy-weight sanity checking, IIRC the second slowest part)
* https://github.com/yacoin/yacoin/blob/master/src/db.cpp#L884 (maybe [but I'm really just guessing] this might be also a fairly slow operation, especially as the number of coin stakes will grow)

EDIT: Done! https://maps.google.com/maps?q=http://yacexplorer.tk/static/peers.kml Grin
You can get the raw files here http://yacexplorer.tk/graphs.htm#stats

Online/offline status is not (yet) included. However, I doubt it will be of any use as it is constantly changing, so I'm giving this a very low priority.
Some screenshot pr0n below (US and EU):


Cool maps there!
Thanks!

As a sidenote, I have YAC, XPM and BTC clients running on my computer, each with maxconnections=32 in .conf file. After 12 hours or so, the
situation with number of nodes connected is usualy something like listed bellow.

YACoin - 32 connections
Bitcoin - 24 connections
Primecoin - 12 connections

No idea how to properly interpret that data though. One of the reasons why YACoin gets so much more connections could be the lack of UPnP
with Coin Control versions (which I solved using PortMapper), e.g. nodes that connect to network after my node went online need to connect
to other nodes to complete syncing but due to Coin Control nodes not being able to accept connections it is my node that ends up "slammed".

FYI, I'm located at Eastern Europe.
8 connections are plenty if you're not a pool or a miner. I once tweaked the node on my block explorer server to have as much connections as possible (it was hovering around 130 IIRC), but I saw no actual benefit, so I closed the port in firewall and allowed only outbound connection (thus reducing the chance on potential attackers).
Also, the code is smart enough to connect to different subnets to minimize the risk of connecting to "bad" nodes (eg. someone could spam your peer list with nodes that he controls - and they will usually fall into the same network subnet). So you might just happen to be one of only a few nodes in that particular network "area".
hero member
Activity: 1426
Merit: 506
September 16, 2013, 01:04:44 AM
Sorry if this has already been asked, but what is the most up to date YAC wallet now? Also, I remember reading a while ago that a new wallet is being developed with control over individual sending addresses. Is this still in the works? I'd like to tip the dev team, which direction should I throw that to?
If you want to download prebuilt windows binary of Yacoin-QT with CC included (and the Yak logos, LOL), I've created this thread: https://bitcointalksearch.org/topic/annyac-coin-control-for-yacoin-is-here-first-altcoin-with-coin-control-276948
Please report any bugs you find (but I hope there are no more bugs). You can send tips for the Coin Control to me. Tongue

Sent you a little thanks for the hard work!
member
Activity: 103
Merit: 10
September 16, 2013, 12:07:33 AM
Out of curiosity, what is this saying that suggest an attack is going on rather than just people mining? I'm new to cryptocurrencies.
As an attacker you mine on your own chain for a while (without broadcasting it to all the others), then suddenly add your blocks and so overrule the legit chain. All transactions on the legit chain while that period will be reversed so you can buy stuff without actually loosing coins.
Well, this might not have been intentional. Someone could have had a lot of PoS blocks found all at once or some PoS blocks were not broadcast to all nodes (and with PoS having a higher priority than PoW, they easily overtook the chain). Also, this was happening a lot in the early days of YAC (diff = 0 and stuff).
The replacing blocks were AFIK all PoW so this isn't just a minor coincidence. It's either a attacker that wants to harm YAC or a serious bug. None of that should be taken too lightly. We will see.
Nope,
Code:
11.9.2013 16:54:36 REORGANIZE: Connect 1 blocks; 00000007c5835b4968bd..547db4922a8b8e71ff85
was a PoS block that wiped out 34 PoW blocks. (You see it's a PoS by the hash's first bytes - 547db4922a8b8e71ff85 - no leading zeroes = very lwo difficulty = PoS block).

My node switched to "~15 blocks remaining" mode, e.g. not synced, so it was not just ordinary PoS "overtake". Only after 15 more legit blocks
were found node went to synced mode.
This has been a known problem for months.  Check about 30 pages back or so (I don't care enough to find the link).  This would be a really trivial attack.  I think it's surprising that this hasn't be exploited more often.
sr. member
Activity: 274
Merit: 250
September 15, 2013, 08:08:56 PM
Very cool google map view. Cool YACoin has some of the best developer support around despite its low price.
sr. member
Activity: 280
Merit: 250
September 15, 2013, 04:53:53 PM
Great work. I really like it.

I like the distribution, but there are still far too much free areas. Has anyone heard about someone doing this on bitcoin?
hero member
Activity: 802
Merit: 1003
GCVMMWH
September 15, 2013, 12:01:35 PM
I'm assuming he meant a user-friendly clicky GUI thingy. Wink

Not sure why that feat is removed in the first place?  Huh

PPC and NVC were not intended to be CPU coins.
hero member
Activity: 802
Merit: 1003
GCVMMWH
September 15, 2013, 11:59:49 AM
I'm assuming he meant a user-friendly clicky GUI thingy. Wink
Not sure why that feat is removed in the first place?  Huh
No idea.
BTW, we should really switch from BerkeleyDB to LevelDB... These client start-up times are driving me crazy.

* ∞   This need to be in the top things to do for the next next (0.4.2) client.
sr. member
Activity: 406
Merit: 250
One does not simply mine Bitcoins
September 15, 2013, 08:01:44 AM
Hi all, I have had a question I've wanted to ask for a while now. Is there a way of knowing how many active nodes/wallets are operating on the network? Has there been much fluctuation in the number of active wallets?
Determining the number of active nodes should be possible by either forcing your client to connect to an unlimited number of nodes and waiting a long time (quick slow and dirty) OR you could parse the peers.dat file inside yacoin data directoy (where the yacoin.conf file is) and try pinging each IP from the list you get (may be inaccurate due to dropped ICMP packets on their firewall and whatnot) or better yet, connecting to the yacoin port (this might help against the firewall issue). But still, the nodes behind overly restrictive firewalls will appear as offline. So the best bet is to actually force the client to connect to all of them (and waiting, waiting, waiting...).
Heh, so actually you can read the number of peers in the peers.dat file by looking at debug.log file:
Code:
Flushed 13214 addresses to peers.dat  114ms
I've also modified the source to output these addresses in plaintext format. Working on gathering more info (last seen, etc...), then I might publish a KML file with approximate location of these IP addresses and their status (online/offline) so it could be viewed as an overlay in Google Maps/Earth.

EDIT: Done! https://maps.google.com/maps?q=http://yacexplorer.tk/static/peers.kml Grin
You can get the raw files here http://yacexplorer.tk/graphs.htm#stats

Online/offline status is not (yet) included. However, I doubt it will be of any use as it is constantly changing, so I'm giving this a very low priority.
Some screenshot pr0n below (US and EU):
sr. member
Activity: 406
Merit: 250
One does not simply mine Bitcoins
September 15, 2013, 07:35:45 AM
I'm assuming he meant a user-friendly clicky GUI thingy. Wink
Not sure why that feat is removed in the first place?  Huh
No idea.
BTW, we should really switch from BerkeleyDB to LevelDB... These client start-up times are driving me crazy.
Jump to: