{"action":"created","issue":{"url":"https://api.github.com/repos/harmony-one/harmony/issues/1257","repository_url":"https://api.github.com/repos/harmony-one/harmony","labels_url":"https://api.github.com/repos/harmony-one/harmony/issues/1257/labels{/name}","comments_url":"https://api.github.com/repos/harmony-one/harmony/issues/1257/comments","events_url":"https://api.github.com/repos/harmony-one/harmony/issues/1257/events","html_url":"https://github.com/harmony-one/harmony/pull/1257","id":473600572,"node_id":"MDExOlB1bGxSZXF1ZXN0MzAxNzM0OTU0","number":1257,"title":"DRG generation (VRF/VDF integration)","user":{"login":"coolcottontail","id":50373379,"node_id":"MDQ6VXNlcjUwMzczMzc5","avatar_url":"https://avatars1.githubusercontent.com/u/50373379?v=4","gravatar_id":"","url":"https://api.github.com/users/coolcottontail","html_url":"https://github.com/coolcottontail","followers_url":"https://api.github.com/users/coolcottontail/followers","following_url":"https://api.github.com/users/coolcottontail/following{/other_user}","gists_url":"https://api.github.com/users/coolcottontail/gists{/gist_id}","starred_url":"https://api.github.com/users/coolcottontail/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coolcottontail/subscriptions","organizations_url":"https://api.github.com/users/coolcottontail/orgs","repos_url":"https://api.github.com/users/coolcottontail/repos","events_url":"https://api.github.com/users/coolcottontail/events{/privacy}","received_events_url":"https://api.github.com/users/coolcottontail/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-07-27T05:19:37Z","updated_at":"2019-07-30T01:07:59Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/harmony-one/harmony/pulls/1257","html_url":"https://github.com/harmony-one/harmony/pull/1257","diff_url":"https://github.com/harmony-one/harmony/pull/1257.diff","patch_url":"https://github.com/harmony-one/harmony/pull/1257.patch"},"body":"## DRG generation\r\nSpec: https://docs.google.com/document/d/1JCcA7pM84q_wI1QAeRjbBXbkTjwcU6In9xHZ15NJJlo/edit\r\n\r\nUse db cache to keep list of VRF block numbers in the current epoch and VDF block number in the current epoch.  \r\n\r\nLeaders update db cache when VRF/VDF is generated \r\nValidators update db cache during conensus onAnnounce \r\n\r\nVDF generation won't across epochs (vdf will finish within current epoch)\r\n\r\n## Test\r\n1. tested basic function flow with  using 1,2,3, 4 leader changes per epoch (VRF generation, VRF validation, VDF generation, VDF validation)  by leaders and validators\r\n2. tested with different shard config, different size of consensus\r\n3. tested various wrong VDF/VRF and make sure it won't cause crash/panic\r\n4. manually kill nodes to trigger view change, \r\n\r\n\r\n## TODO\r\n1. integrate with real leader change code\r\n2. checking the epoch start block needs to be fixed , aka: \r\n\tif recvMsg.BlockNum%core.ShardingSchedule.BlocksPerEpoch() == 0 {\r\n3. VDF delay needs to be accurately defined \r\n\tvdfDifficulty = 5000  // this takes 10s"},"comment":{"url":"https://api.github.com/repos/harmony-one/harmony/issues/comments/516218769","html_url":"https://github.com/harmony-one/harmony/pull/1257#issuecomment-516218769","issue_url":"https://api.github.com/repos/harmony-one/harmony/issues/1257","id":516218769,"node_id":"MDEyOklzc3VlQ29tbWVudDUxNjIxODc2OQ==","user":{"login":"LeoHChen","id":4513927,"node_id":"MDQ6VXNlcjQ1MTM5Mjc=","avatar_url":"https://avatars1.githubusercontent.com/u/4513927?v=4","gravatar_id":"","url":"https://api.github.com/users/LeoHChen","html_url":"https://github.com/LeoHChen","followers_url":"https://api.github.com/users/LeoHChen/followers","following_url":"https://api.github.com/users/LeoHChen/following{/other_user}","gists_url":"https://api.github.com/users/LeoHChen/gists{/gist_id}","starred_url":"https://api.github.com/users/LeoHChen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LeoHChen/subscriptions","organizations_url":"https://api.github.com/users/LeoHChen/orgs","repos_url":"https://api.github.com/users/LeoHChen/repos","events_url":"https://api.github.com/users/LeoHChen/events{/privacy}","received_events_url":"https://api.github.com/users/LeoHChen/received_events","type":"User","site_admin":false},"created_at":"2019-07-30T01:07:59Z","updated_at":"2019-07-30T01:07:59Z","author_association":"CONTRIBUTOR","body":"The commit message history is too messy.  Please re-organize them, using \"git rebase -i\"\r\n[git rebase -i]( https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History)"}}
{"actor":{"display_login":"LeoHChen"}}