{"action":"created","issue":{"url":"https://api.github.com/repos/bosnet/sebak/issues/615","repository_url":"https://api.github.com/repos/bosnet/sebak","labels_url":"https://api.github.com/repos/bosnet/sebak/issues/615/labels{/name}","comments_url":"https://api.github.com/repos/bosnet/sebak/issues/615/comments","events_url":"https://api.github.com/repos/bosnet/sebak/issues/615/events","html_url":"https://github.com/bosnet/sebak/pull/615","id":374851849,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2NDMzMTA2","number":615,"title":"Saving `BlockOperation`s after `finishBallot()`","user":{"login":"spikeekips","id":174565,"node_id":"MDQ6VXNlcjE3NDU2NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/174565?v=4","gravatar_id":"","url":"https://api.github.com/users/spikeekips","html_url":"https://github.com/spikeekips","followers_url":"https://api.github.com/users/spikeekips/followers","following_url":"https://api.github.com/users/spikeekips/following{/other_user}","gists_url":"https://api.github.com/users/spikeekips/gists{/gist_id}","starred_url":"https://api.github.com/users/spikeekips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spikeekips/subscriptions","organizations_url":"https://api.github.com/users/spikeekips/orgs","repos_url":"https://api.github.com/users/spikeekips/repos","events_url":"https://api.github.com/users/spikeekips/events{/privacy}","received_events_url":"https://api.github.com/users/spikeekips/received_events","type":"User","site_admin":false},"labels":[{"id":904295037,"node_id":"MDU6TGFiZWw5MDQyOTUwMzc=","url":"https://api.github.com/repos/bosnet/sebak/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"state":"closed","locked":false,"assignee":{"login":"spikeekips","id":174565,"node_id":"MDQ6VXNlcjE3NDU2NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/174565?v=4","gravatar_id":"","url":"https://api.github.com/users/spikeekips","html_url":"https://github.com/spikeekips","followers_url":"https://api.github.com/users/spikeekips/followers","following_url":"https://api.github.com/users/spikeekips/following{/other_user}","gists_url":"https://api.github.com/users/spikeekips/gists{/gist_id}","starred_url":"https://api.github.com/users/spikeekips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spikeekips/subscriptions","organizations_url":"https://api.github.com/users/spikeekips/orgs","repos_url":"https://api.github.com/users/spikeekips/repos","events_url":"https://api.github.com/users/spikeekips/events{/privacy}","received_events_url":"https://api.github.com/users/spikeekips/received_events","type":"User","site_admin":false},"assignees":[{"login":"spikeekips","id":174565,"node_id":"MDQ6VXNlcjE3NDU2NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/174565?v=4","gravatar_id":"","url":"https://api.github.com/users/spikeekips","html_url":"https://github.com/spikeekips","followers_url":"https://api.github.com/users/spikeekips/followers","following_url":"https://api.github.com/users/spikeekips/following{/other_user}","gists_url":"https://api.github.com/users/spikeekips/gists{/gist_id}","starred_url":"https://api.github.com/users/spikeekips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spikeekips/subscriptions","organizations_url":"https://api.github.com/users/spikeekips/orgs","repos_url":"https://api.github.com/users/spikeekips/repos","events_url":"https://api.github.com/users/spikeekips/events{/privacy}","received_events_url":"https://api.github.com/users/spikeekips/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/bosnet/sebak/milestones/4","html_url":"https://github.com/bosnet/sebak/milestone/4","labels_url":"https://api.github.com/repos/bosnet/sebak/milestones/4/labels","id":3766875,"node_id":"MDk6TWlsZXN0b25lMzc2Njg3NQ==","number":4,"title":"Toward v0.1.0","description":"","creator":{"login":"spikeekips","id":174565,"node_id":"MDQ6VXNlcjE3NDU2NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/174565?v=4","gravatar_id":"","url":"https://api.github.com/users/spikeekips","html_url":"https://github.com/spikeekips","followers_url":"https://api.github.com/users/spikeekips/followers","following_url":"https://api.github.com/users/spikeekips/following{/other_user}","gists_url":"https://api.github.com/users/spikeekips/gists{/gist_id}","starred_url":"https://api.github.com/users/spikeekips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spikeekips/subscriptions","organizations_url":"https://api.github.com/users/spikeekips/orgs","repos_url":"https://api.github.com/users/spikeekips/repos","events_url":"https://api.github.com/users/spikeekips/events{/privacy}","received_events_url":"https://api.github.com/users/spikeekips/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":18,"state":"open","created_at":"2018-10-24T22:16:02Z","updated_at":"2018-11-06T04:11:52Z","due_on":"2018-11-16T08:00:00Z","closed_at":null},"comments":2,"created_at":"2018-10-29T04:13:34Z","updated_at":"2018-11-06T07:02:38Z","closed_at":"2018-11-06T03:14:00Z","author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/bosnet/sebak/pulls/615","html_url":"https://github.com/bosnet/sebak/pull/615","diff_url":"https://github.com/bosnet/sebak/pull/615.diff","patch_url":"https://github.com/bosnet/sebak/pull/615.patch"},"body":"### Background\r\n\r\nThis PR is only for performance. At this time, there are 2 points of bottleneck for elapsed time of one consensus,\r\n\r\n* Ballot validation time\r\n* Storing `block.Block`, `block.BlockTransaction` and `block.BlockOperation` in `finishBallot()`\r\n\r\nIn the huge amount of operations, these 2 processes become slow over timeout. If timeout occurs, the `EXP` ballot is produced and the transactions in `TransactionPool` does not proposed.\r\n\r\nThis PR is for the second problem of `finishBallot()`. This PR does not save `block.BlockOperation` in `finishBallot()`. `block.BlockOperation` will be saved after `finishBallot()`.\r\n\r\nThe detailed benchmark data can be found at https://gist.github.com/spikeekips/dfae9789dfdbc30414a5e58d5c2d42af . This result shows `40,000` operations(`200` tx and `200` operations in each tx) will be saved within 3 seconds. (Without this PR, it almost 7 seconds)\r\n\r\n### Solution\r\n\r\nMajor parts are,\r\n\r\n* `BlockOperation` will be saved in after `finishBallot()`\r\n* If something wrong during saving `BlockOperation`, the `SavingBlockOperations` will check and save continuously in background.\r\n* When node starts, `SavingBlockOperations` will check the existing `BlockOperation`s and save the missing `BlockOperation`s."},"comment":{"url":"https://api.github.com/repos/bosnet/sebak/issues/comments/436151089","html_url":"https://github.com/bosnet/sebak/pull/615#issuecomment-436151089","issue_url":"https://api.github.com/repos/bosnet/sebak/issues/615","id":436151089,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjE1MTA4OQ==","user":{"login":"spikeekips","id":174565,"node_id":"MDQ6VXNlcjE3NDU2NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/174565?v=4","gravatar_id":"","url":"https://api.github.com/users/spikeekips","html_url":"https://github.com/spikeekips","followers_url":"https://api.github.com/users/spikeekips/followers","following_url":"https://api.github.com/users/spikeekips/following{/other_user}","gists_url":"https://api.github.com/users/spikeekips/gists{/gist_id}","starred_url":"https://api.github.com/users/spikeekips/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spikeekips/subscriptions","organizations_url":"https://api.github.com/users/spikeekips/orgs","repos_url":"https://api.github.com/users/spikeekips/repos","events_url":"https://api.github.com/users/spikeekips/events{/privacy}","received_events_url":"https://api.github.com/users/spikeekips/received_events","type":"User","site_admin":false},"created_at":"2018-11-06T07:02:38Z","updated_at":"2018-11-06T07:02:38Z","author_association":"MEMBER","body":"@Geod24 Hmm, I will check it. Thanks."}}
{"actor":{"display_login":"spikeekips"}}