{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/py-evm/pulls/comments/189345512","pull_request_review_id":121511146,"id":189345512,"diff_hunk":"@@ -0,0 +1,76 @@\n+from abc import abstractmethod\n+import asyncio\n+from pathlib import PurePath\n+from threading import Thread\n+\n+from evm.chains.base import BaseChain\n+from evm.db.header import BaseHeaderDB\n+from p2p.service import (\n+    BaseService,\n+    EmptyService,\n+)\n+from trinity.rpc.main import (\n+    RPCServer,\n+)\n+from trinity.rpc.ipc import (\n+    IPCServer,\n+)\n+\n+\n+class Node(BaseService):\n+    \"\"\"\n+    Create usable nodes by adding subclasses that define the following\n+    unset attributes...\n+    \"\"\"\n+\n+    chain_class = None  # type: BaseChain","path":"trinity/nodes/base.py","position":26,"original_position":26,"commit_id":"7039d0c21016a6386d7a774e8dd5b5d2eb6b97a8","original_commit_id":"7039d0c21016a6386d7a774e8dd5b5d2eb6b97a8","user":{"login":"pipermerriam","id":824194,"avatar_url":"https://avatars3.githubusercontent.com/u/824194?v=4","gravatar_id":"","url":"https://api.github.com/users/pipermerriam","html_url":"https://github.com/pipermerriam","followers_url":"https://api.github.com/users/pipermerriam/followers","following_url":"https://api.github.com/users/pipermerriam/following{/other_user}","gists_url":"https://api.github.com/users/pipermerriam/gists{/gist_id}","starred_url":"https://api.github.com/users/pipermerriam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pipermerriam/subscriptions","organizations_url":"https://api.github.com/users/pipermerriam/orgs","repos_url":"https://api.github.com/users/pipermerriam/repos","events_url":"https://api.github.com/users/pipermerriam/events{/privacy}","received_events_url":"https://api.github.com/users/pipermerriam/received_events","type":"User","site_admin":false},"body":"These can be written as:\r\n\r\n```python\r\nchain_class: BaseChain = None\r\n```","created_at":"2018-05-18T17:49:59Z","updated_at":"2018-05-18T17:56:04Z","html_url":"https://github.com/ethereum/py-evm/pull/717#discussion_r189345512","pull_request_url":"https://api.github.com/repos/ethereum/py-evm/pulls/717","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/comments/189345512"},"html":{"href":"https://github.com/ethereum/py-evm/pull/717#discussion_r189345512"},"pull_request":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/717"}}},"pull_request":{"url":"https://api.github.com/repos/ethereum/py-evm/pulls/717","id":188898755,"html_url":"https://github.com/ethereum/py-evm/pull/717","diff_url":"https://github.com/ethereum/py-evm/pull/717.diff","patch_url":"https://github.com/ethereum/py-evm/pull/717.patch","issue_url":"https://api.github.com/repos/ethereum/py-evm/issues/717","number":717,"state":"open","locked":false,"title":"[WIP] Enable ipc queries to light chain","user":{"login":"carver","id":205327,"avatar_url":"https://avatars0.githubusercontent.com/u/205327?v=4","gravatar_id":"","url":"https://api.github.com/users/carver","html_url":"https://github.com/carver","followers_url":"https://api.github.com/users/carver/followers","following_url":"https://api.github.com/users/carver/following{/other_user}","gists_url":"https://api.github.com/users/carver/gists{/gist_id}","starred_url":"https://api.github.com/users/carver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carver/subscriptions","organizations_url":"https://api.github.com/users/carver/orgs","repos_url":"https://api.github.com/users/carver/repos","events_url":"https://api.github.com/users/carver/events{/privacy}","received_events_url":"https://api.github.com/users/carver/received_events","type":"User","site_admin":false},"body":"### What was wrong?\r\n\r\nWant to use IPC to query the light chain, starting from trinity command line.\r\n\r\n### How was it fixed?\r\n\r\nStill very much in progress, but this shows the number of the latest downloaded header:\r\n\r\n```sh\r\n$ trinity --ropsten --light --data-dir /tmp/trinity-light-ropsten/\r\n... <logs> ...\r\n```\r\n```py\r\nfrom web3 import Web3\r\nw3t = Web3(Web3.IPCProvider('/tmp/trinity-light-ropsten/jsonrpc.ipc'))\r\nw3t.eth.blockNumber\r\n```\r\nI've been hacking away to get `w3t.eth.getBlock('latest')` working, then I'll pinch this PR off.\r\n\r\nSome outstanding questions:\r\n- What is the best way to interface with `LightPeerChain` (formerly `p2p.lightchain.LightChain`) from a synchronous interface. I tried to avoid asyncio spreading virally through the code base. But still getting errors about futures on different threads, etc, and I'm new enough to asyncio that a *good* solution isn't obvious to me.\r\n- Which things should be running in their own threads?\r\n- Some modules are split by network (mainnet/ropsten/etc), others split by node type (full/light/sharding?/stateless?). Which makes more sense? (all the ropsten variants in one file, or all the full nodes in one file?)\r\n- Surely a lot more.\r\n\r\n#### Cute Animal Picture\r\n\r\n![put a cute animal picture link inside the parentheses](https://i.ytimg.com/vi/u6HR0om_TL4/maxresdefault.jpg)\r\n","created_at":"2018-05-18T01:12:33Z","updated_at":"2018-05-18T17:56:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6b5e74ed1e7fd25037c43a4b151644e725481486","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":630871768,"url":"https://api.github.com/repos/ethereum/py-evm/labels/Work%20in%20progress","name":"Work in progress","color":"c5def5","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ethereum/py-evm/pulls/717/commits","review_comments_url":"https://api.github.com/repos/ethereum/py-evm/pulls/717/comments","review_comment_url":"https://api.github.com/repos/ethereum/py-evm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethereum/py-evm/issues/717/comments","statuses_url":"https://api.github.com/repos/ethereum/py-evm/statuses/7039d0c21016a6386d7a774e8dd5b5d2eb6b97a8","head":{"label":"carver:ipc-light-client","ref":"ipc-light-client","sha":"7039d0c21016a6386d7a774e8dd5b5d2eb6b97a8","user":{"login":"carver","id":205327,"avatar_url":"https://avatars0.githubusercontent.com/u/205327?v=4","gravatar_id":"","url":"https://api.github.com/users/carver","html_url":"https://github.com/carver","followers_url":"https://api.github.com/users/carver/followers","following_url":"https://api.github.com/users/carver/following{/other_user}","gists_url":"https://api.github.com/users/carver/gists{/gist_id}","starred_url":"https://api.github.com/users/carver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carver/subscriptions","organizations_url":"https://api.github.com/users/carver/orgs","repos_url":"https://api.github.com/users/carver/repos","events_url":"https://api.github.com/users/carver/events{/privacy}","received_events_url":"https://api.github.com/users/carver/received_events","type":"User","site_admin":false},"repo":{"id":111029002,"name":"py-evm","full_name":"carver/py-evm","owner":{"login":"carver","id":205327,"avatar_url":"https://avatars0.githubusercontent.com/u/205327?v=4","gravatar_id":"","url":"https://api.github.com/users/carver","html_url":"https://github.com/carver","followers_url":"https://api.github.com/users/carver/followers","following_url":"https://api.github.com/users/carver/following{/other_user}","gists_url":"https://api.github.com/users/carver/gists{/gist_id}","starred_url":"https://api.github.com/users/carver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carver/subscriptions","organizations_url":"https://api.github.com/users/carver/orgs","repos_url":"https://api.github.com/users/carver/repos","events_url":"https://api.github.com/users/carver/events{/privacy}","received_events_url":"https://api.github.com/users/carver/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/carver/py-evm","description":"A Python implementation of the Ethereum Virtual Machine","fork":true,"url":"https://api.github.com/repos/carver/py-evm","forks_url":"https://api.github.com/repos/carver/py-evm/forks","keys_url":"https://api.github.com/repos/carver/py-evm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/carver/py-evm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/carver/py-evm/teams","hooks_url":"https://api.github.com/repos/carver/py-evm/hooks","issue_events_url":"https://api.github.com/repos/carver/py-evm/issues/events{/number}","events_url":"https://api.github.com/repos/carver/py-evm/events","assignees_url":"https://api.github.com/repos/carver/py-evm/assignees{/user}","branches_url":"https://api.github.com/repos/carver/py-evm/branches{/branch}","tags_url":"https://api.github.com/repos/carver/py-evm/tags","blobs_url":"https://api.github.com/repos/carver/py-evm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/carver/py-evm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/carver/py-evm/git/refs{/sha}","trees_url":"https://api.github.com/repos/carver/py-evm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/carver/py-evm/statuses/{sha}","languages_url":"https://api.github.com/repos/carver/py-evm/languages","stargazers_url":"https://api.github.com/repos/carver/py-evm/stargazers","contributors_url":"https://api.github.com/repos/carver/py-evm/contributors","subscribers_url":"https://api.github.com/repos/carver/py-evm/subscribers","subscription_url":"https://api.github.com/repos/carver/py-evm/subscription","commits_url":"https://api.github.com/repos/carver/py-evm/commits{/sha}","git_commits_url":"https://api.github.com/repos/carver/py-evm/git/commits{/sha}","comments_url":"https://api.github.com/repos/carver/py-evm/comments{/number}","issue_comment_url":"https://api.github.com/repos/carver/py-evm/issues/comments{/number}","contents_url":"https://api.github.com/repos/carver/py-evm/contents/{+path}","compare_url":"https://api.github.com/repos/carver/py-evm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/carver/py-evm/merges","archive_url":"https://api.github.com/repos/carver/py-evm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/carver/py-evm/downloads","issues_url":"https://api.github.com/repos/carver/py-evm/issues{/number}","pulls_url":"https://api.github.com/repos/carver/py-evm/pulls{/number}","milestones_url":"https://api.github.com/repos/carver/py-evm/milestones{/number}","notifications_url":"https://api.github.com/repos/carver/py-evm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/carver/py-evm/labels{/name}","releases_url":"https://api.github.com/repos/carver/py-evm/releases{/id}","deployments_url":"https://api.github.com/repos/carver/py-evm/deployments","created_at":"2017-11-16T22:23:49Z","updated_at":"2017-11-16T22:23:51Z","pushed_at":"2018-05-18T01:17:04Z","git_url":"git://github.com/carver/py-evm.git","ssh_url":"git@github.com:carver/py-evm.git","clone_url":"https://github.com/carver/py-evm.git","svn_url":"https://github.com/carver/py-evm","homepage":"","size":3274,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ethereum:master","ref":"master","sha":"e0864ea63daf7a1ee54111a2d1c5a5aa2d164e9f","user":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars3.githubusercontent.com/u/6250754?v=4","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"repo":{"id":77478378,"name":"py-evm","full_name":"ethereum/py-evm","owner":{"login":"ethereum","id":6250754,"avatar_url":"https://avatars3.githubusercontent.com/u/6250754?v=4","gravatar_id":"","url":"https://api.github.com/users/ethereum","html_url":"https://github.com/ethereum","followers_url":"https://api.github.com/users/ethereum/followers","following_url":"https://api.github.com/users/ethereum/following{/other_user}","gists_url":"https://api.github.com/users/ethereum/gists{/gist_id}","starred_url":"https://api.github.com/users/ethereum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethereum/subscriptions","organizations_url":"https://api.github.com/users/ethereum/orgs","repos_url":"https://api.github.com/users/ethereum/repos","events_url":"https://api.github.com/users/ethereum/events{/privacy}","received_events_url":"https://api.github.com/users/ethereum/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ethereum/py-evm","description":"A Python implementation of the Ethereum Virtual Machine","fork":false,"url":"https://api.github.com/repos/ethereum/py-evm","forks_url":"https://api.github.com/repos/ethereum/py-evm/forks","keys_url":"https://api.github.com/repos/ethereum/py-evm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethereum/py-evm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethereum/py-evm/teams","hooks_url":"https://api.github.com/repos/ethereum/py-evm/hooks","issue_events_url":"https://api.github.com/repos/ethereum/py-evm/issues/events{/number}","events_url":"https://api.github.com/repos/ethereum/py-evm/events","assignees_url":"https://api.github.com/repos/ethereum/py-evm/assignees{/user}","branches_url":"https://api.github.com/repos/ethereum/py-evm/branches{/branch}","tags_url":"https://api.github.com/repos/ethereum/py-evm/tags","blobs_url":"https://api.github.com/repos/ethereum/py-evm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethereum/py-evm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethereum/py-evm/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethereum/py-evm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethereum/py-evm/statuses/{sha}","languages_url":"https://api.github.com/repos/ethereum/py-evm/languages","stargazers_url":"https://api.github.com/repos/ethereum/py-evm/stargazers","contributors_url":"https://api.github.com/repos/ethereum/py-evm/contributors","subscribers_url":"https://api.github.com/repos/ethereum/py-evm/subscribers","subscription_url":"https://api.github.com/repos/ethereum/py-evm/subscription","commits_url":"https://api.github.com/repos/ethereum/py-evm/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethereum/py-evm/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethereum/py-evm/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethereum/py-evm/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethereum/py-evm/contents/{+path}","compare_url":"https://api.github.com/repos/ethereum/py-evm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethereum/py-evm/merges","archive_url":"https://api.github.com/repos/ethereum/py-evm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethereum/py-evm/downloads","issues_url":"https://api.github.com/repos/ethereum/py-evm/issues{/number}","pulls_url":"https://api.github.com/repos/ethereum/py-evm/pulls{/number}","milestones_url":"https://api.github.com/repos/ethereum/py-evm/milestones{/number}","notifications_url":"https://api.github.com/repos/ethereum/py-evm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethereum/py-evm/labels{/name}","releases_url":"https://api.github.com/repos/ethereum/py-evm/releases{/id}","deployments_url":"https://api.github.com/repos/ethereum/py-evm/deployments","created_at":"2016-12-27T19:36:00Z","updated_at":"2018-05-18T15:11:40Z","pushed_at":"2018-05-18T16:58:17Z","git_url":"git://github.com/ethereum/py-evm.git","ssh_url":"git@github.com:ethereum/py-evm.git","clone_url":"https://github.com/ethereum/py-evm.git","svn_url":"https://github.com/ethereum/py-evm","homepage":"http://py-evm.readthedocs.io/en/latest/","size":3275,"stargazers_count":453,"watchers_count":453,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":183,"mirror_url":null,"archived":false,"open_issues_count":94,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":183,"open_issues":94,"watchers":453,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/717"},"html":{"href":"https://github.com/ethereum/py-evm/pull/717"},"issue":{"href":"https://api.github.com/repos/ethereum/py-evm/issues/717"},"comments":{"href":"https://api.github.com/repos/ethereum/py-evm/issues/717/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/717/comments"},"review_comment":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/717/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/py-evm/statuses/7039d0c21016a6386d7a774e8dd5b5d2eb6b97a8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"pipermerriam"}}