1. 03 Feb, 2017 1 commit
    • manish's avatar
      Move Blockstorage code under /fabric/common package · 2a16532c
      manish authored
      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>
  2. 20 Jan, 2017 1 commit
    • denyeart's avatar
      FAB-1758 Fix CouchDB tests when run in parallel · 963042aa
      denyeart authored
      When various packages that utilize CouchDB were tested
      all together, we received intermitent test failures
      due to collisions in test envionment.  Fixed by scoping
      each test package to different CouchDB databases (chains).
      Change-Id: I93b9043f7a5a60b1052d74e9f5f877f9e19a29d9
      Signed-off-by: default avatardenyeart <enyeart@us.ibm.com>
  3. 15 Jan, 2017 1 commit
    • denyeart's avatar
      FAB-1505 and FAB-1337 Refactor CouchDB code · 9df7b0ea
      denyeart authored
      FAB-1505 refactors CouchDB code to be aligned with LevelDB structure.
      FAB-1337 applies all ledger tests written for LevelDB against CouchDB.
      In order to test the CouchDB refactor,
      had to implement FAB-1337 in same changeset to test.
      Like most refactors, this changeset touches a lot of files and code,
      since it is not feasible to do a partial refactor.
      Tests related to versioning and deleting have been commented out,
      these will be re-enabled in subsequent changeset when CouchDB
      has the support, in order to keep this changeset size more reasonable.
      Change-Id: I0d2d6cca89bd0252f6e84317457a9140b3a0d7a5
      Signed-off-by: default avatardenyeart <enyeart@us.ibm.com>
  4. 17 Dec, 2016 1 commit
  5. 12 Dec, 2016 1 commit
    • Chris Elder's avatar
      FAB-1172 - Advanced simulation functions for CouchDB · 2ebd3428
      Chris Elder authored
      Added implementations for the following:
      Unit testing was extended for the range query in couchdb.go
      Additional unit testing for simulation functions will be added
      following a refactoring of unit tests for goleveldb.
      Change-Id: Id0907ace75767fe4b296f16c10d18693718d790f
      Signed-off-by: default avatarChris Elder <chris.elder@us.ibm.com>
  6. 02 Dec, 2016 1 commit
  7. 30 Nov, 2016 1 commit
    • Mari Wade's avatar
      FAB-1087 Add config option in core.yaml for history · 37314475
      Mari Wade authored
      Add config option in core.yaml for history database
      to store the transaction history.  The history database
      will be a queryable database such as CouchDB.
      The default will be false.  If set to false, the transaction
      history will not be persisted in the history database.
      Move the ledger config directory up one level to ledger
      to be the config for state and history databases as well
      as any other ledger functionality that needs a config option.
      Change-Id: If4607047082b686dd903d8b3805362d0c05e1c64
      Signed-off-by: default avatarMari Wade <mariwade@us.ibm.com>
  8. 14 Nov, 2016 1 commit
    • Chris Elder's avatar
      FAB-827 Add config option in core.yaml for couchDB · ea1c53cd
      Chris Elder authored
      Add config option in core.yaml to switch state database from goleveldb to CouchDB
      Added the following to core.yaml
          # stateDatabase - options are "goleveldb", "CouchDB"
          # goleveldb - default state database stored in goleveldb.
          # CouchDB - store state database in CouchDB
          stateDatabase: goleveldb
      Changes were also made to couchdb_txmgr to support the config option.
      Changes were made to couchdb_test.go and marble_example.go to support the
      config option in core.yaml and environment variables.
      Marbles example can now be run with couchDb with the following command:
      CORE_LEDGER_STATE_STATEDATABASE="CouchDB" go run marble_example.go
      Adding a declaration for CORE_LEDGER_STATE_STATEDATABASE will work for peer,
      couchdb_test and marbles example.
      Change-Id: If02ac4f7c1c234d5f4c869875f3c331e35c9a066
      Signed-off-by: default avatarChris Elder <chris.elder@us.ibm.com>
  9. 06 Nov, 2016 1 commit
    • Chris Elder's avatar
      FAB-959 Chaincode with binary data in CouchDB · 5914b120
      Chris Elder authored
      CouchDB is most suited for handling chaincode with JSON values.
      But in some cases chaincode with binary values will need to be stored
      in CouchDB state database, for example to support chaincode
      deployment in lifecycle chaincode.
      This change adds attachment support for couchDB in order to handle
      chaincode with binary data, in addition to chaincode with JSON data.
      For this change, only one attachment is supported even though
      the attachment is added as an array.
      The new signature for SaveDoc now allows for either a JSON represented
      as a byte array or an array of attachments.
      Change-Id: Ifac9ce56c053ed929dae2aab4a5932c0453680a7
      Signed-off-by: default avatarChris Elder <chris.elder@us.ibm.com>
  10. 26 Oct, 2016 1 commit
    • denyeart's avatar
      Initial prototype of CouchDB state DB in ledgernext · c1529a47
      denyeart authored
      This commit adds a transaction manager (state database) based on CouchDB,
      and a sample client to demonstrate/test it.
      KVLedger will continue to use file based block storage
      for the blockchain, but will use CouchDB as the state database for
      simulation and commit.
      This experimental feature is enabled via a feature toggle switch in
      the code (useCouchDB).
      CouchDB must be already installed separately.
      There is a script to start CouchDB in dev env and download a docker
      image of CouchDB if not already downloaded.  Run this command anywhere
      inside the dev env /fabric:
      "couchdb start"
      To switch ledger to use CouchDB,
      update kv_ledger_config.go variable useCouchDB to true.
      In kv_ledger.go NewKVLedger(), you will also need to set the CouchDB connection
      host, port, db name, id, password if using a non-local secured CouchDB.
      This initial commit is only a stand alone ledger prototype and not meant
      for end-to-end chaincode processing. That will come in a subsequent commit.
      To run the sample:
      In CouchDB http://localhost:5984/_utils create a db named marbles_app.
      You can do this from your host which has port 5984 mapped to guest 5984
      (assuming you have done vagrant up after
       went in Oct 25th, as that
      changeset open up vagrant port 5984).
      Then run the sample as follows:
      /core/ledgernext/kvledger/marble_example/main$ go run marble_example.go
      After running the sample, you can view the marble1 document in CouchDB.
      Be sure to delete it in CouchDB if you'd like to re-run the sample.
      Change-Id: Iea4f6ad498dc0e637f0254b6f749060e0298622c
      Signed-off-by: default avatardenyeart <enyeart@us.ibm.com>