kandi X-RAY | daml-on-fabric Summary
kandi X-RAY | daml-on-fabric Summary
This is an implementation of DAML ledger that stores data (transactions and state) using Hyperledger Fabric 1.4 LTS.
Top functions reviewed by kandi - BETA
- Initializes the chaincode
- Read chaincode meta data
- Retrieves the admin user for a peer
- Parses a yaml policy file
- Parse identities map
- Parse the endorsement policy from the document
- Gets a user from a store
- Unserialize a local user from a JSON string
- Returns the current record time in milliseconds
- Query chaincode by chaincode
- Creates a new orderer
- Creates the configured properties
- Gets package from cache
- Gunzip bytes
- Get the list of package names
- Query the byte array for package list
- Returns the height of the commit
- Creates a new peer
- Returns the ledgerId for this node
- Puts a commit into the byte buffer
- Returns the current Ledger ID
- Reads a commit from the chaincode
- Query a system chaincode
- Returns the value associated with the given key
- Creates an admin user
- Shuts down the client
daml-on-fabric Key Features
daml-on-fabric Examples and Code Snippets
Trending Discussions on daml-on-fabric
I was reading this documentation https://github.com/digital-asset/daml-on-fabric but I am confused. I am trying to understand the workflow and the architecture for the daml on fabric network. The network has 2 orgs and each org has 1 peer.On step 4 are allocating 5 daml parties. Quickstart example has 3 signatories(issuer,owner,buyer). To sum up, what is the match between daml parties and fabric orgs? I think that could be allocated even more daml parties without to change fabric network. They interact from one node? What is the purpose to add other nodes on step 11?...
ANSWERAnswered 2020-Sep-09 at 09:20
Parties don't have a cryptographic identity in DAML Ledgers, only nodes do. As part of the shared ledger state, every DAML-enabled infrastructure maintains a mapping from Party to Node. This relationship is usually described as a Node "hosting" a Party. The Node hosting a Party is able to submit transactions using that Party's authority and is guaranteed to receive any transactions visible to that Party.
In the tutorial you are referring to, all parties are allocated on a single Node, which then hosts them. This does indeed not make that much sense in practice. It would be more sensible to set up a network with three orgs and allocate the three parties on the peer nodes in the three orgs, respectively. Given the way the example is set up, that should be straightforward.
I deployed quickstart tutorial based on the example "daml-on-fabric" https://github.com/hacera/daml-on-fabric and after that i tried to deploy the pingpong example from dazl https://github.com/digital-asset/dazl-client/tree/master/samples/ping-pong. The bots from the example works fine on daml ledger. However, when i try to deploy this example on fabric the bots are unable to send the transactions. Everything works fine based on this read me from https://github.com/hacera/daml-on-fabric/blob/master/README.md. The smart contract look like to be deployed on Fabric. The error is when i try to use the bots from pingpong python files https://github.com/digital-asset/dazl-client/blob/master/samples/ping-pong/README.md...
ANSWERAnswered 2020-Mar-11 at 00:11
From the error message it looks like the parties defined in the quick start example have not been allocated on the ledger, hence the "Party not known on ledger" error.
You can follow the steps in https://docs.daml.com/deploy/index.html with use of daml deploy --host= --port=, which will both upload the dars and allocate the parties on the ledger.
You can also run just the allocate party command daml ledger allocate-parties, which will allocate based on the parties defined you your daml.yaml.
I am using DAML-on-Fabric (running DAML based on Hyperledger Fabric).
When I login with
Alice and issue a IOU, the app shows
PartyNotKnownOnLedger (Party not known on ledger).
How do I fix this?...
ANSWERAnswered 2020-Feb-20 at 18:00
As of DAML 0.13.52, the sandbox shipped in the SDK implicitly "allocates" parties for you. This is usually not the case when using actual distributed ledgers (such as Hyperledger Fabric).
To allocate the party, you can either use the SDK assistant
daml ledger allocate-parties command or apply the
allocateParty function using DAML script (documentation here).
Alternatively, apps from other languages can use the
AllocateParty RPC in the
PartyManagementService in the Ledger API. The Ledger API has available bindings in Java and Scala; there is no available wrapper for the
PartyManagementService but you can use the raw gRPC-generated code to use them (more on the Ledger API here).
Since the Ledger API is defined with gRPC you can use any other language with gRPC support (more on the topic here).
No vulnerabilities reported
You can use daml-on-fabric like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the daml-on-fabric component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Reuse Trending Solutions
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page