Uploaded image for project: 'Fabric'
  1. Fabric
  2. FAB-3884

API to retrieve a range of blocks

    XMLWordPrintable

Details

    • Unset
    • Unset
    • Unset

    Description

      As currently we only have chain.queryBlockByNumber(), but sometimes we might need to go through all the block sequentially to check all data (e.g. build a data warehouse from the data), and query only one block at a time is too inefficient for that.

      The alternate approach within chaincode GetStateByRange() does not work well for scanning all keys, since you would have to continuously re-scan to find key changes.  It would be better to be able to get blocks by block range and process all changes from the block transaction write sets.  For example get blocks 1-100, then 101-200, etc.

      Would prefer a peer API than a chaincode API, since the query is not a contract.  This would imply a peer API and a corresponding SDK API.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kelvinzhong wenbo zhong
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: