Key Concepts¶
This section here provides an overview of the key concepts and terms used in Canton and Daml.
- Daml: An enterprise grade, functional programming language for smart contracts based on the abstraction of rights and obligations.
- Participant Node: A server that provides users a consistent programmatic access to a Daml based ledger through the Ledger API. Users trust their participant node. Participant nodes assume that other participant nodes are malicious. The participant node can be configured individually to connect to many domains at the same time, presenting a unified view over all domains. The participant nodes handles transaction signing and validation, such that users don’t have to deal with cryptographic primitives but can trust the participant node that the data they are observing has been properly verified to be correct.
- Canton Transaction Protocol: Canton based participant nodes communicate with other Canton based participant nodes by sending messages over a domain. They use the Canton transaction protocol in order to synchronise their state.
- Domain: The domain provides total ordered, guaranteed delivery multi-cast to the participants. This means that participant nodes communicate with each other by sending end-to-end encrypted messages through the domain. The sequencer service of the domain orders these messages without knowing about the content and ensures that every participant receives the messages in the same order. The other services of the domain are the mediator and the domain topology manager.
- Private Contract Store: Every participant node manages its own private contract store which contains only contracts the participant is privy to. There is no global state or global contract store.
- Virtual Global Ledger: While every participant has their own private contract store (PCS), the Canton Transaction Protocol guarantees that the contracts which are stored in the PCS are well-authorized and that any change to the store is justified, authorized and valid. The result is that every participant only possesses a small part of the virtual global ledger. All the local stores together make up that virtual global ledger and they are thus synchronized. The Canton transaction protocol guarantees that the virtual ledger provides integrity, privacy, transparency and auditability. The ledger is logically global, even though physically, it runs on segregated and isolated domains that are not aware of each other.
- Party: A keyword of Daml, representing a party on a Daml based ledger. Parties in Daml are used the express authorization and observation privileges and are used to capture rights and obligations between each other. Parties are hosted on participant nodes. A participant node can host more than one party. In Canton, a party can be hosted on several participant nodes simultaneously.
- DAR: A Daml archive which contains compiled Daml code that can be interpreted using a Daml interpreter. The name similarity to Java’s JAR is intentional, as is the actual implementation (as a zip-archive). The content of the DAR file are DALF packages (Daml ledger fragment packages).
- Ledger API: Every participant node exposes a Ledger API to their users. The users access and manipulate the ledger state from the perspective of a party.
- Composability: The ability of a participant to extend an existing system with new Daml applications or new topologies unilaterally without requiring cooperation from anyone except the directly involved participants who wish to be part of the new application functionality. There is no central authority in Canton.
- Stakeholders, Controllers, Signatories, Observers: A concept within Daml to determine who may see contract data (signatories and observers), who must have authorized the existence of the contract (signatories) and who can authorize changes (controllers) of a particular contract instance. The union of the parties having such a role on a particular contract instance is denoted to be the set of stakeholders.
- Atomic Transaction: The ability to effect a set of changes atomically such that either all changes happen or nothing happens in case of a conflict or error.
- Sub-Transaction Privacy: Participants to a transaction only learn about the subset of the transaction they are directly involved in, but not about any other part of the transaction. This applies to both the content of the transaction as well as other involved participants.
- Domain Integration: A domain is a set of abstract services which are used by the Canton transaction protocol. A domain can be implemented in different ways, depending on the necessary trust assumptions for a given use-case. If the domain operator is trusted, it can be implemented on top of a database such as the reference implementation which is implemented on Postgres. For low trust environments, a domain can be implemented by leveraging hardware enclaves or by integrating it into other ledgers such as Hyperledger Fabric or Ethereum.
- Mediator: A service provided by the domain, used by the Canton transaction protocol. The mediator acts as commit coordinator, collecting individual transaction verdicts issued by validating participants and aggregates them into a single result. The mediator does not learn about the content of the transaction, they only learn about the involved participants.
- Sequencer: A service provided by the domain, used by the Canton transaction protocol. The sequencer forwards encrypted addressed messages from participants and ensures that every member receives the messages in the same order. Think about registered and sealed mail delivered according to the postal datestamp.
- Domain Topology Manager: A service provided by the domain, used by the Canton transaction protocol. Participants join a new domain by registering with the domain topology manager. The domain topology manager establishes a consistent topology state among all participants. The domain topology manager only forwards identity updates. It can not invent them.
- Blockchain: The Canton protocol does not use a Blockchain. Canton allows different Daml based ledgers to interoperate, independent of whether they are running on a blockchain, on enclaves or on centralised databases.
- Consensus: The Canton protocol does not use PBFT or any similar consensus algorithm. There is no proof of work or proof of stake involved. Instead, Canton uses a variant of a stakeholder based two-phase commit protocol. As such, only stakeholders of a transaction are involved in it and need to process it, providing efficiency, privacy and horizontal scalability. Canton based ledgers are resilient to malicious participants as long as there is at least a single honest participant. A domain integration itself might be using the consensus mechanism of the underlying platform, but participant nodes will not be involved in that process.