{"action":"created","comment":{"url":"https://api.github.com/repos/Tribler/py-ipv8/pulls/comments/219693273","pull_request_review_id":157933839,"id":219693273,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxOTY5MzI3Mw==","diff_hunk":"@@ -44,6 +44,73 @@ def on_timeout(self):\n         pass\n \n \n+class ChainCrawlCache(IntroCrawlTimeout):","path":"ipv8/attestation/trustchain/caches.py","position":15,"original_position":15,"commit_id":"a52d95d72fd0375ee96d031ec9692e848178d7be","original_commit_id":"aa7baa6231cc5c12bd16d6d66a5df1a6830bb549","user":{"login":"devos50","id":1707075,"node_id":"MDQ6VXNlcjE3MDcwNzU=","avatar_url":"https://avatars3.githubusercontent.com/u/1707075?v=4","gravatar_id":"","url":"https://api.github.com/users/devos50","html_url":"https://github.com/devos50","followers_url":"https://api.github.com/users/devos50/followers","following_url":"https://api.github.com/users/devos50/following{/other_user}","gists_url":"https://api.github.com/users/devos50/gists{/gist_id}","starred_url":"https://api.github.com/users/devos50/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devos50/subscriptions","organizations_url":"https://api.github.com/users/devos50/orgs","repos_url":"https://api.github.com/users/devos50/repos","events_url":"https://api.github.com/users/devos50/events{/privacy}","received_events_url":"https://api.github.com/users/devos50/received_events","type":"User","site_admin":false},"body":"I've refactored it.","created_at":"2018-09-23T09:30:57Z","updated_at":"2018-09-23T09:30:57Z","html_url":"https://github.com/Tribler/py-ipv8/pull/282#discussion_r219693273","pull_request_url":"https://api.github.com/repos/Tribler/py-ipv8/pulls/282","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Tribler/py-ipv8/pulls/comments/219693273"},"html":{"href":"https://github.com/Tribler/py-ipv8/pull/282#discussion_r219693273"},"pull_request":{"href":"https://api.github.com/repos/Tribler/py-ipv8/pulls/282"}},"in_reply_to_id":219678579},"pull_request":{"url":"https://api.github.com/repos/Tribler/py-ipv8/pulls/282","id":216312046,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2MzEyMDQ2","html_url":"https://github.com/Tribler/py-ipv8/pull/282","diff_url":"https://github.com/Tribler/py-ipv8/pull/282.diff","patch_url":"https://github.com/Tribler/py-ipv8/pull/282.patch","issue_url":"https://api.github.com/repos/Tribler/py-ipv8/issues/282","number":282,"state":"open","locked":false,"title":"READY: Various improvements to TrustChain","user":{"login":"devos50","id":1707075,"node_id":"MDQ6VXNlcjE3MDcwNzU=","avatar_url":"https://avatars3.githubusercontent.com/u/1707075?v=4","gravatar_id":"","url":"https://api.github.com/users/devos50","html_url":"https://github.com/devos50","followers_url":"https://api.github.com/users/devos50/followers","following_url":"https://api.github.com/users/devos50/following{/other_user}","gists_url":"https://api.github.com/users/devos50/gists{/gist_id}","starred_url":"https://api.github.com/users/devos50/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devos50/subscriptions","organizations_url":"https://api.github.com/users/devos50/orgs","repos_url":"https://api.github.com/users/devos50/repos","events_url":"https://api.github.com/users/devos50/events{/privacy}","received_events_url":"https://api.github.com/users/devos50/received_events","type":"User","site_admin":false},"body":"In this PR, I made quite a few changes to the TrustChain code and protocol. It includes:\r\n- A fix for the block broadcast mechanism, where each block was unintentionally pushed to 1110 users. When this PR is merged, it is pushed to _only_ 25 users.\r\n- An extension of the introduction request/response, where information about the length of ones chain is included (sequence number of their latest block).\r\n- A separate file to store various important TrustChain settings. This includes settings for the block validation ranges (how many blocks do I need prior to signing one) and maximum number of blocks in the database.\r\n- Made the database upgrade script idempotent.\r\n- A database pruning loop that removes old blocks when the database grows too big.\r\n- Made the crawler less aggressive when we already have over 1000 blocks of a specific user.\r\n- A refactor of the crawl mechanism. In particular, each crawl request now contains a 'begin' and 'end' sequence number, or a range. I've also added an additional message when there are no blocks to return. This is more clean than the current mechanism where we return an invalid block in the `send_crawl_response` with type `noblocks`.\r\n- Storing double spend attempts in a separate database table.\r\n- Removed most of the `introduce_nodes` invocations from the TrustChain tests. Peer introduction is already done when creating the node itself.\r\n- Refactored `test_intro_response_crawl` test to make it more simple.\r\n- Added a separate 'crawler' mode to TrustChain, where a node attempts to crawl the whole chain of a target peer.","created_at":"2018-09-18T13:41:03Z","updated_at":"2018-09-23T09:30:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3da47d4b396865ea9c7fe6a46857f86ebd5c8977","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Tribler/py-ipv8/pulls/282/commits","review_comments_url":"https://api.github.com/repos/Tribler/py-ipv8/pulls/282/comments","review_comment_url":"https://api.github.com/repos/Tribler/py-ipv8/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Tribler/py-ipv8/issues/282/comments","statuses_url":"https://api.github.com/repos/Tribler/py-ipv8/statuses/a52d95d72fd0375ee96d031ec9692e848178d7be","head":{"label":"devos50:tc_ttl","ref":"tc_ttl","sha":"a52d95d72fd0375ee96d031ec9692e848178d7be","user":{"login":"devos50","id":1707075,"node_id":"MDQ6VXNlcjE3MDcwNzU=","avatar_url":"https://avatars3.githubusercontent.com/u/1707075?v=4","gravatar_id":"","url":"https://api.github.com/users/devos50","html_url":"https://github.com/devos50","followers_url":"https://api.github.com/users/devos50/followers","following_url":"https://api.github.com/users/devos50/following{/other_user}","gists_url":"https://api.github.com/users/devos50/gists{/gist_id}","starred_url":"https://api.github.com/users/devos50/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devos50/subscriptions","organizations_url":"https://api.github.com/users/devos50/orgs","repos_url":"https://api.github.com/users/devos50/repos","events_url":"https://api.github.com/users/devos50/events{/privacy}","received_events_url":"https://api.github.com/users/devos50/received_events","type":"User","site_admin":false},"repo":{"id":113299215,"node_id":"MDEwOlJlcG9zaXRvcnkxMTMyOTkyMTU=","name":"py-ipv8","full_name":"devos50/py-ipv8","private":false,"owner":{"login":"devos50","id":1707075,"node_id":"MDQ6VXNlcjE3MDcwNzU=","avatar_url":"https://avatars3.githubusercontent.com/u/1707075?v=4","gravatar_id":"","url":"https://api.github.com/users/devos50","html_url":"https://github.com/devos50","followers_url":"https://api.github.com/users/devos50/followers","following_url":"https://api.github.com/users/devos50/following{/other_user}","gists_url":"https://api.github.com/users/devos50/gists{/gist_id}","starred_url":"https://api.github.com/users/devos50/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devos50/subscriptions","organizations_url":"https://api.github.com/users/devos50/orgs","repos_url":"https://api.github.com/users/devos50/repos","events_url":"https://api.github.com/users/devos50/events{/privacy}","received_events_url":"https://api.github.com/users/devos50/received_events","type":"User","site_admin":false},"html_url":"https://github.com/devos50/py-ipv8","description":"Python implementation of the IPV8 layer","fork":true,"url":"https://api.github.com/repos/devos50/py-ipv8","forks_url":"https://api.github.com/repos/devos50/py-ipv8/forks","keys_url":"https://api.github.com/repos/devos50/py-ipv8/keys{/key_id}","collaborators_url":"https://api.github.com/repos/devos50/py-ipv8/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/devos50/py-ipv8/teams","hooks_url":"https://api.github.com/repos/devos50/py-ipv8/hooks","issue_events_url":"https://api.github.com/repos/devos50/py-ipv8/issues/events{/number}","events_url":"https://api.github.com/repos/devos50/py-ipv8/events","assignees_url":"https://api.github.com/repos/devos50/py-ipv8/assignees{/user}","branches_url":"https://api.github.com/repos/devos50/py-ipv8/branches{/branch}","tags_url":"https://api.github.com/repos/devos50/py-ipv8/tags","blobs_url":"https://api.github.com/repos/devos50/py-ipv8/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/devos50/py-ipv8/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/devos50/py-ipv8/git/refs{/sha}","trees_url":"https://api.github.com/repos/devos50/py-ipv8/git/trees{/sha}","statuses_url":"https://api.github.com/repos/devos50/py-ipv8/statuses/{sha}","languages_url":"https://api.github.com/repos/devos50/py-ipv8/languages","stargazers_url":"https://api.github.com/repos/devos50/py-ipv8/stargazers","contributors_url":"https://api.github.com/repos/devos50/py-ipv8/contributors","subscribers_url":"https://api.github.com/repos/devos50/py-ipv8/subscribers","subscription_url":"https://api.github.com/repos/devos50/py-ipv8/subscription","commits_url":"https://api.github.com/repos/devos50/py-ipv8/commits{/sha}","git_commits_url":"https://api.github.com/repos/devos50/py-ipv8/git/commits{/sha}","comments_url":"https://api.github.com/repos/devos50/py-ipv8/comments{/number}","issue_comment_url":"https://api.github.com/repos/devos50/py-ipv8/issues/comments{/number}","contents_url":"https://api.github.com/repos/devos50/py-ipv8/contents/{+path}","compare_url":"https://api.github.com/repos/devos50/py-ipv8/compare/{base}...{head}","merges_url":"https://api.github.com/repos/devos50/py-ipv8/merges","archive_url":"https://api.github.com/repos/devos50/py-ipv8/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/devos50/py-ipv8/downloads","issues_url":"https://api.github.com/repos/devos50/py-ipv8/issues{/number}","pulls_url":"https://api.github.com/repos/devos50/py-ipv8/pulls{/number}","milestones_url":"https://api.github.com/repos/devos50/py-ipv8/milestones{/number}","notifications_url":"https://api.github.com/repos/devos50/py-ipv8/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/devos50/py-ipv8/labels{/name}","releases_url":"https://api.github.com/repos/devos50/py-ipv8/releases{/id}","deployments_url":"https://api.github.com/repos/devos50/py-ipv8/deployments","created_at":"2017-12-06T09:57:39Z","updated_at":"2017-12-06T09:57:40Z","pushed_at":"2018-09-23T09:30:12Z","git_url":"git://github.com/devos50/py-ipv8.git","ssh_url":"git@github.com:devos50/py-ipv8.git","clone_url":"https://github.com/devos50/py-ipv8.git","svn_url":"https://github.com/devos50/py-ipv8","homepage":null,"size":901,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"add_setup"}},"base":{"label":"Tribler:master","ref":"master","sha":"ed7a205f1add69caabd92a4a4ac8ac2d6c4e3e75","user":{"login":"Tribler","id":2913489,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5MTM0ODk=","avatar_url":"https://avatars3.githubusercontent.com/u/2913489?v=4","gravatar_id":"","url":"https://api.github.com/users/Tribler","html_url":"https://github.com/Tribler","followers_url":"https://api.github.com/users/Tribler/followers","following_url":"https://api.github.com/users/Tribler/following{/other_user}","gists_url":"https://api.github.com/users/Tribler/gists{/gist_id}","starred_url":"https://api.github.com/users/Tribler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tribler/subscriptions","organizations_url":"https://api.github.com/users/Tribler/orgs","repos_url":"https://api.github.com/users/Tribler/repos","events_url":"https://api.github.com/users/Tribler/events{/privacy}","received_events_url":"https://api.github.com/users/Tribler/received_events","type":"Organization","site_admin":false},"repo":{"id":95567452,"node_id":"MDEwOlJlcG9zaXRvcnk5NTU2NzQ1Mg==","name":"py-ipv8","full_name":"Tribler/py-ipv8","private":false,"owner":{"login":"Tribler","id":2913489,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5MTM0ODk=","avatar_url":"https://avatars3.githubusercontent.com/u/2913489?v=4","gravatar_id":"","url":"https://api.github.com/users/Tribler","html_url":"https://github.com/Tribler","followers_url":"https://api.github.com/users/Tribler/followers","following_url":"https://api.github.com/users/Tribler/following{/other_user}","gists_url":"https://api.github.com/users/Tribler/gists{/gist_id}","starred_url":"https://api.github.com/users/Tribler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tribler/subscriptions","organizations_url":"https://api.github.com/users/Tribler/orgs","repos_url":"https://api.github.com/users/Tribler/repos","events_url":"https://api.github.com/users/Tribler/events{/privacy}","received_events_url":"https://api.github.com/users/Tribler/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Tribler/py-ipv8","description":"Python implementation of the IPv8 layer","fork":false,"url":"https://api.github.com/repos/Tribler/py-ipv8","forks_url":"https://api.github.com/repos/Tribler/py-ipv8/forks","keys_url":"https://api.github.com/repos/Tribler/py-ipv8/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Tribler/py-ipv8/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Tribler/py-ipv8/teams","hooks_url":"https://api.github.com/repos/Tribler/py-ipv8/hooks","issue_events_url":"https://api.github.com/repos/Tribler/py-ipv8/issues/events{/number}","events_url":"https://api.github.com/repos/Tribler/py-ipv8/events","assignees_url":"https://api.github.com/repos/Tribler/py-ipv8/assignees{/user}","branches_url":"https://api.github.com/repos/Tribler/py-ipv8/branches{/branch}","tags_url":"https://api.github.com/repos/Tribler/py-ipv8/tags","blobs_url":"https://api.github.com/repos/Tribler/py-ipv8/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Tribler/py-ipv8/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Tribler/py-ipv8/git/refs{/sha}","trees_url":"https://api.github.com/repos/Tribler/py-ipv8/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Tribler/py-ipv8/statuses/{sha}","languages_url":"https://api.github.com/repos/Tribler/py-ipv8/languages","stargazers_url":"https://api.github.com/repos/Tribler/py-ipv8/stargazers","contributors_url":"https://api.github.com/repos/Tribler/py-ipv8/contributors","subscribers_url":"https://api.github.com/repos/Tribler/py-ipv8/subscribers","subscription_url":"https://api.github.com/repos/Tribler/py-ipv8/subscription","commits_url":"https://api.github.com/repos/Tribler/py-ipv8/commits{/sha}","git_commits_url":"https://api.github.com/repos/Tribler/py-ipv8/git/commits{/sha}","comments_url":"https://api.github.com/repos/Tribler/py-ipv8/comments{/number}","issue_comment_url":"https://api.github.com/repos/Tribler/py-ipv8/issues/comments{/number}","contents_url":"https://api.github.com/repos/Tribler/py-ipv8/contents/{+path}","compare_url":"https://api.github.com/repos/Tribler/py-ipv8/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Tribler/py-ipv8/merges","archive_url":"https://api.github.com/repos/Tribler/py-ipv8/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Tribler/py-ipv8/downloads","issues_url":"https://api.github.com/repos/Tribler/py-ipv8/issues{/number}","pulls_url":"https://api.github.com/repos/Tribler/py-ipv8/pulls{/number}","milestones_url":"https://api.github.com/repos/Tribler/py-ipv8/milestones{/number}","notifications_url":"https://api.github.com/repos/Tribler/py-ipv8/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Tribler/py-ipv8/labels{/name}","releases_url":"https://api.github.com/repos/Tribler/py-ipv8/releases{/id}","deployments_url":"https://api.github.com/repos/Tribler/py-ipv8/deployments","created_at":"2017-06-27T14:30:23Z","updated_at":"2018-09-23T08:21:57Z","pushed_at":"2018-09-23T09:30:14Z","git_url":"git://github.com/Tribler/py-ipv8.git","ssh_url":"git@github.com:Tribler/py-ipv8.git","clone_url":"https://github.com/Tribler/py-ipv8.git","svn_url":"https://github.com/Tribler/py-ipv8","homepage":"","size":809,"stargazers_count":14,"watchers_count":14,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":24,"license":{"key":"lgpl-3.0","name":"GNU Lesser General Public License v3.0","spdx_id":"LGPL-3.0","url":"https://api.github.com/licenses/lgpl-3.0","node_id":"MDc6TGljZW5zZTEy"},"forks":10,"open_issues":24,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Tribler/py-ipv8/pulls/282"},"html":{"href":"https://github.com/Tribler/py-ipv8/pull/282"},"issue":{"href":"https://api.github.com/repos/Tribler/py-ipv8/issues/282"},"comments":{"href":"https://api.github.com/repos/Tribler/py-ipv8/issues/282/comments"},"review_comments":{"href":"https://api.github.com/repos/Tribler/py-ipv8/pulls/282/comments"},"review_comment":{"href":"https://api.github.com/repos/Tribler/py-ipv8/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Tribler/py-ipv8/pulls/282/commits"},"statuses":{"href":"https://api.github.com/repos/Tribler/py-ipv8/statuses/a52d95d72fd0375ee96d031ec9692e848178d7be"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"devos50"}}