|
dga
|
 |
September 07, 2014, 05:20:36 PM |
|
Technology is opened and transparent. It's not messy - all you need is strong exprience with modern C++ design, passion and maybe little different attitude to it. (not you personally sure  ) It's not only my opinion - for example i have another dev who was helped me with some core patches (difficulty adjustment from 64 to 128 bit to be more concrete) - he also gave good feedback about codebase. And also it said dga (Dave Andersen) if i'm not mistaken (correct me if i wrong). I haven't looked at a lot of the core code for things like transactions. On the whole, I have mixed feelings about it. I can comment on, for example, the wild keccak implementation and the cryptonight PoW implementation: - CryptoNight was deliberately obfuscated, so it's not a very useful example. It was ugly, but it was someone clever trying to be ugly. The underlying *algorithm* (also invented by CN) was really elegant. - Wild Keccak was reasonable. It made use of some fancy very-modern C++ features in ways that I might call excessively clever (there's a funky use of a type trait template in there to differentiate the real keccak code from a tweaked version used in the PoW with extra multiplies), but that's a bit more in the realm of style, and I see why it was done that way. (I think that's related to some of my comments below about the code being designed for ease-of-being-written). - The RPC design is very reasonable. Much better than most of the C-based protocols in other currencies. The use of C++ there helps clean it up a lot, and it's both readable and easier to verify correctness and lack of things like buffer overflows. - The tree_hash code that PT was complaining about is almost unreadable and very difficult to determine what the heck it's actually trying to do. The lack of comments there are brutal for an outside developer. - The simpleminer code was mixed. It wasn't commented, but it wasn't too hard to figure out. I only spotted a few issues. - The code is structurally complex -- understanding it requires too much bouncing between many different files. It would really benefit from a big refactoring that focused on simplification and clarity. It has the feel of code that was written with an eye towards programmer efficiency on *writing* (getting a lot out of relatively few lines of code). Simple examples would be things like "why the heck is get_donation_accounts() in a file called currency_format_utils.cpp" (or the equivalent functions in cryptonote_format_utils for XMR). The last comment is really the best way to sum up the state of the codebase: My guess is that it was written by folks who know what they're doing, but were focused on developer speed, not the kind of structure that makes it easier to maintain the code over longer periods of time. A lot of that can be fixed with refactoring and (serious) reviews from other developers about where things need to be clarified. Some bits should be shot and rewritten, such as that nasty bit of C that PT identified. There are some big chunks in C that I haven't looked at, and which I gather are the source of a lot of the horribleness. But it's not too hard for a good C++ programmer to jump in and start doing some work on the parts of the codebase that *aren't* directly tied to the core transaction stuff. That part will take someone longer to get into, but it's not impossible.
|
|
|
|
smooth
Legendary

Activity: 2982
Merit: 1203
|
 |
September 07, 2014, 05:26:26 PM |
|
I'm updating my copy of the blockhain with 0.8.8.3 and it's saying it is -3 days ahead at this point. Is this how it is supposed to be going?
My guess is that it's seeing that the bad chain exists, and will download that, fail to verify it and its work, and switch back to the main chain. Should I download the blockchain from the OP and use it instead of what I have synced or is mine ok? You are okay as long as you updated to the latest release are able to sync to the current height, no need to download a new blockchain. It is the peer you connected with that is on the wrong chain. Nothing we can do about that, some nodes are just neglected, forgotten, etc. The network must function even with bad nodes, and it does.
|
|
|
|
|
trip96
Newbie

Activity: 55
Merit: 0
|
 |
September 07, 2014, 05:39:34 PM |
|
My progress: Downloaded new client from the original post (0.8.8.3) Everything is fine. Windows 7 64-bit. Just synced and it went smoothly.
|
|
|
|
|
argentinx
Member


Activity: 109
Merit: 10
|
 |
