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

with block event, send associated private data too



    • Type: Story
    • Status: Closed (View Workflow)
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: v2.0.0
    • Component/s: fabric-ledger
    • Labels:


      1. In a block event, producer sends only the content of actual block. With sideDB and private data, the actual block would contain only the hashes of key and value. As a result, if anyone wants to export the data out of blockchain using block event, they need to either query it or depend on the GetPrivateDataByRange() API.
      2. In the normal case, if we invoke a transaction and write something to the ledger, all the peers can listen to block event and get the read-write set so they know what got updated; however, in the sidedb case, even the peers that have access to the private collection cannot get anything from the block event. So in this case, if a collection includes {A,B,C} peers and A submits transaction through nodejs API, how can B and C know what data is updated? As B and C’s client can no longer find this information out by listening to block events. 

      To solve the above two problems, we can make the peer send the pvtdata along with the block event for the collection members only. When a client registers for event, it can mention whether it is interested in receiving the pvtdata. If the interest is specified, the peer would perform the ACL (to check whether the client is the member of the collection) and accept the registration. 

      Note that we can allow use to configure this option via core.yaml. If a particular deployment does not want to export private data at all, it can be disabled via core.yaml


          Issue Links



              wenjian Wenjian Qiao
              Senthil1 Senthilnathan N
              0 Vote for this issue
              3 Start watching this issue



                  Git Integration