{"action":"created","comment":{"url":"https://api.github.com/repos/input-output-hk/cardano-chain/pulls/comments/237879736","pull_request_review_id":180290533,"id":237879736,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzg3OTczNg==","diff_hunk":"@@ -0,0 +1,269 @@\n+{-# LANGUAGE FlexibleContexts #-}\n+{-# LANGUAGE TupleSections    #-}\n+\n+-- | Validation and update of the delegation ledger state.\n+--\n+--   Delegation is split into two phases, Scheduling and Activation. During the\n+--   Scheduling phase new delegation certificates are validated and added to a\n+--   queue of 'ScheduledDelegation's. During the Activation phase\n+--   'ScheduledDelgation's are added to the active delegation state.\n+module Cardano.Chain.Delegation.Validation\n+  (\n+  -- * Scheduling\n+    SchedulingState(..)\n+  , SchedulingError(..)\n+  , ScheduledDelegation(..)\n+  , scheduleCertificate\n+\n+  -- * Activation\n+  , ActivationState(..)\n+  , activateDelegation\n+\n+  -- * Blockchain Interface\n+  , InterfaceState(..)\n+  , initialInterfaceState\n+  , delegates\n+  , updateDelegation\n+  )\n+where\n+\n+import Cardano.Prelude\n+\n+import qualified Data.Map as M\n+import Data.Sequence (Seq, (<|))\n+import qualified Data.Sequence as Seq\n+import qualified Data.Set as Set\n+\n+import Cardano.Binary.Class (Annotated(..), serialize')\n+import Cardano.Chain.Common (StakeholderId, mkStakeholderId)\n+import Cardano.Chain.Delegation.Certificate (ACertificate, Certificate)\n+import Cardano.Chain.Genesis as Genesis\n+  ( Config\n+  , GenesisDelegation(..)\n+  , GenesisWStakeholders(..)\n+  , configBootStakeholders\n+  , configEpochSlots\n+  , configHeavyDelegation\n+  , configProtocolMagic\n+  )\n+import Cardano.Chain.Slotting\n+  ( EpochIndex\n+  , FlatSlotId\n+  , SlotCount\n+  , addSlotNumber\n+  , slotNumberEpoch\n+  , subSlotNumber\n+  )\n+import Cardano.Crypto\n+  (AProxySecretKey(..), PublicKey, pskOmega, validateProxySecretKey)\n+\n+\n+--------------------------------------------------------------------------------\n+-- Scheduling\n+--------------------------------------------------------------------------------\n+\n+data SchedulingState = SchedulingState\n+  { ssScheduledDelegations :: Seq ScheduledDelegation\n+  , ssKeyEpochDelegations  :: Set (EpochIndex, StakeholderId)\n+  } deriving (Eq, Show)\n+\n+data ScheduledDelegation = ScheduledDelegation\n+  { sdSlot      :: FlatSlotId\n+  , sdDelegator :: StakeholderId\n+  , sdDelegate  :: StakeholderId\n+  } deriving (Eq, Show)\n+\n+data SchedulingError\n+  = SchedulingInvalidCertificate Text\n+  | SchedulingMultipleDelegationsForEpoch EpochIndex StakeholderId\n+  | SchedulingMultipleDelegationsForSlot FlatSlotId StakeholderId\n+  | SchedulingNonGenesisDelegator StakeholderId\n+  | SchedulingPastEpoch EpochIndex EpochIndex\n+  deriving (Eq, Show)\n+\n+\n+-- | Update the delegation 'SchedulingState' with a 'Certificate' if it passes\n+--   all the validation rules. This is an implementation of the delegation\n+--   scheduling inference rule from the ledger specification.\n+scheduleCertificate\n+  :: MonadError SchedulingError m\n+  => Genesis.Config\n+  -> FlatSlotId\n+  -> SlotCount\n+  -> SchedulingState\n+  -> ACertificate ByteString\n+  -> m SchedulingState\n+scheduleCertificate config slot d ss cert = do\n+\n+  -- Check that the delegator is a genesis key\n+  unless\n+    (delegator `M.member` genesisStakeholders)\n+    (throwError $ SchedulingNonGenesisDelegator delegator)\n+\n+  -- Check that the delegation epoch is greater than or equal to the current one\n+  unless\n+    (epoch <= delegationEpoch)\n+    (throwError $ SchedulingPastEpoch epoch delegationEpoch)\n+\n+  -- Check that the delegator hasn't already delegated in 'delegationEpoch'\n+  when\n+    ((delegationEpoch, delegator) `Set.member` ssKeyEpochDelegations ss)\n+    ( throwError\n+    $ SchedulingMultipleDelegationsForEpoch delegationEpoch delegator\n+    )\n+\n+  -- Check that the delegator hasn't issued a certificate in this slot\n+  when\n+    (isJust $ Seq.findIndexL delegatesThisSlot (ssScheduledDelegations ss))\n+    (throwError $ SchedulingMultipleDelegationsForSlot slot delegator)\n+\n+  -- Check that the delegation certificate is valid\n+  validateProxySecretKey (configProtocolMagic config) cert\n+    `wrapError` SchedulingInvalidCertificate\n+\n+  -- Schedule the new delegation and register the epoch/delegator pair\n+  pure $ SchedulingState\n+    { ssScheduledDelegations = delegation <| ssScheduledDelegations ss\n+    , ssKeyEpochDelegations  = Set.insert\n+      (delegationEpoch, delegator)\n+      (ssKeyEpochDelegations ss)\n+    }\n+ where\n+  delegator = mkStakeholderId $ pskIssuerPk cert\n+  delegate  = mkStakeholderId $ pskDelegatePk cert\n+\n+  genesisStakeholders =\n+    getGenesisWStakeholders $ configBootStakeholders config\n+\n+  epoch           = slotNumberEpoch (configEpochSlots config) slot\n+  delegationEpoch = pskOmega cert\n+\n+  activationSlot  = addSlotNumber d slot\n+\n+  delegatesThisSlot sd =\n+    sdSlot sd == activationSlot && sdDelegator sd == delegator\n+\n+  delegation = ScheduledDelegation activationSlot delegator delegate\n+\n+\n+--------------------------------------------------------------------------------\n+-- Activation\n+--------------------------------------------------------------------------------\n+\n+-- | Maps containing, for each delegator, the active delegation and the slot it\n+--   became active in.\n+data ActivationState = ActivationState\n+  { asDelegationMap   :: Map StakeholderId StakeholderId","path":"src/Cardano/Chain/Delegation/Validation.hs","position":156,"original_position":156,"commit_id":"5b435cc6e5e89890ae5a2ad048060487bc52117b","original_commit_id":"5b435cc6e5e89890ae5a2ad048060487bc52117b","user":{"login":"ruhatch","id":8578982,"node_id":"MDQ6VXNlcjg1Nzg5ODI=","avatar_url":"https://avatars0.githubusercontent.com/u/8578982?v=4","gravatar_id":"","url":"https://api.github.com/users/ruhatch","html_url":"https://github.com/ruhatch","followers_url":"https://api.github.com/users/ruhatch/followers","following_url":"https://api.github.com/users/ruhatch/following{/other_user}","gists_url":"https://api.github.com/users/ruhatch/gists{/gist_id}","starred_url":"https://api.github.com/users/ruhatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruhatch/subscriptions","organizations_url":"https://api.github.com/users/ruhatch/orgs","repos_url":"https://api.github.com/users/ruhatch/repos","events_url":"https://api.github.com/users/ruhatch/events{/privacy}","received_events_url":"https://api.github.com/users/ruhatch/received_events","type":"User","site_admin":false},"body":"Yeah, there isn't really a good way to get this at the type level. We could create a refined type that lifts the `StakeholderId`s to a type level list and values of the type have to be in the list, but really we should just start the Idris rewrite then...","created_at":"2018-11-30T14:34:58Z","updated_at":"2018-11-30T14:34:58Z","html_url":"https://github.com/input-output-hk/cardano-chain/pull/180#discussion_r237879736","pull_request_url":"https://api.github.com/repos/input-output-hk/cardano-chain/pulls/180","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/input-output-hk/cardano-chain/pulls/comments/237879736"},"html":{"href":"https://github.com/input-output-hk/cardano-chain/pull/180#discussion_r237879736"},"pull_request":{"href":"https://api.github.com/repos/input-output-hk/cardano-chain/pulls/180"}},"in_reply_to_id":237857910},"pull_request":{"url":"https://api.github.com/repos/input-output-hk/cardano-chain/pulls/180","id":234807873,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM0ODA3ODcz","html_url":"https://github.com/input-output-hk/cardano-chain/pull/180","diff_url":"https://github.com/input-output-hk/cardano-chain/pull/180.diff","patch_url":"https://github.com/input-output-hk/cardano-chain/pull/180.patch","issue_url":"https://api.github.com/repos/input-output-hk/cardano-chain/issues/180","number":180,"state":"open","locked":false,"title":"[#165] Implement delegation state and validation rules","user":{"login":"ruhatch","id":8578982,"node_id":"MDQ6VXNlcjg1Nzg5ODI=","avatar_url":"https://avatars0.githubusercontent.com/u/8578982?v=4","gravatar_id":"","url":"https://api.github.com/users/ruhatch","html_url":"https://github.com/ruhatch","followers_url":"https://api.github.com/users/ruhatch/followers","following_url":"https://api.github.com/users/ruhatch/following{/other_user}","gists_url":"https://api.github.com/users/ruhatch/gists{/gist_id}","starred_url":"https://api.github.com/users/ruhatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruhatch/subscriptions","organizations_url":"https://api.github.com/users/ruhatch/orgs","repos_url":"https://api.github.com/users/ruhatch/repos","events_url":"https://api.github.com/users/ruhatch/events{/privacy}","received_events_url":"https://api.github.com/users/ruhatch/received_events","type":"User","site_admin":false},"body":"This implements the delegation state and validation rules. It also implements the blockchain-ledger interface and integrates that with chain validation.\r\n\r\nPlease pay special attention to the `initialInterfaceState` implementation, as I would like feedback on whether that looks reasonable. In order to get that working I had to add an extra condition to `activateDelegation`.","created_at":"2018-11-29T22:26:37Z","updated_at":"2018-11-30T14:34:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1c3ae597e4e965abed64587943eaf79a949aec8","assignee":{"login":"ruhatch","id":8578982,"node_id":"MDQ6VXNlcjg1Nzg5ODI=","avatar_url":"https://avatars0.githubusercontent.com/u/8578982?v=4","gravatar_id":"","url":"https://api.github.com/users/ruhatch","html_url":"https://github.com/ruhatch","followers_url":"https://api.github.com/users/ruhatch/followers","following_url":"https://api.github.com/users/ruhatch/following{/other_user}","gists_url":"https://api.github.com/users/ruhatch/gists{/gist_id}","starred_url":"https://api.github.com/users/ruhatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruhatch/subscriptions","organizations_url":"https://api.github.com/users/ruhatch/orgs","repos_url":"https://api.github.com/users/ruhatch/repos","events_url":"https://api.github.com/users/ruhatch/events{/privacy}","received_events_url":"https://api.github.com/users/ruhatch/received_events","type":"User","site_admin":false},"assignees":[{"login":"ruhatch","id":8578982,"node_id":"MDQ6VXNlcjg1Nzg5ODI=","avatar_url":"https://avatars0.githubusercontent.com/u/8578982?v=4","gravatar_id":"","url":"https://api.github.com/users/ruhatch","html_url":"https://github.com/ruhatch","followers_url":"https://api.github.com/users/ruhatch/followers","following_url":"https://api.github.com/users/ruhatch/following{/other_user}","gists_url":"https://api.github.com/users/ruhatch/gists{/gist_id}","starred_url":"https://api.github.com/users/ruhatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruhatch/subscriptions","organizations_url":"https://api.github.com/users/ruhatch/orgs","repos_url":"https://api.github.com/users/ruhatch/repos","events_url":"https://api.github.com/users/ruhatch/events{/privacy}","received_events_url":"https://api.github.com/users/ruhatch/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"redxaxder","id":4647658,"node_id":"MDQ6VXNlcjQ2NDc2NTg=","avatar_url":"https://avatars3.githubusercontent.com/u/4647658?v=4","gravatar_id":"","url":"https://api.github.com/users/redxaxder","html_url":"https://github.com/redxaxder","followers_url":"https://api.github.com/users/redxaxder/followers","following_url":"https://api.github.com/users/redxaxder/following{/other_user}","gists_url":"https://api.github.com/users/redxaxder/gists{/gist_id}","starred_url":"https://api.github.com/users/redxaxder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redxaxder/subscriptions","organizations_url":"https://api.github.com/users/redxaxder/orgs","repos_url":"https://api.github.com/users/redxaxder/repos","events_url":"https://api.github.com/users/redxaxder/events{/privacy}","received_events_url":"https://api.github.com/users/redxaxder/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/input-output-hk/cardano-chain/pulls/180/commits","review_comments_url":"https://api.github.com/repos/input-output-hk/cardano-chain/pulls/180/comments","review_comment_url":"https://api.github.com/repos/input-output-hk/cardano-chain/pulls/comments{/number}","comments_url":"https://api.github.com/repos/input-output-hk/cardano-chain/issues/180/comments","statuses_url":"https://api.github.com/repos/input-output-hk/cardano-chain/statuses/5b435cc6e5e89890ae5a2ad048060487bc52117b","head":{"label":"input-output-hk:ruhatch/delegation-validation","ref":"ruhatch/delegation-validation","sha":"5b435cc6e5e89890ae5a2ad048060487bc52117b","user":{"login":"input-output-hk","id":12909177,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyOTA5MTc3","avatar_url":"https://avatars3.githubusercontent.com/u/12909177?v=4","gravatar_id":"","url":"https://api.github.com/users/input-output-hk","html_url":"https://github.com/input-output-hk","followers_url":"https://api.github.com/users/input-output-hk/followers","following_url":"https://api.github.com/users/input-output-hk/following{/other_user}","gists_url":"https://api.github.com/users/input-output-hk/gists{/gist_id}","starred_url":"https://api.github.com/users/input-output-hk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/input-output-hk/subscriptions","organizations_url":"https://api.github.com/users/input-output-hk/orgs","repos_url":"https://api.github.com/users/input-output-hk/repos","events_url":"https://api.github.com/users/input-output-hk/events{/privacy}","received_events_url":"https://api.github.com/users/input-output-hk/received_events","type":"Organization","site_admin":false},"repo":{"id":149791280,"node_id":"MDEwOlJlcG9zaXRvcnkxNDk3OTEyODA=","name":"cardano-chain","full_name":"input-output-hk/cardano-chain","private":false,"owner":{"login":"input-output-hk","id":12909177,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyOTA5MTc3","avatar_url":"https://avatars3.githubusercontent.com/u/12909177?v=4","gravatar_id":"","url":"https://api.github.com/users/input-output-hk","html_url":"https://github.com/input-output-hk","followers_url":"https://api.github.com/users/input-output-hk/followers","following_url":"https://api.github.com/users/input-output-hk/following{/other_user}","gists_url":"https://api.github.com/users/input-output-hk/gists{/gist_id}","starred_url":"https://api.github.com/users/input-output-hk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/input-output-hk/subscriptions","organizations_url":"https://api.github.com/users/input-output-hk/orgs","repos_url":"https://api.github.com/users/input-output-hk/repos","events_url":"https://api.github.com/users/input-output-hk/events{/privacy}","received_events_url":"https://api.github.com/users/input-output-hk/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/input-output-hk/cardano-chain","description":"A re-implementation of the Cardano blockchain layer, replacing the Byron release","fork":false,"url":"https://api.github.com/repos/input-output-hk/cardano-chain","forks_url":"https://api.github.com/repos/input-output-hk/cardano-chain/forks","keys_url":"https://api.github.com/repos/input-output-hk/cardano-chain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/input-output-hk/cardano-chain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/input-output-hk/cardano-chain/teams","hooks_url":"https://api.github.com/repos/input-output-hk/cardano-chain/hooks","issue_events_url":"https://api.github.com/repos/input-output-hk/cardano-chain/issues/events{/number}","events_url":"https://api.github.com/repos/input-output-hk/cardano-chain/events","assignees_url":"https://api.github.com/repos/input-output-hk/cardano-chain/assignees{/user}","branches_url":"https://api.github.com/repos/input-output-hk/cardano-chain/branches{/branch}","tags_url":"https://api.github.com/repos/input-output-hk/cardano-chain/tags","blobs_url":"https://api.github.com/repos/input-output-hk/cardano-chain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/input-output-hk/cardano-chain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/input-output-hk/cardano-chain/git/refs{/sha}","trees_url":"https://api.github.com/repos/input-output-hk/cardano-chain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/input-output-hk/cardano-chain/statuses/{sha}","languages_url":"https://api.github.com/repos/input-output-hk/cardano-chain/languages","stargazers_url":"https://api.github.com/repos/input-output-hk/cardano-chain/stargazers","contributors_url":"https://api.github.com/repos/input-output-hk/cardano-chain/contributors","subscribers_url":"https://api.github.com/repos/input-output-hk/cardano-chain/subscribers","subscription_url":"https://api.github.com/repos/input-output-hk/cardano-chain/subscription","commits_url":"https://api.github.com/repos/input-output-hk/cardano-chain/commits{/sha}","git_commits_url":"https://api.github.com/repos/input-output-hk/cardano-chain/git/commits{/sha}","comments_url":"https://api.github.com/repos/input-output-hk/cardano-chain/comments{/number}","issue_comment_url":"https://api.github.com/repos/input-output-hk/cardano-chain/issues/comments{/number}","contents_url":"https://api.github.com/repos/input-output-hk/cardano-chain/contents/{+path}","compare_url":"https://api.github.com/repos/input-output-hk/cardano-chain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/input-output-hk/cardano-chain/merges","archive_url":"https://api.github.com/repos/input-output-hk/cardano-chain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/input-output-hk/cardano-chain/downloads","issues_url":"https://api.github.com/repos/input-output-hk/cardano-chain/issues{/number}","pulls_url":"https://api.github.com/repos/input-output-hk/cardano-chain/pulls{/number}","milestones_url":"https://api.github.com/repos/input-output-hk/cardano-chain/milestones{/number}","notifications_url":"https://api.github.com/repos/input-output-hk/cardano-chain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/input-output-hk/cardano-chain/labels{/name}","releases_url":"https://api.github.com/repos/input-output-hk/cardano-chain/releases{/id}","deployments_url":"https://api.github.com/repos/input-output-hk/cardano-chain/deployments","created_at":"2018-09-21T16:42:53Z","updated_at":"2018-11-29T03:14:29Z","pushed_at":"2018-11-29T22:27:27Z","git_url":"git://github.com/input-output-hk/cardano-chain.git","ssh_url":"git@github.com:input-output-hk/cardano-chain.git","clone_url":"https://github.com/input-output-hk/cardano-chain.git","svn_url":"https://github.com/input-output-hk/cardano-chain","homepage":"","size":1719,"stargazers_count":15,"watchers_count":15,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":46,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2,"open_issues":46,"watchers":15,"default_branch":"master"}},"base":{"label":"input-output-hk:master","ref":"master","sha":"169127e430b8ac4a5f88d1657f300a2a16ce953d","user":{"login":"input-output-hk","id":12909177,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyOTA5MTc3","avatar_url":"https://avatars3.githubusercontent.com/u/12909177?v=4","gravatar_id":"","url":"https://api.github.com/users/input-output-hk","html_url":"https://github.com/input-output-hk","followers_url":"https://api.github.com/users/input-output-hk/followers","following_url":"https://api.github.com/users/input-output-hk/following{/other_user}","gists_url":"https://api.github.com/users/input-output-hk/gists{/gist_id}","starred_url":"https://api.github.com/users/input-output-hk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/input-output-hk/subscriptions","organizations_url":"https://api.github.com/users/input-output-hk/orgs","repos_url":"https://api.github.com/users/input-output-hk/repos","events_url":"https://api.github.com/users/input-output-hk/events{/privacy}","received_events_url":"https://api.github.com/users/input-output-hk/received_events","type":"Organization","site_admin":false},"repo":{"id":149791280,"node_id":"MDEwOlJlcG9zaXRvcnkxNDk3OTEyODA=","name":"cardano-chain","full_name":"input-output-hk/cardano-chain","private":false,"owner":{"login":"input-output-hk","id":12909177,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyOTA5MTc3","avatar_url":"https://avatars3.githubusercontent.com/u/12909177?v=4","gravatar_id":"","url":"https://api.github.com/users/input-output-hk","html_url":"https://github.com/input-output-hk","followers_url":"https://api.github.com/users/input-output-hk/followers","following_url":"https://api.github.com/users/input-output-hk/following{/other_user}","gists_url":"https://api.github.com/users/input-output-hk/gists{/gist_id}","starred_url":"https://api.github.com/users/input-output-hk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/input-output-hk/subscriptions","organizations_url":"https://api.github.com/users/input-output-hk/orgs","repos_url":"https://api.github.com/users/input-output-hk/repos","events_url":"https://api.github.com/users/input-output-hk/events{/privacy}","received_events_url":"https://api.github.com/users/input-output-hk/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/input-output-hk/cardano-chain","description":"A re-implementation of the Cardano blockchain layer, replacing the Byron release","fork":false,"url":"https://api.github.com/repos/input-output-hk/cardano-chain","forks_url":"https://api.github.com/repos/input-output-hk/cardano-chain/forks","keys_url":"https://api.github.com/repos/input-output-hk/cardano-chain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/input-output-hk/cardano-chain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/input-output-hk/cardano-chain/teams","hooks_url":"https://api.github.com/repos/input-output-hk/cardano-chain/hooks","issue_events_url":"https://api.github.com/repos/input-output-hk/cardano-chain/issues/events{/number}","events_url":"https://api.github.com/repos/input-output-hk/cardano-chain/events","assignees_url":"https://api.github.com/repos/input-output-hk/cardano-chain/assignees{/user}","branches_url":"https://api.github.com/repos/input-output-hk/cardano-chain/branches{/branch}","tags_url":"https://api.github.com/repos/input-output-hk/cardano-chain/tags","blobs_url":"https://api.github.com/repos/input-output-hk/cardano-chain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/input-output-hk/cardano-chain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/input-output-hk/cardano-chain/git/refs{/sha}","trees_url":"https://api.github.com/repos/input-output-hk/cardano-chain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/input-output-hk/cardano-chain/statuses/{sha}","languages_url":"https://api.github.com/repos/input-output-hk/cardano-chain/languages","stargazers_url":"https://api.github.com/repos/input-output-hk/cardano-chain/stargazers","contributors_url":"https://api.github.com/repos/input-output-hk/cardano-chain/contributors","subscribers_url":"https://api.github.com/repos/input-output-hk/cardano-chain/subscribers","subscription_url":"https://api.github.com/repos/input-output-hk/cardano-chain/subscription","commits_url":"https://api.github.com/repos/input-output-hk/cardano-chain/commits{/sha}","git_commits_url":"https://api.github.com/repos/input-output-hk/cardano-chain/git/commits{/sha}","comments_url":"https://api.github.com/repos/input-output-hk/cardano-chain/comments{/number}","issue_comment_url":"https://api.github.com/repos/input-output-hk/cardano-chain/issues/comments{/number}","contents_url":"https://api.github.com/repos/input-output-hk/cardano-chain/contents/{+path}","compare_url":"https://api.github.com/repos/input-output-hk/cardano-chain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/input-output-hk/cardano-chain/merges","archive_url":"https://api.github.com/repos/input-output-hk/cardano-chain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/input-output-hk/cardano-chain/downloads","issues_url":"https://api.github.com/repos/input-output-hk/cardano-chain/issues{/number}","pulls_url":"https://api.github.com/repos/input-output-hk/cardano-chain/pulls{/number}","milestones_url":"https://api.github.com/repos/input-output-hk/cardano-chain/milestones{/number}","notifications_url":"https://api.github.com/repos/input-output-hk/cardano-chain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/input-output-hk/cardano-chain/labels{/name}","releases_url":"https://api.github.com/repos/input-output-hk/cardano-chain/releases{/id}","deployments_url":"https://api.github.com/repos/input-output-hk/cardano-chain/deployments","created_at":"2018-09-21T16:42:53Z","updated_at":"2018-11-29T03:14:29Z","pushed_at":"2018-11-29T22:27:27Z","git_url":"git://github.com/input-output-hk/cardano-chain.git","ssh_url":"git@github.com:input-output-hk/cardano-chain.git","clone_url":"https://github.com/input-output-hk/cardano-chain.git","svn_url":"https://github.com/input-output-hk/cardano-chain","homepage":"","size":1719,"stargazers_count":15,"watchers_count":15,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":46,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":2,"open_issues":46,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/input-output-hk/cardano-chain/pulls/180"},"html":{"href":"https://github.com/input-output-hk/cardano-chain/pull/180"},"issue":{"href":"https://api.github.com/repos/input-output-hk/cardano-chain/issues/180"},"comments":{"href":"https://api.github.com/repos/input-output-hk/cardano-chain/issues/180/comments"},"review_comments":{"href":"https://api.github.com/repos/input-output-hk/cardano-chain/pulls/180/comments"},"review_comment":{"href":"https://api.github.com/repos/input-output-hk/cardano-chain/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/input-output-hk/cardano-chain/pulls/180/commits"},"statuses":{"href":"https://api.github.com/repos/input-output-hk/cardano-chain/statuses/5b435cc6e5e89890ae5a2ad048060487bc52117b"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"ruhatch"}}