September 07, 2014, 05:45:58 PM |
|
2014-Sep-07 19:43:22.135157 [P2P5][193.150.121.37:18080 OUT]Sync data returned u nknown top block: 205913 -> 207812 [1899 blocks (1 days) behind] SYNCHRONIZATION started 2014-Sep-07 19:43:25.102635 [P2P4][68.52.136.224:18080 OUT]Sync data returned un known top block: 205968 -> 207812 [1844 blocks (1 days) behind] SYNCHRONIZATION started 2014-Sep-07 19:44:36.040358 [P2P7][188.40.137.12:18080 OUT] SYNCHRONIZED OK 2014-Sep-07 19:45:17.156474 [P2P3][95.188.116.35:18080 OUT]Sync data returned un known top block: 207812 -> 202659 [5153 blocks (-3 days) ahead] SYNCHRONIZATION started 2014-Sep-07 19:46:10.360146 [P2P7][54.64.122.255:18080 OUT]Sync data returned un known top block: 207813 -> 202659 [5154 blocks (-3 days) ahead] SYNCHRONIZATION started 2014-Sep-07 19:46:13.816759 [P2P7]Block with id: <78fbbca5edea204b3ff5e92fbe6413 029a32849ccad434481cc9e2b944244845> can't be accepted for alternative chain, block height: 202658 blockchain height: 207813 2014-Sep-07 19:46:13.847525 [P2P7][54.64.122.255:18080 OUT]Block verification fa iled, dropping connection what is the problem?
|
|
|
|
|
|
equipoise
|
 |
September 07, 2014, 05:49:03 PM |
|
Literally nothing has changed in the way the wallet works in the last two weeks. OK. But when i open bitmonerod.exe, see: "Sync data returned unknown top block: 206081 -> 207740 [1499 blocks (1 days) behind] SYNCHRONIZATION started" That's all. SYNCHRONIZATION stops and does not go beyond! What does it mean, hah? That's OK? Then i open simplewallet.exe but it freezes after enter of password. If I have try to make a new XMR Wallet, simplewallet.exe also freezes after enter of password. What i did wrong?  Just wait some time and you should be OK. Simplewallet is waiting for a response from bitmonerod - that's why it freezes. Bitmonerod is starting the sync and is just 1 day behind, so just wait it to finish.
|
|
|
|
psterryl
Member


Activity: 87
Merit: 10
|
 |
September 07, 2014, 05:50:34 PM |
|
2014-Sep-07 19:43:22.135157 [P2P5][193.150.121.37:18080 OUT]Sync data returned u nknown top block: 205913 -> 207812 [1899 blocks (1 days) behind] SYNCHRONIZATION started 2014-Sep-07 19:43:25.102635 [P2P4][68.52.136.224:18080 OUT]Sync data returned un known top block: 205968 -> 207812 [1844 blocks (1 days) behind] SYNCHRONIZATION started 2014-Sep-07 19:44:36.040358 [P2P7][188.40.137.12:18080 OUT] SYNCHRONIZED OK 2014-Sep-07 19:45:17.156474 [P2P3][95.188.116.35:18080 OUT]Sync data returned un known top block: 207812 -> 202659 [5153 blocks (-3 days) ahead] SYNCHRONIZATION started 2014-Sep-07 19:46:10.360146 [P2P7][54.64.122.255:18080 OUT]Sync data returned un known top block: 207813 -> 202659 [5154 blocks (-3 days) ahead] SYNCHRONIZATION started 2014-Sep-07 19:46:13.816759 [P2P7]Block with id: <78fbbca5edea204b3ff5e92fbe6413 029a32849ccad434481cc9e2b944244845> can't be accepted for alternative chain, block height: 202658 blockchain height: 207813 2014-Sep-07 19:46:13.847525 [P2P7][54.64.122.255:18080 OUT]Block verification fa iled, dropping connection what is the problem? No problem, just your node receiving blocks from others that are on the wrong chain. You can safely ignore these errors.
|
|
|
|
|
argentinx
Member


Activity: 109
Merit: 10
|
 |
September 07, 2014, 05:53:03 PM |
|
perfect thanks but I thought that they patched all nodes
|
|
|
|
|
psterryl
Member


Activity: 87
Merit: 10
|
 |
September 07, 2014, 05:54:10 PM |
|
perfect thanks but I thought that they patched all nodes
Nope, they released a patched version. It's up to all the people running these nodes (like you and me) to update to the correct version, or they won't be able to use their wallets.
|
|
|
|
|
coins101
Legendary

Activity: 1456
Merit: 1002
|
 |
September 07, 2014, 06:24:10 PM |
|
I'm updating my copy of the blockhain with 0.8.8.3 and it's saying it is -3 days ahead at this point. Is this how it is supposed to be going?
My guess is that it's seeing that the bad chain exists, and will download that, fail to verify it and its work, and switch back to the main chain. Should I download the blockchain from the OP and use it instead of what I have synced or is mine ok? You are okay as long as you updated to the latest release are able to sync to the current height, no need to download a new blockchain. It is the peer you connected with that is on the wrong chain. Nothing we can do about that, some nodes are just neglected, forgotten, etc. The network must function even with bad nodes, and it does. I must have missed something. Is this release a patch or final fix? There was a post a few pages back that there was a rollback - is that part of the patch or fix, to get rid of the corrupt block(s)? https://bitcointalk.org/index.php?topic=583449.msg8698576#msg8698576Thanks Edit: Just seen the post above which indicates this is a patch release.
|
|
|
|
|
|
othe
|
 |
September 07, 2014, 06:30:04 PM |
|
Coins101, you understood the word rollback in a incorrect manner. The patch just syncs to the correct chain if you are stuck on the wrong one; it goes back to the block where the split occured and syncs from there on.
This "rollback" has nothning todo with a bc rollback, i agree the word is confusingly used tho.
This is a "final fix" or "patch" call it how you want but the daemon continues to operate correct with it.
|
|
|
|
coins101
Legendary

Activity: 1456
Merit: 1002
|
 |
September 07, 2014, 06:41:34 PM |
|
Coins101, you understood the word rollback in a incorrect manner. The patch just syncs to the correct chain if you are stuck on the wrong one; it goes back to the block where the split occured and syncs from there on.
This "rollback" has nothning todo with a bc rollback, i agree the word is confusingly used tho.
This is a "final fix" or "patch" call it how you want but the daemon continues to operate correct with it.
Obviously not my area of expertise, but longest chains are supposed to win and miners will eventually drop shorter chains when the proper blocks are eventually broadcast across the network. So, I'd be interested to know what the fix, fixed. Was it a patch that fixed the attackers means to enter the network with a checkpoint that loses the corrupted chain(s)?
|
|
|
|
|
smooth
Legendary

Activity: 2982
Merit: 1203
|
 |
September 07, 2014, 06:47:16 PM Last edit: September 07, 2014, 07:02:57 PM by smooth |
|
Coins101, you understood the word rollback in a incorrect manner. The patch just syncs to the correct chain if you are stuck on the wrong one; it goes back to the block where the split occured and syncs from there on.
This "rollback" has nothning todo with a bc rollback, i agree the word is confusingly used tho.
This is a "final fix" or "patch" call it how you want but the daemon continues to operate correct with it.
Obviously not my area of expertise, but longest chains are supposed to win and miners will eventually drop shorter chains when the proper blocks are eventually broadcast across the network. So, I'd be interested to know what the fix, fixed. Was it a patch with a checkpoint that loses the corrupted chain(s)? There were three fixes. One to prevent the type of malicious blocks that caused the fork from being used again, the second is adding checkpoints to make sure you are on the correct fork when syncing past the malicious blocks, and finally checking of checkpoints in the saved blockchain file to ensure that you end up on the correct fork after restarting your daemon. The normal "longest chain wins" code used for normal forks that happen all the time (usually just one or two blocks, but can be longer) doesn't work in this case without the fixes because it assumes that there is only one version of a block with the same block ID, which the exploit violated.
|
|
|
|
|
coins101
Legendary

