fabric icon indicating copy to clipboard operation
fabric copied to clipboard

How to get the transaction history data in block chain?

Open huhaiqing opened this issue 9 years ago • 4 comments

Could you help us how to get the transaction history data from block chain?

For example, I onced executed below transaction. transaction 1: a= 100, b=200, c=300 transaction 2: a=90, b=210, c=300 transaction 3: a= 80, b=210, c=310 ...... Now I want to get the history transaction, the blockchain should return the total ledger to us, such as a= 100, b=200, c=300 a=90, b=210, c=300 a= 80, b=210, c=310

Is there any function to be called to query the total chanincode's information?

Thanks in advance.

huhaiqing avatar Jun 03 '16 07:06 huhaiqing

@huhaiqing - we do not currently store historical state information. For the key/value store (aka the state stored for each chaincode), we only store the latest value of any given key. For the "ledger" we actually store the entire list of "transactions" but they do not include the state at each point in time.

A proposal for a new ledger architecture has just been started and this is one of the requirements being considered.

mastersingh24 avatar Jun 03 '16 10:06 mastersingh24

Could you tell me how to get the entire list of "transaction" ? Thanks

huhaiqing avatar Jun 05 '16 09:06 huhaiqing

Hi @huhaiqing

I am trying to understand the difference between what you're asking for here and in issue #1735.

It seems to me, that you're looking to retrieve a list of transactions in each block as we currently do in the REST API (see below). Could you please clarify what you're looking for? Thanks!

https://github.com/hyperledger/fabric/blob/master/docs/API/CoreAPI.md#block

angrbrd avatar Aug 10 '16 20:08 angrbrd

Hi @angrbrd Sorry, i have the few question. i have the member_ledger to store member. the key store member id. the value store member data. i can query member data via id. But how can I get all member in once query.

Sorry i am not good at english.

ChiShiun avatar May 31 '17 13:05 ChiShiun