Repository navigation
Releases: threefoldtech/ledger_graphql
Release list
v2.13.0
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.lockremoved. Usenpm ci. seed-versions.shno longer passes a--typesBundleflag 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
What's Changed
- Save new accountID for twin entity during update event by @sameh-farouk in #204
Full Changelog: v2.12.2...v2.12.3
v2.12.2
v2.12.1
What's Changed
- fix: matching ip address with gateway by @sameh-farouk in #178
- Bump version to 2.12.1 by @sameh-farouk in #180
- Adding makefile version-bump by @sameh-farouk in #179
Full Changelog: v2.12.0...v2.12.1
v2.12.0
What's Changed
- fix: Fixing pricing-policy ID 0 for some farms by @sameh-farouk in #164
- update nodejs to 20.12.2 LTS by @sameh-farouk in #166
- feat: track historical power events by @sameh-farouk in #165
- fmt: fix inconsistent use of spaces in indentation by @sameh-farouk in #168
- feat: log when we encouter unknow event hash by @sameh-farouk in #170
- patch: fix bad merge by @sameh-farouk in #173
- feat: Track historical tft prices by @sameh-farouk in #169
- fix: parse publicConfig V118 by @sameh-farouk in #172
- use use ghcr.io in docker-compose file by @sameh-farouk in #174
- fix: init cockroach cluster settings in indexer docker-compose by @sameh-farouk in #175
- fix: Validate ip addresses by @sameh-farouk in #176
- bump version 2.12.0 by @sameh-farouk in #177
Full Changelog: v2.11.9...v2.12.0
v2.11.9
What's Changed
- Fix serviceContractCanceled mapping by @sameh-farouk in #161
- bump version 2.11.9 by @sameh-farouk in #163
Full Changelog: v2.11.8...v2.11.9
v2.11.8
What's Changed
- Fix: Switch to restcountries v3 API and use common country name by @sameh-farouk in #158
- bump version 2.11.8 by @sameh-farouk in #159
Full Changelog: v2.11.7...v2.11.8
v2.11.7
What's Changed
- fix soultion provider ID, deployment data and hash by @sameh-farouk in #155
- bump version 2.11.7 by @sameh-farouk in #156
Full Changelog: v2.11.6...v2.11.7
v2.11.6
What's Changed
- Fix: fix broken region information by @sameh-farouk in #150
- apply contract type changes by @sameh-farouk in #152
- bump version 2.11.6 by @sameh-farouk in #153
New Contributors
- @sameh-farouk made their first contribution in #150
Full Changelog: v2.11.5...v2.11.6
v2.11.5
What's Changed
- Master fix node country decoding by @mariobassem in #145
Full Changelog: v2.11.4...v2.11.5