Activity: 1456
Merit: 1002
|
 |
September 07, 2014, 06:54:07 PM |
|
Thanks @smooth
|
|
|
|
|
fluffypony
Donator
Legendary

Activity: 1274
Merit: 1069
GetMonero.org / MyMonero.com
|
 |
September 07, 2014, 06:58:02 PM |
|
Obviously not my area of expertise, but longest chains are supposed to win and miners will eventually drop shorter chains when the proper blocks are eventually broadcast across the network. So, I'd be interested to know what the fix, fixed. Was it a patch that fixed the attackers means to enter the network with a checkpoint that loses the corrupted chain(s)?
Ah yes - sorry, the terminology used in the blockchain storage class is rollback - https://github.com/monero-project/bitmonero/blob/master/src/cryptonote_core/blockchain_storage.cpp#L399rollback_blockchain_switching() is used when a node disconnects from one chain, rolls back, and then switches to another chain that it determines is "best" (longest verifiable).
|
|
|
|
coins101
Legendary

Activity: 1456
Merit: 1002
|
 |
September 07, 2014, 07:17:44 PM |
|
Obviously not my area of expertise, but longest chains are supposed to win and miners will eventually drop shorter chains when the proper blocks are eventually broadcast across the network. So, I'd be interested to know what the fix, fixed. Was it a patch that fixed the attackers means to enter the network with a checkpoint that loses the corrupted chain(s)?
Ah yes - sorry, the terminology used in the blockchain storage class is rollback - https://github.com/monero-project/bitmonero/blob/master/src/cryptonote_core/blockchain_storage.cpp#L399rollback_blockchain_switching() is used when a node disconnects from one chain, rolls back, and then switches to another chain that it determines is "best" (longest verifiable). Thanks. This sounds like a temporary patch (based on smooth response above) because of constant moving check points pushing everyone back to a particular chain rather than a chain chosen by consensus? If so, is there a time frame when there are sufficient number of blocks to enable the checkpoints to be removed?
|
|
|
|
|
smooth
Legendary

Activity: 2982
Merit: 1203
|
 |
September 07, 2014, 07:29:36 PM |
|
Obviously not my area of expertise, but longest chains are supposed to win and miners will eventually drop shorter chains when the proper blocks are eventually broadcast across the network. So, I'd be interested to know what the fix, fixed. Was it a patch that fixed the attackers means to enter the network with a checkpoint that loses the corrupted chain(s)?
Ah yes - sorry, the terminology used in the blockchain storage class is rollback - https://github.com/monero-project/bitmonero/blob/master/src/cryptonote_core/blockchain_storage.cpp#L399rollback_blockchain_switching() is used when a node disconnects from one chain, rolls back, and then switches to another chain that it determines is "best" (longest verifiable). Thanks. This sounds like a temporary patch (based on smooth response above) because of constant moving check points pushing everyone back to a particular chain rather than a chain chosen by consensus? If so, is there a time frame when there are sufficient number of blocks to enable the checkpoints to be removed? Checkpoints were only needed in this case because of the exploit. Most coins do use checkpoints in practice, including Bitcoin, even if they aren't needed in theory (if everything works as intended).
|
|
|
|
|
smooth
Legendary

Activity: 2982
Merit: 1203
|
 |
