From 897a515de771954069bc58c1d794db865f66a320 Mon Sep 17 00:00:00 2001 From: dtfiedler Date: Mon, 9 Sep 2024 09:09:27 -0600 Subject: [PATCH 1/2] chore(docker): update env vars for resolver priority order These are to configure the reesolution order via docker compose --- docker-compose.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 52a6aa68..ac2d5ba3 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -72,7 +72,11 @@ services: - WEBHOOK_BLOCK_FILTER=${WEBHOOK_BLOCK_FILTER:-} - CONTIGUOUS_DATA_CACHE_CLEANUP_THRESHOLD=${CONTIGUOUS_DATA_CACHE_CLEANUP_THRESHOLD:-} - TRUSTED_ARNS_RESOLVER_TYPE=${TRUSTED_ARNS_RESOLVER_TYPE:-gateway} - - TRUSTED_ARNS_RESOLVER_URL=${TRUSTED_ARNS_RESOLVER_URL:-https://__NAME__.arweave.dev} + - TRUSTED_ARNS_RESOLVER_URL=${TRUSTED_ARNS_RESOLVER_URL:-http://resolver:6000} + - TRUSTED_ARNS_GATEWAY_URL=${TRUSTED_ARNS_GATEWAY_URL:-https://__NAME__.arweave.dev} + - ARNS_RESOLVER_PRIORITY_ORDER=${ARNS_RESOLVER_PRIORITY_ORDER:-resolver,on-demand,gateway} + - ARNS_CACHE_TTL_SECONDS=${ARNS_CACHE_TTL_SECONDS:-3600} + - ARNS_CACHE_MAX_KEYS=${ARNS_CACHE_MAX_KEYS:-10000} - ENABLE_MEMPOOL_WATCHER=${ENABLE_MEMPOOL_WATCHER:-false} - MEMPOOL_POOLING_INTERVAL_MS=${MEMPOOL_POOLING_INTERVAL_MS:-} - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID:-} From 1d1fd3fedff4907c090ad3d3d2368908e7f80b15 Mon Sep 17 00:00:00 2001 From: dtfiedler Date: Mon, 9 Sep 2024 11:19:29 -0600 Subject: [PATCH 2/2] fix(docker): update docker default to not specify resolver by default If this url is provided, the composite arns resolver will try and use it. Since the resolver is not enabled by default we should remove this so it is not used. --- docker-compose.yaml | 7 +++---- src/config.ts | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index ac2d5ba3..8369a474 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -71,10 +71,9 @@ services: - WEBHOOK_INDEX_FILTER=${WEBHOOK_INDEX_FILTER:-} - WEBHOOK_BLOCK_FILTER=${WEBHOOK_BLOCK_FILTER:-} - CONTIGUOUS_DATA_CACHE_CLEANUP_THRESHOLD=${CONTIGUOUS_DATA_CACHE_CLEANUP_THRESHOLD:-} - - TRUSTED_ARNS_RESOLVER_TYPE=${TRUSTED_ARNS_RESOLVER_TYPE:-gateway} - - TRUSTED_ARNS_RESOLVER_URL=${TRUSTED_ARNS_RESOLVER_URL:-http://resolver:6000} - - TRUSTED_ARNS_GATEWAY_URL=${TRUSTED_ARNS_GATEWAY_URL:-https://__NAME__.arweave.dev} - - ARNS_RESOLVER_PRIORITY_ORDER=${ARNS_RESOLVER_PRIORITY_ORDER:-resolver,on-demand,gateway} + - TRUSTED_ARNS_RESOLVER_URL=${TRUSTED_ARNS_RESOLVER_URL:-} + - TRUSTED_ARNS_GATEWAY_URL=${TRUSTED_ARNS_GATEWAY_URL:-https://__NAME__.arweave.net} + - ARNS_RESOLVER_PRIORITY_ORDER=${ARNS_RESOLVER_PRIORITY_ORDER:-on-demand,gateway} - ARNS_CACHE_TTL_SECONDS=${ARNS_CACHE_TTL_SECONDS:-3600} - ARNS_CACHE_MAX_KEYS=${ARNS_CACHE_MAX_KEYS:-10000} - ENABLE_MEMPOOL_WATCHER=${ENABLE_MEMPOOL_WATCHER:-false} diff --git a/src/config.ts b/src/config.ts index a6ef7896..4d3452cd 100644 --- a/src/config.ts +++ b/src/config.ts @@ -284,9 +284,8 @@ export const TRUSTED_ARNS_RESOLVER_TYPE = env.varOrDefault( 'gateway', ); -export const TRUSTED_ARNS_RESOLVER_URL = env.varOrDefault( +export const TRUSTED_ARNS_RESOLVER_URL = env.varOrUndefined( 'TRUSTED_ARNS_RESOLVER_URL', - TRUSTED_ARNS_GATEWAY_URL, ); //