{"action":"opened","number":6,"pull_request":{"url":"https://api.github.com/repos/dharmaprotocol/charta/pulls/6","id":168430617,"html_url":"https://github.com/dharmaprotocol/charta/pull/6","diff_url":"https://github.com/dharmaprotocol/charta/pull/6.diff","patch_url":"https://github.com/dharmaprotocol/charta/pull/6.patch","issue_url":"https://api.github.com/repos/dharmaprotocol/charta/issues/6","number":6,"state":"open","locked":false,"title":"Do not rely on block number; instead use the block's timestamp","user":{"login":"saturnial","id":683181,"avatar_url":"https://avatars2.githubusercontent.com/u/683181?v=4","gravatar_id":"","url":"https://api.github.com/users/saturnial","html_url":"https://github.com/saturnial","followers_url":"https://api.github.com/users/saturnial/followers","following_url":"https://api.github.com/users/saturnial/following{/other_user}","gists_url":"https://api.github.com/users/saturnial/gists{/gist_id}","starred_url":"https://api.github.com/users/saturnial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saturnial/subscriptions","organizations_url":"https://api.github.com/users/saturnial/orgs","repos_url":"https://api.github.com/users/saturnial/repos","events_url":"https://api.github.com/users/saturnial/events{/privacy}","received_events_url":"https://api.github.com/users/saturnial/received_events","type":"User","site_admin":false},"body":"This change reflects a request from the Zeppelin Solutions team and affects the following aspects of the code base:\r\n\r\n1 - The `TermsContract` interface no longer relies on block numbers, but block timestamps\r\n2- Entries in the `DebtRegistry` no longer store block numbers, but block timestamps\r\n\r\nThey submitted the following in requesting this change:\r\n\r\n>>>Use of block numbers to express moments in time\r\n\r\nImplementors of the TermsContracts interface are expected to define repayment terms as a function of block numbers, as documented and seen in the function signatures of getExpectedRepaymentValue and getValueRepaid. To aid in this, entries in DebtRegistry record the issuance block number.\r\n\r\nBlock timestamps have a small risk of miner manipulation within a range of minutes, so it is recommended to use block numbers for certain usecases where this manipulation is a security risk. It should be noted, however, that block times are not fixed, and thus block numbers are not a reliable unit of time. For example, the constant SEVEN_DAYS_IN_BLOCKS will not always represent the timespan of seven days that it is meant to.\r\n\r\nFor the specific use case of determining repayment dates we think that the predictability of timestamps is preferable, and that it does not compromise the security of the system. Consider changing interfaces and data structures to use timestamps instead of block numbers.","created_at":"2018-02-11T01:29:42Z","updated_at":"2018-02-11T01:29:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dharmaprotocol/charta/pulls/6/commits","review_comments_url":"https://api.github.com/repos/dharmaprotocol/charta/pulls/6/comments","review_comment_url":"https://api.github.com/repos/dharmaprotocol/charta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dharmaprotocol/charta/issues/6/comments","statuses_url":"https://api.github.com/repos/dharmaprotocol/charta/statuses/9d01f195cdd634d1aee9ed8220fb759b5fb06f6b","head":{"label":"dharmaprotocol:timestamp","ref":"timestamp","sha":"9d01f195cdd634d1aee9ed8220fb759b5fb06f6b","user":{"login":"dharmaprotocol","id":28667653,"avatar_url":"https://avatars3.githubusercontent.com/u/28667653?v=4","gravatar_id":"","url":"https://api.github.com/users/dharmaprotocol","html_url":"https://github.com/dharmaprotocol","followers_url":"https://api.github.com/users/dharmaprotocol/followers","following_url":"https://api.github.com/users/dharmaprotocol/following{/other_user}","gists_url":"https://api.github.com/users/dharmaprotocol/gists{/gist_id}","starred_url":"https://api.github.com/users/dharmaprotocol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dharmaprotocol/subscriptions","organizations_url":"https://api.github.com/users/dharmaprotocol/orgs","repos_url":"https://api.github.com/users/dharmaprotocol/repos","events_url":"https://api.github.com/users/dharmaprotocol/events{/privacy}","received_events_url":"https://api.github.com/users/dharmaprotocol/received_events","type":"Organization","site_admin":false},"repo":{"id":111745346,"name":"charta","full_name":"dharmaprotocol/charta","owner":{"login":"dharmaprotocol","id":28667653,"avatar_url":"https://avatars3.githubusercontent.com/u/28667653?v=4","gravatar_id":"","url":"https://api.github.com/users/dharmaprotocol","html_url":"https://github.com/dharmaprotocol","followers_url":"https://api.github.com/users/dharmaprotocol/followers","following_url":"https://api.github.com/users/dharmaprotocol/following{/other_user}","gists_url":"https://api.github.com/users/dharmaprotocol/gists{/gist_id}","starred_url":"https://api.github.com/users/dharmaprotocol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dharmaprotocol/subscriptions","organizations_url":"https://api.github.com/users/dharmaprotocol/orgs","repos_url":"https://api.github.com/users/dharmaprotocol/repos","events_url":"https://api.github.com/users/dharmaprotocol/events{/privacy}","received_events_url":"https://api.github.com/users/dharmaprotocol/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dharmaprotocol/charta","description":"New & improved contracts for Dharma protocol as specified in https://whitepaper.dharma.io","fork":false,"url":"https://api.github.com/repos/dharmaprotocol/charta","forks_url":"https://api.github.com/repos/dharmaprotocol/charta/forks","keys_url":"https://api.github.com/repos/dharmaprotocol/charta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dharmaprotocol/charta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dharmaprotocol/charta/teams","hooks_url":"https://api.github.com/repos/dharmaprotocol/charta/hooks","issue_events_url":"https://api.github.com/repos/dharmaprotocol/charta/issues/events{/number}","events_url":"https://api.github.com/repos/dharmaprotocol/charta/events","assignees_url":"https://api.github.com/repos/dharmaprotocol/charta/assignees{/user}","branches_url":"https://api.github.com/repos/dharmaprotocol/charta/branches{/branch}","tags_url":"https://api.github.com/repos/dharmaprotocol/charta/tags","blobs_url":"https://api.github.com/repos/dharmaprotocol/charta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dharmaprotocol/charta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dharmaprotocol/charta/git/refs{/sha}","trees_url":"https://api.github.com/repos/dharmaprotocol/charta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dharmaprotocol/charta/statuses/{sha}","languages_url":"https://api.github.com/repos/dharmaprotocol/charta/languages","stargazers_url":"https://api.github.com/repos/dharmaprotocol/charta/stargazers","contributors_url":"https://api.github.com/repos/dharmaprotocol/charta/contributors","subscribers_url":"https://api.github.com/repos/dharmaprotocol/charta/subscribers","subscription_url":"https://api.github.com/repos/dharmaprotocol/charta/subscription","commits_url":"https://api.github.com/repos/dharmaprotocol/charta/commits{/sha}","git_commits_url":"https://api.github.com/repos/dharmaprotocol/charta/git/commits{/sha}","comments_url":"https://api.github.com/repos/dharmaprotocol/charta/comments{/number}","issue_comment_url":"https://api.github.com/repos/dharmaprotocol/charta/issues/comments{/number}","contents_url":"https://api.github.com/repos/dharmaprotocol/charta/contents/{+path}","compare_url":"https://api.github.com/repos/dharmaprotocol/charta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dharmaprotocol/charta/merges","archive_url":"https://api.github.com/repos/dharmaprotocol/charta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dharmaprotocol/charta/downloads","issues_url":"https://api.github.com/repos/dharmaprotocol/charta/issues{/number}","pulls_url":"https://api.github.com/repos/dharmaprotocol/charta/pulls{/number}","milestones_url":"https://api.github.com/repos/dharmaprotocol/charta/milestones{/number}","notifications_url":"https://api.github.com/repos/dharmaprotocol/charta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dharmaprotocol/charta/labels{/name}","releases_url":"https://api.github.com/repos/dharmaprotocol/charta/releases{/id}","deployments_url":"https://api.github.com/repos/dharmaprotocol/charta/deployments","created_at":"2017-11-23T00:25:44Z","updated_at":"2018-02-11T00:40:56Z","pushed_at":"2018-02-11T01:23:42Z","git_url":"git://github.com/dharmaprotocol/charta.git","ssh_url":"git@github.com:dharmaprotocol/charta.git","clone_url":"https://github.com/dharmaprotocol/charta.git","svn_url":"https://github.com/dharmaprotocol/charta","homepage":null,"size":24510,"stargazers_count":17,"watchers_count":17,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":3,"open_issues":4,"watchers":17,"default_branch":"master"}},"base":{"label":"dharmaprotocol:master","ref":"master","sha":"a59d2579de95e94149be5db3b6b44e8604736406","user":{"login":"dharmaprotocol","id":28667653,"avatar_url":"https://avatars3.githubusercontent.com/u/28667653?v=4","gravatar_id":"","url":"https://api.github.com/users/dharmaprotocol","html_url":"https://github.com/dharmaprotocol","followers_url":"https://api.github.com/users/dharmaprotocol/followers","following_url":"https://api.github.com/users/dharmaprotocol/following{/other_user}","gists_url":"https://api.github.com/users/dharmaprotocol/gists{/gist_id}","starred_url":"https://api.github.com/users/dharmaprotocol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dharmaprotocol/subscriptions","organizations_url":"https://api.github.com/users/dharmaprotocol/orgs","repos_url":"https://api.github.com/users/dharmaprotocol/repos","events_url":"https://api.github.com/users/dharmaprotocol/events{/privacy}","received_events_url":"https://api.github.com/users/dharmaprotocol/received_events","type":"Organization","site_admin":false},"repo":{"id":111745346,"name":"charta","full_name":"dharmaprotocol/charta","owner":{"login":"dharmaprotocol","id":28667653,"avatar_url":"https://avatars3.githubusercontent.com/u/28667653?v=4","gravatar_id":"","url":"https://api.github.com/users/dharmaprotocol","html_url":"https://github.com/dharmaprotocol","followers_url":"https://api.github.com/users/dharmaprotocol/followers","following_url":"https://api.github.com/users/dharmaprotocol/following{/other_user}","gists_url":"https://api.github.com/users/dharmaprotocol/gists{/gist_id}","starred_url":"https://api.github.com/users/dharmaprotocol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dharmaprotocol/subscriptions","organizations_url":"https://api.github.com/users/dharmaprotocol/orgs","repos_url":"https://api.github.com/users/dharmaprotocol/repos","events_url":"https://api.github.com/users/dharmaprotocol/events{/privacy}","received_events_url":"https://api.github.com/users/dharmaprotocol/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dharmaprotocol/charta","description":"New & improved contracts for Dharma protocol as specified in https://whitepaper.dharma.io","fork":false,"url":"https://api.github.com/repos/dharmaprotocol/charta","forks_url":"https://api.github.com/repos/dharmaprotocol/charta/forks","keys_url":"https://api.github.com/repos/dharmaprotocol/charta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dharmaprotocol/charta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dharmaprotocol/charta/teams","hooks_url":"https://api.github.com/repos/dharmaprotocol/charta/hooks","issue_events_url":"https://api.github.com/repos/dharmaprotocol/charta/issues/events{/number}","events_url":"https://api.github.com/repos/dharmaprotocol/charta/events","assignees_url":"https://api.github.com/repos/dharmaprotocol/charta/assignees{/user}","branches_url":"https://api.github.com/repos/dharmaprotocol/charta/branches{/branch}","tags_url":"https://api.github.com/repos/dharmaprotocol/charta/tags","blobs_url":"https://api.github.com/repos/dharmaprotocol/charta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dharmaprotocol/charta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dharmaprotocol/charta/git/refs{/sha}","trees_url":"https://api.github.com/repos/dharmaprotocol/charta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dharmaprotocol/charta/statuses/{sha}","languages_url":"https://api.github.com/repos/dharmaprotocol/charta/languages","stargazers_url":"https://api.github.com/repos/dharmaprotocol/charta/stargazers","contributors_url":"https://api.github.com/repos/dharmaprotocol/charta/contributors","subscribers_url":"https://api.github.com/repos/dharmaprotocol/charta/subscribers","subscription_url":"https://api.github.com/repos/dharmaprotocol/charta/subscription","commits_url":"https://api.github.com/repos/dharmaprotocol/charta/commits{/sha}","git_commits_url":"https://api.github.com/repos/dharmaprotocol/charta/git/commits{/sha}","comments_url":"https://api.github.com/repos/dharmaprotocol/charta/comments{/number}","issue_comment_url":"https://api.github.com/repos/dharmaprotocol/charta/issues/comments{/number}","contents_url":"https://api.github.com/repos/dharmaprotocol/charta/contents/{+path}","compare_url":"https://api.github.com/repos/dharmaprotocol/charta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dharmaprotocol/charta/merges","archive_url":"https://api.github.com/repos/dharmaprotocol/charta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dharmaprotocol/charta/downloads","issues_url":"https://api.github.com/repos/dharmaprotocol/charta/issues{/number}","pulls_url":"https://api.github.com/repos/dharmaprotocol/charta/pulls{/number}","milestones_url":"https://api.github.com/repos/dharmaprotocol/charta/milestones{/number}","notifications_url":"https://api.github.com/repos/dharmaprotocol/charta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dharmaprotocol/charta/labels{/name}","releases_url":"https://api.github.com/repos/dharmaprotocol/charta/releases{/id}","deployments_url":"https://api.github.com/repos/dharmaprotocol/charta/deployments","created_at":"2017-11-23T00:25:44Z","updated_at":"2018-02-11T00:40:56Z","pushed_at":"2018-02-11T01:23:42Z","git_url":"git://github.com/dharmaprotocol/charta.git","ssh_url":"git@github.com:dharmaprotocol/charta.git","clone_url":"https://github.com/dharmaprotocol/charta.git","svn_url":"https://github.com/dharmaprotocol/charta","homepage":null,"size":24510,"stargazers_count":17,"watchers_count":17,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":3,"open_issues":4,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dharmaprotocol/charta/pulls/6"},"html":{"href":"https://github.com/dharmaprotocol/charta/pull/6"},"issue":{"href":"https://api.github.com/repos/dharmaprotocol/charta/issues/6"},"comments":{"href":"https://api.github.com/repos/dharmaprotocol/charta/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/dharmaprotocol/charta/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/dharmaprotocol/charta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dharmaprotocol/charta/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/dharmaprotocol/charta/statuses/9d01f195cdd634d1aee9ed8220fb759b5fb06f6b"}},"author_association":"COLLABORATOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":5,"additions":39,"deletions":33,"changed_files":6}}
{"actor":{"display_login":"saturnial"}}