cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing Hyperledger Fabric Blockchain Instance from Chaincode in GOLANG

I am trying to program a smart contract in GO language. It is going to calculate the total consumption value by taking consumption values from individual blocks. The information stored in a block is in the form of a json, e.g.

There are multiple blocks containing such consumption data.

1. How do I access the consumption data of individual blocks from the blockchain ?

2. Is it possible to use the proof of history API or is there another way ?

3. How to calculate and show the total consumption value(since in GO there is only invoke funtion)?

4. Do I store the consumption values in an array and sum it up ?

5. What actually is a "block" in the way we use it? e.g

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Aroni,

very good questions and the only answer for all five in my case is either Blockchain Connector to a HANA instance or open source CouchDB, which unfortunately is not exposed in SCP implementation of fabric.

i would be more than happy to stand corrected on either or both claims.

thank you, greg