Canton Synchronization Domain on Ethereum

A Canton Ethereum sync domain uses a sequencer backed by Ethereum instead of by another ledger (such as Postgres or Fabric). The other sync domain components (mediator, sync domain manager) are reused from the relational database driver. Architecturally, the Canton Ethereum sequencer is a JVM application that interacts with an Ethereum client via the RPC JSON API to write events to the blockchain. Specifically, it interacts with an instance of the smart contract Sequencer.sol and calls function of Sequencer.sol to persist transactions and requests to the blockchain. It uses the configured Ethereum account to execute these calls. Analogous to the database-based sequencer implementations, multiple Ethereum sequencer applications can read and write to the same Sequencer.sol smart contract instance and they can do so through different Ethereum client nodes for high availability, scalability, and trust. The following diagram shows the architecture of an Ethereum-based sync domain:

Note

When running in a multi-writer setup, each Ethereum Sequencer application needs to use a separate Ethereum account. Otherwise, transactions may get stuck due to nonce mismatches.

Architecture of an Ethereum sync domain

Smart contract Sequencer.sol

The smart contract deployed to the blockchain is implemented in Solidity. Its latest revision drivers/ethereum/solidity/Sequencer.sol is available in the enterprise edition only.

Data is written to the blockchain by emitting events to the transaction logs. The Sequencer Application reads all transactions (and transaction logs) created from calls to Sequencer.sol and keeps its own store for a view of the sequencer history. This enables the Sequencer Application to serve read subscriptions promptly without having to query the Ethereum client and to restart without having to re-read all the history. The store can either use in-memory storage or persistent storage (using a database).