Skip to content

examples: Airnode demo catching a provider serving wrong data - #14

Merged
macjayz merged 1 commit into
mainfrom
examples/airnode-demo
Nov 1, 2026
Merged

macjayz merged 1 commit into
mainfrom
examples/airnode-demo

Conversation

@macjayz

@macjayz macjayz commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Adds examples/airnode-demo: a runnable version of the "provider serves wrong data with HTTP 200" story.

  • your-provider: a local stand-in that proxies Base mainnet but answers block requests with the block from 40 blocks earlier.
  • airnode-drpc: a real call through AirnodeHub's dRPC listing, paid via x402 in aUSD on Base Sepolia. Its signature is checked and bound to the exact request.
  • Both are asked the same question at one pinned height, and D2 (detectDisagreement) raises provider_disagreement naming the verified Airnode signer.

The README opens with the problem it demonstrates, then shows how to get a funded test key and run it:

AIRNODE_PAYER_KEY=0x... npm run demo -w examples/airnode-demo

Also links the example from the README's Signed verification section.

Tested: ran it end to end against live AirnodeHub. The signature was valid and request-bound, and D2 fired as shown in the example README. Typechecked with strict settings and linted.

🤖 Generated with Claude Code

A local stand-in provider answers block requests with a block from 40
blocks earlier, always with HTTP 200. A real, paid AirnodeHub call answers
the same pinned question with a signed response, and detector D2 raises
provider_disagreement naming the verified signer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@macjayz
macjayz enabled auto-merge November 1, 2026 09:37
@macjayz
macjayz merged commit f1fde8c into main Nov 1, 2026
8 checks passed
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.

1 participant