Skip to content

Bug: list_markets returns corrupted hash data at certain offsets #1346

@rolandgem

Description

@rolandgem

Problem

list_markets (both settled and unsettled) returns rows with corrupted hash data at certain pagination offsets. The error:

failed to list markets: row 1: failed to decode hash as hex or base64 (len=42, data="XlGscrhGH4UukrFIQgfNDZpC50hbh4SJIlQPlig7k="): illegal base64 data at input byte 41

This started on 2026-03-26 ~05:34 UTC on testnet. Multiple offsets are affected (offset=100 for unsettled, offsets 200/2900/6300/15000/15500/16100/19800 for settled).

Impact

Our market maker bot was down for ~30 hours because market discovery pagination aborted on the first error, returning zero active markets.

We've worked around this on our side by skipping bad pages and continuing pagination, but the underlying data corruption should be investigated.

Reproduction

from trufnetwork_sdk_py.client import TNClient
client = TNClient(url="https://gateway.testnet.truf.network", token="...")
# This will fail:
client.list_markets(settled_filter=False, limit=100, offset=100)

CC @MicBun

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions