Skip to content
Discussions/App Development/Retrieving data from couch dbForum ↗

Retrieving data from couch db

App Development6 posts696 views5 likesLast activity Dec 2020
AL
alpha_codersOP
Dec 2020

How to see data in couchdb after setting up couchdb as state database in daml on fabric

LU
Luciano
Dec 2020

Hi! Welcome to the community.

You could try using the navigator (daml navigator server) to visualize the contracts.

I think that while you may be able to use native tools to inspect the ledger state, contracts won’t be intelligible, as they will probably be encoded/encrypted.

This post may also be useful for further info:

This is a great question! You should use signatory/observers to restrict access to the data. The underlying ledger (ok - maybe not the sandbox, but a production ledger) will take care of encryption for you, or it might even restrict access physically by keeping the data on your local node, where other parties are unable to access it altogether! edit: See ledger topologies for an overview of the different approaches that may be used to guarantee privacy. It all depends on the implementation and…
AL
alpha_coders
Dec 2020

Thanks for your reply, is it possible to see the data in couchdb fauxton interface?

GA
Gary_Verhaegen
Dec 2020

If you’re connecting to CouchDB directly, you will be able to see some data (i.e. mostly just the fact that there is data), but it will likely be encoded. See the question @Luciano linked to for details.

SH
Shaul
Dec 2020

Welcome to the DAML Community @alpha_coders!

I don’t have experience with fauxton but what I expect is that you’ll see the data but it will look like an opaque blob, you won’t be able to see it in fauxton in a way that is meaningful to you. The answers to these two questions explains why:

This is the ChaincodeArgs part of a transaction. I tried to Base64 decode the data, but nothing intelligible came out of it. ChaincodeArgs 0 "[blob:THHWvJqRO/R5]" 1 "[blob:H4sIAAAAAAAAAAGYAGf/CAUQARgBIo8BH4sIAAAAAAAAAOPi4WjZPPMXq0DD6VurGKXyuJy5WB1TcjPzhFSMjdMsEo0sLXXNDJMNdE1MLFJ0k5KNzXXTjAwTDZJNzMyM0wyk2NLy85MSi7SAxlybBzJm0bxuRil1LlWX0oKczOTEklTv1EorBef8vJKixOQSBSBPIS+/RKE0L7OwNBUA5u7gfH4AAAA622qFmAAAAA==]" 2 "[blob:H4sIAAAAAAAAAK1SaVRTZxq+iQkEolQYBEZ6oEKAopAgghubstWQsFjQYUwQbpJLiNkguSEEl5YyxT…
When daml is deployed on fabric, what is stored on the database? What is stored on the chain?
AL
alpha_coders
Dec 2020

Thank you all for the assistance …

← Back to Discussions