{"action":"created","issue":{"url":"https://api.github.com/repos/monero-project/monero/issues/3717","repository_url":"https://api.github.com/repos/monero-project/monero","labels_url":"https://api.github.com/repos/monero-project/monero/issues/3717/labels{/name}","comments_url":"https://api.github.com/repos/monero-project/monero/issues/3717/comments","events_url":"https://api.github.com/repos/monero-project/monero/issues/3717/events","html_url":"https://github.com/monero-project/monero/issues/3717","id":318509715,"number":3717,"title":"Nodes creating block templates that they will reject","user":{"login":"zawy12","id":18004719,"avatar_url":"https://avatars2.githubusercontent.com/u/18004719?v=4","gravatar_id":"","url":"https://api.github.com/users/zawy12","html_url":"https://github.com/zawy12","followers_url":"https://api.github.com/users/zawy12/followers","following_url":"https://api.github.com/users/zawy12/following{/other_user}","gists_url":"https://api.github.com/users/zawy12/gists{/gist_id}","starred_url":"https://api.github.com/users/zawy12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zawy12/subscriptions","organizations_url":"https://api.github.com/users/zawy12/orgs","repos_url":"https://api.github.com/users/zawy12/repos","events_url":"https://api.github.com/users/zawy12/events{/privacy}","received_events_url":"https://api.github.com/users/zawy12/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-27T18:41:51Z","updated_at":"2018-04-28T16:39:02Z","closed_at":null,"author_association":"NONE","body":"GraftNetwork experienced an interesting attack based on Cryptnote/Monero settings. It's described [here](https://github.com/graft-project/GraftNetwork/pull/118#issuecomment-384599435) and [here](https://github.com/graft-project/GraftNetwork/issues/116).   Basically a big miner mines a lot of blocks with timestamps set just below the FTL (future time limit of what nodes will accept as a valid timestamp).  He soon \"owns the MTP\" which means his forwarded timestamps become the basis of the MTP.  MTP = median time past.   If that falsified MTP is > current time, miners submitting blocks with timestamps from honest nodes will be rejected  **The pool or miner needs to change the timestamp to MTP+1 if current time is less than MTP.** ( This is what every clone should be correcting right now). He can then mine without competition for a few blocks.  Apparently honest miners can be locked out a lot of block if they do not request a new block template after the MTP starts being in the past of the node's clock.  \r\n\r\nThe attack can be performed on Monero with > 58% hash power applied for 35 blocks to briefly stop all miners and pools fro getting blocks accepted.  All clones are vulnerable, except those who had already lowered their FTL to 500 when getting their new marvelous DA. \r\n\r\nTo perform the attack, and attacker needs a hashrate of about MTP/FTL + 0.5 multiplied by the baseline hashrate in order to do the attack, where MTP and FTL are in terms of the target solvetime. For Monero, MTP = (60+1)/2 and FTL = 60.  This is if the difficulty algorithm is slow like Monero's.  Difficulty algorithms that try to estimate current hashrate instead of the average of past 24 hours are much less vulnerable.\r\n\r\nSomeone has said \"we do not consider > 51% attacks meaningful\" but that's life on an hourly basis if you're not the biggest coin for a given POW.\r\n\r\nBut anyway, shouldn't nodes be prevented from handing out block templates that they will reject?"},"comment":{"url":"https://api.github.com/repos/monero-project/monero/issues/comments/385189108","html_url":"https://github.com/monero-project/monero/issues/3717#issuecomment-385189108","issue_url":"https://api.github.com/repos/monero-project/monero/issues/3717","id":385189108,"user":{"login":"iamsmooth","id":8495206,"avatar_url":"https://avatars2.githubusercontent.com/u/8495206?v=4","gravatar_id":"","url":"https://api.github.com/users/iamsmooth","html_url":"https://github.com/iamsmooth","followers_url":"https://api.github.com/users/iamsmooth/followers","following_url":"https://api.github.com/users/iamsmooth/following{/other_user}","gists_url":"https://api.github.com/users/iamsmooth/gists{/gist_id}","starred_url":"https://api.github.com/users/iamsmooth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamsmooth/subscriptions","organizations_url":"https://api.github.com/users/iamsmooth/orgs","repos_url":"https://api.github.com/users/iamsmooth/repos","events_url":"https://api.github.com/users/iamsmooth/events{/privacy}","received_events_url":"https://api.github.com/users/iamsmooth/received_events","type":"User","site_admin":false},"created_at":"2018-04-28T16:39:02Z","updated_at":"2018-04-28T16:39:02Z","author_association":"CONTRIBUTOR","body":"Yes, I agree it doesn't make a lot of difference in practice. As a miner, I wouldn't add 1, just because I don't see how it can possibly help me and it could possibly hurt me (even if unlikely).\r\n\r\nIf it had some generally beneficial effect, then it might be justified since the incentive to remove it is low, but I'm not sure what that beneficial effect would be either.\r\n\r\nBTW, the attacker doesn't strictly need to solve the blocks in 1 second, they only need to solve the necessary number of blocks with the desired median and then have those blocks presented to the network at an acceptable time (once FTL has advanced). Since they control >50% they can always outpace the rest of the network.\r\n\r\nStill, this doesn't make the difference not small.\r\n\r\nI just looked and Bitcoin includes the +1, and it seems odd to see the same off-by-one error there too, so I guess maybe they have a reason."}}
{"actor":{"display_login":"iamsmooth"}}