Skip to content
CCPEDIAby Unity Nodes
SIGs

RFP #20: CantonGrid — Open-Source Canton Indexer | Seeking a Champion, Contributors & Development Fund Support

1 posts37 viewsLast activity 11d ago

  1. KunalOP

    Hi Canton community,

    I’m Kunal, an independent Rust and blockchain engineer with over 5 years of experience building backend systems and blockchain infrastructure, including indexers, cross-chain integrations, and decentralized applications.

    I’ve worked extensively with Rust, Substrate/Polkadot SDK, Solana, PostgreSQL, and blockchain data infrastructure.

    I’m currently building CantonGrid, an open-source, Rust-based indexing framework for Canton Network.

    I’m looking to connect with open-source contributors, Canton developers, potential Tech & Ops Committee Champions, and the Canton Foundation Development Fund to help take CantonGrid from its current working alpha stage to production readiness.

    The project aligns with RFP #20 — Indexers, particularly its focus on application-level indexing, reusable developer infrastructure, and privacy-preserving data access.

    Why I started building CantonGrid

    I originally started developing CantonGrid because I needed a reliable indexing solution for Outcomia, a prediction-market application I’m building using Daml and Canton.

    While working on Outcomia, I needed infrastructure capable of:

    • Tracking Daml contract creation, archival, and lifecycle transitions.

    • Maintaining application-specific data models in PostgreSQL.

    • Providing REST and GraphQL APIs for application frontends.

    • Preserving Canton’s party-level privacy and authorization boundaries.

    • Recovering from interruptions without duplicating events.

    • Generating typed APIs from reusable model definitions.

    Instead of developing an indexer specifically for Outcomia, I decided to build a standalone, reusable, open-source indexing framework that other developers in the Canton ecosystem could also use.

    CantonGrid builds on authorized node-local Participant Query Store (PQS) data and maintains application-oriented projections.

    What has been implemented so far

    CantonGrid has progressed through several development milestones.

    1. Core indexing infrastructure

    • Rust-based indexing engine.

    • Authorized Canton PQS integration.

    • Contract creation and archival tracking.

    • Active contract state and lifecycle history.

    • PostgreSQL persistence.

    • Transactional checkpoints and recovery.

    • Duplicate-event protection.

    • Source authorization and health checks.

    2. REST and GraphQL APIs

    • Authenticated contract and history queries.

    • Caller-scoped visibility.

    • Party-aware authorization.

    • Pagination and cursor validation.

    • Exact representation of Daml numeric and integer values.

    3. Declarative data models

    • Application-specific model definitions.

    • Model validation and SQL schema generation.

    • Model registration and managed projection tables.

    • Bounded backfill and live projections.

    • Exact arithmetic and typed field transformations.

    • Generated GraphQL schemas and TypeScript interfaces.

    4. Working Daml LocalNet proof of concept

    The latest merged contribution, PR #11, adds a reproducible end-to-end demonstration.

    The PoC:

    • Deploys an actual Daml prediction-market contract.

    • Executes the Draft → Open → Resolved lifecycle.

    • Indexes real Canton contract events.

    • Exposes indexed data through generated GraphQL queries.

    • Demonstrates party-specific visibility using separate identities.

    • Tests cursor isolation and caller revocation.

    • Verifies recovery after stopping and restarting the indexer.

    Two complete LocalNet runs passed, including recovery and duplicate-prevention checks.

    A lightweight local dashboard also demonstrates the indexed market lifecycle.

    This is currently a working alpha-stage implementation, not a production deployment.

    What remains to be built

    Although the core infrastructure and LocalNet PoC are working, several important capabilities are still needed to make CantonGrid production-ready.

    Milestone 1 — Complete declarative model APIs

    • Advanced filtering and query capabilities.

    • REST interfaces for generated application models.

    • Broader authorization and privacy testing.

    • Improved model discovery and revision management.

    • Additional application integration examples.

    Milestone 2 — Scalable indexing and recovery

    • Staged backfills for larger datasets.

    • Improved large-scale replay and recovery.

    • Performance benchmarks and optimization.

    • Load testing under sustained indexing workloads.

    • Operational monitoring and diagnostics.

    Milestone 3 — Durable event streaming

    • Authenticated, resumable event subscriptions.

    • Durable checkpoint-based stream delivery.

    • Reconnection and replay handling.

    • Retention-gap detection.

    • Authorization revalidation during streaming.

    • Backpressure and delivery guarantees.

    Milestone 4 — Production hardening

    • Remote deployment and TLS support.

    • Canton DevNet integration and validation.

    • Deployment automation and operational documentation.

    • Failure recovery and security testing.

    • Performance and reliability benchmarks.

    • Production deployment guidance.

    Additional capabilities, including broader Canton lifecycle support and historical indexing improvements, will require further technical investigation and scoping.

    Why I’m seeking Development Fund support

    I’ve been developing CantonGrid independently, initially to solve the indexing requirements of Outcomia.

    As development progressed, I realized this infrastructure could benefit other Canton developers who need application-specific data indexing and querying while respecting Canton’s privacy model.

    My goal is to make CantonGrid a reliable, reusable, open-source indexing framework for the broader Canton developer ecosystem.

    I’m seeking Canton Foundation Development Fund support to complete the remaining engineering, testing, documentation, and production-hardening work.

    I would like to structure this work into clearly defined milestones, with transparent deliverables and measurable acceptance criteria.

    All funded improvements would remain open-source and reusable beyond Outcomia.

    Open-source contributors are welcome!

    CantonGrid is open-source under the Apache 2.0 license, and I would love to collaborate with developers interested in Rust, Daml, Canton infrastructure, indexing systems, and developer tooling.

    I’m particularly interested in contributions involving:

    • Rust backend architecture and performance optimization.

    • Canton Ledger API and PQS integrations.

    • PostgreSQL indexing and query optimization.

    • GraphQL and REST API development.

    • Privacy-preserving data access.

    • Durable event streaming and recovery.

    • Testing, benchmarking, documentation, and deployment tooling.

    Whether you’re an experienced Canton developer or someone interested in contributing to the ecosystem, I’d be happy to discuss the project, review contributions, and collaborate on its development.

    Contributions, technical discussions, GitHub issues, and pull requests are welcome.

    Looking for a Champion, contributors, and technical feedback

    I’m particularly interested in connecting with members of the Canton APIs and Daml developer tooling communities.

    I’m seeking:

    1. Technical feedback on CantonGrid’s current architecture, implementation, and security model.

    2. Open-source contributors interested in helping develop, test, improve, and maintain CantonGrid.

    3. Guidance on RFP #20 alignment, particularly around ecosystem requirements and reusable indexing infrastructure.

    4. Feedback on the proposed milestones, production-readiness requirements, and technical priorities.

    5. A Tech & Ops Committee Champion willing to support CantonGrid through the Development Fund review process.

    6. Development Fund support to help complete the remaining engineering milestones and make CantonGrid production-ready.

    I’m happy to walk interested developers, SIG members, and potential Champions through the existing architecture, codebase, technical documentation, and working LocalNet demonstration.

    Project links

    GitHub Repository

    Repository kunal171/cantongrid

    GitHub - kunal171/cantongrid: Open-source indexing infrastructure for Canton....

    Open-source indexing infrastructure for Canton. Turn authorized Daml contracts into queryable PostgreSQL databases, GraphQL APIs, and real-time data streams.

    GitBook Technical Documentation

    shady-3.gitbook.io

    CantonGrid

    Runnable LocalNet PoC

    https://github.com/kunal171/cantongrid/blob/main/docs/guide/poc.md

    Development Roadmap

    https://github.com/kunal171/cantongrid/blob/main/docs/roadmap.md

    Outcomia — Original Application Use Case

    Repository kunal171/outcomia-canton

    GitHub - kunal171/outcomia-canton: Canton-native limit-order prediction markets:...

    Canton-native limit-order prediction markets: binary and multi-outcome markets, private clubs and governance.

    GitHub Profile

    GitHub

    kunal171 - Overview

    Rust systems engineer building blockchain infrastructure, distributed systems, secure networking, and applied cryptography. - kunal171

    I believe an open-source indexing framework like CantonGrid could make it easier for developers to build applications on Canton without having to implement the same indexing infrastructure independently.

    I’d really appreciate feedback from the community, potential contributors, and introductions to relevant SIG members or Tech & Ops Committee Champions.

    Thanks for taking a look!

    Kunal
    Rust / Backend / Blockchain Engineer
    Creator of CantonGrid