Skip to content
Discussions/App Development/Choosing fabric channel at runtimeForum ↗

Choosing fabric channel at runtime

App Development3 posts618 views3 likesLast activity Feb 2021
BA
basilkyOP
Feb 2021

I was going through the daml-on-fabric repository. I found that the Fabric channel on which DAML works is specified here. Is it possible to dynamically choose the channel at runtime? (eg: specifying channel name while hitting DAML HTTP JSON API Service). I want certain transactions to be on a different channel. I’m new to DAML, Please correct me if I’m thinking in the wrong direction.

SO
sormeter
Feb 2021

Hi @basilky the channel used is the one specified in the config file as you have linked.

The JSON api is one level above the specific ledger concerns so does not know anything about Fabric being used directly, hence Fabric specific config is not available at that level.

What is the reason you would be looking to put different transactions on different channels? Theoretically you could spin up multiple daml-on-fabric instances, each running as a separate process on a separate port configured to a separate channel. You would need to have a JSON api instance configured to each. In that setup you would effectively be running two completely independent blockchain instances, however.

AN
anthony
Feb 2021

Also at least somewhat related and worth noting that there are other constructs to have privacy in Daml:

I often get the question whether to put this data or that data on the Ledger or not so here are some thoughts on that matter. Please discuss and add your own thoughts. Some reasons not to store blobs on ledger I would not recommend storing large blobs of data on the ledger because there is no binary data type (this is to some degree to discourage doing this in the first place) every time the contract storing the data is used (e.g. fetched, etc), the data is loaded and sent around, even is th…
← Back to Discussions