Home / Cardano Foundation / cardano-rosetta-java
Apr 10, 4-5 PM (0)
Apr 10, 5-6 PM (0)
Apr 10, 6-7 PM (0)
Apr 10, 7-8 PM (0)
Apr 10, 8-9 PM (0)
Apr 10, 9-10 PM (0)
Apr 10, 10-11 PM (0)
Apr 10, 11-12 AM (0)
Apr 11, 12-1 AM (0)
Apr 11, 1-2 AM (0)
Apr 11, 2-3 AM (0)
Apr 11, 3-4 AM (0)
Apr 11, 4-5 AM (0)
Apr 11, 5-6 AM (0)
Apr 11, 6-7 AM (0)
Apr 11, 7-8 AM (0)
Apr 11, 8-9 AM (0)
Apr 11, 9-10 AM (0)
Apr 11, 10-11 AM (0)
Apr 11, 11-12 PM (0)
Apr 11, 12-1 PM (0)
Apr 11, 1-2 PM (0)
Apr 11, 2-3 PM (0)
Apr 11, 3-4 PM (0)
Apr 11, 4-5 PM (0)
Apr 11, 5-6 PM (0)
Apr 11, 6-7 PM (0)
Apr 11, 7-8 PM (0)
Apr 11, 8-9 PM (0)
Apr 11, 9-10 PM (0)
Apr 11, 10-11 PM (0)
Apr 11, 11-12 AM (0)
Apr 12, 12-1 AM (0)
Apr 12, 1-2 AM (0)
Apr 12, 2-3 AM (0)
Apr 12, 3-4 AM (0)
Apr 12, 4-5 AM (0)
Apr 12, 5-6 AM (0)
Apr 12, 6-7 AM (0)
Apr 12, 7-8 AM (0)
Apr 12, 8-9 AM (0)
Apr 12, 9-10 AM (0)
Apr 12, 10-11 AM (0)
Apr 12, 11-12 PM (0)
Apr 12, 12-1 PM (0)
Apr 12, 1-2 PM (0)
Apr 12, 2-3 PM (0)
Apr 12, 3-4 PM (0)
Apr 12, 4-5 PM (0)
Apr 12, 5-6 PM (0)
Apr 12, 6-7 PM (0)
Apr 12, 7-8 PM (0)
Apr 12, 8-9 PM (0)
Apr 12, 9-10 PM (0)
Apr 12, 10-11 PM (0)
Apr 12, 11-12 AM (0)
Apr 13, 12-1 AM (0)
Apr 13, 1-2 AM (2)
Apr 13, 2-3 AM (1)
Apr 13, 3-4 AM (0)
Apr 13, 4-5 AM (0)
Apr 13, 5-6 AM (0)
Apr 13, 6-7 AM (0)
Apr 13, 7-8 AM (0)
Apr 13, 8-9 AM (0)
Apr 13, 9-10 AM (0)
Apr 13, 10-11 AM (0)
Apr 13, 11-12 PM (0)
Apr 13, 12-1 PM (0)
Apr 13, 1-2 PM (0)
Apr 13, 2-3 PM (0)
Apr 13, 3-4 PM (0)
Apr 13, 4-5 PM (0)
Apr 13, 5-6 PM (0)
Apr 13, 6-7 PM (0)
Apr 13, 7-8 PM (1)
Apr 13, 8-9 PM (0)
Apr 13, 9-10 PM (0)
Apr 13, 10-11 PM (0)
Apr 13, 11-12 AM (0)
Apr 14, 12-1 AM (0)
Apr 14, 1-2 AM (0)
Apr 14, 2-3 AM (0)
Apr 14, 3-4 AM (0)
Apr 14, 4-5 AM (0)
Apr 14, 5-6 AM (1)
Apr 14, 6-7 AM (5)
Apr 14, 7-8 AM (0)
Apr 14, 8-9 AM (0)
Apr 14, 9-10 AM (0)
Apr 14, 10-11 AM (0)
Apr 14, 11-12 PM (0)
Apr 14, 12-1 PM (0)
Apr 14, 1-2 PM (0)
Apr 14, 2-3 PM (0)
Apr 14, 3-4 PM (0)
Apr 14, 4-5 PM (0)
Apr 14, 5-6 PM (0)
Apr 14, 6-7 PM (0)
Apr 14, 7-8 PM (0)
Apr 14, 8-9 PM (0)
Apr 14, 9-10 PM (0)
Apr 14, 10-11 PM (0)
Apr 14, 11-12 AM (0)
Apr 15, 12-1 AM (0)
Apr 15, 1-2 AM (0)
Apr 15, 2-3 AM (0)
Apr 15, 3-4 AM (0)
Apr 15, 4-5 AM (0)
Apr 15, 5-6 AM (0)
Apr 15, 6-7 AM (0)
Apr 15, 7-8 AM (0)
Apr 15, 8-9 AM (0)
Apr 15, 9-10 AM (0)
Apr 15, 10-11 AM (0)
Apr 15, 11-12 PM (0)
Apr 15, 12-1 PM (0)
Apr 15, 1-2 PM (0)
Apr 15, 2-3 PM (0)
Apr 15, 3-4 PM (0)
Apr 15, 4-5 PM (0)
Apr 15, 5-6 PM (0)
Apr 15, 6-7 PM (0)
Apr 15, 7-8 PM (1)
Apr 15, 8-9 PM (0)
Apr 15, 9-10 PM (0)
Apr 15, 10-11 PM (0)
Apr 15, 11-12 AM (0)
Apr 16, 12-1 AM (0)
Apr 16, 1-2 AM (0)
Apr 16, 2-3 AM (0)
Apr 16, 3-4 AM (0)
Apr 16, 4-5 AM (0)
Apr 16, 5-6 AM (0)
Apr 16, 6-7 AM (0)
Apr 16, 7-8 AM (0)
Apr 16, 8-9 AM (0)
Apr 16, 9-10 AM (0)
Apr 16, 10-11 AM (0)
Apr 16, 11-12 PM (3)
Apr 16, 12-1 PM (0)
Apr 16, 1-2 PM (0)
Apr 16, 2-3 PM (0)
Apr 16, 3-4 PM (0)
Apr 16, 4-5 PM (0)
Apr 16, 5-6 PM (0)
Apr 16, 6-7 PM (0)
Apr 16, 7-8 PM (0)
Apr 16, 8-9 PM (0)
Apr 16, 9-10 PM (0)
Apr 16, 10-11 PM (0)
Apr 16, 11-12 AM (0)
Apr 17, 12-1 AM (0)
Apr 17, 1-2 AM (0)
Apr 17, 2-3 AM (0)
Apr 17, 3-4 AM (0)
Apr 17, 4-5 AM (0)
Apr 17, 5-6 AM (0)
Apr 17, 6-7 AM (2)
Apr 17, 7-8 AM (0)
Apr 17, 8-9 AM (0)
Apr 17, 9-10 AM (0)
Apr 17, 10-11 AM (0)
Apr 17, 11-12 PM (0)
Apr 17, 12-1 PM (0)
Apr 17, 1-2 PM (0)
Apr 17, 2-3 PM (1)
Apr 17, 3-4 PM (1)
Apr 17, 4-5 PM (0)
18 commits this week Apr 10, 2026 - Apr 17, 2026
fix: raise SYNC_GRACE_SLOTS_COUNT default to 200 and enrich gateway error logs
Bumps the default sync grace window from 100 to 200 slots across env files,
Spring config, Helm values, and docs. The previous value caused the synced
flag on /network/status to flap when the HTTP link between rosetta-api and
yaci-indexer was briefly unstable.

