Duniter-squid version 0.2.8

Duniter squid version 0.2.8 is out. It’s adding the information of the account creation block as suggested in Ğ1nkgo v2 support progress, plan and pubkeys/address proposal. This will in particular allow to know if the account existed in v1 (and so b58 pubkey could be displayed to the user to avoid address change) or was created in v2.

The expireOn field of identities has been fixed, see the schema for more info about its meaning.

One of my indexers is up to date, the other is indexing.

[edit] the 0.2.9 is being checked with a fix on genesis cert updatedOn field and the pre-genesis expireOn estimations

3 Likes

Thanks indeed @HugoTrentesaux.

I will be great if we can query the current version of the schema using by a node, in order to detect which nodes are up-to-date and which are not. I don’t know if this can be done already.

Better if this version uses https://semver.org/ so we can compare programmaticly better.

This is needed in order to adapt our clients code to future schema changes properly and prevent runtime errors.

1 Like

For instance I still get different schemas as I mentioned here.

$ npx get-graphql-schema https://gdev-indexer.p2p.legal/v1/graphql > /tmp/sc1
$ npx get-graphql-schema https://squid.gdev.coinduf.eu/v1/graphql > /tmp/sc2
$ view -d /tmp/sc1 /tmp/sc2

cc @poka

I probably should stop this one, please start one.

I’ll already have one. The thing is how to know the schema version of each node.

I agree. #40 aims to expose the version of the indexer through the API. For the moment, there were very frequent breaking changes, so I just kept incrementing minor version number, but we should soon move to a cleaner version numbering scheme. I did not make the effort to do it properly because of the lack of response to indexer updates, but if I see more people installing indexers, I’ll put more effort in it.

1 Like

Hi again @HugoTrentesaux.

I’m trying to play with this to later implement it in the client. I think you added identity.createdOn. Then, if I do a query:

query GetNewAccounts {
  account(where: { identity: { createdOn: { _neq: 0 } } }) {
    id
    isActive
    identity {
      id
      isMember
      name
      accountId
      status
      createdOn
      account {
        isActive
      }
      index
    }
  }
}

I only find in our test environment 5 accounts with identities that I will show with the new addressing.

What about accounts without identity?

For instance, my old v1 account (migrated by Gecko):

query GetSomeAccount {
  account(where: { id: { _eq: "5DpRqhjEof2WMFoAYTAqqoQzyBH9zRRmAbBZGQm9uZSzNeY6" } }) {
    id
    isActive
    identity {
      id
      isMember
      name
      accountId
      status
      createdOn
      account {
        isActive
      }
      index
    }
  }
}

Returns:

{
  "data": {
    "account": [
      {
        "id": "5DpRqhjEof2WMFoAYTAqqoQzyBH9zRRmAbBZGQm9uZSzNeY6",
        "isActive": true,
        "identity": null
      }
    ]
  }
}

In other words, I missing a way to know if a simple wallet/account was created in v1 or not.

This one was already there. The one I added is account.createdOn:

The corresponding query is:

query GetNewAccounts {
  account(limit: 10, where: {createdOn: {_gt: 0}}) {
    id
    identity { name }
  }
}
{
  "data": {
    "account": [
      {
        "id": "5E6q47RRGZU15LjUiBTm2DZjpqFKAjRNafYS8YV8AzTQZtLG",
        "identity": {
          "name": "cgeek"
        }
      },
      {
        "id": "5Dq8xjvkmbz7q4g2LbZgyExD26VSCutfEc6n4W4AfQeVHZqz",
        "identity": {
          "name": "HugoTrentesaux"
        }
      },
      {
        "id": "5HDikVWZ2xHfqvVVFwex5zmRsH4LuR3KqMgKZYEbCSjStSKw",
        "identity": {
          "name": "moul"
        }
      },
      {
        "id": "5CQ8T4qpbYJq7uVsxGPQ5q2df7x3Wa4aRY6HUWMBYjfLZhnn",
        "identity": {
          "name": "poka"
        }
      },
      {
        "id": "5F6xAX1k6eRKUGrF7exifKcS2K2SB781Cn6soV1kahjwkGpg",
        "identity": {
          "name": "14572"
        }
      },
      {
        "id": "5CfodrEFe64MJtWvfhTHYBuUySr4WXLv2B41mZFucTXSGMFA",
        "identity": null
      },
      {
        "id": "5Cw6cF46Et7hpGXAnYD1XeEMQrfuPioMq4nyrVpUzcHvi575",
        "identity": null
      },
      {
        "id": "5GBVhdJUdsGhxozu6R8X6x2pTZvuuW46s7JSU4tiW7Zd3WmY",
        "identity": {
          "name": "Pini"
        }
      },
      {
        "id": "5Epo9NJL5TpEWBhDobZoWK8yezCYnDg9dTXMB486LhdzWz85",
        "identity": null
      },
      {
        "id": "5CJKhFCpdSpumgWjSZ3TQmejJuHV6iELJrtdrfs38SXuiQeB",
        "identity": null
      }
    ]
  }
}

As you can see, some accounts have associated identities, some don’t (null).

Thanks for your question :slight_smile:

This helps me clarify the schema available here: schema.graphql · main · nodes / duniter-squid · GitLab. I will add more documentation in it.

1 Like