Gas Profiler - DPM Component
Install, configure, run, and troubleshoot dpm canton-profiler for Canton validator pre-flight checks.
What is the Canton Gas Profiler?​
The Canton Gas Profiler is a dpm component that estimates what a transaction will cost and whether it will succeed — before it is submitted to the Canton network.
Developers often deploy blindly, only discovering their transactions are too large or too expensive after they fail on testnet or mainnet. A poorly designed transaction can deplete a validator's traffic budget, causing every subsequent transaction on that validator to be rejected. The profiler closes that gap. It's the Tenderly-style simulation step Canton has been missing, run it before you submit, not after you fail.
Before submitting a command, the gas profiler answers three questions:
- Will this transaction succeed? — pre-flight readiness checks catch unknown parties, missing packages, failed vetting, and unhealthy synchronizers before they cause a rejection.
- How many bytes of sequencer traffic will it consume? - exact traffic cost, computed by running the Daml interpreter without committing to the ledger.
- Can the validator's traffic budget cover it? — balance verification against the validator's current traffic budget, with a recommendation to top up Canton Coin if it can't.
Who it's for​
The profiler is built for operators, workflow designers, and developers managing multi-party transactions with substantial payloads, teams running self-hosted validators, and Daml developers designing workflows across multiple parties. It is not an end-user gas calculator: validators, not individual wallets, bear traffic costs, so the tool is scoped to the people who operate and design around that cost.
Contents​
- Pre-requisite
- Getting started — Quick start, Install
- Configuration — Configure, Nginx / vhost routing
- Commands — Commands, Output and exit codes, Capability modes, Operational notes
- Command JSON
- Warnings — Warnings W001–W011
- Troubleshooting
Pre-requisite​
Canton Gas Profiler is a DPM component that checks a Ledger API command before you submit it. It can estimate sequencer traffic bytes, convert the estimate to CC/USD when rates are available, and flag readiness issues such as unknown parties, missing packages, failed vetting checks, unhealthy synchronizers, or PrepareSubmission failures.
| Need | Why |
|---|---|
| DPM 1.0.14+ | Installs and runs the component from your Daml project. |
| Node.js 18+ | Runs the bundled CLI script. |
| Canton Ledger API 3.5+ | Provides PrepareSubmission for pre-flight interpretation and traffic cost. |
| JWT | Authorizes Ledger API calls for the command's userId, actAs, and readAs. |
| Scan or scan-proxy | Optional; used for CC/USD conversion. Fallback rates can be configured. |
| Admin API | Optional; enables FULL mode checks such as live traffic balance and synchronizer status. |