# Duniter-indexer changelog

**URL:** https://forum.duniter.org/t/duniter-indexer-changelog/10076
**Category:** Indexers
**Created:** [25 November 2022 12:51 UTC](https://forum.duniter.org/t/duniter-indexer-changelog/10076 "2022-11-25T12:51:31Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![ManUtopiK](https://forum.duniter.org/user_avatar/forum.duniter.org/manutopik/32/29_2.png) [@ManUtopiK](https://forum.duniter.org/u/ManUtopiK)
#### Post date: [25 November 2022 12:51 UTC](https://forum.duniter.org/t/duniter-indexer-changelog/10076/1 "2022-11-25T12:51:31Z")

</div>

We’ve worked on it at the last hackathon and few days after at home with @poka.

 ![image](https://forum.duniter.org/uploads/default/original/2X/a/acb17f5179a163b2300860f11eb156f8fce02003.png)

# List on what’s have done :

### Docker

- build docker image of the indexer itself and another one for Hasura with migration
- configuring the CI to auto publish docker images
- refactoring docker-compose with `prod`, `dev` and `test` mode
  - prod : launch all pre-configured services
  - dev : launch all needed services, but not the indexer
  - test : launch duniter-rpc with **sealing mode**

### Hasura

- bump Hasura version
- refactoring database :
  - with name as the primary key of identity table
  - renaming block index
  - renaming id to pubkey

### Fastify

- fill database directly with real sql queries and not through graphQL : **more than [x2 faster!](https://git.duniter.org/manutopik/duniter-indexer/-/blob/master/benchmark.md?plain=1)**
- refactoring the process block mechanism with an event emitter
- remove `fastify-hasura` and `vite-node` dependencies, which simplify docker workflow
- started writing test with Vitest and fake data with Polkadot
- indexing the true **Ğ1 genesis and all transactions !**

### Frontend

- designed awesome logo
- refactored frontend and integrate anu-vue UI lib
- update graphiQL to the latest
- toggle mode relay graphQL API
- display latest finalized block

You can take a look online here :  
[https://gdev-indexer-graphiql.p2p.legal](https://gdev-indexer-graphiql.p2p.legal)

---

<div class="post-metadata">

### Author: ![HugoTrentesaux](https://forum.duniter.org/user_avatar/forum.duniter.org/hugotrentesaux/32/6396_2.png) [@HugoTrentesaux](https://forum.duniter.org/u/HugoTrentesaux)
#### Post date: [25 November 2022 14:30 UTC](https://forum.duniter.org/t/duniter-indexer-changelog/10076/2 "2022-11-25T14:30:53Z")

</div>

Is it easy to enable the GraphiQL plugin for click-only request? (the one with the checkboxes on the left which is enabled in Hasura console).

---

<div class="post-metadata">

### Author: ![ManUtopiK](https://forum.duniter.org/user_avatar/forum.duniter.org/manutopik/32/29_2.png) [@ManUtopiK](https://forum.duniter.org/u/ManUtopiK)
#### Post date: [25 November 2022 15:20 UTC](https://forum.duniter.org/t/duniter-indexer-changelog/10076/3 "2022-11-25T15:20:38Z")

</div>

Do you mean this one ? [GitHub - OneGraph/graphiql-explorer: Explorer plugin for GraphiQL](https://github.com/OneGraph/graphiql-explorer)  
I will try to add it…

---

<div class="post-metadata">

### Author: ![Moul](https://forum.duniter.org/user_avatar/forum.duniter.org/moul/32/9145_2.png) [@Moul](https://forum.duniter.org/u/Moul)
#### Post date: [12 December 2022 18:08 UTC](https://forum.duniter.org/t/duniter-indexer-changelog/10076/4 "2022-12-12T18:08:44Z")

</div>

Can we move the repository to a group, where we would find it more easily?  
It could be moved into the `nodes` group. I created the [`indexers` group](https://git.duniter.org/indexers).  
Which one fits best?

---

<div class="post-metadata">

### Author: ![HugoTrentesaux](https://forum.duniter.org/user_avatar/forum.duniter.org/hugotrentesaux/32/6396_2.png) [@HugoTrentesaux](https://forum.duniter.org/u/HugoTrentesaux)
#### Post date: [12 December 2022 18:36 UTC](https://forum.duniter.org/t/duniter-indexer-changelog/10076/5 "2022-12-12T18:36:00Z")

</div>

Not sure which is the best between nodes and indexers. Depends whether we aim for precise categories or easy to find software.

---

<div class="post-metadata">

### Author: ![ManUtopiK](https://forum.duniter.org/user_avatar/forum.duniter.org/manutopik/32/29_2.png) [@ManUtopiK](https://forum.duniter.org/u/ManUtopiK)
#### Post date: [12 December 2022 20:17 UTC](https://forum.duniter.org/t/duniter-indexer-changelog/10076/6 "2022-12-12T20:17:21Z")

</div>

> [@Moul](#):
>
> Can we move the repository to a group, where we would find it more easily?

Sure, good idea! Everywhere you want 🙂  
I don’t know which [group](https://git.duniter.org/dashboard/groups) fit the best. Maybe tools ? Or nodes ? Websites ? I really don’t know. Feel free to move it ! I’ll adapt myself…

---

<div class="post-metadata">

### Author: ![Moul](https://forum.duniter.org/user_avatar/forum.duniter.org/moul/32/9145_2.png) [@Moul](https://forum.duniter.org/u/Moul)
#### Post date: [16 December 2022 09:55 UTC](https://forum.duniter.org/t/duniter-indexer-changelog/10076/7 "2022-12-16T09:55:23Z")

</div>

I deleted the `indexers` group, and [moved this repository into `nodes` group](https://git.duniter.org/nodes/duniter-indexer).  
There is not much item at the root of this group.

---

<div class="post-metadata">

### Author: ![ManUtopiK](https://forum.duniter.org/user_avatar/forum.duniter.org/manutopik/32/29_2.png) [@ManUtopiK](https://forum.duniter.org/u/ManUtopiK)
#### Post date: [16 December 2022 10:10 UTC](https://forum.duniter.org/t/duniter-indexer-changelog/10076/8 "2022-12-16T10:10:02Z")

</div>

Ok, thanks a lot. I’ll change my remote url.  
ping @poka

---

<div class="post-metadata">

### Author: ![HugoTrentesaux](https://forum.duniter.org/user_avatar/forum.duniter.org/hugotrentesaux/32/6396_2.png) [@HugoTrentesaux](https://forum.duniter.org/u/HugoTrentesaux)
#### Post date: [23 January 2023 11:26 UTC](https://forum.duniter.org/t/duniter-indexer-changelog/10076/9 "2023-01-23T11:26:28Z")

</div>

Do we need to change something in the config of [https://gdev-indexer-graphiql.p2p.legal/](https://gdev-indexer-graphiql.p2p.legal/)? It says `"NetworkError when attempting to fetch resource."`. @poka?

---

<div class="post-metadata">

### Author: ![poka](https://forum.duniter.org/user_avatar/forum.duniter.org/poka/32/6827_2.png) [@poka](https://forum.duniter.org/u/poka)
#### Post date: [23 January 2023 11:33 UTC](https://forum.duniter.org/t/duniter-indexer-changelog/10076/10 "2023-01-23T11:33:19Z")

</div>

yes i have to dig it.

---

<div class="post-metadata">

### Author: ![poka](https://forum.duniter.org/user_avatar/forum.duniter.org/poka/32/6827_2.png) [@poka](https://forum.duniter.org/u/poka)
#### Post date: [23 January 2023 11:53 UTC](https://forum.duniter.org/t/duniter-indexer-changelog/10076/11 "2023-01-23T11:53:54Z")

</div>

you should use hasura console instead for now

[https://gdev-indexer.p2p.legal/console](https://gdev-indexer.p2p.legal/console)

---

<div class="post-metadata">

### Author: ![HugoTrentesaux](https://forum.duniter.org/user_avatar/forum.duniter.org/hugotrentesaux/32/6396_2.png) [@HugoTrentesaux](https://forum.duniter.org/u/HugoTrentesaux)
#### Post date: [6 March 2023 20:46 UTC](https://forum.duniter.org/t/duniter-indexer-changelog/10076/12 "2023-03-06T20:46:08Z")

</div>

Does it have something to do with `INDEXER_HASURA_GRAPHQL_ENDPOINT_GRAPHIQL` in the `docker-compose.yml`?

```auto
services:
  app:
    image: duniter/duniter-indexer:latest
    environment:
      - POSTGRES_HOST=postgres
      - INDEXER_DUNITER_WS_ENDPOINT=ws://duniter-rpc:9944
      - INDEXER_DUNITER_WS_ENDPOINT_GRAPHIQL=${INDEXER_DUNITER_WS_ENDPOINT_GRAPHIQL}
      - INDEXER_HASURA_GRAPHQL_ENDPOINT_GRAPHIQL=${INDEXER_HASURA_GRAPHQL_ENDPOINT_GRAPHIQL}
    restart: unless-stopped
    ports:
      - "3000:3000"
    depends_on:
      - duniter-rpc
      - postgres
      - graphql-engine

```

How can we fix it?

---

<div class="post-metadata">

### Author: ![ManUtopiK](https://forum.duniter.org/user_avatar/forum.duniter.org/manutopik/32/29_2.png) [@ManUtopiK](https://forum.duniter.org/u/ManUtopiK)
#### Post date: [7 March 2023 12:42 UTC](https://forum.duniter.org/t/duniter-indexer-changelog/10076/13 "2023-03-07T12:42:23Z")

</div>

I think currently the bug come from a configuration mistake.  
`INDEXER_DUNITER_WS_ENDPOINT_GRAPHIQL` should be the public websocket endpoint.  
`INDEXER_HASURA_GRAPHQL_ENDPOINT_GRAPHIQL` should be the public hasura endpoint. ([https://gdev-indexer.p2p.legal](https://gdev-indexer.p2p.legal))

---

<div class="post-metadata">

### Author: ![HugoTrentesaux](https://forum.duniter.org/user_avatar/forum.duniter.org/hugotrentesaux/32/6396_2.png) [@HugoTrentesaux](https://forum.duniter.org/u/HugoTrentesaux)
#### Post date: [7 March 2023 14:08 UTC](https://forum.duniter.org/t/duniter-indexer-changelog/10076/14 "2023-03-07T14:08:04Z")

</div>

Oh, thanks, I did not have the strength to dig in the code to see what it was supposed to be.  
So for example?

```auto
- INDEXER_DUNITER_WS_ENDPOINT_GRAPHIQL="wss://gdev.coinduf.eu/ws"
- INDEXER_HASURA_GRAPHQL_ENDPOINT_GRAPHIQL="https://hasura.gdev.coinduf.eu/"

```

I set these ones, but the app is still unavailable: [https://indexer.gdev.coinduf.eu/](https://indexer.gdev.coinduf.eu/)

---

<div class="post-metadata">

### Author: ![ManUtopiK](https://forum.duniter.org/user_avatar/forum.duniter.org/manutopik/32/29_2.png) [@ManUtopiK](https://forum.duniter.org/u/ManUtopiK)
#### Post date: [7 March 2023 14:19 UTC](https://forum.duniter.org/t/duniter-indexer-changelog/10076/15 "2023-03-07T14:19:30Z")

</div>

Looks good!

---

<div class="post-metadata">

### Author: ![HugoTrentesaux](https://forum.duniter.org/user_avatar/forum.duniter.org/hugotrentesaux/32/6396_2.png) [@HugoTrentesaux](https://forum.duniter.org/u/HugoTrentesaux)
#### Post date: [7 March 2023 14:20 UTC](https://forum.duniter.org/t/duniter-indexer-changelog/10076/16 "2023-03-07T14:20:44Z")

</div>

You wrote “looks good” at the time I updated my message to say that [https://indexer.gdev.coinduf.eu/](https://indexer.gdev.coinduf.eu/) was an empty page, even with this config.

---

<div class="post-metadata">

### Author: ![ManUtopiK](https://forum.duniter.org/user_avatar/forum.duniter.org/manutopik/32/29_2.png) [@ManUtopiK](https://forum.duniter.org/u/ManUtopiK)
#### Post date: [7 March 2023 14:34 UTC](https://forum.duniter.org/t/duniter-indexer-changelog/10076/17 "2023-03-07T14:34:12Z")

</div>

Remove the double quote :

```auto
- INDEXER_DUNITER_WS_ENDPOINT_GRAPHIQL=wss://gdev.coinduf.eu/ws
- INDEXER_HASURA_GRAPHQL_ENDPOINT_GRAPHIQL=https://hasura.gdev.coinduf.eu/

```

---

<div class="post-metadata">

### Author: ![HugoTrentesaux](https://forum.duniter.org/user_avatar/forum.duniter.org/hugotrentesaux/32/6396_2.png) [@HugoTrentesaux](https://forum.duniter.org/u/HugoTrentesaux)
#### Post date: [7 March 2023 14:36 UTC](https://forum.duniter.org/t/duniter-indexer-changelog/10076/18 "2023-03-07T14:36:08Z")

</div>

Should not change anything in `yaml` file, no?

---

<div class="post-metadata">

### Author: ![ManUtopiK](https://forum.duniter.org/user_avatar/forum.duniter.org/manutopik/32/29_2.png) [@ManUtopiK](https://forum.duniter.org/u/ManUtopiK)
#### Post date: [7 March 2023 15:07 UTC](https://forum.duniter.org/t/duniter-indexer-changelog/10076/19 "2023-03-07T15:07:36Z")

</div>

This config should be in `.env` file or `docker-compose.prod.yaml` file.

---

<div class="post-metadata">

### Author: ![HugoTrentesaux](https://forum.duniter.org/user_avatar/forum.duniter.org/hugotrentesaux/32/6396_2.png) [@HugoTrentesaux](https://forum.duniter.org/u/HugoTrentesaux)
#### Post date: [7 March 2023 15:09 UTC](https://forum.duniter.org/t/duniter-indexer-changelog/10076/20 "2023-03-07T15:09:26Z")

</div>

Right now as I show it (with the `-` before), it is `yaml` in the `docker-compose.yml` file. So I do not feel like I should try without quotes (moreover with the `:` special character)

[Next page](https://forum.duniter.org/t/duniter-indexer-changelog/10076.md?page=2)
