{"action":"created","issue":{"url":"https://api.github.com/repos/steemit/steem/issues/563","repository_url":"https://api.github.com/repos/steemit/steem","labels_url":"https://api.github.com/repos/steemit/steem/issues/563/labels{/name}","comments_url":"https://api.github.com/repos/steemit/steem/issues/563/comments","events_url":"https://api.github.com/repos/steemit/steem/issues/563/events","html_url":"https://github.com/steemit/steem/issues/563","id":188132758,"number":563,"title":"Account bandwidth updating issue","user":{"login":"abitmore","id":9946777,"avatar_url":"https://avatars.githubusercontent.com/u/9946777?v=3","gravatar_id":"","url":"https://api.github.com/users/abitmore","html_url":"https://github.com/abitmore","followers_url":"https://api.github.com/users/abitmore/followers","following_url":"https://api.github.com/users/abitmore/following{/other_user}","gists_url":"https://api.github.com/users/abitmore/gists{/gist_id}","starred_url":"https://api.github.com/users/abitmore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abitmore/subscriptions","organizations_url":"https://api.github.com/users/abitmore/orgs","repos_url":"https://api.github.com/users/abitmore/repos","events_url":"https://api.github.com/users/abitmore/events{/privacy}","received_events_url":"https://api.github.com/users/abitmore/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-08T23:30:24Z","updated_at":"2016-11-09T15:37:26Z","closed_at":null,"body":"According to the [code](https://github.com/steemit/steem/blob/v0.15.0/libraries/chain/database.cpp#L468-L477): \r\n```\r\n         auto delta_time = (now - a.last_bandwidth_update).to_seconds();\r\n         uint64_t N = trx_size * STEEMIT_BANDWIDTH_PRECISION;\r\n         if( delta_time >= STEEMIT_BANDWIDTH_AVERAGE_WINDOW_SECONDS )\r\n            acnt.average_bandwidth = N;\r\n         else\r\n         {\r\n            auto old_weight = acnt.average_bandwidth * (STEEMIT_BANDWIDTH_AVERAGE_WINDOW_SECONDS - delta_time);\r\n            auto new_weight = delta_time * N;\r\n            acnt.average_bandwidth =  (old_weight + new_weight) / (STEEMIT_BANDWIDTH_AVERAGE_WINDOW_SECONDS);\r\n         }\r\n```\r\n\r\nIt means, if one account can make multiple transactions into one block, the second and following transactions would be \"free\", because `delta_time` would be `0`.\r\n\r\nI think there are other similar methods to spam the network.\r\n\r\nThanks to steemitmarket@steem for testing (related link: https://steemit.com/spam/@steemitmarket/6skilb-whitespamattack)"},"comment":{"url":"https://api.github.com/repos/steemit/steem/issues/comments/259444071","html_url":"https://github.com/steemit/steem/issues/563#issuecomment-259444071","issue_url":"https://api.github.com/repos/steemit/steem/issues/563","id":259444071,"user":{"login":"theoreticalbts","id":10215982,"avatar_url":"https://avatars.githubusercontent.com/u/10215982?v=3","gravatar_id":"","url":"https://api.github.com/users/theoreticalbts","html_url":"https://github.com/theoreticalbts","followers_url":"https://api.github.com/users/theoreticalbts/followers","following_url":"https://api.github.com/users/theoreticalbts/following{/other_user}","gists_url":"https://api.github.com/users/theoreticalbts/gists{/gist_id}","starred_url":"https://api.github.com/users/theoreticalbts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theoreticalbts/subscriptions","organizations_url":"https://api.github.com/users/theoreticalbts/orgs","repos_url":"https://api.github.com/users/theoreticalbts/repos","events_url":"https://api.github.com/users/theoreticalbts/events{/privacy}","received_events_url":"https://api.github.com/users/theoreticalbts/received_events","type":"User","site_admin":false},"created_at":"2016-11-09T15:37:26Z","updated_at":"2016-11-09T15:37:26Z","body":"Yeah, this needs fixed.  Good news is, once HF is done, pre-HF code can be updated to ignore bandwidth entirely, so we don't need to keep the old BW algorithm around forever, and can even save some time re-indexing.\r\n\r\n"}}
{"actor":{"display_login":"theoreticalbts"}}