Releases: ChainSafe/canton-middleware
Releases · ChainSafe/canton-middleware
v0.2.1
v0.2
Release Notes v0.2
Overview
This release introduces the ERC-20 API Server as a new service and includes significant improvements to the Relayer.
New: ERC-20 API Server
A new JSON-RPC 2.0 API server providing ERC-20-like interface for Canton-based tokens.
Features
-
Token Metadata Methods (public):
erc20_name- Get token nameerc20_symbol- Get token symbolerc20_decimals- Get token decimalserc20_totalSupply- Get total supply from cache
-
Authenticated Methods (require JWT or EVM signature):
erc20_balanceOf- Get user balanceerc20_transfer- Transfer tokens between registered usersuser_register- Register new user with EVM signature
Architecture
- Issuer-centric model: All users share the relayer party, differentiated by fingerprint mapping
- Balance caching system: PostgreSQL-backed cache with periodic reconciliation
- Whitelist support: Address-based registration whitelist
- Graceful shutdown: Configurable timeout with proper cleanup
Configuration
New configuration file: config.api-server.docker.yaml
Relayer Improvements (since v0.1.7)
Features
- Issuer-centric model support - Aligns with API Server architecture
- Docker local testing setup - Full end-to-end testing with auto package ID detection
- Docker build and release workflow - Automated GHCR publishing
- JWT renewal for Canton streamer - Automatic token refresh
- Bridge activity sorting - Events ordered newest to oldest
- Deposit idempotency - Prevents duplicate deposits
Fixes
- Withdrawal balance cache - Now correctly uses EVM address
- Package ID extraction - Updated for v2 packages
- Fingerprint lookups - Fixed cache updates
- Transfer pattern - Uses Burn+Mint instead of non-existent Transfer choice
- DepositReceipt tracking - Properly tracked in raw events
- Healthcheck - Uses GET instead of HEAD
- Streamer error handling - Fixed lastOffset usage and error responses
Maintenance
- Updated canton-erc20 submodule to v2 with renamed packages
- Removed legacy Canton bridge methods
- Dynamic DAR discovery with version 1.0.2 support
- Eliminated DAR build warnings
- Cleaned up deprecated test scripts
- Simplified .dockerignore
Breaking Changes
- Package IDs updated for refactored Daml packages (v2)
- Removed legacy Canton bridge methods - use new API patterns
Upgrade Notes
- Update configuration files with new package IDs
- Rebuild DAR files with updated canton-erc20 submodule
- Run database migrations for API Server balance cache tables
- Configure
relayer_partyfor issuer-centric model
Docker Images
# Relayer
docker pull ghcr.io/chainsafe/canton-middleware:v0.2
# API Server
docker pull ghcr.io/chainsafe/canton-erc20-api:v0.2v0.1.7
Canton-Ethereum Token Bridge - Release Notes v1.0
Overview
A centralized token bridge connecting CIP-56 tokens on Canton Network with ERC-20 tokens on Ethereum Mainnet, enabling bidirectional cross-chain transfers.
Core Features
Relayer Service
- Go-based relayer node running as a sidecar to Canton Network Partner Node
- Bidirectional event streaming from both Canton and Ethereum
- Persistent offset tracking with PostgreSQL for crash recovery
- Automatic reconciliation of pending transfers (every 5 minutes)
- Readiness probes for Kubernetes deployment
Deposit Flow (EVM → Canton)
- Monitors
Depositevents on Ethereum bridge contract - Creates
PendingDepositon Canton via Ledger API - Resolves user fingerprint mapping and processes deposit
- Unlocks/mints tokens to Canton user's holding
Withdrawal Flow (Canton → EVM)
- Streams
WithdrawalEventcontracts from Canton - Submits
withdrawFromCantontransaction on Ethereum - Marks withdrawal complete on Canton for reconciliation
- Idempotency protection via Canton tx hash tracking
Smart Contracts
- Ethereum: Solidity bridge contract for ERC-20 lock/unlock and wrapped token mint/burn
- Canton: DAML contracts for CIP-56 token management and bridge operations
Operational Scripts
bootstrap-bridge.go- Initialize Canton bridge contractsregister-user.go- Register user fingerprint mappingsquery-holdings.go- Query Canton token holdingsinitiate-withdrawal.go- Initiate Canton→EVM withdrawalscleanup-withdrawals.go- Reconcile incomplete withdrawals
Configuration
- YAML-based configuration with environment variable overrides
- Support for local, devnet, and mainnet environments
- Docker Compose deployments included
Observability
- Prometheus metrics for pending transfers
- Structured logging with zap
- Health/readiness endpoints