What is the workflow on daml-sawtooth network?

108 views Asked by At

I am trying to understand the adoption of a DAML smart on sawtooth network. According to this tutorial https://github.com/blockchaintp/daml-on-sawtooth there is:

  1. Sawtooth network which contains:

    Rest-api

    Validator

    Transaction processor

    postgres

    devmode-engine

That are essential for the network.

  1. What is the role of daml-rpc and daml-tp? They act as connectors?

For example, a daml user communicates with an api with the daml platform like this image https://docs.daml.com/getting-started/app-architecture.html and after that is adopted from sawtooth network?

  1. Finally, where is stored the xxx.dar file?
1

There are 1 answers

0
Brian Healey On BEST ANSWER

DAML-on-Sawtooth is a specific DAML ledger implementation integrated using a full Sawtooth network deployment. leveraging Sawtooth's validation features for persistence.

The rest-api you see in that repository is actually the Sawtooth REST api used for communicating to the Sawtooth network, and that validator an implementation of Sawtooth validation as part of the commit protocol, and the transaction processor to handle DAML transactions on the Sawtooth network.

The sawtooth-daml-rpc is what implements the DAML Ledger API gRPC services, and this exposes the Ledger API that the application code interacts with. Postgres is used as an underlying index db service supporting the Ledger API.

In the https://docs.daml.com/getting-started/app-architecture.html you can conceptually swap the "Sandbox" box with "Sawtooth Network", as in the DAML-on-Sawtooth case it is the full Sawtooth network which is able to consume and return DAML that is the ledger implementation.

As with all DAML ledgers, the DAR files are uploaded through the package upload gRPC APIs and are persisted on the ledger (in this case the Sawtooth network), as are parties and transactions through the party allocation and transaction submission APIs, respectively.