Enriches the logs in YaciHttpGatewayImpl for both getStakeAccountRewards
and getDiscoveredPeers: non-2xx branches now include the target URL and
response body alongside the status code, and IOException/InterruptedException
branches include the URL plus the exception (full cause chain) so SSL and
connection errors are visible in the logs.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
fix: update PeerSnapshotServiceImpl for
  cardano-node 10.7.x peer-snapshot format

  cardano-node 10.7.x dropped the legacy
  "domain" relay field — all relay
  addresses (both hostnames and IPs) now use
  the "address" key. The port
  field is also optional in the new format.

  - Detect relay type (domain/IPv4/IPv6) by
  inspecting the address value
    instead of checking for a non-null
  "domain" field
  - Default port to 3001 when the relay entry
  omits the port field
  - Retain "domain" field handling for
  backwards compatibility with
    older snapshot formats
build(docker): harden apt against transient Ubuntu-mirror failures
Drops an /etc/apt/apt.conf.d/99-retries file into every ubuntu:24.04
stage before the first apt call:

  Acquire::Retries "5";
  Acquire::http::Timeout "30";
  Acquire::https::Timeout "30";
  Acquire::http::No-Cache "true";

Motivation: docker compose builds on shared hosts have been hitting
"File has unexpected size" errors from security.ubuntu.com when a
mirror edge is mid-sync. Retries + No-Cache let apt transparently
re-fetch from a fresh mirror instance instead of failing the whole
build. Does not help when the mirror is serving a permanently-wrong
file (nothing does), but cleans up the common transient case.

