{"action":"created","comment":{"url":"https://api.github.com/repos/rchain/rchain/pulls/comments/205719862","pull_request_review_id":141040065,"id":205719862,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTcxOTg2Mg==","diff_hunk":"@@ -129,7 +132,8 @@ object Reduce {\n       val rspaceCost                                        = body.storageCost + patterns.storageCost + srcs.storageCost\n       for {\n         _ <- costAccountingAlg.charge(rspaceCost)\n-        _ <- tuplespaceAlg.consume(binds, ParWithRandom(body, rand), persistent)\n+        c <- tuplespaceAlg.consume(binds, ParWithRandom(body, rand), persistent)\n+        _ <- costAccountingAlg.modify(_.charge(c))","path":"rholang/src/main/scala/coop/rchain/rholang/interpreter/Reduce.scala","position":80,"original_position":51,"commit_id":"8421710043eec3c303e8015a45b04f9263999ebb","original_commit_id":"63ab095ef737c882b34a0d3d8d6cd96d6495e5e6","user":{"login":"ArturGajowy","id":460141,"node_id":"MDQ6VXNlcjQ2MDE0MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/460141?v=4","gravatar_id":"","url":"https://api.github.com/users/ArturGajowy","html_url":"https://github.com/ArturGajowy","followers_url":"https://api.github.com/users/ArturGajowy/followers","following_url":"https://api.github.com/users/ArturGajowy/following{/other_user}","gists_url":"https://api.github.com/users/ArturGajowy/gists{/gist_id}","starred_url":"https://api.github.com/users/ArturGajowy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArturGajowy/subscriptions","organizations_url":"https://api.github.com/users/ArturGajowy/orgs","repos_url":"https://api.github.com/users/ArturGajowy/repos","events_url":"https://api.github.com/users/ArturGajowy/events{/privacy}","received_events_url":"https://api.github.com/users/ArturGajowy/received_events","type":"User","site_admin":false},"body":"I think this corresponds with your discussion with @rabbitonweb on the Cell typeclass PR. Can we somehow separate `.set` into a separate interface, so the types guard where it's used? Maybe create a fresh instance of CostAccountingAlg on `reduce.inj` isntead of resetting it?\r\n\r\nI won't insist on `set`, but would really like to see `.modify` hidden and `.charge` being used instead.","created_at":"2018-07-27T09:36:37Z","updated_at":"2018-07-27T09:46:28Z","html_url":"https://github.com/rchain/rchain/pull/1145#discussion_r205719862","pull_request_url":"https://api.github.com/repos/rchain/rchain/pulls/1145","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/rchain/rchain/pulls/comments/205719862"},"html":{"href":"https://github.com/rchain/rchain/pull/1145#discussion_r205719862"},"pull_request":{"href":"https://api.github.com/repos/rchain/rchain/pulls/1145"}},"in_reply_to_id":205376354},"pull_request":{"url":"https://api.github.com/repos/rchain/rchain/pulls/1145","id":202296748,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyMjk2NzQ4","html_url":"https://github.com/rchain/rchain/pull/1145","diff_url":"https://github.com/rchain/rchain/pull/1145.diff","patch_url":"https://github.com/rchain/rchain/pull/1145.patch","issue_url":"https://api.github.com/repos/rchain/rchain/issues/1145","number":1145,"state":"open","locked":false,"title":"[RHOL-504]: Add cost accounting to the spatial matcher","user":{"login":"goral09","id":5120801,"node_id":"MDQ6VXNlcjUxMjA4MDE=","avatar_url":"https://avatars2.githubusercontent.com/u/5120801?v=4","gravatar_id":"","url":"https://api.github.com/users/goral09","html_url":"https://github.com/goral09","followers_url":"https://api.github.com/users/goral09/followers","following_url":"https://api.github.com/users/goral09/following{/other_user}","gists_url":"https://api.github.com/users/goral09/gists{/gist_id}","starred_url":"https://api.github.com/users/goral09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goral09/subscriptions","organizations_url":"https://api.github.com/users/goral09/orgs","repos_url":"https://api.github.com/users/goral09/repos","events_url":"https://api.github.com/users/goral09/events{/privacy}","received_events_url":"https://api.github.com/users/goral09/received_events","type":"User","site_admin":false},"body":"## Overview\r\nAdds cost accounting to the spatial matcher.\r\n\r\n### Which JIRA issue does this PR relate to? If there is not a JIRA issue addressing this work, please create one now and add the link here.\r\n\r\nhttps://rchain.atlassian.net/browse/RHOL-504\r\n\r\n### Complete this checklist before you submit the PR\r\n- [ ] This PR contains no more than 200 lines of code, excluding test code.\r\n- [ ] This PR meets [RChain development coding standards](https://rchain.atlassian.net/wiki/spaces/DOC/pages/28082177/Coding+Standards).\r\n- [ ] You have someone in mind to assign for review. Make this assignment after submitting the PR.\r\n\r\n### Notes\r\nOptional. Add any notes on caveats, approaches you tried that didn't work, or anything else.\r\n","created_at":"2018-07-18T15:40:32Z","updated_at":"2018-07-27T09:46:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b98a163c208c3b6d10b560dc5d5ab0f0a15717e","assignee":null,"assignees":[],"requested_reviewers":[{"login":"odeac","id":1412609,"node_id":"MDQ6VXNlcjE0MTI2MDk=","avatar_url":"https://avatars0.githubusercontent.com/u/1412609?v=4","gravatar_id":"","url":"https://api.github.com/users/odeac","html_url":"https://github.com/odeac","followers_url":"https://api.github.com/users/odeac/followers","following_url":"https://api.github.com/users/odeac/following{/other_user}","gists_url":"https://api.github.com/users/odeac/gists{/gist_id}","starred_url":"https://api.github.com/users/odeac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odeac/subscriptions","organizations_url":"https://api.github.com/users/odeac/orgs","repos_url":"https://api.github.com/users/odeac/repos","events_url":"https://api.github.com/users/odeac/events{/privacy}","received_events_url":"https://api.github.com/users/odeac/received_events","type":"User","site_admin":false},{"login":"rabbitonweb","id":6287558,"node_id":"MDQ6VXNlcjYyODc1NTg=","avatar_url":"https://avatars1.githubusercontent.com/u/6287558?v=4","gravatar_id":"","url":"https://api.github.com/users/rabbitonweb","html_url":"https://github.com/rabbitonweb","followers_url":"https://api.github.com/users/rabbitonweb/followers","following_url":"https://api.github.com/users/rabbitonweb/following{/other_user}","gists_url":"https://api.github.com/users/rabbitonweb/gists{/gist_id}","starred_url":"https://api.github.com/users/rabbitonweb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rabbitonweb/subscriptions","organizations_url":"https://api.github.com/users/rabbitonweb/orgs","repos_url":"https://api.github.com/users/rabbitonweb/repos","events_url":"https://api.github.com/users/rabbitonweb/events{/privacy}","received_events_url":"https://api.github.com/users/rabbitonweb/received_events","type":"User","site_admin":false},{"login":"henrytill","id":6430643,"node_id":"MDQ6VXNlcjY0MzA2NDM=","avatar_url":"https://avatars3.githubusercontent.com/u/6430643?v=4","gravatar_id":"","url":"https://api.github.com/users/henrytill","html_url":"https://github.com/henrytill","followers_url":"https://api.github.com/users/henrytill/followers","following_url":"https://api.github.com/users/henrytill/following{/other_user}","gists_url":"https://api.github.com/users/henrytill/gists{/gist_id}","starred_url":"https://api.github.com/users/henrytill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henrytill/subscriptions","organizations_url":"https://api.github.com/users/henrytill/orgs","repos_url":"https://api.github.com/users/henrytill/repos","events_url":"https://api.github.com/users/henrytill/events{/privacy}","received_events_url":"https://api.github.com/users/henrytill/received_events","type":"User","site_admin":false},{"login":"itegulov","id":7879134,"node_id":"MDQ6VXNlcjc4NzkxMzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/7879134?v=4","gravatar_id":"","url":"https://api.github.com/users/itegulov","html_url":"https://github.com/itegulov","followers_url":"https://api.github.com/users/itegulov/followers","following_url":"https://api.github.com/users/itegulov/following{/other_user}","gists_url":"https://api.github.com/users/itegulov/gists{/gist_id}","starred_url":"https://api.github.com/users/itegulov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itegulov/subscriptions","organizations_url":"https://api.github.com/users/itegulov/orgs","repos_url":"https://api.github.com/users/itegulov/repos","events_url":"https://api.github.com/users/itegulov/events{/privacy}","received_events_url":"https://api.github.com/users/itegulov/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":758279618,"node_id":"MDU6TGFiZWw3NTgyNzk2MTg=","url":"https://api.github.com/repos/rchain/rchain/labels/don't-merge-yet","name":"don't-merge-yet","color":"fc7674","default":false},{"id":775817099,"node_id":"MDU6TGFiZWw3NzU4MTcwOTk=","url":"https://api.github.com/repos/rchain/rchain/labels/not-ready-yet","name":"not-ready-yet","color":"35ff5d","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/rchain/rchain/pulls/1145/commits","review_comments_url":"https://api.github.com/repos/rchain/rchain/pulls/1145/comments","review_comment_url":"https://api.github.com/repos/rchain/rchain/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rchain/rchain/issues/1145/comments","statuses_url":"https://api.github.com/repos/rchain/rchain/statuses/8421710043eec3c303e8015a45b04f9263999ebb","head":{"label":"goral09:RHOL-504_cost-accounting-matcher","ref":"RHOL-504_cost-accounting-matcher","sha":"8421710043eec3c303e8015a45b04f9263999ebb","user":{"login":"goral09","id":5120801,"node_id":"MDQ6VXNlcjUxMjA4MDE=","avatar_url":"https://avatars2.githubusercontent.com/u/5120801?v=4","gravatar_id":"","url":"https://api.github.com/users/goral09","html_url":"https://github.com/goral09","followers_url":"https://api.github.com/users/goral09/followers","following_url":"https://api.github.com/users/goral09/following{/other_user}","gists_url":"https://api.github.com/users/goral09/gists{/gist_id}","starred_url":"https://api.github.com/users/goral09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goral09/subscriptions","organizations_url":"https://api.github.com/users/goral09/orgs","repos_url":"https://api.github.com/users/goral09/repos","events_url":"https://api.github.com/users/goral09/events{/privacy}","received_events_url":"https://api.github.com/users/goral09/received_events","type":"User","site_admin":false},"repo":{"id":129659641,"node_id":"MDEwOlJlcG9zaXRvcnkxMjk2NTk2NDE=","name":"rchain","full_name":"goral09/rchain","owner":{"login":"goral09","id":5120801,"node_id":"MDQ6VXNlcjUxMjA4MDE=","avatar_url":"https://avatars2.githubusercontent.com/u/5120801?v=4","gravatar_id":"","url":"https://api.github.com/users/goral09","html_url":"https://github.com/goral09","followers_url":"https://api.github.com/users/goral09/followers","following_url":"https://api.github.com/users/goral09/following{/other_user}","gists_url":"https://api.github.com/users/goral09/gists{/gist_id}","starred_url":"https://api.github.com/users/goral09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goral09/subscriptions","organizations_url":"https://api.github.com/users/goral09/orgs","repos_url":"https://api.github.com/users/goral09/repos","events_url":"https://api.github.com/users/goral09/events{/privacy}","received_events_url":"https://api.github.com/users/goral09/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/goral09/rchain","description":null,"fork":true,"url":"https://api.github.com/repos/goral09/rchain","forks_url":"https://api.github.com/repos/goral09/rchain/forks","keys_url":"https://api.github.com/repos/goral09/rchain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/goral09/rchain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/goral09/rchain/teams","hooks_url":"https://api.github.com/repos/goral09/rchain/hooks","issue_events_url":"https://api.github.com/repos/goral09/rchain/issues/events{/number}","events_url":"https://api.github.com/repos/goral09/rchain/events","assignees_url":"https://api.github.com/repos/goral09/rchain/assignees{/user}","branches_url":"https://api.github.com/repos/goral09/rchain/branches{/branch}","tags_url":"https://api.github.com/repos/goral09/rchain/tags","blobs_url":"https://api.github.com/repos/goral09/rchain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/goral09/rchain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/goral09/rchain/git/refs{/sha}","trees_url":"https://api.github.com/repos/goral09/rchain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/goral09/rchain/statuses/{sha}","languages_url":"https://api.github.com/repos/goral09/rchain/languages","stargazers_url":"https://api.github.com/repos/goral09/rchain/stargazers","contributors_url":"https://api.github.com/repos/goral09/rchain/contributors","subscribers_url":"https://api.github.com/repos/goral09/rchain/subscribers","subscription_url":"https://api.github.com/repos/goral09/rchain/subscription","commits_url":"https://api.github.com/repos/goral09/rchain/commits{/sha}","git_commits_url":"https://api.github.com/repos/goral09/rchain/git/commits{/sha}","comments_url":"https://api.github.com/repos/goral09/rchain/comments{/number}","issue_comment_url":"https://api.github.com/repos/goral09/rchain/issues/comments{/number}","contents_url":"https://api.github.com/repos/goral09/rchain/contents/{+path}","compare_url":"https://api.github.com/repos/goral09/rchain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/goral09/rchain/merges","archive_url":"https://api.github.com/repos/goral09/rchain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/goral09/rchain/downloads","issues_url":"https://api.github.com/repos/goral09/rchain/issues{/number}","pulls_url":"https://api.github.com/repos/goral09/rchain/pulls{/number}","milestones_url":"https://api.github.com/repos/goral09/rchain/milestones{/number}","notifications_url":"https://api.github.com/repos/goral09/rchain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/goral09/rchain/labels{/name}","releases_url":"https://api.github.com/repos/goral09/rchain/releases{/id}","deployments_url":"https://api.github.com/repos/goral09/rchain/deployments","created_at":"2018-04-15T23:24:40Z","updated_at":"2018-04-25T19:11:17Z","pushed_at":"2018-07-27T09:19:27Z","git_url":"git://github.com/goral09/rchain.git","ssh_url":"git@github.com:goral09/rchain.git","clone_url":"https://github.com/goral09/rchain.git","svn_url":"https://github.com/goral09/rchain","homepage":null,"size":13560,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":1,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"rchain:dev","ref":"dev","sha":"ebbc56ef8f0150a2323d4a0ef7c1de6701d368c7","user":{"login":"rchain","id":20671765,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNjcxNzY1","avatar_url":"https://avatars0.githubusercontent.com/u/20671765?v=4","gravatar_id":"","url":"https://api.github.com/users/rchain","html_url":"https://github.com/rchain","followers_url":"https://api.github.com/users/rchain/followers","following_url":"https://api.github.com/users/rchain/following{/other_user}","gists_url":"https://api.github.com/users/rchain/gists{/gist_id}","starred_url":"https://api.github.com/users/rchain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rchain/subscriptions","organizations_url":"https://api.github.com/users/rchain/orgs","repos_url":"https://api.github.com/users/rchain/repos","events_url":"https://api.github.com/users/rchain/events{/privacy}","received_events_url":"https://api.github.com/users/rchain/received_events","type":"Organization","site_admin":false},"repo":{"id":84493691,"node_id":"MDEwOlJlcG9zaXRvcnk4NDQ5MzY5MQ==","name":"rchain","full_name":"rchain/rchain","owner":{"login":"rchain","id":20671765,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwNjcxNzY1","avatar_url":"https://avatars0.githubusercontent.com/u/20671765?v=4","gravatar_id":"","url":"https://api.github.com/users/rchain","html_url":"https://github.com/rchain","followers_url":"https://api.github.com/users/rchain/followers","following_url":"https://api.github.com/users/rchain/following{/other_user}","gists_url":"https://api.github.com/users/rchain/gists{/gist_id}","starred_url":"https://api.github.com/users/rchain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rchain/subscriptions","organizations_url":"https://api.github.com/users/rchain/orgs","repos_url":"https://api.github.com/users/rchain/repos","events_url":"https://api.github.com/users/rchain/events{/privacy}","received_events_url":"https://api.github.com/users/rchain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rchain/rchain","description":null,"fork":false,"url":"https://api.github.com/repos/rchain/rchain","forks_url":"https://api.github.com/repos/rchain/rchain/forks","keys_url":"https://api.github.com/repos/rchain/rchain/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rchain/rchain/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rchain/rchain/teams","hooks_url":"https://api.github.com/repos/rchain/rchain/hooks","issue_events_url":"https://api.github.com/repos/rchain/rchain/issues/events{/number}","events_url":"https://api.github.com/repos/rchain/rchain/events","assignees_url":"https://api.github.com/repos/rchain/rchain/assignees{/user}","branches_url":"https://api.github.com/repos/rchain/rchain/branches{/branch}","tags_url":"https://api.github.com/repos/rchain/rchain/tags","blobs_url":"https://api.github.com/repos/rchain/rchain/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rchain/rchain/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rchain/rchain/git/refs{/sha}","trees_url":"https://api.github.com/repos/rchain/rchain/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rchain/rchain/statuses/{sha}","languages_url":"https://api.github.com/repos/rchain/rchain/languages","stargazers_url":"https://api.github.com/repos/rchain/rchain/stargazers","contributors_url":"https://api.github.com/repos/rchain/rchain/contributors","subscribers_url":"https://api.github.com/repos/rchain/rchain/subscribers","subscription_url":"https://api.github.com/repos/rchain/rchain/subscription","commits_url":"https://api.github.com/repos/rchain/rchain/commits{/sha}","git_commits_url":"https://api.github.com/repos/rchain/rchain/git/commits{/sha}","comments_url":"https://api.github.com/repos/rchain/rchain/comments{/number}","issue_comment_url":"https://api.github.com/repos/rchain/rchain/issues/comments{/number}","contents_url":"https://api.github.com/repos/rchain/rchain/contents/{+path}","compare_url":"https://api.github.com/repos/rchain/rchain/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rchain/rchain/merges","archive_url":"https://api.github.com/repos/rchain/rchain/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rchain/rchain/downloads","issues_url":"https://api.github.com/repos/rchain/rchain/issues{/number}","pulls_url":"https://api.github.com/repos/rchain/rchain/pulls{/number}","milestones_url":"https://api.github.com/repos/rchain/rchain/milestones{/number}","notifications_url":"https://api.github.com/repos/rchain/rchain/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rchain/rchain/labels{/name}","releases_url":"https://api.github.com/repos/rchain/rchain/releases{/id}","deployments_url":"https://api.github.com/repos/rchain/rchain/deployments","created_at":"2017-03-09T22:15:35Z","updated_at":"2018-07-27T07:41:09Z","pushed_at":"2018-07-27T09:19:29Z","git_url":"git://github.com/rchain/rchain.git","ssh_url":"git@github.com:rchain/rchain.git","clone_url":"https://github.com/rchain/rchain.git","svn_url":"https://github.com/rchain/rchain","homepage":null,"size":13455,"stargazers_count":376,"watchers_count":376,"language":"Scala","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":110,"mirror_url":null,"archived":false,"open_issues_count":11,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":110,"open_issues":11,"watchers":376,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rchain/rchain/pulls/1145"},"html":{"href":"https://github.com/rchain/rchain/pull/1145"},"issue":{"href":"https://api.github.com/repos/rchain/rchain/issues/1145"},"comments":{"href":"https://api.github.com/repos/rchain/rchain/issues/1145/comments"},"review_comments":{"href":"https://api.github.com/repos/rchain/rchain/pulls/1145/comments"},"review_comment":{"href":"https://api.github.com/repos/rchain/rchain/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rchain/rchain/pulls/1145/commits"},"statuses":{"href":"https://api.github.com/repos/rchain/rchain/statuses/8421710043eec3c303e8015a45b04f9263999ebb"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"ArturGajowy"}}