{"action":"created","comment":{"url":"https://api.github.com/repos/corda/corda/pulls/comments/237799384","pull_request_review_id":180177088,"id":237799384,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzc5OTM4NA==","diff_hunk":"@@ -153,6 +159,8 @@ class WireTransaction(componentGroups: List<ComponentGroup>, val privacySalt: Pr\n \n         val resolvedAttachments = attachments.lazyMapped { att, _ -> resolveAttachment(att) ?: throw AttachmentResolutionException(att) }\n \n+        val inputContractClassToJarVersion = resolveContractAttachmentVersion(resolvedInputs.map { Pair(it.state.contract, it.ref) }, resolveContractAttachment)","path":"core/src/main/kotlin/net/corda/core/transactions/WireTransaction.kt","position":58,"original_position":56,"commit_id":"4ccd6a4e17b417a66d17c29ab44a9b5bd9e84c0f","original_commit_id":"f3a4bc5d7b805db01e8d0df9b1192cfede5165a5","user":{"login":"tudor-malene","id":1941897,"node_id":"MDQ6VXNlcjE5NDE4OTc=","avatar_url":"https://avatars0.githubusercontent.com/u/1941897?v=4","gravatar_id":"","url":"https://api.github.com/users/tudor-malene","html_url":"https://github.com/tudor-malene","followers_url":"https://api.github.com/users/tudor-malene/followers","following_url":"https://api.github.com/users/tudor-malene/following{/other_user}","gists_url":"https://api.github.com/users/tudor-malene/gists{/gist_id}","starred_url":"https://api.github.com/users/tudor-malene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tudor-malene/subscriptions","organizations_url":"https://api.github.com/users/tudor-malene/orgs","repos_url":"https://api.github.com/users/tudor-malene/repos","events_url":"https://api.github.com/users/tudor-malene/events{/privacy}","received_events_url":"https://api.github.com/users/tudor-malene/received_events","type":"User","site_admin":false},"body":"The issue is that resolving the version of input states is an expensive step as it involves deserializing data, reading from jars, etc.\r\nAnd it's only needed when running transaction verification.\r\n\r\nI would suggest making the version calculation lazy too.","created_at":"2018-11-30T09:42:46Z","updated_at":"2018-11-30T09:51:52Z","html_url":"https://github.com/corda/corda/pull/4262#discussion_r237799384","pull_request_url":"https://api.github.com/repos/corda/corda/pulls/4262","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/corda/corda/pulls/comments/237799384"},"html":{"href":"https://github.com/corda/corda/pull/4262#discussion_r237799384"},"pull_request":{"href":"https://api.github.com/repos/corda/corda/pulls/4262"}},"in_reply_to_id":236210207},"pull_request":{"url":"https://api.github.com/repos/corda/corda/pulls/4262","id":232242750,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyMjQyNzUw","html_url":"https://github.com/corda/corda/pull/4262","diff_url":"https://github.com/corda/corda/pull/4262.diff","patch_url":"https://github.com/corda/corda/pull/4262.patch","issue_url":"https://api.github.com/repos/corda/corda/issues/4262","number":4262,"state":"open","locked":false,"title":"CORDA-2150 signature constraints non downgrade rule","user":{"login":"szymonsztuka","id":8189785,"node_id":"MDQ6VXNlcjgxODk3ODU=","avatar_url":"https://avatars0.githubusercontent.com/u/8189785?v=4","gravatar_id":"","url":"https://api.github.com/users/szymonsztuka","html_url":"https://github.com/szymonsztuka","followers_url":"https://api.github.com/users/szymonsztuka/followers","following_url":"https://api.github.com/users/szymonsztuka/following{/other_user}","gists_url":"https://api.github.com/users/szymonsztuka/gists{/gist_id}","starred_url":"https://api.github.com/users/szymonsztuka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szymonsztuka/subscriptions","organizations_url":"https://api.github.com/users/szymonsztuka/orgs","repos_url":"https://api.github.com/users/szymonsztuka/repos","events_url":"https://api.github.com/users/szymonsztuka/events{/privacy}","received_events_url":"https://api.github.com/users/szymonsztuka/received_events","type":"User","site_admin":false},"body":"Contract class version non-downgrade rule is check in two places:\r\n1) `LedgerTransaction.verify()`\r\n2) `TransactionBuilder.toWireTransaction(services: ServicesForResolution)`  before WiredTransaction is created, internally it's inside `selectContractAttachmentsAndOutputStateConstraints()` as it has already fetched Attachment for output contracts\r\n\r\nAdded new ServiceHub method `fun loadContractAttachment(stateRef: StateRef): Attachment?`\r\n\r\nLacking tests, preliminary minor additions to `TestCordapp.kt`/`TestCordappImpl.kt`/`TestCordappsUtils.kt`","created_at":"2018-11-20T09:19:17Z","updated_at":"2018-11-30T09:51:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4e7aa3eb497c279e4499d3c542311424c1752368","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":879858219,"node_id":"MDU6TGFiZWw4Nzk4NTgyMTk=","url":"https://api.github.com/repos/corda/corda/labels/work%20in%20progress","name":"work in progress","color":"a01429","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/corda/corda/pulls/4262/commits","review_comments_url":"https://api.github.com/repos/corda/corda/pulls/4262/comments","review_comment_url":"https://api.github.com/repos/corda/corda/pulls/comments{/number}","comments_url":"https://api.github.com/repos/corda/corda/issues/4262/comments","statuses_url":"https://api.github.com/repos/corda/corda/statuses/4ccd6a4e17b417a66d17c29ab44a9b5bd9e84c0f","head":{"label":"corda:feature/CORDA-2150-signature-constraints-non-downgrade-rule","ref":"feature/CORDA-2150-signature-constraints-non-downgrade-rule","sha":"4ccd6a4e17b417a66d17c29ab44a9b5bd9e84c0f","user":{"login":"corda","id":22600631,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyNjAwNjMx","avatar_url":"https://avatars1.githubusercontent.com/u/22600631?v=4","gravatar_id":"","url":"https://api.github.com/users/corda","html_url":"https://github.com/corda","followers_url":"https://api.github.com/users/corda/followers","following_url":"https://api.github.com/users/corda/following{/other_user}","gists_url":"https://api.github.com/users/corda/gists{/gist_id}","starred_url":"https://api.github.com/users/corda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corda/subscriptions","organizations_url":"https://api.github.com/users/corda/orgs","repos_url":"https://api.github.com/users/corda/repos","events_url":"https://api.github.com/users/corda/events{/privacy}","received_events_url":"https://api.github.com/users/corda/received_events","type":"Organization","site_admin":false},"repo":{"id":70137417,"node_id":"MDEwOlJlcG9zaXRvcnk3MDEzNzQxNw==","name":"corda","full_name":"corda/corda","private":false,"owner":{"login":"corda","id":22600631,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyNjAwNjMx","avatar_url":"https://avatars1.githubusercontent.com/u/22600631?v=4","gravatar_id":"","url":"https://api.github.com/users/corda","html_url":"https://github.com/corda","followers_url":"https://api.github.com/users/corda/followers","following_url":"https://api.github.com/users/corda/following{/other_user}","gists_url":"https://api.github.com/users/corda/gists{/gist_id}","starred_url":"https://api.github.com/users/corda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corda/subscriptions","organizations_url":"https://api.github.com/users/corda/orgs","repos_url":"https://api.github.com/users/corda/repos","events_url":"https://api.github.com/users/corda/events{/privacy}","received_events_url":"https://api.github.com/users/corda/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/corda/corda","description":"Corda is an open source blockchain project, designed for business from the start. Only Corda allows you to build interoperable blockchain networks that transact in strict privacy. Corda's smart contract technology allows businesses to transact directly, with value.","fork":false,"url":"https://api.github.com/repos/corda/corda","forks_url":"https://api.github.com/repos/corda/corda/forks","keys_url":"https://api.github.com/repos/corda/corda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/corda/corda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/corda/corda/teams","hooks_url":"https://api.github.com/repos/corda/corda/hooks","issue_events_url":"https://api.github.com/repos/corda/corda/issues/events{/number}","events_url":"https://api.github.com/repos/corda/corda/events","assignees_url":"https://api.github.com/repos/corda/corda/assignees{/user}","branches_url":"https://api.github.com/repos/corda/corda/branches{/branch}","tags_url":"https://api.github.com/repos/corda/corda/tags","blobs_url":"https://api.github.com/repos/corda/corda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/corda/corda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/corda/corda/git/refs{/sha}","trees_url":"https://api.github.com/repos/corda/corda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/corda/corda/statuses/{sha}","languages_url":"https://api.github.com/repos/corda/corda/languages","stargazers_url":"https://api.github.com/repos/corda/corda/stargazers","contributors_url":"https://api.github.com/repos/corda/corda/contributors","subscribers_url":"https://api.github.com/repos/corda/corda/subscribers","subscription_url":"https://api.github.com/repos/corda/corda/subscription","commits_url":"https://api.github.com/repos/corda/corda/commits{/sha}","git_commits_url":"https://api.github.com/repos/corda/corda/git/commits{/sha}","comments_url":"https://api.github.com/repos/corda/corda/comments{/number}","issue_comment_url":"https://api.github.com/repos/corda/corda/issues/comments{/number}","contents_url":"https://api.github.com/repos/corda/corda/contents/{+path}","compare_url":"https://api.github.com/repos/corda/corda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/corda/corda/merges","archive_url":"https://api.github.com/repos/corda/corda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/corda/corda/downloads","issues_url":"https://api.github.com/repos/corda/corda/issues{/number}","pulls_url":"https://api.github.com/repos/corda/corda/pulls{/number}","milestones_url":"https://api.github.com/repos/corda/corda/milestones{/number}","notifications_url":"https://api.github.com/repos/corda/corda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/corda/corda/labels{/name}","releases_url":"https://api.github.com/repos/corda/corda/releases{/id}","deployments_url":"https://api.github.com/repos/corda/corda/deployments","created_at":"2016-10-06T08:46:29Z","updated_at":"2018-11-30T09:47:30Z","pushed_at":"2018-11-30T09:47:28Z","git_url":"git://github.com/corda/corda.git","ssh_url":"git@github.com:corda/corda.git","clone_url":"https://github.com/corda/corda.git","svn_url":"https://github.com/corda/corda","homepage":"https://www.corda.net","size":167794,"stargazers_count":2528,"watchers_count":2528,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":643,"mirror_url":null,"archived":false,"open_issues_count":87,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":643,"open_issues":87,"watchers":2528,"default_branch":"master"}},"base":{"label":"corda:master","ref":"master","sha":"9d748e7b0cb71cce2c0ea6e7ab1ab6a6be2a34ed","user":{"login":"corda","id":22600631,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyNjAwNjMx","avatar_url":"https://avatars1.githubusercontent.com/u/22600631?v=4","gravatar_id":"","url":"https://api.github.com/users/corda","html_url":"https://github.com/corda","followers_url":"https://api.github.com/users/corda/followers","following_url":"https://api.github.com/users/corda/following{/other_user}","gists_url":"https://api.github.com/users/corda/gists{/gist_id}","starred_url":"https://api.github.com/users/corda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corda/subscriptions","organizations_url":"https://api.github.com/users/corda/orgs","repos_url":"https://api.github.com/users/corda/repos","events_url":"https://api.github.com/users/corda/events{/privacy}","received_events_url":"https://api.github.com/users/corda/received_events","type":"Organization","site_admin":false},"repo":{"id":70137417,"node_id":"MDEwOlJlcG9zaXRvcnk3MDEzNzQxNw==","name":"corda","full_name":"corda/corda","private":false,"owner":{"login":"corda","id":22600631,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyNjAwNjMx","avatar_url":"https://avatars1.githubusercontent.com/u/22600631?v=4","gravatar_id":"","url":"https://api.github.com/users/corda","html_url":"https://github.com/corda","followers_url":"https://api.github.com/users/corda/followers","following_url":"https://api.github.com/users/corda/following{/other_user}","gists_url":"https://api.github.com/users/corda/gists{/gist_id}","starred_url":"https://api.github.com/users/corda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corda/subscriptions","organizations_url":"https://api.github.com/users/corda/orgs","repos_url":"https://api.github.com/users/corda/repos","events_url":"https://api.github.com/users/corda/events{/privacy}","received_events_url":"https://api.github.com/users/corda/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/corda/corda","description":"Corda is an open source blockchain project, designed for business from the start. Only Corda allows you to build interoperable blockchain networks that transact in strict privacy. Corda's smart contract technology allows businesses to transact directly, with value.","fork":false,"url":"https://api.github.com/repos/corda/corda","forks_url":"https://api.github.com/repos/corda/corda/forks","keys_url":"https://api.github.com/repos/corda/corda/keys{/key_id}","collaborators_url":"https://api.github.com/repos/corda/corda/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/corda/corda/teams","hooks_url":"https://api.github.com/repos/corda/corda/hooks","issue_events_url":"https://api.github.com/repos/corda/corda/issues/events{/number}","events_url":"https://api.github.com/repos/corda/corda/events","assignees_url":"https://api.github.com/repos/corda/corda/assignees{/user}","branches_url":"https://api.github.com/repos/corda/corda/branches{/branch}","tags_url":"https://api.github.com/repos/corda/corda/tags","blobs_url":"https://api.github.com/repos/corda/corda/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/corda/corda/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/corda/corda/git/refs{/sha}","trees_url":"https://api.github.com/repos/corda/corda/git/trees{/sha}","statuses_url":"https://api.github.com/repos/corda/corda/statuses/{sha}","languages_url":"https://api.github.com/repos/corda/corda/languages","stargazers_url":"https://api.github.com/repos/corda/corda/stargazers","contributors_url":"https://api.github.com/repos/corda/corda/contributors","subscribers_url":"https://api.github.com/repos/corda/corda/subscribers","subscription_url":"https://api.github.com/repos/corda/corda/subscription","commits_url":"https://api.github.com/repos/corda/corda/commits{/sha}","git_commits_url":"https://api.github.com/repos/corda/corda/git/commits{/sha}","comments_url":"https://api.github.com/repos/corda/corda/comments{/number}","issue_comment_url":"https://api.github.com/repos/corda/corda/issues/comments{/number}","contents_url":"https://api.github.com/repos/corda/corda/contents/{+path}","compare_url":"https://api.github.com/repos/corda/corda/compare/{base}...{head}","merges_url":"https://api.github.com/repos/corda/corda/merges","archive_url":"https://api.github.com/repos/corda/corda/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/corda/corda/downloads","issues_url":"https://api.github.com/repos/corda/corda/issues{/number}","pulls_url":"https://api.github.com/repos/corda/corda/pulls{/number}","milestones_url":"https://api.github.com/repos/corda/corda/milestones{/number}","notifications_url":"https://api.github.com/repos/corda/corda/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/corda/corda/labels{/name}","releases_url":"https://api.github.com/repos/corda/corda/releases{/id}","deployments_url":"https://api.github.com/repos/corda/corda/deployments","created_at":"2016-10-06T08:46:29Z","updated_at":"2018-11-30T09:47:30Z","pushed_at":"2018-11-30T09:47:28Z","git_url":"git://github.com/corda/corda.git","ssh_url":"git@github.com:corda/corda.git","clone_url":"https://github.com/corda/corda.git","svn_url":"https://github.com/corda/corda","homepage":"https://www.corda.net","size":167794,"stargazers_count":2528,"watchers_count":2528,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":643,"mirror_url":null,"archived":false,"open_issues_count":87,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":643,"open_issues":87,"watchers":2528,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/corda/corda/pulls/4262"},"html":{"href":"https://github.com/corda/corda/pull/4262"},"issue":{"href":"https://api.github.com/repos/corda/corda/issues/4262"},"comments":{"href":"https://api.github.com/repos/corda/corda/issues/4262/comments"},"review_comments":{"href":"https://api.github.com/repos/corda/corda/pulls/4262/comments"},"review_comment":{"href":"https://api.github.com/repos/corda/corda/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/corda/corda/pulls/4262/commits"},"statuses":{"href":"https://api.github.com/repos/corda/corda/statuses/4ccd6a4e17b417a66d17c29ab44a9b5bd9e84c0f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tudor-malene"}}