September 07, 2014, 07:30:58 PM |
|
Obviously not my area of expertise, but longest chains are supposed to win and miners will eventually drop shorter chains when the proper blocks are eventually broadcast across the network. So, I'd be interested to know what the fix, fixed. Was it a patch that fixed the attackers means to enter the network with a checkpoint that loses the corrupted chain(s)?
Ah yes - sorry, the terminology used in the blockchain storage class is rollback - https://github.com/monero-project/bitmonero/blob/master/src/cryptonote_core/blockchain_storage.cpp#L399rollback_blockchain_switching() is used when a node disconnects from one chain, rolls back, and then switches to another chain that it determines is "best" (longest verifiable). Thanks. This sounds like a temporary patch (based on smooth response above) because of constant moving check points pushing everyone back to a particular chain rather than a chain chosen by consensus? If so, is there a time frame when there are sufficient number of blocks to enable the checkpoints to be removed? the consensus code worked, only one forked survived, the problem was people were stuck on the bad fork, but now with new binaries its impossible to go wrong  It sort of worked. Everyone should have switched to one chain once it got longer (switches back and forth a few times are possible until it is clear which chain wins), and that part didn't work.
|
|
|
|
|
aminorex
Legendary

Activity: 1596
Merit: 1031
Sine secretum non libertas
|
 |
September 07, 2014, 08:13:00 PM |
|
At this point the attack has been handled with neither a persistent fork nor a roll-back. Well done.
|
Give a man a fish and he eats for a day. Give a man a Poisson distribution and he eats at random times independent of one another, at a constant known rate.
|
|
|
Aaxx
Newbie

Activity: 14
Merit: 0
|
 |
September 07, 2014, 09:17:46 PM |
|
Well done. Still can't sync bitmonerod. I delete my p2pstate.bin, poolstate.bin, myXMR.bin. Then start bitmonerod with the flag "--add-priority-node 88.151.101.22:18080". "Sync data returned unknown top block: 206081 -> 208005 [1924 blocks (1 days) behind]" I definitely stuck on 202656 so wrong fork i guess. This blockchain.bin http://monero.cc/downloads/blockchain/win/blockchain.binSHA-1: 8c23da70c1291a61444090d8d5127dd6c12efa81 didn't work for me on Windows 7 64-bit. Please, Kind people give me link to download right blockchain.bin after 202656! Cry for help!  P.S. I also want to add in file of start of bitmonerod: --add-exclusive-node 178.253.202.230:18080 --add-exclusive-node 79.140.20.93:18080 --add-exclusive-node 78.27.112.54:18080 --add-exclusive-node 114.219.164.13:18080 --add-exclusive-node 89.240.241.74:18080 --add-exclusive-node 37.52.249.122:18080 --add-exclusive-node 128.171.159.20:18080 --add-exclusive-node 75.118.218.3:18080 May be it helps? 
|
|
|
|
|
fluffypony
Donator
Legendary

Activity: 1274
Merit: 1069
GetMonero.org / MyMonero.com
|
 |
September 07, 2014, 09:22:36 PM |
|
Still can't sync bitmonerod. I delete my p2pstate.bin, poolstate.bin, myXMR.bin. Then start bitmonerod with the flag "--add-priority-node 88.151.101.22:18080". "Sync data returned unknown top block: 206081 -> 208005 [1924 blocks (1 days) behind]" I definitely stuck on 202656 so wrong fork i guess. This blockchain.bin http://monero.cc/downloads/blockchain/win/blockchain.binSHA-1: 8c23da70c1291a61444090d8d5127dd6c12efa81 didn't work for me on Windows 7 64-bit. Please, Kind people give me link to download right blockchain.bin after 202656! Cry for help!  P.S. I also want to add in file of start of bitmonerod: --add-exclusive-node 178.253.202.230:18080 --add-exclusive-node 79.140.20.93:18080 --add-exclusive-node 78.27.112.54:18080 --add-exclusive-node 114.219.164.13:18080 --add-exclusive-node 89.240.241.74:18080 --add-exclusive-node 37.52.249.122:18080 --add-exclusive-node 128.171.159.20:18080 --add-exclusive-node 75.118.218.3:18080 May be it helps?  Why are you specifying nodes?!?!??? Just start bitmonerod.exe and let it run, don't specify any nodes unless you absolutely know what you're doing!!!
|
|
|
|
|