Skip to content

feat: index PoRep Market as first-class - #102

Open
rvagg wants to merge 1 commit into
masterfrom
rvagg/porep
Open

feat: index PoRep Market as first-class#102
rvagg wants to merge 1 commit into
masterfrom
rvagg/porep

Conversation

@rvagg

@rvagg rvagg commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

PoRep Market (FIDL's "cold storage") is the largest non-FWSS operator on FilecoinPay, but was unattributable because it deploys one Validator per deal. This change indexes PoRepMarket, ValidatorFactory, SPRegistry (a dedicated fork), and SLIOracle (mainnet V1) into porep_* tables, bridged to fp_* via porep_rail_id_updated (rail_id) and porep_proxy_created (operator). ABIs vendored from fidlabs/porep-market@8a20c1a.

Also:

  • sql-validator: allow read-only stats aggregates, from watching what agents reach for (stddev, variance, percentile_cont/disc, mode, corr, covar)
  • system-context: name PoRep Market and Storacha's wind-down, fix per-token decimals (axlUSDC is 6-dec) across aggregate recipes

PoRep Market (FIDL's "cold storage") is the largest non-FWSS operator on
FilecoinPay, but was unattributable because it deploys one
Validator per deal. This change indexes PoRepMarket, ValidatorFactory,
SPRegistry (a dedicated fork), and SLIOracle (mainnet V1) into porep_* tables,
bridged to fp_* via porep_rail_id_updated (rail_id) and porep_proxy_created
(operator). ABIs vendored from fidlabs/porep-market@8a20c1a.

Also:
- sql-validator: allow read-only stats aggregates, from watching what agents
  reach for (stddev, variance, percentile_cont/disc, mode, corr, covar)
- system-context: name PoRep Market and Storacha's wind-down, fix
	per-token decimals (axlUSDC is 6-dec) across aggregate recipes
@rvagg
rvagg requested review from Kubuxu and a lite review from Copilot August 18, 2026 05:12
@FilOzzy FilOzzy added this to FOC Aug 18, 2026
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC Aug 18, 2026
@rvagg rvagg changed the title feat: index PoRep Market as a first-class feat: index PoRep Market as first-class Aug 18, 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.

Pull request overview

Adds PoRep Market (FIDL’s “cold storage”) as a first-class indexed service in the observer by introducing new porep_* event tables and Ponder handlers/contracts, and updates query guidance + SQL validation to better support cross-operator analytics (including mixed-token decimals and additional statistical aggregates).

Changes:

  • Index PoRep Market V1 (Market, ValidatorFactory, SPRegistry, SLIOracle) into new porep_* tables and wire contracts into both mainnet and calibnet Ponder configs.
  • Expand the SQL validator allow-list to include common statistical + ordered-set aggregates, with tests verifying WITHIN GROUP doesn’t bypass validation.
  • Update system context to reflect PoRep attribution/bridging, per-token decimals (not universally 18), and Storacha being wound down.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
shared/system-context.ts Updates analytics/query guidance for PoRep, mixed-token decimals, and Storacha status.
server/test/sql-validation.test.ts Adds tests covering newly allowed statistical and ordered-set aggregates, plus bypass checks.
server/src/sql-validator.ts Extends function allow-list to include additional safe aggregates.
indexer/src/schema-defs.ts Defines new porep_* tables for PoRep Market V1 events and bridges.
indexer/src/porep.ts Adds Ponder event handlers inserting PoRep Market/SP registry/SLI oracle events into porep_*.
indexer/ponder.schema.ts Exposes porep_* tables via generated Ponder schema exports for handlers.
indexer/ponder.config.mainnet.ts Adds PoRep Market-related contracts/ABIs and start block configuration on mainnet.
indexer/ponder.config.calibnet.ts Adds PoRep Market-related contracts/ABIs and start block configuration on calibnet.
indexer/abis/PoRepValidatorFactory.ts Vendors PoRep ValidatorFactory ABI for indexing.
indexer/abis/PoRepSPRegistry.ts Vendors PoRep SPRegistry ABI for indexing.
indexer/abis/PoRepSLIOracle.ts Vendors PoRep SLIOracle ABI for indexing.
indexer/abis/PoRepMarket.ts Vendors PoRep Market ABI for indexing.
.gitignore Ignores generated server ponder-env.d.ts and normalizes generated-path entries.

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

@BigLep BigLep moved this from 📌 Triage to 🔎 Awaiting review in FOC Aug 19, 2026
@github-project-automation github-project-automation Bot moved this from 🔎 Awaiting review to ✔️ Approved by reviewer in FOC Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✔️ Approved by reviewer

Development

Successfully merging this pull request may close these issues.

5 participants