Skip to content

Oracle submission verifier has a placeholder blockchain adapter #10

Description

@dorismaduegbunam

src/blockchain/oracle/submission-verifier.service.ts line 81:
// TODO: Replace with actual blockchain adapter (ethers/web3)

The verifier does not actually talk to a chain. The comment also names
ethers/web3, which are Ethereum libraries — this project is on Stellar and
already depends on @stellar/stellar-sdk ^14. So the placeholder was written
against the wrong ecosystem.

Why this matters

The whole point of the oracle subsystem is that off-chain data becomes verifiable
on-chain. Without a real adapter, submissions are signed and then never
verified against the ledger, so the trust property the architecture claims does
not hold end to end.

Tasks

  • Implement the adapter against @stellar/stellar-sdk and Soroban RPC, not an Ethereum library
  • Point it at the oracle-contract in the Trellis repository — note that contract is currently a stub, so coordinate with that work
  • Handle the failure modes: RPC unavailable, transaction not found, insufficient confirmations, network mismatch
  • Make it configurable across testnet and mainnet via existing config
  • Add retry with backoff for transient RPC failures
  • Add tests against a mocked RPC covering each failure mode

Files to look at

  • src/blockchain/oracle/submission-verifier.service.ts
  • src/blockchain/oracle/services/payload-signing.service.ts
  • src/config/env.validation.ts

Acceptance criteria

  • Submissions are verified against the real ledger
  • The Ethereum library reference is gone from code and comments
  • Transient RPC failures retry; permanent ones surface clearly
  • Tests cover each failure mode

Notes

Cross-repository: depends on oracle-contract in TRELLIS-STELLAR/Trellis
existing. Link the two issues and agree the payload shape once, in one thread.


Skills: TypeScript, Stellar SDK, Soroban
Estimated effort: 1–2 weeks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions