1. 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
  2. 26 Jan, 2017 1 commit
    • denyeart's avatar
      [FAB-1762] Refactor couchdb history db to leveldb. · 2c982629
      denyeart authored
      
      
      - Utilize leveldb for history of keys instead of couchdb
      
      - Single leveldb database serves all chains to optimize
        footprint (same structure as leveldb block index database
        and leveldb state database)
      
      - Block commit writes a history key for each key/value
        that is updated in a tran, in the form:
         ns~key~blocknum~trannum
      
      - History database is an index for history of key writes
        over time.  The key values are not included to reduce
        size of database.
      
      - GetHistoryForKey() finds all records starting with ~ns~key
        and returns the transactions that updated the key.
      
      - Subsequent changeset will lookup and return the txid
        and historic value from the block storage.  Client can
        then GetTransactionById to see the historic transactions.
      
      - Since history db size is much reduced, it is now enabled
        by default in core.yaml.
      
      - Upon crash recovery, ledger initialization will ensure
        that both state db and history db in sync with block storage
      
      Reused existing test logic, therefore the changeset
      is relatively large to ensure tests still pass.
      
      Change-Id: I79103aa39957f58d246de5b5295fb40a4b9c033b
      Signed-off-by: default avatardenyeart <enyeart@us.ibm.com>
      2c982629
  3. 02 Dec, 2016 1 commit
  4. 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>
      37314475