Skip to content

Proposal: Canton Index#319

Open
Web3Slimchance wants to merge 1 commit into
canton-foundation:mainfrom
Web3Slimchance:canton-index
Open

Proposal: Canton Index#319
Web3Slimchance wants to merge 1 commit into
canton-foundation:mainfrom
Web3Slimchance:canton-index

Conversation

@Web3Slimchance
Copy link
Copy Markdown

Development Fund Proposal Submission

Proposal file: /proposals/canton-index.md


Summary

Canton Index reduces the time from "I have a validator" to "I can query my data" from weeks to minutes. It gives every Canton builder a shared, open-source primitive for accessing ledger data. Instead of every team hand-rolling JSONB SQL pipelines, they can focus on actual application logic.

Canton Index sits alongside a validator running PQS, applies developer-defined filters to ledger events, materializes them into application-ready documents, and exposes them through a document-query HTTP API.

This proposal is scoped to stateless projections. The proposal outlines a roadmap with follow-on work:

  • A Scan connector covering network-level data, cross-validator views, and historical data that the local validator may have pruned.
  • A stateful filter runtime supporting roll-ups and aggregations.
  • A strongly-typed GraphQL API.

Checklist

  • Proposal file added under /proposals/
  • Milestones and funding amounts defined
  • Acceptance criteria included
  • Alignment with Canton priorities described

Notes for Reviewers

  • This proposal is championed by Bernhard Elsner (CPO at Digital Asset) and has been pre-reviewed by both Bernhard and Curtis Hrischuk (Principal Technical Product Manager at Digital Asset). Thank you both for the in-depth feedback.
  • The proposal is authored by The Graph Foundation and InfraDAO. The Graph has pioneered and continues to advance multiple high-performance indexing systems used by tens of thousands of developers. InfraDAO has led the onboarding of 20+ networks into The Graph Network, covering integration, tooling, documentation, and performance optimization. This proposal brings that experience to Canton.
  • Design partners are engaged from Milestone 1 to validate the filter format and query patterns against real workloads, ensuring the design is shaped by actual developer needs.
  • See the full proposal for the detailed specification, milestones, acceptance criteria, and risks.

Proposal migrated to github

Signed-off-by: Web3Slimchance <Web3Slimchance@gmail.com>
Comment thread proposals/canton-index.md

### Abstract

We propose Canton Index, an open-source indexing and query engine for Canton Network. It sits alongside a validator that runs PQS (the Participant Query Store), reads ledger events from PQS using developer-defined filter specifications, transforms those events into application-ready documents, and serves the results through a document-query API. Phase 2 will add Scan as a second source for network-level data, cross-validator views, and historical periods that local PQS may have pruned.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment that Scan only solves for historical CC data PQS would need to be set to not prune data to solve history for private transactions.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, you are right. We deliberately kept the abstract and Phase 2 description at a high level to keep the proposal tight, but we could have been clearer: "Scan can fill in network-level and historical CC data, but cannot recover pruned private transactions." Happy to tighten the wording in the proposal if useful.

Comment thread proposals/canton-index.md
└─────────────────────────────────────────────────────────┘
```

**PQS Reader:** This component polls the validator's Participant Query Store using its documented SQL API: `creates(name, from, to)`, `exercises(name, from, to)`, `archives(name, from, to)`, and `active(name, at_offset)`. The PQS Reader tracks its own progress cursor by ledger offset to know what has already been processed. PQS itself handles the upstream Ledger API subscription, reconnection, backpressure, and pruning, so Canton Index inherits those guarantees rather than reimplementing them. PQS is assumed to be available on validators (the Canton Foundation's separately-funded "PQS as common good" work brings PQS into the open-source surface for all operators).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Architecture comment. PQS uses streaming interface from participant ledger API, so this architecture goes from streaming to DB to poll based mechanism

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a deliberate tradeoff for Phase 1. PQS already gives us a stable SQL interface with offset semantics, reconnection, and durability handled upstream. A direct Ledger API streaming path at chain head is a reasonable future optimization, and we'd address it in a later phase once we have real latency data from validators.

Comment thread proposals/canton-index.md
- Tracks source offset per document for consistency
- Supports pruning by age or offset to keep tables lean

**Query API:** HTTP document-query API over materialized documents:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are you thinking about the authentication and authorization model for access to the data?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is out of scope for Phase 1. Most enterprise validator operators have custom auth workflows. We would prefer understanding the concrete needs before we lock down the authentication and authorization model. For Phase 1 the Query API is assumed to run inside the operator's trust boundary, fronted by their existing auth. We'll revisit if a concrete need emerges from our design partners.

@github-actions
Copy link
Copy Markdown

@Web3Slimchance, your proposal is missing a Special Interest Group (SIG) label. Adding the right SIG label ensures the relevant domain experts can find and review your proposal, Check more about SIGs.

Please add one of the following labels to this PR:

  • attestor-pools-daos-multisig
  • canton-apis
  • canton-protocol-multi-synchronizer
  • daml-tooling
  • dapp-integration
  • dar-app-management
  • defi-liquidity
  • defi-protocols
  • financial-workflows-composability
  • global-synchronizer-scaling
  • node-deployment-operations
  • onchain-governance
  • party-portability-data-resilience
  • regulatory-compliance
  • token-asset-standards
  • tokenomics
  • wallet-apps

Not sure which one fits? Pick the closest match to your proposal's domain. You can add a label from the right sidebar under "Labels".

1 similar comment
@github-actions
Copy link
Copy Markdown

@Web3Slimchance, your proposal is missing a Special Interest Group (SIG) label. Adding the right SIG label ensures the relevant domain experts can find and review your proposal, Check more about SIGs.

Please add one of the following labels to this PR:

  • attestor-pools-daos-multisig
  • canton-apis
  • canton-protocol-multi-synchronizer
  • daml-tooling
  • dapp-integration
  • dar-app-management
  • defi-liquidity
  • defi-protocols
  • financial-workflows-composability
  • global-synchronizer-scaling
  • node-deployment-operations
  • onchain-governance
  • party-portability-data-resilience
  • regulatory-compliance
  • token-asset-standards
  • tokenomics
  • wallet-apps

Not sure which one fits? Pick the closest match to your proposal's domain. You can add a label from the right sidebar under "Labels".

@Web3Slimchance
Copy link
Copy Markdown
Author

I do not have write access to this repo. Can one of the maintainers please add the canton-apis SIG label 🙏

@hythloda hythloda moved this from Ready for Vote to Voting Live in Dev Fund Incoming May 13, 2026
@hythloda hythloda moved this from Voting Live to Ready for Vote in Dev Fund Incoming May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Ready for Vote

Development

Successfully merging this pull request may close these issues.

4 participants