{"action":"created","issue":{"url":"https://api.github.com/repos/hyperledger/fabric/issues/1854","repository_url":"https://api.github.com/repos/hyperledger/fabric","labels_url":"https://api.github.com/repos/hyperledger/fabric/issues/1854/labels{/name}","comments_url":"https://api.github.com/repos/hyperledger/fabric/issues/1854/comments","events_url":"https://api.github.com/repos/hyperledger/fabric/issues/1854/events","html_url":"https://github.com/hyperledger/fabric/pull/1854","id":160523357,"number":1854,"title":"Remove syscc from genesis#issue1741","user":{"login":"muralisrini","id":14361488,"avatar_url":"https://avatars.githubusercontent.com/u/14361488?v=3","gravatar_id":"","url":"https://api.github.com/users/muralisrini","html_url":"https://github.com/muralisrini","followers_url":"https://api.github.com/users/muralisrini/followers","following_url":"https://api.github.com/users/muralisrini/following{/other_user}","gists_url":"https://api.github.com/users/muralisrini/gists{/gist_id}","starred_url":"https://api.github.com/users/muralisrini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muralisrini/subscriptions","organizations_url":"https://api.github.com/users/muralisrini/orgs","repos_url":"https://api.github.com/users/muralisrini/repos","events_url":"https://api.github.com/users/muralisrini/events{/privacy}","received_events_url":"https://api.github.com/users/muralisrini/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-15T21:03:50Z","updated_at":"2016-06-15T21:03:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/hyperledger/fabric/pulls/1854","html_url":"https://github.com/hyperledger/fabric/pull/1854","diff_url":"https://github.com/hyperledger/fabric/pull/1854.diff","patch_url":"https://github.com/hyperledger/fabric/pull/1854.patch"},"body":"Remove system chaincodes from genesis block and make them completely non-declarative.\r\n\r\n# Description\r\nSystem chaincodes should be treated as part of the fabric with all policies and rules applicable to upgrading/modifying the fabric applicable to the system chaincodes. It does not make sense to have them committed to the genesis block as user chaincodes would. This PR removes system chaincodes from genesis block\r\n  * remove system chaincode declaration from peer/core.yaml\r\n  * the system chaincodes are embedded into the fabric programmatically (see importsysccs.go and systemchaincode_test.go)\r\n\r\nThe registration of system chaincodes is currently disabled if security/privacy mode is on. A approach different from user chaincode treatment of security context is needed to address this correctly (the \"user\" is the \"peer\"). Working with @adecaro on this. Commit 3ad5fb1 commit will be removed with the PR for the fix.\r\n\r\n## Motivation and Context\r\nAs highlighted by #1741, having system chaincodes  - whose deployment don't participate in consensus - committed to genesis block can give raise to problems if the transactions are not the same on all peers (even if the chaincode's context and states are identical). Furthermore, treating them as proper on-block transactions would complicated scenarios such as upgrade. These problems really show that system chaincodes should be considered as part of fabric code.\r\n\r\nFixes #1741\r\n\r\n## How Has This Been Tested?\r\nRemoved a system chaincode unit test from chaincode folder and made it part of the system_chaincode package. This is the right approach now that system chaincodes are registered programmatically. The test case also serves as an example of registering system chaincodes (ie, the sample needs to be only part of the unit test and does not have to be imported/registered in importsysccs.go).\r\n\r\n## Checklist:\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [X] I have added a [Signed-off-by](https://github.com/hyperledger/fabric/blob/master/CONTRIBUTING.md#legal-stuff)\r\n- [X] Either no new documentation is required by this change, OR I added new documentation\r\n- [X] Either no new tests are required by this change, OR I added new tests\r\n- [X] I have run [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports), [go vet](https://golang.org/cmd/vet/), and [golint](https://github.com/golang/lint). I have cleaned up all valid errors and warnings in code I have added or modified. These tools may generate false positives. Don't be worried about ignoring some errors or warnings. The goal is clean, consistent, and readable code.\r\n\r\nSigned-off-by: muralisr@us.ibm.com\r\n\r\nOriginal PR #1826 "},"comment":{"url":"https://api.github.com/repos/hyperledger/fabric/issues/comments/226319473","html_url":"https://github.com/hyperledger/fabric/pull/1854#issuecomment-226319473","issue_url":"https://api.github.com/repos/hyperledger/fabric/issues/1854","id":226319473,"user":{"login":"dco-bot","id":15003259,"avatar_url":"https://avatars.githubusercontent.com/u/15003259?v=3","gravatar_id":"","url":"https://api.github.com/users/dco-bot","html_url":"https://github.com/dco-bot","followers_url":"https://api.github.com/users/dco-bot/followers","following_url":"https://api.github.com/users/dco-bot/following{/other_user}","gists_url":"https://api.github.com/users/dco-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/dco-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dco-bot/subscriptions","organizations_url":"https://api.github.com/users/dco-bot/orgs","repos_url":"https://api.github.com/users/dco-bot/repos","events_url":"https://api.github.com/users/dco-bot/events{/privacy}","received_events_url":"https://api.github.com/users/dco-bot/received_events","type":"User","site_admin":false},"created_at":"2016-06-15T21:03:51Z","updated_at":"2016-06-15T21:03:51Z","body":"Hi muralisrini,\n\nThanks for submitting this pull request!\n\nPlease add a comment with a DCO1.1 Signed-off-by statement in order to allow us to process your pull request.\n\ndco-bot"}}
{"actor":{"display_login":"dco-bot"}}