Skip to content

Releases: threefoldtech/ledger_graphql

v2.13.0

Choose a tag to compare

@sameh-farouk sameh-farouk released this 26 Jul 20:55
cf2bef9

First release since v2.12.3 (2025-10-02). Mostly indexing-correctness fixes, and one of them is why a resync is needed.

⚠️ A full processor resync is required

Every fix below is in a mapping handler — they change how chain events become entities. Rows already written by the previous handlers are not retroactively corrected. Deploying without a resync leaves a database that is correct for new blocks and wrong for old ones, which is harder to work with than being uniformly wrong.

Resync per network, following the usual devnet → qanet → testnet → mainnet order.

Indexing correctness

Node certification was always recorded as Diy. newNode.certification was hardcoded and never read from the event payload, so every node appeared as DIY regardless of its real certification. Now decoded per runtime version (v28, v43, current), falling back to Diy only where the event genuinely carries no certification.

Public IPs were silently dropped. Every IP in a FarmStored/FarmUpdated event was given the same entity id (item.event.id), so a farm with several public IPs kept only one. Ids are now suffixed per index.

Unawaited writes in IP and public-config handling. publicIps.forEach(async ip => …) never awaited its callbacks, and return inside the callback skipped only that iteration rather than the surrounding logic. Converted to for loops with continue, so writes complete and control flow does what it reads like.

Rent contracts were never updated. ContractUpdated handled node and name contracts only, so a RentContract kept its original values forever. It is now looked up and updated alongside the others.

Contracts in grace period were recorded as OutOfFunds. The state switch had no GracePeriod case and defaulted everything unmatched to OutOfFunds. State parsing is now shared between the node and rent paths, with GracePeriod handled.

dedicatedFarm was always false on older data. Existing indexer snapshots were built with a typesBundle carrying a typo — "dedicatedFarm:", with a trailing colon, as the JSON key — so the processor never found the field it expected. Farm events now read the value from either key. This workaround exists only until every indexer has been resynced with the corrected bundle.

Unknown event versions failed silently. ContractGracePeriodStarted and ContractGracePeriodEnded produced an undefined contract id when the event version was not recognised, then carried on. They now log an error naming the event and stop, so a missing type shows up instead of quietly corrupting a row.

Public configs are no longer invented. A PublicConfig entity was constructed even when the event carried none.

Performance

25 indexes added to the fields actually used for lookups — twinID, farmID, nodeID, contractID, state, timestamp, name, ip, certification, dedicatedFarm — with migration 1775123913074-Data.js. They are plain CREATE INDEX, so on a populated table they would take ACCESS EXCLUSIVE locks and stall the processor and API; resyncing onto an empty database avoids that entirely.

Type generation

Type definitions are no longer maintained by hand. typegen/tfchainVersions.jsonl is an append-only log of runtime metadata from all networks and is now the single source of truth for squid-substrate-typegen, with scripts/seed-versions.sh discovering versions per network in deployment order. src/types/ is generated output and should not be edited directly. See docs/typeChanges.md.

Note the ordering rule documented there: deploy the processor before a runtime upgrade goes live. If the chain upgrades first, unrecognised event hashes are skipped and those blocks are never revisited, which forces exactly the resync this release already needs.

Development and deployment

  • Postgres now uses a named volume (postgres-data) instead of an anonymous one. Existing compose stacks will come up against a fresh volume — their old data is still on disk but no longer attached, which in practice means starting from an empty database. That aligns with the resync above.
  • Compose stacks and shared networking reworked so the indexer and processor stacks can talk to each other predictably.
  • Standardised on npm; yarn.lock removed. Use npm ci.
  • seed-versions.sh no longer passes a --typesBundle flag that the tool ignores.
  • Dead code, unused imports removed and certification helpers extracted.

Documentation and licensing were also brought in line with the Ledger naming, with no behavioural effect.

Full changelog: v2.12.3...v2.13.0

Release v2.12.3

Choose a tag to compare

@sameh-farouk sameh-farouk released this 02 Oct 08:08
0095208

What's Changed

Full Changelog: v2.12.2...v2.12.3

v2.12.2

Choose a tag to compare

@sameh-farouk sameh-farouk released this 02 Sep 18:53
d48f3e8

What's Changed

Full Changelog: v2.12.1...v2.12.2

v2.12.1

Choose a tag to compare

@sameh-farouk sameh-farouk released this 29 May 11:31
055136b

What's Changed

Full Changelog: v2.12.0...v2.12.1

v2.12.0

Choose a tag to compare

@sameh-farouk sameh-farouk released this 27 May 11:36
05ea7d3

What's Changed

Full Changelog: v2.11.9...v2.12.0

v2.11.9

Choose a tag to compare

@sameh-farouk sameh-farouk released this 07 Apr 14:15
7eac56b

What's Changed

Full Changelog: v2.11.8...v2.11.9

v2.11.8

Choose a tag to compare

@sameh-farouk sameh-farouk released this 22 Feb 15:03
80d44a4

What's Changed

Full Changelog: v2.11.7...v2.11.8

v2.11.7

Choose a tag to compare

@sameh-farouk sameh-farouk released this 04 Feb 14:39
efe065d

What's Changed

Full Changelog: v2.11.6...v2.11.7

v2.11.6

Choose a tag to compare

@sameh-farouk sameh-farouk released this 24 Jan 12:07
d7ce510

What's Changed

New Contributors

Full Changelog: v2.11.5...v2.11.6

v2.11.5

Choose a tag to compare

@sameh-farouk sameh-farouk released this 19 Dec 16:55
da00000

What's Changed

Full Changelog: v2.11.4...v2.11.5