1. 24 Jan, 2017 2 commits
    • manish's avatar
      Detect phantom items during validation · 16372176
      manish authored
      https://jira.hyperledger.org/browse/FAB-1668
      
      
      
      Phantom reads problem:
      -----------------------------
      If a transaction executes a key range query (say key_1 - key_n) leveldb
      serves all the keys in the given range in sorted order of keys.
      Between simulation and validation of a transaction, some other transaction
      may insert one or more keys in this range. Now, this change cannot
      be detected by merely checking the versions of the keys present in
      the read-set of the transaction.
      (though, this check can detect updates and deletes).
      
      A serializable isolation level does not permit phantom reads.
      
      Situations where the phantom reads may not be acceptable:
      -----------------------------
       - A chaincode may take a decision based on aggregates of the results of
      the range query such as min/max/avg/sum etc. This would be affected
      if a new entry gets added to the range query results.
      
       - A chaincode may want to change all the marbles
      owned by a specific user to blue in a tran `t1`. The chaincode may do so
      by performing a range query to get all the marbles for the user and
      change their color to blue. Now, if a new white marble get added to
      the user's assets by an another transaction `t2`,
      `t1` should be marked as invalid.
      
      Solution in this change-set:
      -----------------------------
      For solving this, we can capture the details of the range query
      (the query and it's results) during the simulation time and
      re-execute the query during validation time and compare the results.
      If the results (keys and versions) are still the same,
      we can safely commit the transaction.
      
      This changes set introduces
       - Structures for capturing the range query details in rwset
       - Detection of phantom items (insertion/deletion)
         that affect the results of the range query during validation
       - Mark the transactions that are affected by the phantom items
         as invalid to ensure serializability in the presence of range queries
      
      Change-Id: I909841a0234c37795ad7a4ffcca8a9ebd9c9f994
      Signed-off-by: default avatarmanish <manish.sethi@gmail.com>
      16372176
    • Jonathan Levi's avatar
      230f3ccf
  2. 23 Jan, 2017 14 commits
  3. 22 Jan, 2017 4 commits
    • Srinivasan Muralidharan's avatar
      FAB-1800 peer should not load channel with bad config · 376021a0
      Srinivasan Muralidharan authored
      https://jira.hyperledger.org/browse/FAB-1800
      
      
      
      peer should stop loading the channel but continue to load the next chain.
      
      Also added a panic to the system chaincode if there's no ledger registered
      with the chain.
      
      Change-Id: Ia581c70c636c3be21fbb05e9cd01fafe36c91b09
      Signed-off-by: default avatarSrinivasan Muralidharan <muralisr@us.ibm.com>
      376021a0
    • Gari Singh's avatar
      [FAB-1799] Add function to replace client root CAs · 2c0e72a8
      Gari Singh authored
      
      
      The GRPCServer had methods for appending and
      removing client root certificates but did not
      have a method to set/update the list in its
      entirety.
      
      * Add SetClientRootCAs function to GRPCServer
      * Add new tests and update existing tests
      
      Change-Id: I8159ae9a0cea663a882b5bcaecc184b4934ab8eb
      Signed-off-by: default avatarGari Singh <gari.r.singh@gmail.com>
      2c0e72a8
    • jeffgarratt's avatar
      [FAB-1141] Added join channel to bootstrap.feature · f14cd847
      jeffgarratt authored
      
      
      Join channel invocation is created and sent to endorser.
      
      Now join works!!
      
      Local MSP config is now read from core.yaml variable peer.mspConfigPath
      
      protos/utils/blockutils.go now use correct Configuratio Item type of MSP.
      
      Chaned peer.mspConfigPath to
      "/etc/hyperledger/fabric/msp/sampleconfig".
      
      Changed msp function to NOT use JSON encoding/decoding.
      
      Changed msp to check for type of configuration item vs name.
      
      Added preferredMaxBytes to Batchsize orderer config.  Regenerated orderer
      configuration.proto.
      
      Copied the cacerts to the admincerts for local MSP setup per @ASO
      recommendation for now.
      
      Signing is now performed at entity level and uses sha256 digest
      with ASN1 encoding for signature.
      
      Generated proto files for peer protos.
      
      Changed cert in SerializedIdentity from ASN1 encoding to PEM.
      
      Set the chainId to empty string for join request.
      
      Regenerated orderer configuration proto.
      
      Generated MSP config protos.
      
      Now add MSP Config items to channel create transaction.
      
      Now add Anchor peers config items to channel create
      transaction.
      
      Fixed msp tests to use the blockutils msp config path
      lookup mechanism, and now uses the proper Type setting
      in the MSPConfig proto structure.
      
      Change-Id: I507c490df41ff003306f5210905418cec9108b8c
      Signed-off-by: default avatarjeffgarratt <garratt.jeff@gmail.com>
      f14cd847
    • conghonglei's avatar
      Fix gossip linter failure · 5c171cc4
      conghonglei authored
      
      
      ATT. goimports re-format gossip/service/channle, to make it pass linter
      check.
      
      Change-Id: I1c26f05fdfd5e689941b0fe798c6d07e8fa8b68a
      Signed-off-by: default avatarconghonglei <conghonglei@wanda.cn>
      5c171cc4
  4. 21 Jan, 2017 4 commits
  5. 20 Jan, 2017 16 commits