Onchain Data Infrastructure in Your Own Cloud
A reference design for running onchain data infrastructure inside your own cloud: the parts, reorgs, privacy, correctness, disaster recovery and procurement.
This is a reference design for teams that need blockchain data inside their own boundary: banks, custodians, payment companies, stablecoin issuers and trading desks. It covers what each part of the system does, where the risks sit, and what to ask for in procurement. It's written from the system we build and run every day, and it describes what each part does, not our source code.
If you only read one line: pull whole blocks into your own account, do every bit of filtering there, and keep the early and final versions of the data apart.
Who this is for
You need onchain data to drive something that matters: a ledger, a compliance record, a settlement flow, a trading system. And at least one of these is true:
- Your watch list is sensitive. The addresses you track are your clients, and the markets you watch are your positions.
- Your auditors and examiners read your systems, not a vendor's.
- Your security team won't approve sending client identifiers to a third-party API.
- The data has to land in your database, in your schema, next to the rest of your books.
If none of those apply, buying a dataset is often the right call. The next section says when.
Three ways to get onchain data
| Buy a dataset | Build in-house | Own the pipeline | |
|---|---|---|---|
| What you get | A vendor's warehouse and API | Whatever your team builds | A single-tenant deployment, built around your workload |
| Where it runs | The vendor's cloud | Your cloud | Your cloud, your rack, or dedicated machines |
| Who sees your queries | The vendor | Nobody outside | Nobody outside your boundary |
| Who carries reorgs, backfills and new chains | The vendor, on their schedule | Your team, for every chain, for good | The builder, or your team with theirs on call |
| Schema | The vendor's | Yours | Yours |
| Good fit | History for reports and models | Teams that can staff a data platform | Data that drives your ledger, product or trades |
Buying data works well for research and reporting, and data vendors do it well. Building in-house works when you can staff it: node operations, reorg handling, backfills, schema changes and on-call, per chain. Owning the pipeline means the deployment and the rows are yours, while a specialist builds and runs it. See build vs buy for a longer version of this trade-off.
The rest of this page describes the third option, since it's the one that runs inside your boundary.
The architecture, part by part
Only two things cross the boundary on the way in: whole blocks, and (where you use it) pending transactions from the chain's network. Your watch list stays on the inside, and nothing that goes out names a wallet or a market you care about.
1. Read whole blocks
The pipeline needs a source for every chain: the chain's own peer-to-peer network, a node you run, or an RPC provider. Most deployments mix them. A node you run costs disk and operations, and in exchange nobody upstream sees anything. An RPC provider is quicker to start and fine for privacy, as long as you only ask it for whole blocks and receipts, never for "logs for address X".
Read the same block from two sources where it matters, and compare. Providers lag, drop events and occasionally serve a stale head. Catching that at the edge is far cheaper than finding it in your ledger.
On the chains where speed matters, skip the RPC layer entirely. Rollup sequencer feeds and a chain's own network deliver blocks before any provider can re-serve them. Reading Arbitrum's sequencer feed directly, we get a swap to its exact post-trade price in 3.3 ms, median: see the races.
2. See it before the block (optional)
On some chains you can decode a payment or a trade from the pending pool before its block exists. On Polygon we see Polymarket fills about a second before the block lands. This is useful for settlement user experience, risk checks and trading, and it has two rules:
- Label it early. A pending transaction can be dropped or replaced. Nothing downstream should book it as final.
- Measure it. Track how often the early version matched the final one. In our Tempo race, 648 of 648 payments we caught early matched exactly when the block landed.
Not every chain has a public pending pool, and not every workload needs one. It's the first part to leave out when you scope.
3. Track heads and reorgs
One component follows the tip of every chain, links each block to its parent and notices when the chain reorganizes. It publishes two streams:
- Early: every block the moment it's seen, plus a removal notice if a reorg drops it.
- Final: only blocks past the chain's reorg risk, so it never needs a correction.
Each consumer picks one. A trading screen listens to early. A ledger or a compliance record listens to final. Don't build a single stream that tries to be both, since that's the most common way reorged transfers end up booked.
What "final" means differs by chain: a finality gadget on some, a confirmation depth on others, a sequencer's soft confirmation and a later batch on rollups. Write down the rule for each chain you run, and have the system enforce it rather than each consumer.
4. One data model
Normalize every chain into one shape before your code sees it. A transfer should have the same keys whether it came from an EVM chain, Solana, Bitcoin or Cosmos: chain, block, transaction, from, to, token, amount, time. We run one transfer model across more than 15 chain families.
The payoff is in what you don't write. Your reconciliation, reporting and compliance code is written once. Adding a chain becomes configuration, not a project. And the model is where to put the hard per-chain cases (native vs token transfers, internal calls, fee accounting), so they're solved once and tested once.
5. Your code, next to the data
Business logic runs inside the pipeline, in the same boundary: filtering to your watch list, joining to your reference data, shaping rows into your schema. This is also where the privacy promise is kept. Your watch list lives here, in your account, and only filtered results move on.
Two rules keep it sane:
- Backfill and live data go through the same code. If history is loaded by one tool and live data by another, the two disagree at the seam, and you find out at quarter end.
- Transforms are versioned. When logic changes, you know which rows were produced by which version, and you can reprocess a range without starting over.
6. Deliver
Rows land where your systems already read: Postgres, BigQuery or another warehouse, a stream such as Kafka, or a webhook into your own service. Delivery is at least once, so every write has to be idempotent: key each row on chain, transaction and log (or instruction) index, and an upsert makes a retry harmless.
Measure end to end, from block to committed row in your database. On a dedicated deployment we measure 147 ms from a new Polygon block to decoded rows in Postgres, median.
Privacy as a design property
A privacy policy promises not to look. A design gives nothing to look at. The second kind is the one to ask for.
What an upstream source learns depends on what you ask it:
| What you ask upstream | What the provider can infer |
|---|---|
| The next block, the next receipts | That you follow this chain. Nothing about your interests |
| Logs filtered by contract or address | Exactly which contracts and addresses you care about |
| Balance or contract reads for specific accounts | Your watch list, call by call |
| Pending transactions for specific addresses | Your clients' activity, before it settles |
So the design rule is simple. Ask upstream only for whole blocks, receipts and the pending pool, and do every filter inside your account. When a job genuinely needs a contract read, send it to a node inside your boundary. If that node has to be someone else's, treat each read as disclosed to them.
The same rule covers your vendor. When the pipeline runs in your account, the builder operates it through access you grant and can revoke, and your audit logs record that access. Nothing it produces passes through anyone else's systems. See enterprise deployments for the options.
Correctness
A pipeline that is fast and wrong is worse than none. Four checks keep it honest:
- No gaps. Every block number is accounted for, and every block's parent hash matches the block before it. A missing block is an alert, not a log line.
- No double counting. Idempotent writes (above) make retries and replays safe. Reorg removals come through as explicit events, never as silent overwrites.
- Backfill matches live. Same code path, same version, checked at the cutover point.
- Proof against an independent source. Reconcile your output against a dataset you didn't produce. When we backfilled a year of Ethereum, 666.7M of 666.7M transactions matched an independent public dataset, row for row. Keep the comparison job, and rerun it after every significant change.
For reconciliation workloads (stablecoin supply by chain, custody balances, treasury), add a fifth: totals in your rows tie to totals the chain reports directly, such as a token's total supply at a block.
Operations and disaster recovery
Measure your system apart from the chains
Chains halt, slow down and reorganize. Your monitoring should tell you whether a delay is the chain's or yours. Track, per chain:
- Head lag: your newest block against an independent view of the chain's head.
- Delivery lag: block time to committed row in your database.
- Reorg depth: anything deeper than the chain normally produces deserves a person.
- Source health: error rates and disagreement between your sources.
What to page on
Page a person for gaps, for a final stream that stops moving while the chain is producing blocks, and for a reorg deeper than your finality rule allows. Most other conditions belong on a dashboard. A pager that rings for every slow RPC call gets muted, and then it misses the real one.
Rebuild from nothing, and drill it
Everything in the deployment should be reproducible from three things: configuration in version control, your database backups, and a written runbook. Then test it. Rebuild on fresh machines, time it, and fold every gap you hit back into the runbook. Our last drill (2026-10-14) took our core systems from nothing to running in 8.5 minutes.
Decide in advance what a lost hour costs. Live data can be re-read from the chain after an outage, so the real recovery target is "how fast do we catch up", not "can we recover". Size the catch-up speed accordingly.
What drives size and cost
We don't publish prices for these deployments, because the spread between workloads is wide. These are the levers that set it:
| Driver | Why it matters |
|---|---|
| Number of chains | Each chain adds a source, a finality rule and an on-call surface |
| History depth | "From now on" is cheap. "From genesis" means a large one-time backfill and the storage behind it |
| Latency target | Seconds work with RPC sources. Sub-second usually means your own nodes or the chain's own network |
| Own nodes or RPC | Nodes cost disk and operations. RPC costs usage fees and needs the privacy rules above |
| Early stream | Reading the pending pool needs your own node on that chain |
| Delivery volume | Every transfer on a chain, or only the ones touching your addresses |
| Who runs it | The builder on call, or your team with theirs as backup |
Being specific about the first two is the quickest way to cut cost.
Procurement checklist
Ask any vendor, us included, for a clear answer to each of these:
- Identity and access: Which identities can reach the deployment? Do they come through your identity provider? Is there a break-glass path, and is it logged?
- Network: Which outbound destinations does the deployment need? Can egress be locked to those chain sources alone?
- Data residency: Which region does each part run in? Does any data, including logs and metrics, leave it?
- Encryption: At rest with your keys, in transit everywhere.
- Logs: Do the deployment's logs and audit trail go to your SIEM?
- Subprocessors: Which third parties touch the data? With your own nodes in your cloud, the answer should be none.
- Contracts: MSA and DPA, uptime and incident-response terms, and who carries on-call.
- Exit: If you end the contract, what keeps running, what you keep, and what has to be handed over. Ask what happens if the vendor is acquired.
- Evidence: Ask for measured numbers from a running system: latency, a reconciliation result and a disaster drill.
Related reading
- Enterprise onchain infrastructure: where it runs and who operates it
- The system: each part above, with the number that proves it
- Payments and fintech: workloads that run on this design
- Build vs buy and self-hosting
FAQ
Can onchain data infrastructure run entirely inside our own cloud account?
Yes. The whole pipeline runs in your account: reading blocks, tracking reorgs, your transforms and delivery to your database. Only whole blocks come in from chain sources, and nothing it produces passes through a vendor's systems.
How do we keep our watch list private from RPC providers?
Ask upstream sources only for whole blocks, receipts and the pending pool, and filter to your addresses inside your own account. Filtered log queries and per-account reads tell a provider exactly what you track, so route any unavoidable contract reads to a node you choose, ideally your own.
How should a pipeline handle chain reorganizations?
Publish two streams. The early stream carries every block as soon as it's seen, plus a removal notice if a reorg drops it. The final stream carries only blocks past the chain's reorg risk. Ledgers and compliance records read the final stream; trading and user-facing screens can read the early one.
Do we need to run our own blockchain nodes?
Not always. RPC providers are a fine source as long as you request whole blocks and receipts. Your own nodes make sense when you need sub-second latency, a pending-transaction stream, or zero third parties in the data path.
How do we prove the data is complete and correct?
Check every block is present and links to its parent, make every write idempotent, run backfill and live data through the same code, and reconcile the output against an independent dataset. We matched 666.7M of 666.7M Ethereum transactions from a year-long backfill this way.
Who runs the deployment day to day?
Either the builder operates it inside your account through access you grant and can revoke, or your engineers run it with the builder on call. We do both.
We build and run this for you.
In your cloud, your rack or ours. Tell us what it has to watch and where it has to run, and an engineer will scope it with you.
Talk to an engineer