{"action":"created","comment":{"url":"https://api.github.com/repos/ethereum/py-evm/pulls/comments/170802629","pull_request_review_id":99544161,"id":170802629,"diff_hunk":"@@ -26,6 +26,8 @@ def __init__(self, header, transactions=None, witness_nodes=None):\n         if witness_nodes is None:\n             witness_nodes = []\n \n+        self.transaction_fee_sum = 0","path":"evm/vm/forks/sharding/collations.py","position":4,"original_position":4,"commit_id":"d763823ec20accc3281c5eb617fcac0a78741435","original_commit_id":"d763823ec20accc3281c5eb617fcac0a78741435","user":{"login":"NIC619","id":17670147,"avatar_url":"https://avatars0.githubusercontent.com/u/17670147?v=4","gravatar_id":"","url":"https://api.github.com/users/NIC619","html_url":"https://github.com/NIC619","followers_url":"https://api.github.com/users/NIC619/followers","following_url":"https://api.github.com/users/NIC619/following{/other_user}","gists_url":"https://api.github.com/users/NIC619/gists{/gist_id}","starred_url":"https://api.github.com/users/NIC619/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NIC619/subscriptions","organizations_url":"https://api.github.com/users/NIC619/orgs","repos_url":"https://api.github.com/users/NIC619/repos","events_url":"https://api.github.com/users/NIC619/events{/privacy}","received_events_url":"https://api.github.com/users/NIC619/received_events","type":"User","site_admin":false},"body":"`block.transaction_fee_sum`(or `collation.transaction_fee_sum`) is used to record the accumulated transaction fee paid by each transaction that's included in the block(collation).\r\n\r\n```python\r\ndef add_transaction(self, transaction, computation, block):\r\n    …\r\n    # Calculate transaction fee\r\n    transaction_fee, _ = computation.compute_transaction_fee_and_refund()\r\n    # Bookkeep this transaction fee\r\n    block.transaction_fee_sum += transaction_fee\r\n    ...\r\n```","created_at":"2018-02-27T02:53:50Z","updated_at":"2018-02-27T02:53:51Z","html_url":"https://github.com/ethereum/py-evm/pull/350#discussion_r170802629","pull_request_url":"https://api.github.com/repos/ethereum/py-evm/pulls/350","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/comments/170802629"},"html":{"href":"https://github.com/ethereum/py-evm/pull/350#discussion_r170802629"},"pull_request":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/350"}},"in_reply_to_id":170759042},"pull_request":{"url":"https://api.github.com/repos/ethereum/py-evm/pulls/350","id":167015471,"html_url":"https://github.com/ethereum/py-evm/pull/350","diff_url":"https://github.com/ethereum/py-evm/pull/350.diff","patch_url":"https://github.com/ethereum/py-evm/pull/350.patch","issue_url":"https://api.github.com/repos/ethereum/py-evm/issues/350","number":350,"state":"open","locked":false,"title":"JSON test builder","user":{"login":"jannikluhn","id":29854669,"avatar_url":"https://avatars1.githubusercontent.com/u/29854669?v=4","gravatar_id":"","url":"https://api.github.com/users/jannikluhn","html_url":"https://github.com/jannikluhn","followers_url":"https://api.github.com/users/jannikluhn/followers","following_url":"https://api.github.com/users/jannikluhn/following{/other_user}","gists_url":"https://api.github.com/users/jannikluhn/gists{/gist_id}","starred_url":"https://api.github.com/users/jannikluhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jannikluhn/subscriptions","organizations_url":"https://api.github.com/users/jannikluhn/orgs","repos_url":"https://api.github.com/users/jannikluhn/repos","events_url":"https://api.github.com/users/jannikluhn/events{/privacy}","received_events_url":"https://api.github.com/users/jannikluhn/received_events","type":"User","site_admin":false},"body":"Referencing #332 \r\n\r\nThis is an unfinished first iteration of a JSON state test builder with the goal to explore if this approach makes sense. For sharding some changes in the test runner and the JSON format are required, so to keep things simple I started with replicating main chain tests.\r\n\r\nI posted a usage example the resulting JSON file [here](https://gist.github.com/jannikluhn/208707c73e96bf9f7ad8bdbff6154e88).\r\n\r\nFor comparison, from what I understood the original JSON tests are generated from a hand written JSON file (or automatically generated using some pattern) which is subsequently \"filled\" (i.e. expanded and the resulting state is calculated). Compared to my approach this is safer as it doesn't use the tested code to generate the tests (the example above for instance uses the `BaseTransaction` class). But it makes writing tests more cumbersome and less clear (especially when encoding transaction data for, e.g., user account transactions).\r\n\r\nAnyways, I'm very interested in your opinions and other ideas on this, @pipermerriam @hwwhww @NIC619.\r\n\r\n#### Cute Animal Picture\r\n\r\n![put a cute animal picture link inside the parentheses](https://pixabay.com/get/ea34b50720f51c22d2524518a33219c8b66ae3d018b616449df5c57d/lop-eared-314881_1280.jpg)\r\n","created_at":"2018-02-04T15:38:41Z","updated_at":"2018-02-27T02:53:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b37f6511f38585ad8d2244c18eeb07f3f637231e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":630872074,"url":"https://api.github.com/repos/ethereum/py-evm/labels/Needs%20Review","name":"Needs Review","color":"0052cc","default":false},{"id":769749869,"url":"https://api.github.com/repos/ethereum/py-evm/labels/Sharding","name":"Sharding","color":"f2e346","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ethereum/py-evm/pulls/350/commits","review_comments_url":"https://api.github.com/repos/ethereum/py-evm/pulls/350/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/350/comments","statuses_url":"https://api.github.com/repos/ethereum/py-evm/statuses/d763823ec20accc3281c5eb617fcac0a78741435","head":{"label":"jannikluhn:json-test-builder","ref":"json-test-builder","sha":"d763823ec20accc3281c5eb617fcac0a78741435","user":{"login":"jannikluhn","id":29854669,"avatar_url":"https://avatars1.githubusercontent.com/u/29854669?v=4","gravatar_id":"","url":"https://api.github.com/users/jannikluhn","html_url":"https://github.com/jannikluhn","followers_url":"https://api.github.com/users/jannikluhn/followers","following_url":"https://api.github.com/users/jannikluhn/following{/other_user}","gists_url":"https://api.github.com/users/jannikluhn/gists{/gist_id}","starred_url":"https://api.github.com/users/jannikluhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jannikluhn/subscriptions","organizations_url":"https://api.github.com/users/jannikluhn/orgs","repos_url":"https://api.github.com/users/jannikluhn/repos","events_url":"https://api.github.com/users/jannikluhn/events{/privacy}","received_events_url":"https://api.github.com/users/jannikluhn/received_events","type":"User","site_admin":false},"repo":{"id":112172429,"name":"py-evm","full_name":"jannikluhn/py-evm","owner":{"login":"jannikluhn","id":29854669,"avatar_url":"https://avatars1.githubusercontent.com/u/29854669?v=4","gravatar_id":"","url":"https://api.github.com/users/jannikluhn","html_url":"https://github.com/jannikluhn","followers_url":"https://api.github.com/users/jannikluhn/followers","following_url":"https://api.github.com/users/jannikluhn/following{/other_user}","gists_url":"https://api.github.com/users/jannikluhn/gists{/gist_id}","starred_url":"https://api.github.com/users/jannikluhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jannikluhn/subscriptions","organizations_url":"https://api.github.com/users/jannikluhn/orgs","repos_url":"https://api.github.com/users/jannikluhn/repos","events_url":"https://api.github.com/users/jannikluhn/events{/privacy}","received_events_url":"https://api.github.com/users/jannikluhn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jannikluhn/py-evm","description":"A Python implementation of the Ethereum Virtual Machine","fork":true,"url":"https://api.github.com/repos/jannikluhn/py-evm","forks_url":"https://api.github.com/repos/jannikluhn/py-evm/forks","keys_url":"https://api.github.com/repos/jannikluhn/py-evm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jannikluhn/py-evm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jannikluhn/py-evm/teams","hooks_url":"https://api.github.com/repos/jannikluhn/py-evm/hooks","issue_events_url":"https://api.github.com/repos/jannikluhn/py-evm/issues/events{/number}","events_url":"https://api.github.com/repos/jannikluhn/py-evm/events","assignees_url":"https://api.github.com/repos/jannikluhn/py-evm/assignees{/user}","branches_url":"https://api.github.com/repos/jannikluhn/py-evm/branches{/branch}","tags_url":"https://api.github.com/repos/jannikluhn/py-evm/tags","blobs_url":"https://api.github.com/repos/jannikluhn/py-evm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jannikluhn/py-evm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jannikluhn/py-evm/git/refs{/sha}","trees_url":"https://api.github.com/repos/jannikluhn/py-evm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jannikluhn/py-evm/statuses/{sha}","languages_url":"https://api.github.com/repos/jannikluhn/py-evm/languages","stargazers_url":"https://api.github.com/repos/jannikluhn/py-evm/stargazers","contributors_url":"https://api.github.com/repos/jannikluhn/py-evm/contributors","subscribers_url":"https://api.github.com/repos/jannikluhn/py-evm/subscribers","subscription_url":"https://api.github.com/repos/jannikluhn/py-evm/subscription","commits_url":"https://api.github.com/repos/jannikluhn/py-evm/commits{/sha}","git_commits_url":"https://api.github.com/repos/jannikluhn/py-evm/git/commits{/sha}","comments_url":"https://api.github.com/repos/jannikluhn/py-evm/comments{/number}","issue_comment_url":"https://api.github.com/repos/jannikluhn/py-evm/issues/comments{/number}","contents_url":"https://api.github.com/repos/jannikluhn/py-evm/contents/{+path}","compare_url":"https://api.github.com/repos/jannikluhn/py-evm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jannikluhn/py-evm/merges","archive_url":"https://api.github.com/repos/jannikluhn/py-evm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jannikluhn/py-evm/downloads","issues_url":"https://api.github.com/repos/jannikluhn/py-evm/issues{/number}","pulls_url":"https://api.github.com/repos/jannikluhn/py-evm/pulls{/number}","milestones_url":"https://api.github.com/repos/jannikluhn/py-evm/milestones{/number}","notifications_url":"https://api.github.com/repos/jannikluhn/py-evm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jannikluhn/py-evm/labels{/name}","releases_url":"https://api.github.com/repos/jannikluhn/py-evm/releases{/id}","deployments_url":"https://api.github.com/repos/jannikluhn/py-evm/deployments","created_at":"2017-11-27T09:01:07Z","updated_at":"2017-11-27T09:01:09Z","pushed_at":"2018-02-26T20:46:12Z","git_url":"git://github.com/jannikluhn/py-evm.git","ssh_url":"git@github.com:jannikluhn/py-evm.git","clone_url":"https://github.com/jannikluhn/py-evm.git","svn_url":"https://github.com/jannikluhn/py-evm","homepage":"","size":2742,"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:sharding","ref":"sharding","sha":"0f241577b8e1974f34db34ec692eef277c60e8de","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-02-25T21:17:36Z","pushed_at":"2018-02-26T22:56:06Z","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":2205,"stargazers_count":312,"watchers_count":312,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":118,"mirror_url":null,"archived":false,"open_issues_count":64,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":118,"open_issues":64,"watchers":312,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/350"},"html":{"href":"https://github.com/ethereum/py-evm/pull/350"},"issue":{"href":"https://api.github.com/repos/ethereum/py-evm/issues/350"},"comments":{"href":"https://api.github.com/repos/ethereum/py-evm/issues/350/comments"},"review_comments":{"href":"https://api.github.com/repos/ethereum/py-evm/pulls/350/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/350/commits"},"statuses":{"href":"https://api.github.com/repos/ethereum/py-evm/statuses/d763823ec20accc3281c5eb617fcac0a78741435"}},"author_association":"NONE"}}
{"actor":{"display_login":"NIC619"}}