Skip to content

feat(approach): Private Oracles - #217

Open
Darkjay123 wants to merge 4 commits into
ethsystems:masterfrom
Darkjay123:approach-private-oracles
Open

Darkjay123 wants to merge 4 commits into
ethsystems:masterfrom
Darkjay123:approach-private-oracles

Conversation

@Darkjay123

Copy link
Copy Markdown
Contributor

Fills the "Approach TBD" gap on the Private Oracles use case from issue #138.

What this adds

New approach card Private Oracles (approaches/approach-private-oracles.md) comparing three sub-approaches:

  • Private information retrieval (documented, I2I+I2U) — fetch a record without the server learning which record was read.
  • TEE-served encrypted queries (documented, I2I+I2U) — queries encrypted to an attested enclave key; the operator never sees content, only counters.
  • Batched delivery with anchored provenance (documented, I2I) — consumption hidden inside delivery rounds; provider provenance and consent receipts attested on-chain.

Each sub-approach carries CROPS scores with written justification; the card follows the v2 template (issue #151) with the 10-row comparison matrix, persona perspectives, a conditional recommendation and open questions.

Accompanying changes

  • use-cases/private-oracles.md: the "Approach TBD" recommended-approaches section now links the card (architectural considerations kept).
  • CHANGELOG.md: [Unreleased] entry in the style of the recent approach PRs.

Checks

All six required v2 sections present, title prefix and frontmatter complete, body word count within the documented approach limit. The Vale prose gate runs in CI.

Part of #138.

Fills the Approach TBD gap on private-oracles (issue ethsystems#138). Adds the
approach card comparing private information retrieval, TEE-served
encrypted queries and batched delivery with anchored provenance; links
the use-case card and adds the changelog entry.

@rymnc rymnc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thank you for your contribution! left some comments inline

Comment thread approaches/approach-private-oracles.md Outdated
uses_patterns: [pattern-tee-based-privacy, pattern-tee-key-manager]
```

**Summary:** Queries arrive encrypted to a key held inside a Trusted Execution Environment; the enclave resolves and serves them without the operator observing content or requester.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the operator runs the network edge, so it sees which consumer connects, when and how often. pattern-tee-based-privacy says that the host controls every byte that crosses the enclave boundary. #218 says the same at approach-private-read.md line 94. so "or requester" does not hold. the requirement at line 23 to hide the query source has no mechanism in this card.

suggestion: remove "or requester", and add pattern-network-anonymity or pattern-mixnet-anonymity for the source.

Suggested change
**Summary:** Queries arrive encrypted to a key held inside a Trusted Execution Environment; the enclave resolves and serves them without the operator observing content or requester.
**Summary:** Queries arrive encrypted to a key held inside a Trusted Execution Environment; the enclave resolves and serves them without the operator reading query content. The operator still sees which consumer connects, and when.

Comment thread approaches/approach-private-oracles.md Outdated
Comment on lines +43 to +45
maturity: documented
context: both
crops: { cr: high, o: partial, p: full, s: medium }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

these values differ from pattern-private-information-retrieval. the pattern is maturity: research, o: yes and s: high. it also says that cr drops to low when a single operator holds the only copy of the database. that is the oracle case: the matrix says "dataset hosting" at line 148. #218 marks its pir path concept.

suggestion: use maturity: concept and the pattern scores, or say why this card differs. then update the rationale at line 71 and the matrix at lines 142 and 144.

Comment thread approaches/approach-private-oracles.md Outdated

**Summary:** The consumer fetches a record from the oracle's dataset without the serving infrastructure learning which record was fetched.

**How it works:** The oracle publishes an indexed dataset (price history, reference data). The consumer runs a PIR query: the server processes an encrypted query vector and returns a response the client decrypts to exactly the requested record, while the server learns nothing about which index was read. Batching many consumers' queries shares server cost, and update streams keep the dataset fresh between republications.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

batching does not share the per-query server work. simplepir says that "the server must touch every bit of the database to answer even a single client query". clients share a preprocessing hint, which is 121 mb for a 1 gb database. after an update, the server must repeat some of the preprocessing. for price data, updates are frequent, so update cost is the binding cost.

suggestion: name the mechanism that amortizes cost, and state the hint download and the update cost. the "client light" cell at line 147 then needs the hint too.

Comment thread approaches/approach-private-oracles.md Outdated
- Single-server PIR rests on computational assumptions; multi-server variants need non-colluding operators

**Threat model:**
- Timing or size side channels leak which record was fetched

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

simplepir says that "the server must touch every bit of the database to answer even a single client query". so a correct server's timing does not depend on the index. the leak is when queries happen and how often, which shows intent.

suggestion:

Suggested change
- Timing or size side channels leak which record was fetched
- Query timing and rate leak trading intent; non-oblivious implementations may also leak the index

- Read patterns are heavy and repeated, amortizing server cost

**Avoid when:**
- The consumer needs proof the served value is fresh and correct, not just unseen

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

line 24 requires integrity and freshness for every consumer. so this avoid-when rules out pir for every oracle use. pattern-private-information-retrieval pairs pir with a separate integrity anchor. that also answers open question 4 at line 188.

suggestion: add a signed snapshot or a state-root anchor to how it works, and remove this bullet.

### Constraints

- Trading-grade latency rules out heavyweight proving on the hot path
- Multiple providers must aggregate without a single trusted party

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

no sub-approach aggregates across providers. every column has an operator at line 148, and the tee default is one trusted party. the use case also requires hiding individual provider contributions at line 58. but line 117 attests the contributing providers, and line 126 lists attribution only as a threat. problem 2 of the use case (provider revenue) does not appear in the card.

suggestion: add a threshold or mpc aggregation sub-approach, or move these to open questions.

Comment thread approaches/approach-private-oracles.md Outdated
uses_patterns: [pattern-verifiable-attestation, pattern-commit-and-prove]
```

**Summary:** Queries hide inside aggregate delivery rounds and provider provenance is attested on-chain, so neither consumption patterns nor data origin leak at the individual level.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this summary says that neither consumption patterns nor data origin leak. the rationale at line 136 says that cadence and volume leak. the provider attestations at line 117 also show data origin. line 161 also calls this model orthogonal to the other two. so it is a layer over them, but the matrix compares it as a third option.

suggestion:

Suggested change
**Summary:** Queries hide inside aggregate delivery rounds and provider provenance is attested on-chain, so neither consumption patterns nor data origin leak at the individual level.
**Summary:** Feeds publish in fixed rounds with provider provenance attested on-chain, so a consumer's individual queries hide inside a round, while round cadence, volume and the set of contributing providers stay visible.

Comment thread approaches/approach-private-oracles.md Outdated

### Default

For an institutional consumer buying reference data with latency requirements, TEE-served encrypted queries are the default: they hide query content from the operator with production-grade latency and add little beyond the hardware trust a conventional oracle already implies.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the card gives no source for "the hardware trust a conventional oracle already implies". pattern-tee-based-privacy says that tee-only deployments suit only pilots or low-value operations. so the tee default adds a hardware-vendor trust anchor. "production-grade latency" also conflicts with maturity: documented.

suggestion:

Suggested change
For an institutional consumer buying reference data with latency requirements, TEE-served encrypted queries are the default: they hide query content from the operator with production-grade latency and add little beyond the hardware trust a conventional oracle already implies.
For an institutional consumer buying reference data with latency requirements, TEE-served encrypted queries are the default: they hide query content from the operator without proving on the hot path, at the cost of a hardware-vendor trust anchor.

Comment thread approaches/approach-private-oracles.md Outdated

### Decision factors

- If the operator itself cannot be trusted with any query visibility, use private information retrieval instead.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

pir hides which record is read. pattern-private-information-retrieval says that the server still learns that a query was issued and the query rate.

suggestion:

Suggested change
- If the operator itself cannot be trusted with any query visibility, use private information retrieval instead.
- If the operator must not learn which record is read, even under a hardware compromise, use private information retrieval instead.

Comment thread CHANGELOG.md Outdated

## [Unreleased]

- feat(approach): [Private Oracles](approaches/approach-private-oracles.md), filling the "Approach TBD" gap on [Private Oracles](use-cases/private-oracles.md), whose recommended-approaches section now links to the card. Compares private information retrieval (documented, I2I+I2U), TEE-served encrypted queries (documented) and batched delivery with anchored provenance (documented, I2I), with a 10-row comparison matrix, persona perspectives, a conditional recommendation and open questions.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

the entry has no pr link. .claude/CLAUDE.md asks for one.

suggestion:

Suggested change
- feat(approach): [Private Oracles](approaches/approach-private-oracles.md), filling the "Approach TBD" gap on [Private Oracles](use-cases/private-oracles.md), whose recommended-approaches section now links to the card. Compares private information retrieval (documented, I2I+I2U), TEE-served encrypted queries (documented) and batched delivery with anchored provenance (documented, I2I), with a 10-row comparison matrix, persona perspectives, a conditional recommendation and open questions.
- feat(approach): [Private Oracles](approaches/approach-private-oracles.md), filling the "Approach TBD" gap on [Private Oracles](use-cases/private-oracles.md), whose recommended-approaches section now links to the card. Compares private information retrieval (documented, I2I+I2U), TEE-served encrypted queries (documented) and batched delivery with anchored provenance (documented, I2I), with a 10-row comparison matrix, persona perspectives, a conditional recommendation and open questions. ([#217](https://github.com/ethsystems/map/pull/217))

- PIR sub-approach: maturity concept and the pattern's own scores (CR low single-operator case, O yes, S high); rationale and matrix updated
- batching economics stated: server touches every bit per query, 121 MB hint per 1 GB dataset, update cost binds for price data
- threat model: timing and rate leak trading intent; non-oblivious implementations may leak the index
- integrity: pair PIR with a signed snapshot or state-root anchor; drop the avoid-when bullet that ruled PIR out of every oracle use
- TEE sub-approach: operator still sees which consumer connects and when; drop pattern-tee-key-manager (signing-key misuse, same as ethsystems#218); add pattern-network-anonymity for the source; single-operator score set CR low/O partial/P partial/S medium
- batched delivery: pattern-commit-and-prove replaced with pattern-mixnet-anonymity; pattern-zk-tls dropped from frontmatter; disclosure-keys pattern added for scoped regulator access
- cross-provider aggregation moved to an open question
- default and decision-factor summaries aligned with the review's suggested wording
- changelog entry gains its PR link
Darkjay123 added a commit to Darkjay123/map that referenced this pull request Nov 17, 2026
- scenario: peers never see RPC reads; the eth wire protocol carries no read messages
- institution-run nodes: transaction history needs a self-hosted indexer; third-party indexer queries added to the threat model; broadcasts reveal the node IP, paired with pattern-private-transaction-broadcasting
- TEE-hosted RPC: provider sees who queries, when and how much; ORAM needed to hide which state the enclave reads; drop pattern-tee-key-manager (signing-key misuse); add pattern-tee-network-anonymity and link it
- single-operator TEE score set (CR low/O partial/P partial/S medium), consistent with ethsystems#217; rationale and matrix updated
- obfuscated aggregate reads: gateway sees sender and timing; PIR hides only the record; honest no-deployments maturity and high server-compute cost
- use-case recommended-approaches section rewritten per review; changelog entry gains its PR link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants