{"action":"created","comment":{"url":"https://api.github.com/repos/hyperledger/indy-plenum/pulls/comments/166609035","pull_request_review_id":94695667,"id":166609035,"diff_hunk":"@@ -1,3 +1,18 @@\n-Outline of the system\n-# TODO\n+#Overview of the system\n \n+- The system maintains maintains a replicated ordered log of transactions called the ledger. \n+- Participants of the system which maintain this log are called the nodes. The nodes run a consensus protocol ([RBFT](http://lig-membres.imag.fr/aublin/rbft/report.pdf)) to agree on the order of transactions. For simplicity it can be assumed that one of the node is the leader (primary) which determines the order of transactions and communicates it to the rest of the nodes (followers).\n+- Each run (3 phase commit) of the consensus protocol orders a batch (collection) of transactions.\n+- Nodes maintain several ledgers, each for a distinct purpose, it has a pool ledger for node membership transactions like addition of new node, suspension of a node, change of IP/port or keys of a node, a ledger for identity transactions, etc \n+- Apart for the ledger, nodes maintain state (for each ledger) which is [Merkle Patricia Trie](https://github.com/ethereum/wiki/wiki/Patricia-Tree). It might maintain several other projections of the ledger. For more on storage, refer the [storage document](storage.md). \n+- Clients with appropriate permissions can send write requests (transactions) to the nodes but any client can send read requests to the nodes.\n+- Communicate between nodes and clients and node-to-node happens on [CurveZMQ](http://curvezmq.org/). The codebase has an abstraction called `Stack` that manages communication. It has several variants which offer different features.\n+- On receiving transactions nodes perform some basic validation and broadcast the request to other nodes. This is called request propagation, more details in RBFT paper. \n+  Once the nodes realise that enough nodes have got the request, they consider the request ready for processing.\n+  The primary node initiates a new round of consensus through a 3 phase commit process at the end of which all nodes add the transaction to their ledger and corresponding storages. More details on 3 phase commit in RBFT paper.\n+  Different kinds of requests update different ledgers and storage layers. A detailed explanation of request handling is present [here](request_handling.md)\n+- During the life of the system, nodes might crash and restart, get disconnected/re-connected, new nodes might join the network. Thus nodes need a mechanism to get the transactions they have missed or never had (new node). They do this by a process called catchup.\n+  Here the nodes communicate their state and learn other node's states and then if the nodes realise that they are behind, they run a protocol to get the missing transactions. More on this in the [catchup document](catchup.md)\n+- The nodes can request various protocol-specific messages from other nodes by a `MESSAGE_REQUEST` message.\n+- When the primary node crashes (or becomes non functional in any way), or it misbehaves by sending bad messages or it slows down then the follower nodes initiate a protocol to change the leader, this protocol is called view change. \n+  View change involves selecting a new leader, which is done in a round robin fashion and communication (and catchup if needed) of state so before the new leader starts, every node has the same state. ","path":"docs/main.md","position":20,"original_position":20,"commit_id":"0817da42c8d18a58a75ecdeb343a876eacc2ae59","original_commit_id":"0817da42c8d18a58a75ecdeb343a876eacc2ae59","user":{"login":"ashcherbakov","id":21102430,"avatar_url":"https://avatars1.githubusercontent.com/u/21102430?v=4","gravatar_id":"","url":"https://api.github.com/users/ashcherbakov","html_url":"https://github.com/ashcherbakov","followers_url":"https://api.github.com/users/ashcherbakov/followers","following_url":"https://api.github.com/users/ashcherbakov/following{/other_user}","gists_url":"https://api.github.com/users/ashcherbakov/gists{/gist_id}","starred_url":"https://api.github.com/users/ashcherbakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashcherbakov/subscriptions","organizations_url":"https://api.github.com/users/ashcherbakov/orgs","repos_url":"https://api.github.com/users/ashcherbakov/repos","events_url":"https://api.github.com/users/ashcherbakov/events{/privacy}","received_events_url":"https://api.github.com/users/ashcherbakov/received_events","type":"User","site_admin":false},"body":"Please add three more paragraphs explicitly describing how our consensus protocol differs from RBFT one:\r\n1) BLS signatures\r\n2) timestamps (set by Primary)\r\n3) batches of requests\r\n","created_at":"2018-02-07T12:58:47Z","updated_at":"2018-02-07T12:59:36Z","html_url":"https://github.com/hyperledger/indy-plenum/pull/524#discussion_r166609035","pull_request_url":"https://api.github.com/repos/hyperledger/indy-plenum/pulls/524","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/hyperledger/indy-plenum/pulls/comments/166609035"},"html":{"href":"https://github.com/hyperledger/indy-plenum/pull/524#discussion_r166609035"},"pull_request":{"href":"https://api.github.com/repos/hyperledger/indy-plenum/pulls/524"}}},"pull_request":{"url":"https://api.github.com/repos/hyperledger/indy-plenum/pulls/524","id":167610824,"html_url":"https://github.com/hyperledger/indy-plenum/pull/524","diff_url":"https://github.com/hyperledger/indy-plenum/pull/524.diff","patch_url":"https://github.com/hyperledger/indy-plenum/pull/524.patch","issue_url":"https://api.github.com/repos/hyperledger/indy-plenum/issues/524","number":524,"state":"open","locked":false,"title":"documentation, change log message and method names","user":{"login":"lovesh","id":3115401,"avatar_url":"https://avatars0.githubusercontent.com/u/3115401?v=4","gravatar_id":"","url":"https://api.github.com/users/lovesh","html_url":"https://github.com/lovesh","followers_url":"https://api.github.com/users/lovesh/followers","following_url":"https://api.github.com/users/lovesh/following{/other_user}","gists_url":"https://api.github.com/users/lovesh/gists{/gist_id}","starred_url":"https://api.github.com/users/lovesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lovesh/subscriptions","organizations_url":"https://api.github.com/users/lovesh/orgs","repos_url":"https://api.github.com/users/lovesh/repos","events_url":"https://api.github.com/users/lovesh/events{/privacy}","received_events_url":"https://api.github.com/users/lovesh/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Lovesh <lovesh.harchandani@evernym.com>","created_at":"2018-02-07T06:47:30Z","updated_at":"2018-02-07T12:59:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dfd2f9c34d5fbd8ddec6b8ed41f6e22ccf137a26","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/hyperledger/indy-plenum/pulls/524/commits","review_comments_url":"https://api.github.com/repos/hyperledger/indy-plenum/pulls/524/comments","review_comment_url":"https://api.github.com/repos/hyperledger/indy-plenum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hyperledger/indy-plenum/issues/524/comments","statuses_url":"https://api.github.com/repos/hyperledger/indy-plenum/statuses/0817da42c8d18a58a75ecdeb343a876eacc2ae59","head":{"label":"hyperledger:overview-doc","ref":"overview-doc","sha":"0817da42c8d18a58a75ecdeb343a876eacc2ae59","user":{"login":"hyperledger","id":7657900,"avatar_url":"https://avatars2.githubusercontent.com/u/7657900?v=4","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"repo":{"id":51585028,"name":"indy-plenum","full_name":"hyperledger/indy-plenum","owner":{"login":"hyperledger","id":7657900,"avatar_url":"https://avatars2.githubusercontent.com/u/7657900?v=4","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hyperledger/indy-plenum","description":"Plenum Byzantine Fault Tolerant Protocol","fork":false,"url":"https://api.github.com/repos/hyperledger/indy-plenum","forks_url":"https://api.github.com/repos/hyperledger/indy-plenum/forks","keys_url":"https://api.github.com/repos/hyperledger/indy-plenum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyperledger/indy-plenum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyperledger/indy-plenum/teams","hooks_url":"https://api.github.com/repos/hyperledger/indy-plenum/hooks","issue_events_url":"https://api.github.com/repos/hyperledger/indy-plenum/issues/events{/number}","events_url":"https://api.github.com/repos/hyperledger/indy-plenum/events","assignees_url":"https://api.github.com/repos/hyperledger/indy-plenum/assignees{/user}","branches_url":"https://api.github.com/repos/hyperledger/indy-plenum/branches{/branch}","tags_url":"https://api.github.com/repos/hyperledger/indy-plenum/tags","blobs_url":"https://api.github.com/repos/hyperledger/indy-plenum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyperledger/indy-plenum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyperledger/indy-plenum/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyperledger/indy-plenum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyperledger/indy-plenum/statuses/{sha}","languages_url":"https://api.github.com/repos/hyperledger/indy-plenum/languages","stargazers_url":"https://api.github.com/repos/hyperledger/indy-plenum/stargazers","contributors_url":"https://api.github.com/repos/hyperledger/indy-plenum/contributors","subscribers_url":"https://api.github.com/repos/hyperledger/indy-plenum/subscribers","subscription_url":"https://api.github.com/repos/hyperledger/indy-plenum/subscription","commits_url":"https://api.github.com/repos/hyperledger/indy-plenum/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyperledger/indy-plenum/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyperledger/indy-plenum/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyperledger/indy-plenum/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyperledger/indy-plenum/contents/{+path}","compare_url":"https://api.github.com/repos/hyperledger/indy-plenum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyperledger/indy-plenum/merges","archive_url":"https://api.github.com/repos/hyperledger/indy-plenum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyperledger/indy-plenum/downloads","issues_url":"https://api.github.com/repos/hyperledger/indy-plenum/issues{/number}","pulls_url":"https://api.github.com/repos/hyperledger/indy-plenum/pulls{/number}","milestones_url":"https://api.github.com/repos/hyperledger/indy-plenum/milestones{/number}","notifications_url":"https://api.github.com/repos/hyperledger/indy-plenum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyperledger/indy-plenum/labels{/name}","releases_url":"https://api.github.com/repos/hyperledger/indy-plenum/releases{/id}","deployments_url":"https://api.github.com/repos/hyperledger/indy-plenum/deployments","created_at":"2016-02-12T12:03:16Z","updated_at":"2018-02-05T15:29:01Z","pushed_at":"2018-02-07T12:48:57Z","git_url":"git://github.com/hyperledger/indy-plenum.git","ssh_url":"git@github.com:hyperledger/indy-plenum.git","clone_url":"https://github.com/hyperledger/indy-plenum.git","svn_url":"https://github.com/hyperledger/indy-plenum","homepage":"","size":7583,"stargazers_count":96,"watchers_count":96,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":92,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":92,"open_issues":8,"watchers":96,"default_branch":"master"}},"base":{"label":"hyperledger:master","ref":"master","sha":"c1420a9bb5a982172009102b262a98a74616554f","user":{"login":"hyperledger","id":7657900,"avatar_url":"https://avatars2.githubusercontent.com/u/7657900?v=4","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"repo":{"id":51585028,"name":"indy-plenum","full_name":"hyperledger/indy-plenum","owner":{"login":"hyperledger","id":7657900,"avatar_url":"https://avatars2.githubusercontent.com/u/7657900?v=4","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hyperledger/indy-plenum","description":"Plenum Byzantine Fault Tolerant Protocol","fork":false,"url":"https://api.github.com/repos/hyperledger/indy-plenum","forks_url":"https://api.github.com/repos/hyperledger/indy-plenum/forks","keys_url":"https://api.github.com/repos/hyperledger/indy-plenum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyperledger/indy-plenum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyperledger/indy-plenum/teams","hooks_url":"https://api.github.com/repos/hyperledger/indy-plenum/hooks","issue_events_url":"https://api.github.com/repos/hyperledger/indy-plenum/issues/events{/number}","events_url":"https://api.github.com/repos/hyperledger/indy-plenum/events","assignees_url":"https://api.github.com/repos/hyperledger/indy-plenum/assignees{/user}","branches_url":"https://api.github.com/repos/hyperledger/indy-plenum/branches{/branch}","tags_url":"https://api.github.com/repos/hyperledger/indy-plenum/tags","blobs_url":"https://api.github.com/repos/hyperledger/indy-plenum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyperledger/indy-plenum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyperledger/indy-plenum/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyperledger/indy-plenum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyperledger/indy-plenum/statuses/{sha}","languages_url":"https://api.github.com/repos/hyperledger/indy-plenum/languages","stargazers_url":"https://api.github.com/repos/hyperledger/indy-plenum/stargazers","contributors_url":"https://api.github.com/repos/hyperledger/indy-plenum/contributors","subscribers_url":"https://api.github.com/repos/hyperledger/indy-plenum/subscribers","subscription_url":"https://api.github.com/repos/hyperledger/indy-plenum/subscription","commits_url":"https://api.github.com/repos/hyperledger/indy-plenum/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyperledger/indy-plenum/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyperledger/indy-plenum/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyperledger/indy-plenum/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyperledger/indy-plenum/contents/{+path}","compare_url":"https://api.github.com/repos/hyperledger/indy-plenum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyperledger/indy-plenum/merges","archive_url":"https://api.github.com/repos/hyperledger/indy-plenum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyperledger/indy-plenum/downloads","issues_url":"https://api.github.com/repos/hyperledger/indy-plenum/issues{/number}","pulls_url":"https://api.github.com/repos/hyperledger/indy-plenum/pulls{/number}","milestones_url":"https://api.github.com/repos/hyperledger/indy-plenum/milestones{/number}","notifications_url":"https://api.github.com/repos/hyperledger/indy-plenum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyperledger/indy-plenum/labels{/name}","releases_url":"https://api.github.com/repos/hyperledger/indy-plenum/releases{/id}","deployments_url":"https://api.github.com/repos/hyperledger/indy-plenum/deployments","created_at":"2016-02-12T12:03:16Z","updated_at":"2018-02-05T15:29:01Z","pushed_at":"2018-02-07T12:48:57Z","git_url":"git://github.com/hyperledger/indy-plenum.git","ssh_url":"git@github.com:hyperledger/indy-plenum.git","clone_url":"https://github.com/hyperledger/indy-plenum.git","svn_url":"https://github.com/hyperledger/indy-plenum","homepage":"","size":7583,"stargazers_count":96,"watchers_count":96,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":92,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":92,"open_issues":8,"watchers":96,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hyperledger/indy-plenum/pulls/524"},"html":{"href":"https://github.com/hyperledger/indy-plenum/pull/524"},"issue":{"href":"https://api.github.com/repos/hyperledger/indy-plenum/issues/524"},"comments":{"href":"https://api.github.com/repos/hyperledger/indy-plenum/issues/524/comments"},"review_comments":{"href":"https://api.github.com/repos/hyperledger/indy-plenum/pulls/524/comments"},"review_comment":{"href":"https://api.github.com/repos/hyperledger/indy-plenum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hyperledger/indy-plenum/pulls/524/commits"},"statuses":{"href":"https://api.github.com/repos/hyperledger/indy-plenum/statuses/0817da42c8d18a58a75ecdeb343a876eacc2ae59"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ashcherbakov"}}