1. 12 Feb, 2017 1 commit
  2. 09 Feb, 2017 1 commit
    • denyeart's avatar
      [FAB-2052] Finish ledger API GetHistoryForKey() · 9d90fdf6
      denyeart authored
      
      
      Finish the implementation for ledger API GetHistoryForKey().
      
      Lookup the history of key updates by blockNum:tranNum.
      
      For each history record, retrieve the txID and key value
      from block storage. This requires passing a block storage handle
      into the history query executor, and exposing the block storage
      test environment to other packages. Historic txID and key value
      is returned to client to enable simple provenance scenarios.
      
      Added tests for GetHistoryForKey() including recovery scenarios.
      One test required a fix to block storage syncIndex().
      Also tested end-to-end with peer.
      
      Change-Id: I988130e9682f5d8d707c4ec37753bc0e7e297269
      Signed-off-by: default avatardenyeart <enyeart@us.ibm.com>
      9d90fdf6
  3. 04 Feb, 2017 1 commit
    • denyeart's avatar
      [FAB-2009] Add RetrieveTxByBlockNumTranNum · 96cd9a73
      denyeart authored
      
      
      History database returns the list of (blockNum,tranNum) that
      updated a key.
      RetrieveTxByBlockNumTranNum will allow kvledger
      to retrieve transaction history for this list of key updates.
      
      Change-Id: I9ff3ed6c273c57b65223b283c4f602910e5982bf
      Signed-off-by: default avatardenyeart <enyeart@us.ibm.com>
      96cd9a73
  4. 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
  5. 19 Jan, 2017 1 commit
  6. 17 Jan, 2017 1 commit
    • manish's avatar
      SingleLevelDB for block index · 8cdd0f4d
      manish authored
      https://jira.hyperledger.org/browse/FAB-1664
      
      
      
      This changeset:
      - Renames package ledger/util/db to ledger/util/leveldbhelper
      - Implements a leveldb provider
        (that enables using same leveldb instance as a multiple logical dbs)
        in util package for being able to reuse across statedb, index,
        and later for historydb
      - Implements a provider as a single point of invocation
        for managing multiple block storage
      - Uses a single leveldb instance for block storage index
      - Makes the structures other than providers as private
        to their respective packages
      
      Change-Id: I5f0b3b9aa8ef3ac1ccdce4f3c6fa6d842b5318c1
      Signed-off-by: default avatarmanish <manish.sethi@gmail.com>
      8cdd0f4d
  7. 13 Dec, 2016 1 commit
    • Mari Wade's avatar
      FAB-1336 Add new ledger blockstorage index. · 458c5212
      Mari Wade authored
      
      
      Add a new ledger blockstorage index for History
      that will map (blocknum,trannum) to the file storage
      location for this block transaction
      
      This index will be used for the API  GetTransactionsForKey()
      for (chaincode1,key1).  It will do a key range query on chaincode1~key1
      to pick up all chaincode1~key1 records.  Results will indicate
      the set of (blocknum,trannum) transactions that updated this key.
      
      Change-Id: I81da09e5526d7e2966634c78a03d34011d514442
      Signed-off-by: default avatarMari Wade <mariwade@us.ibm.com>
      458c5212
  8. 01 Dec, 2016 1 commit
  9. 09 Nov, 2016 1 commit
  10. 28 Oct, 2016 1 commit
  11. 26 Oct, 2016 1 commit
  12. 28 Sep, 2016 1 commit
  13. 20 Sep, 2016 1 commit
    • manish's avatar
      Disable WAL for block storage DB · 0df6a8d1
      manish authored
      
      
      (Rocks) DB WAL adds overheads while using the DB for saving checkpoints
      for block storage. Avoiding writing to WAL translates the write workload
      (appending blocks to the blockfile) into a sequential disk writes.
      
      This commit changes the way checkpoints are saved - checkpoints are
      written to DB as before, however since WAL is disabled, the checkpoint
      stays in-memory only. The in-memory checkpoint is flushed explicitly to
      disk (via DB flush) at the time of new block file creation. The in-memory
      checkpoint would implicitly also be flushed to memory at the time of DB
      shutdown. However, if a crash takes place, the checkpoint available in the
      DB would be behind the actual block file status. In order to handle this
      crash scenario, this commit also adds code to perform a scan of the block
      file beyond the last saved checkpoint and update the checkpoint.
      
      Change-Id: Ie88646b225abaa50b595833f5e7ed8d4facae920
      Signed-off-by: default avatarmanish <manish.sethi@gmail.com>
      0df6a8d1
  14. 15 Sep, 2016 1 commit