feat: index PoRep Market as first-class - #102
Open
rvagg wants to merge 1 commit into
Open
Conversation
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
There was a problem hiding this comment.
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 GROUPdoesn’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.
Kubuxu
approved these changes
Aug 20, 2026
This was referenced Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: