Uploaded image for project: 'Fabric'
  1. Fabric
  2. FAB-7030

Allow Channel Readers to invoke chaincode that reads from the ledger

    Details

    • Type: Story
    • Status: To Do (View Workflow)
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: fabric-peer
    • Labels:
      None
    • SDK Impact:
      Unset
    • System Test Impact:
      Unset
    • Documentation Impact:
      Unset

      Description

      If you are not a ChannelWriter you will not be able to invoke chaincode (propose) on an endorser, and therefore identities that are ChannelReaders but not ChannelWriters have no mechanism to call read-only chaincode functions.  Based on the role name, I would expect ChannelReaders should be able to call chaincode read-only functions.

      Currently in 1.1 this can be achieved by overriding the Propose ACL to be something different than ChannelWriters.  This work item proposes that ChannelReaders should be able to call chaincode functions that read from ledger using the default configuration.

      Option 1: Re-introduce a chaincode Query() function (it was there in 0.6 but not 1.0, removed in -FAB-1055-), which would only require you to be a ChannelReader to call chaincode read-only functions (functions that attempt to write in the context of a Query would immediately return an error). The Query() would also be more streamlined than Invoke() as the peer simulator would not need to generate a RWSet and the ProposalResponse would not include a RWSet.

      Option 2: Set the Propose ACL to be ChannelReaders instead of ChannelWriters. If the chaincode simulation has writes, then we could additionally ensure that client is a ChannelWriter.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                denyeart David Enyeart
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Git Source Code