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

protos - remove Transaction message, cleanup ChaincodeXXX message

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • High
    • Resolution: Done
    • None
    • None
    • fabric-peer

    Description

      Remove old Transaction and rename Transaction2

      Primary user of the original Transaction protobuf message is the chaincode framework. But chaincode interaction in V1.0 is with Proposals and not Transactions. Chaincode used Transaction in old release for these purposes

      • keep track of chaincode requests using TXID in Transaction
      • use context from Transaction for roles and attributes

      NOTE - the use of Transaction for roles and attributes was half-baked. With Proposals we have the opportunity to implement this correctly. A Proposal should encapsulate all the ACL support needed for the Chaincode and the Proposal should be passed to the chaincode directly (adc).

      Removal of the old Transaction protobuf message type results in the following changes

      • TXID is passed as parameter to chaincode methods
      • roles and attributes have been removed from chaincode
      • a temporary stub for setting Proposal in a Chaincode request (on the peer side) has been added. Its not currently used. (NOTE - need to work with Java chaincode folks before we can send Proposal to the chaincode)
      • unit tests have been modified to reflect the changes
      • endorser expects TID to be non-empty string (uniqueness check is a TODO)
      Cleanup of Chaincode protobuf message

      The main clean up was getting rid of QUERY enums. The impact of this is as follows

      • the chaincode and chaincode/shim state messages do not deal with QUERY elements from protobuf messages
      • Query and QueryChaincode have been removed from chaincode stub interface (but many examples still implemented them)
      • some examples such as chaincode_example02 and chaincode_example05 have been modified to expose the old Query implementation via the Invoke method

      Attachments

        Issue Links

          Activity

            People

              muralisr Srinivasan Muralidharan
              muralisr Srinivasan Muralidharan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: