Skip to content

feat(indexer): index PoRep Market as first-class tables - #124

Merged
rvagg merged 1 commit into
masterfrom
rvagg/porep-indexer
Sep 10, 2026
Merged

feat(indexer): index PoRep Market as first-class tables#124
rvagg merged 1 commit into
masterfrom
rvagg/porep-indexer

Conversation

@rvagg

@rvagg rvagg commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Ref: #102

Pulling out just the indexer/server parts of 102, will follow-up with context with a context reorg because we currently have no space to describe this.

Ref: #102
Pulling out just the indexer/server parts of 102, will follow-up with context
with a context reorg because we currently have no space to describe this.
@rvagg
rvagg requested a lite review from Copilot September 10, 2026 13:15
@FilOzzy FilOzzy added this to FOC Sep 10, 2026
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC Sep 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new porep_sli_attestation_update table name introduces an inconsistent suffix compared to existing _updated tables, which is likely to become a long-lived API/migration footgun if merged as-is.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR extracts the indexer/server portions of the larger PoRep Market indexing work (ref #102), adding PoRep Market as a first-class indexed service with dedicated porep_* tables and updating the server-side SQL validation + MCP context size tripwires to accommodate the expanded schema metadata.

Changes:

  • Add PoRep Market indexing: new porep_* table defs, network addresses/start blocks, Ponder contract config, and event handlers to write PoRep lifecycle/registry/oracle events.
  • Vendor PoRep ABIs and add indexer tests to validate ABI event decoding and network registry configuration.
  • Expand server SQL validator allow-list for statistical + ordered-set aggregates, and add a system-context size budget test for the table list payload.
File summaries
File Description
server/test/system-context.test.ts Adds a size-budget tripwire for the formatted table list loaded into MCP sessions.
server/test/sql-validation.test.ts Adds validation tests for statistical and ordered-set aggregates, including bypass guards.
server/src/sql-validator.ts Allows additional safe statistical/ordered-set aggregate functions.
server/README.md Updates Postgres row description to reflect growth beyond a fixed table count.
indexer/test/porep-events.test.ts Adds tests ensuring PoRep ABIs decode key events into expected primitive types.
indexer/test/networks.test.ts Asserts PoRep Market addresses/start blocks are preserved in network registry snapshots.
indexer/test/abi-events.test.ts Registers PoRep ABIs in the shared ABI event-shape validation test.
indexer/src/schema-defs.ts Defines new porep_* tables + descriptions/columns/indexes for PoRep Market.
indexer/src/porep.ts Implements Ponder event handlers inserting PoRep events into porep_* tables.
indexer/src/networks.ts Adds PoRep Market addresses and PoRep-specific start block to network configs.
indexer/ponder.schema.ts Exposes PoRep table handles in the generated schema exports.
indexer/ponder.config.ts Adds PoRep contracts to the Ponder config with PoRep deployment start blocks.
indexer/abis/PoRepMarket.ts Vendored PoRepMarket V1 ABI.
indexer/abis/PoRepValidatorFactory.ts Vendored ValidatorFactory V1 ABI.
indexer/abis/PoRepSPRegistry.ts Vendored SPRegistry V1 ABI.
indexer/abis/PoRepSLIOracle.ts Vendored SLIOracle V1 ABI.
Review details
  • Files reviewed: 16/16 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread indexer/src/schema-defs.ts
@rvagg
rvagg merged commit 11e6931 into master Sep 10, 2026
6 checks passed
@rvagg
rvagg deleted the rvagg/porep-indexer branch September 10, 2026 13:23
@github-project-automation github-project-automation Bot moved this from 📌 Triage to 🎉 Done in FOC Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

3 participants