Re: How transactions for assets are linked across blocks
There is a chaincode API GetHistoryForKey() that returns the history of changes to an asset key.
This API uses a LevelDB database under the covers that tracks the block and transaction number where each asset key was updated. You can think of it as an index mapping asset keys to block transactions.
Dave Enyeart"Suhan Sumeet" ---05/09/2019 06:25:21 AM---Can anyone please share some guidance on this query. Thanks in advance :) On Wed, May 8, 2019 at 4:0
From: "Suhan Sumeet" <suhan.premilu@...>
To: hyperledger-fabric@...
Date: 05/09/2019 06:25 AM
Subject: Re: [Hyperledger Fabric] How transactions for assets are linked across blocks
Sent by: fabric@...
Can anyone please share some guidance on this query. Thanks in advance :)
On Wed, May 8, 2019 at 4:09 PM Suhan Sumeet via Lists.Hyperledger.Org <suhan.premilu=gmail.com@...> wrote:
- Hello Folks,
As per my understanding in Hyperledger fabric the blocks are created based on criteria's like time/ number of blocks n etc.
My questions here is since we store asset by key value and transaction happen over assets.
For any particular asset the transactions related to it may be distributed/enclosed in various blocks in a unconsecutive manner.
How does Hyperledger fabric maintains/retrieves the History of transaction of an asset for which the transactions are disbursed across multiple blocks? do we maintain any index for Key & its relevant blocks? or we check each block over a chain.? to trace an asset
Regards,
Sunil Suseelan