Skip to content

Commit

Permalink
[FAB-6620] Prevent private data send in instantiate
Browse files Browse the repository at this point in the history
Currently the collection configurations are stored in the LSCC namespace.
Therefore, if an instantiate transaction contains private data -
it's impossible to obtain the collection configuration in order to
know to which peers to disseminate to, etc.

Therefore we should just disable private data dissemination upon
endorsement altogether.

This change set makes the endorsement fail if private data is
detected in the simulation results in instantiate.

Change-Id: Icb6d0e9df2505e93f2350063d43913b71e3f2761
Signed-off-by: yacovm <yacovm@il.ibm.com>
  • Loading branch information
yacovm committed Dec 21, 2017
1 parent c0a2615 commit 8a705b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/endorser/endorser.go
Expand Up @@ -265,6 +265,10 @@ func (e *Endorser) simulateProposal(ctx context.Context, chainID string, txid st
}

if simResult.PvtSimulationResults != nil {
if cid.Name == "lscc" {
// TODO: remove once we can store collection configuration outside of LSCC
return nil, nil, nil, nil, errors.New("Private data is forbidden to be used in instantiate")
}
if err := e.distributePrivateData(chainID, txid, simResult.PvtSimulationResults); err != nil {
return nil, nil, nil, nil, err
}
Expand Down

0 comments on commit 8a705b7

Please sign in to comment.