Skip to content

Problem: operators can't tell when they must install a release #1495

Description

@MicBun

When a new TN release comes out and I run my own node, I want to know whether I must install it and by which block, so my node keeps following the chain instead of stopping at the first block it computes differently.

What happens

A release page lists only the merged pull requests. None of v2.6.4 to v2.6.8 says whether mainnet must take it, from which block or by when. From the code changes between the tags, three of the five change how mainnet runs blocks:

  • v2.6.4: required
  • v2.6.5: required from mainnet block 3078596, where actions that call a method only v2.6.5 has were applied, and before its consensus change at block 3115000
  • v2.6.8: required once migration 063 ran on mainnet

The notice was short. v2.6.5 was published on 5 Nov 2026 at 12:59 UTC. Mainnet applied actions that call a method only v2.6.5 has in block 3078596 at 22:32 UTC the same day, 9 h 33 min later, and a node on v2.6.4 computes a different result from that block on. v2.6.8 was published on 16 Nov at 15:31 UTC, and migration 063, applied in one transaction with a new settle_market that calls tn_utils.parse_attestation_outcome, a method only v2.6.8 has, ran on mainnet in block 3198504 at 23:12 UTC the same day, 7 h 41 min later. The migration's header asks for the new binary first only on the nodes that the public gateway and RPC serve from.

The upgrade guide covers an in-place upgrade that does not change consensus and a network migration with a new genesis. It has no case for an in-place upgrade that is required by a block. It tells operators to look for a "migration required" flag that no release has carried, and to check "official announcements" without saying where they go out. The container image guide falls back to latest when TN_NODE_TAG is unset, and the tag its example sets, v0.15.0, is not a published image. The AMI template runs latest, and nothing pulls it again on its own.

A node on an older release keeps running until a block's app hash differs from the network's. It then halts with AppHash mismatch, halting the node, and Restart=always or restart: unless-stopped starts it into the same block again.

  • Release pages: https://github.com/trufnetwork/node/releases
  • Migration 063's apply order:
    * Apply order: the binary that knows ids 13 to 16 and
    * parse_attestation_outcome goes on every node kgw or our RPC serves from
    * first. Then the new settle_market and create_market and this file go out in
    * one atomic exec-sql, never this file first:
    *
    * - testnet: settle_market and create_market from
    * 032-order-book-actions.sql, then this file.
    * - mainnet: settle_market from 032-order-book-actions.sql (it names no
    * bridge, and 032.prod has no copy of it), create_market from
    * 032-order-book-actions.prod.sql, then this file. The create_market in
    * 032-order-book-actions.sql charges its fee through hoodi_tt, which
    * mainnet does not have. The full 032 followed by the full 032.prod, then
    * this file, is the other allowed form.
    *
    * A v2 market created before the new create_market skips its argument checks,
    * and one reaching the old settle_market is quarantined on 'unsupported
    * action_id'. Once this file is applied the binary cannot be rolled back.
  • The new settle_market call:
    $outcome_code INT := tn_utils.parse_attestation_outcome($result_canonical);
  • What the upgrade guide covers:
    This page describes the **most common upgrade path – an in-place binary upgrade that does *not* change consensus rules** (i.e. no schema or protocol breaking changes).
    and
    ## Breaking Changes & Migrations
    When a new version introduces consensus-breaking changes, a simple binary replacement is **not sufficient**.
    These scenarios require a **network migration** (offline or zero-downtime) and coordination with the core team.
  • The announcements and the flag:
    - Check official announcements for specific migration instructions
    and
    If your target version mentions a *migration required* flag in the release notes, **contact the TRUF.NETWORK team before proceeding**.
  • latest in the guide and the AMI template:
    image: ghcr.io/trufnetwork/node:${TN_NODE_TAG:-latest}
    entrypoint: ["sh", "-c", "for i in $$(seq 60); do pg_isready --host=postgres --username=postgres --quiet && break; sleep 1; done; exec psql --host=postgres --username=postgres --no-psqlrc --set=ON_ERROR_STOP=1 --file=/app/postgres-roles.sql"]
    restart: "no"
    depends_on:
    postgres:
    condition: service_healthy
    tn-node:
    image: ghcr.io/trufnetwork/node:${TN_NODE_TAG:-latest}
    ,
    Compose automatically loads variables from a `.env` file in the same directory. At a minimum set the node image tag you want to run (for example the latest release) and optionally pre-fill auto-setup values:
    ```dotenv
    TN_NODE_TAG=v0.15.0
    and
    image: ghcr.io/trufnetwork/node:latest
    container_name: tn-postgres-roles
    entrypoint: ["sh", "-c", "for i in $$(seq 60); do pg_isready --host=tn-postgres --username=postgres --quiet && break; sleep 1; done; exec psql --host=tn-postgres --username=postgres --no-psqlrc --set=ON_ERROR_STOP=1 --file=/app/postgres-roles.sql"]
    depends_on:
    tn-postgres:
    condition: service_healthy
    networks:
    - tn-network
    restart: "no"
    tn-node:
    image: ghcr.io/trufnetwork/node:latest
  • The halt on a different app hash: https://github.com/trufnetwork/kwil-db/blob/83d68e65c71b280b0a0b983155a3c320db18e421/node/consensus/follower.go#L437-L458
  • The restart setting in the operator guide:
    ExecStart=$(which kwild) start -r $HOME/truf-node-operator/my-node-config
    Restart=always
    RestartSec=10

Scope

  • Each release page opens with one line that says whether mainnet and testnet must take the release and, when they must, from which block and about when in UTC. A release whose page lacks that line fails its build in release.yaml and publish-node-image.yaml, and gets no binaries and no image.
  • A release that mainnet must take is announced a stated number of days before its mainnet block, and a migration that needs a new binary waits for that block too. Where a rule can wait on an on-chain parameter, as in the MAA rollout, its height can move if operators need more time.
  • The upgrade guide covers a required in-place upgrade, names where release notices go out, and shows the halt line an outdated node logs and how to recover.
  • The guides and the AMI template name a release tag rather than latest, and tn-node-update takes the release tag to move to (for example a TN_NODE_TAG in /opt/tn/.env), so an AMI node can install a required release.

Acceptance criteria

  • The next release page's first line says required or optional, with the mainnet and testnet blocks and an approximate UTC date when it is required.
  • release.yaml and publish-node-image.yaml fail for a release whose page lacks that line, and latest does not move.
  • The upgrade guide states the minimum notice before a required release's mainnet block, and has a section for a required in-place upgrade with the halt line and the recovery steps.
  • git grep finds no node:latest and no TN_NODE_TAG:-latest in the guides or the AMI template, and the container image guide's example tag is a published image.
  • On an AMI node, tn-node-update with a release tag installs that release.

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions