Re: get level db key-values without query


David Enyeart
 

If you are the admin of a Fabric node, in theory you could write a client application that connects to LevelDB to query data. But you would have to understand Fabric data storage internals, and stop the peer process while connecting, so it isn’t really a feasible approach for users.

 

Another option is taking a snapshot of a peer’s channel. This will output the state database content for the purpose of joining another peer from the current state snapshot, and for comparing snapshots across peers to verify ledger integrity. Again, the snapshot is in an internal format optimized for Fabric utilities, but you could in theory write a utility to parse it with some Fabric internals knowledge (not quite as difficult as writing a LevelDB application). If you do write a utility, please contribute it back!

See the ledger snapshot doc - https://hyperledger-fabric.readthedocs.io/en/latest/peer_ledger_snapshot.html

 

 

From: fabric@... <fabric@...> on behalf of Matthew White <whitemat@...>
Date: Wednesday, October 5, 2022 at 5:04 AM
To: Nikos Karamolegkos <nkaram@...>, fabric <fabric@...>
Subject: [EXTERNAL] Re: [Hyperledger Fabric] get level db key-values without query

Hi - not sure with LevelDB - CouchDB if configured can be connected to directly.

However it's not something I'd suggest as doing as a routine thing - as the chaincode is there to help enforce access control to data.

Matthew

-----Original Message-----
From: fabric@... <fabric@...> On Behalf Of Nikos Karamolegkos
Sent: 04 October 2022 14:36
To: fabric <fabric@...>
Subject: [EXTERNAL] [Hyperledger Fabric] get level db key-values without query

Can I somehow (as admin of the network) get all the level DB key-values without querying the ledger via the chaincode?


--
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)







Unless otherwise stated above:

IBM United Kingdom Limited
Registered in England and Wales with number 741598
Registered office: PO Box 41, North Harbour, Portsmouth, Hants. PO6 3AU




Join fabric@lists.hyperledger.org to automatically receive all group messages.