Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Changed

- **ArNS resolves on-demand (from chain) by default** — the default
`ARNS_RESOLVER_PRIORITY_ORDER` is now `on-demand,gateway` (was
`gateway,on-demand`). Each gateway resolves ArNS names authoritatively from the
ANT record itself, falling back to a trusted-gateway hop only if the on-demand
resolver fails. This makes gateways self-sufficient rather than clients of a few
trusted gateways (more decentralized) and reads the source of truth instead of
another gateway's possibly-stale cached answer. On-demand adds a chain read per
cache-miss resolution (cheap on Solana RPC; heavier as an AO CU dryrun) — set
`ARNS_RESOLVER_PRIORITY_ORDER=gateway,on-demand` to restore the prior behavior.
The bundled observer now references this node's own gateway
(`ARNS_ROOT_HOST`) by default, so its reference resolution is authoritative and
local.

- **Chunk-post fan-out narrows to the configured threshold** — now that HTTP 303
counts as a successful (temporary) acceptance (see Fixed), broadcasts stop at
`CHUNK_POST_MIN_SUCCESS_COUNT` as intended instead of grinding the full peer
Expand Down
9 changes: 8 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,14 @@ services:
- AR_IO_NODE_RELEASE=${AR_IO_NODE_RELEASE:-82-pre}
- AR_IO_SDK_LOG_LEVEL=${AR_IO_SDK_LOG_LEVEL:-none}
# Reference Gateway Configuration
- REFERENCE_GATEWAY_HOSTS=${REFERENCE_GATEWAY_HOSTS:-}
# The bundled observer references THIS node's own gateway by default (its
# ARNS_ROOT_HOST), rather than external gateways. Since the gateway now
# resolves ArNS on-demand (authoritatively, from chain), self-reference is
# both authoritative and more decentralized — the observer forms its own
# chain-derived view and the protocol aggregates observers by majority.
# Falls back to the observer's own default (turbo/ar-io.net) if neither
# REFERENCE_GATEWAY_HOSTS nor ARNS_ROOT_HOST is set.
- REFERENCE_GATEWAY_HOSTS=${REFERENCE_GATEWAY_HOSTS:-${ARNS_ROOT_HOST:-}}
- REFERENCE_GATEWAY_NETWORK_ONLY=${REFERENCE_GATEWAY_NETWORK_ONLY:-}
- REFERENCE_GATEWAY_NETWORK_FALLBACK=${REFERENCE_GATEWAY_NETWORK_FALLBACK:-}
- REFERENCE_GATEWAY_CONSENSUS_SIZE=${REFERENCE_GATEWAY_CONSENSUS_SIZE:-}
Expand Down
8 changes: 7 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2629,8 +2629,14 @@ export const ARNS_CACHE_MAX_KEYS = +env.varOrDefault(
'10000',
);

// Resolve ArNS names authoritatively from chain first (on-demand ANT lookups),
// falling back to a trusted-gateway hop only if the on-demand resolver fails.
// This makes each gateway self-sufficient rather than a client of a few trusted
// gateways (more decentralized) and reads the source of truth (the ANT record)
// instead of another gateway's possibly-stale cached answer. Operators can revert
// to the previous behavior with ARNS_RESOLVER_PRIORITY_ORDER=gateway,on-demand.
export const ARNS_RESOLVER_PRIORITY_ORDER = env
.varOrDefault('ARNS_RESOLVER_PRIORITY_ORDER', 'gateway,on-demand')
.varOrDefault('ARNS_RESOLVER_PRIORITY_ORDER', 'on-demand,gateway')
.split(',');

export const ARNS_COMPOSITE_RESOLVER_TIMEOUT_MS = +env.varOrDefault(
Expand Down
Loading