Applied to:
- api/Dockerfile                          (build-common)
- yaci-indexer/Dockerfile                 (build-common)
- docker/dockerfiles/mithril/Dockerfile   (cardano-builder + mithril-runner)
- docker/dockerfiles/node/Dockerfile      (cardano-builder + node-runner)
- docker/dockerfiles/postgres/Dockerfile

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
build(docker): harden apt against transient Ubuntu-mirror failures
Drops an /etc/apt/apt.conf.d/99-retries file into every ubuntu:24.04
stage before the first apt call:

  Acquire::Retries "5";
  Acquire::http::Timeout "30";
  Acquire::https::Timeout "30";
  Acquire::http::No-Cache "true";

Motivation: docker compose builds on shared hosts have been hitting
"File has unexpected size" errors from security.ubuntu.com when a
mirror edge is mid-sync. Retries + No-Cache let apt transparently
re-fetch from a fresh mirror instance instead of failing the whole
build. Does not help when the mirror is serving a permanently-wrong
file (nothing does), but cleans up the common transient case.

Applied to:
- api/Dockerfile                          (build-common)
- yaci-indexer/Dockerfile                 (build-common)
- docker/dockerfiles/mithril/Dockerfile   (cardano-builder + mithril-runner)
- docker/dockerfiles/node/Dockerfile      (cardano-builder + node-runner)
- docker/dockerfiles/postgres/Dockerfile

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
refactor: move TOKEN_REGISTRY_ENABLED to serialization, always serve decimals
Client feedback: on most Rosetta chains decimals is a native, mandatory
field on every asset — and on Cardano we need to enrich it via assets-ext
even when the rest of the token-registry metadata isn't exposed. So the
flag shouldn't gate DB access; it should gate only the extra enrichment
fields in currency.metadata.

New wire contract:
- currency.decimals              — always populated (CIP-26/CIP-68 value or 0 fallback)
- currency.metadata.policyId     — always populated
- currency.metadata.{subject,name,description,ticker,url,logo,version}
                                 — only when TOKEN_REGISTRY_ENABLED=true

Code changes:
- TokenQueryServiceImpl drops the enabled short-circuit and always
  queries the assets-ext tables; mergeMetadata seeds decimals=0 and
  always populates policyId + subject.
- TokenRegistryCurrencyData.decimals back to @Nonnull Integer.
- AccountMapperUtil / TransactionMapperUtils drop the
  getDecimalsWithFallback helper and inline metadata.getDecimals().
- DataMapper injects TOKEN_REGISTRY_ENABLED; when false it emits a
  policyId-only CurrencyMetadataResponse, when true it delegates to
  TokenRegistryMapper for the full mapping. Decimals continues to flow
  to CurrencyResponse.decimals unconditionally.

Tests:
- DataMapperTest gains a TokenRegistryEnabledFlagTests nested class
  covering both flag states and null-metadata input.
- AccountMapperUtilTest and TransactionMapperUtilsTest flip the flag on
  at construction since they assert on enrichment fields.
- TokenQueryServiceTest drops the RegistryEnabledFlagTests class and
  updates the 'nothing found' assertions to match the new contract
  (subject populated, decimals=0).

Env and docs:
- New .env.docker-compose-preview (NETWORK=preview, PROTOCOL_MAGIC=2,
  enrichment + logos on). Allow-listed in .gitignore.
- token-metadata.md rewritten to separate 'decimals always' from
  'enrichment gated'; per-network defaults table (mainnet off,
  preprod/preview on).
- env-vars.md, helm-values.md, kubernetes/deployment.md updated to
  reflect the new semantics.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
feat: reintroduce TOKEN_REGISTRY_ENABLED flag (default disabled)
Clients rely on a runtime switch to turn token-registry enrichment on and
off; the assets-ext refactor dropped it. Reintroduce a single flag,
TOKEN_REGISTRY_ENABLED (default false), and route it through
TokenQueryServiceImpl so disabled requests short-circuit to a policyId-only
fallback without hitting the DB.

Also revert the decimals-non-null contract from e5efb3b05: the disabled
fallback now mirrors main (policyId only, subject/decimals null), so the
mergeMetadata path no longer seeds decimals=0. Restored getDecimalsWithFallback
in AccountMapperUtil and TransactionMapperUtils and flipped
TokenRegistryCurrencyData.decimals back to @Nullable.

Stripped the legacy HTTP-era flags (TOKEN_REGISTRY_BASE_URL,
TOKEN_REGISTRY_CACHE_TTL_HOURS, TOKEN_REGISTRY_REQUEST_TIMEOUT_SECONDS)
from every env template, docker-compose, Helm chart, CI workflow, and doc
that still referenced them. Enabled token registry + logo on preprod
(.env.docker-compose-preprod, values-preprod.yaml). Rewrote
docs/docs/advanced-configuration/token-metadata.md to describe the new
DB-backed yaci-store assets-ext flow instead of the removed
cf-token-metadata-registry HTTP proxy setup.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>