history from an indexer on our infra, through the relay #23
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent: #3
Scope
The wallet does not scan blocks. Define the history query the wallet needs (transfers in and out, reversible schedule/cancel/execute, wormhole exits, per account, paginated by block) and serve it from our infrastructure: either blackbeard.observer's database through a new
/v1route, or a smallwallet-apirelay crate in this workspace that fronts it. The wallet caches results locally in SQLite so history is readable offline.Operator decision to record here before starting
Observer route or relay crate. The relay is needed anyway for swaps (#7) and ramps (#8); the question is whether history joins it or stays with the observer.
Acceptance
An account's history in the wallet matches what explorer.quantus.com shows for the same account, and loads from cache with the network down.
Depends on
Chain profiles. Parallel with the transfer child.
Decision taken as a working default (overturn here if wrong): history comes from the observer, not a relay.
Why: blackbeard.observer already indexes every chain the wallet has a profile for (quantus, planck; heisenberg too) and already serves
GET /v1/chains/{chain}/accounts/{address}with the account's merged event and extrinsic activity, keyset-paginated bybefore_height,before_source,before_index, 100 rows a page, CORS open for GET, behind the same nginx on oolon the node endpoints will use. Transfers in and out, reversible schedule/cancel/execute and wormhole exits are all rows in that feed with the addresses already mapped to SS58. So the wallet reads that route through aHistorySourceport inwallet-corewith an observer adapter inwallet-data, filters the rows it cares about, and caches them in SQLite under the data directory so history reads with the network down.What this leaves for later, on the observer side: a dedicated transfers-only route (
accounts/{address}/transfers) that filters on the server and pages by height alone. The existing GIN and(chain, height desc, event_index desc)indexes already serve it; it is an optimisation, not a prerequisite, and it ships as a Rust change alone (no asset or deploy change).The relay crate stays reserved for swaps (#7) and ramps (#8), where the wallet needs something that is not a public read.
Profiles gain an
indexerURL (https://blackbeard.observer/v1/chains/quantus,…/planck); the dev profile has none, and the history screen says so rather than pretending.