1. 01 May, 2018 1 commit
    • Alessandro Sorniotti's avatar
      [FAB-6381] Secure defaults for txsFilter · 53de0781
      Alessandro Sorniotti authored
      
      
      The aim of this change set is to apply the well-established "Secure by
      default" security principle to the way the validator validates transactions
      in a block.
      
      The current code behaves as follows: create an array of validation codes, set
      by default to "all transactions are valid"; then perform validation which may
      mark transactions as invalid. Furthermore, in other parts of the code, if no
      array of validation codes is yet persent in the block, a new one is
      indiscriminately created (again, marking all transactions as valid). This
      approach is a security anti-pattern because it opens up to attacks where an
      adversary may force the code through a path where the default "tx is valid"
      validation code is maintained even for invalid txes.
      
      This change set ensures that validation code arrays are created and set to a
      new value (TxValidationCode_NOT_VALIDATED) which ensures that a transaction
      that hasn't been validated cannot be mistaken for a valid one.
      
      Change-Id: I5dbb18dd77af3cd14b168042ae660e4e27bf29dd
      Signed-off-by: default avatarAlessandro Sorniotti <ale.linux@sopit.net>
      53de0781
  2. 16 Apr, 2018 1 commit
    • Matthew Sykes's avatar
      [FAB-9494] test package functions to load config · 1d8344d7
      Matthew Sykes authored
      
      
      - Add variadic argument for extra search paths to configtxgen/localconfig
        Load and LoadTopLevel functions. This is primarily intended to be used
        in tests.
      - Create configtxgentest package that loads configurations and profiles
        from the development sampleconfig directory.
      - Add method to configtest to setup and reset FABRIC_CFG_PATH.
      - Update tests to use configtxgentest and/or configtest as appropriate.
      
      Change-Id: I6a66491bfbc0048f5b38babf6a55fb918a439fe6
      Signed-off-by: default avatarMatthew Sykes <sykesmat@us.ibm.com>
      1d8344d7
  3. 13 Mar, 2018 1 commit
  4. 18 Dec, 2017 1 commit
  5. 13 Oct, 2017 1 commit
  6. 24 Sep, 2017 1 commit
  7. 10 Aug, 2017 1 commit
    • manish's avatar
      [FAB-5654] SideDB - Tx simulation/validation/commit · 8a87b8ae
      manish authored
      
      
      This CR modifies the tranaction simulation, validation, and commit
      code and delivers the end-to-end transaction flow that treats the
      private data in a special manner. This CR mainly leverages the earlier
      submitted independent CRs for sidedb feature for accomplishing this behavior.
      
      This CR also allows ledger to receive the blocks and the pvt data from
      another peer on the same channel (i.e., a peer catching up via state)
      
      This CR is exceptionally large becasue of manily two reasons
      
      1) The way currently the code (and specially the tests) is organized in
      simulation/validation/commit flow, its not easy to submit such kind
      of changes independently that cuase the change in the whole transaction
      processing flow.
      
      2) This CR causes a change in the existing ledger APIs which are used widely
      across other packages (specially in the tests) and hence many files are included
      for fixing the broken dependencies
      
      Change-Id: Id29575176575f4c01793efd3476b68f8364cb592
      Signed-off-by: default avatarmanish <manish.sethi@gmail.com>
      8a87b8ae
  8. 05 Aug, 2017 1 commit
  9. 01 Jun, 2017 1 commit
  10. 25 Apr, 2017 1 commit
  11. 18 Feb, 2017 1 commit
    • Luis Sanchez's avatar
      [FAB-2214] 1st block in chain is block 0, not 1 · e49f25fc
      Luis Sanchez authored
      
      
      Made the following changes to fsblkstorage provider:
      
      * Block numbers start at 0, not 1.
      
      * Blockchain height should be last block number + 1.
      
      * A block's Block.Header.Number should be equal to
        the Blockchain height when AddBlock() is called.
      
      * Updated ledger tests to use random temporary dir.
      
      * Update core endorser tests to generate valid block
        numbers.
      
      Change-Id: I0208cd6a4b9da462c29d06126fa651f4c0dcd2fc
      Signed-off-by: default avatarLuis Sanchez <sanchezl@us.ibm.com>
      e49f25fc
  12. 03 Feb, 2017 1 commit
    • manish's avatar
      Move Blockstorage code under /fabric/common package · 2a16532c
      manish authored
      https://jira.hyperledger.org/browse/FAB-2022
      
      
      
      This changes introduced by this CR
      - Moves the block storage code from package
      core/ledger/blkstorage to common/ledger/blkstorage
      
      - Splits the ledger_interface.go so as to move common interfaces
      and data type to common/ledger package
      
      - Moves some of the util functions to common/ledger package
      
      - Moves core/ledger/ordererledger package to orderer/ledger/fsledger
      orderer folks can futher rename/refactor this as seems suitable to them
      
      Change-Id: I759e16f00dc2ec9bb62196121083cf48eae76948
      Signed-off-by: default avatarmanish <manish.sethi@gmail.com>
      2a16532c
  13. 23 Jan, 2017 1 commit
  14. 16 Jan, 2017 1 commit
    • Alessandro Sorniotti's avatar
      [FAB-1639] [FAB-1580] Rework validator · ae10d2b6
      Alessandro Sorniotti authored
      
      
      This change-set has removed calls to the txvalidator that were issued right
      after the peer (the leader) receives blocks from the orderers. The validator
      is now called to validate messages received from the gossip layer. In order
      to fix an import cycle, we have introduced the ChaincodeProvider interface
      in core/common/ccprovider/ccprovider.go, an implementation and a factory.
      This way, code that needs to use functions from the chaincode package
      without importing it can simply use (and possibly extend) the
      ChaincodeProvider interface and implementation.
      
      Furthermore, this drop has introduced protocol-level message validation for
      config transactions that was lacking before.
      
      Change-Id: I5906a6fe3da8410b05b5079dd7f0b9d28d20bb85
      Signed-off-by: default avatarAlessandro Sorniotti <ale.linux@sopit.net>
      ae10d2b6
  15. 08 Jan, 2017 1 commit
  16. 01 Dec, 2016 1 commit
  17. 28 Nov, 2016 1 commit
  18. 23 Nov, 2016 1 commit
    • Alessandro Sorniotti's avatar
      TX proposal/endorsement/validation flow (+MSP) · 16fa08e2
      Alessandro Sorniotti authored
      
      
      This change set contains a set of functions to generate a transaction (from
      proposal, endorsements and a signing identity) and validate it (given a set
      of root CAs). The validation code will be used by the committer. The tx
      assembling code should be helpful for the SDK team to understand how
      transactions should be assembled. Additionally, it has changed the type of
      messages exchanged everywhere to be of the proper type and with signatures
      (obtained from a fixed identity for now). Finally, it contains an initial
      implementation of VSCC with unit tests (which is however not yet called by
      the committer).
      
      Change-Id: I375ecc7e61516f3c4ab8fd874aa564e99cc720fb
      Signed-off-by: default avatarAlessandro Sorniotti <ale.linux@sopit.net>
      16fa08e2
  19. 11 Nov, 2016 1 commit
  20. 10 Nov, 2016 1 commit
    • Artem Barger's avatar
      Add Committer service API interface. · 41e842f1
      Artem Barger authored
      
      
      Introduce committer service API with basic functionality
      required for gossip layer. Additionally refactored a toy
      example of committer service implementation within "noopssinglechain"
      package, separating beetwen the block delivery and committing
      functionality.
      
      Change-Id: Id2b05c4dae9af55c7f14801051ea510eaf54fcbb
      Signed-off-by: default avatarArtem Barger <bartem@il.ibm.com>
      41e842f1
  21. 26 Oct, 2016 1 commit
  22. 15 Sep, 2016 1 commit