You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rewrite of the Akash blockchain indexer as an encapsulated app with its own database and, eventually, its own public REST API. Design doc and discussion live in the Linear project (see CON-803).
4
+
5
+
One codebase, several processes. The role is picked at runtime:
6
+
7
+
```
8
+
INDEXER_ROLE = sync | backfill | api | jobs
9
+
NETWORK = mainnet | sandbox | testnet
10
+
```
11
+
12
+
Currently implemented: `sync` (live tail with per-block atomic commits, advisory-lock leader election, parent-hash continuity check) and a minimal `api` (healthz + status). `backfill` and `jobs` exit with `ROLE_NOT_IMPLEMENTED`.
RPC endpoints default to the network's public nodes from `@akashnetwork/net`; override with a comma-separated `RPC_NODE_ENDPOINTS`. With no checkpoint in the database, sync starts at the current chain tip (set `SYNC_START_HEIGHT` to start elsewhere). Migrations run automatically on boot.
24
+
25
+
```bash
26
+
npm run dev
27
+
```
28
+
29
+
Then check progress:
30
+
31
+
```bash
32
+
curl localhost:3092/v1/status
33
+
```
34
+
35
+
The checkpoint height should advance as blocks land in `cosmos.blocks`, `cosmos.transactions`, and `cosmos.messages`.
ALTERTABLE"cosmos"."messages" ADD CONSTRAINT"messages_type_id_message_types_id_fk"FOREIGN KEY ("type_id") REFERENCES"cosmos"."message_types"("id") ON DELETE no action ONUPDATE no action;--> statement-breakpoint
44
+
CREATEUNIQUE INDEX "message_types_type_idx" ON"cosmos"."message_types" USING btree ("type");--> statement-breakpoint
45
+
CREATEINDEX "messages_type_id_idx" ON"cosmos"."messages" USING btree ("type_id");--> statement-breakpoint
46
+
CREATEINDEX "transactions_hash_idx" ON"cosmos"."transactions" USING btree ("hash");
0 commit comments