Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: envs documentation #49

Closed
wants to merge 7 commits into from
Closed
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
56 changes: 56 additions & 0 deletions .env.example
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrapping the values for ANS104_UNBUNDLE_FILTER and ANS104_INDEX_FILTER in single quotes can lead to parsing errors. The values do not need to be wrapped in any quotes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed the single quotes.

Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Starting block height for node synchronization (0 = start from the beginning)
# START_HEIGHT=0

# Stop block height for node synchronization (Infinity = keep syncing until stopped)
# STOP_HEIGHT="Infinity"

# Arweave node to use for fetching data
# TRUSTED_NODE_URL="https://arweave.net"

# Arweave node to use for proxying requests
# TRUSTED_GATEWAY_URL="https://arweave.net"

# ArNS gateway
# TRUSTED_ARNS_GATEWAY_URL="https://__NAME__.arweave.dev"

# If true, use indexed data as a cache and skip fetching data from the node
# SKIP_CACHE=false

# Adds an "INSTANCE_ID" field to output logs
# INSTANCE_ID=""

# Sets the format of output logs, accepts "simple" and "json"
# LOG_FORMAT="simple"

# AR.IO node exposed port number
# PORT=4000

# Number from 0 to Infinity, representing the probability of a request failing
# SIMULATED_REQUEST_FAILURE_RATE=0

# Arweave wallet address used for staking and rewards
# AR_IO_WALLET=""

# Admin key used for accessing the admin API
# ADMIN_API_KEY="secret"

# If true, ar.io node will start indexing missing bundles
# BACKFILL_BUNDLE_RECORDS=false

# If true, all indexed bundles will be reprocessed with the new filters (you can use this when you change the filters)
# FILTER_CHANGE_REPROCESS=false

# Only bundles compliant with this filter will be unbundled
# ANS104_UNBUNDLE_FILTER={"never": true}

# Only bundles compliant with this filter will be indexed
# ANS104_INDEX_FILTER={"never": true}

# Root host for ArNS
# ARNS_ROOT_HOST=""

# Protocol setting in process of creating sandbox domain in ArNS (ARNS_ROOT_HOST needs to be set for this env to have any effect)
# SANDBOX_PROTOCOL=""

# If true, start indexing blocks, tx, ANS104 bundles
# START_WRITERS=true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@ test-results.json
/.vscode
.DS_Store

# JetBrains
/.idea

# Exceptions
!/data/.gitkeep
24 changes: 24 additions & 0 deletions docs/envs.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can add
LOG_FORMAT | string | "simple" | sets the format of output logs, accepts "simple" and "json"
INSTANCE_ID | string | "" | Adds an "instanceId" field to output logs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added the missing ENVs.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# ENVs
This document describes the environment variables that can be used to configure the `ar.io` node.

| ENV_NAME | TYPE | DEFAULT_VALUE | DESCRIPTION |
|--------------------------------|----------------------|--------------------------------|---------------------------------------------------------------------------------------------------------------------------------|
| START_HEIGHT | Number or "Infinity" | 0 | Starting block height for node synchronization (0 = start from the beginning) |
| STOP_HEIGHT | Number or "Infinity" | "Infinity" | Stop block height for node synchronization (Infinity = keep syncing until stopped) |
| TRUSTED_NODE_URL | String | "https://arweave.net" | Arweave node to use for fetching data |
| TRUSTED_GATEWAY_URL | String | "https://arweave.net" | Arweave node to use for proxying requests |
| TRUSTED_ARNS_GATEWAY_URL | String | "https://__NAME__.arweave.dev" | ArNS gateway |
| INSTANCE_ID | String | "" | Adds an "INSTACE_ID" field to output logs |
| LOG_FORMAT | String | "simple" | Sets the format of output logs, accepts "simple" and "json" |
| SKIP_CACHE | Boolean | false | If true, use indexed data as a cache and skip fetching data from the node |
| PORT | Number | 4000 | AR.IO node exposed port number |
| SIMULATED_REQUEST_FAILURE_RATE | Number | 0 | Number from 0 to Infinity, representing the probability of a request failing |
| AR_IO_WALLET | String | "" | Arweave wallet address used for staking and rewards |
| ADMIN_API_KEY | String | Generated | API key used for admin API requests (if not set, it's generated and logged into the console) |
| BACKFILL_BUNDLE_RECORDS | Boolean | false | If true, ar.io node will start indexing missing bundles |
| FILTER_CHANGE_REPROCESS | Boolean | false | If true, all indexed bundles will be reprocessed with the new filters (you can use this when you change the filters) |
| ANS104_UNBUNDLE_FILTER | String | '{"never": true}' | Only bundles compliant with this filter will be unbundled |
| ANS104_INDEX_FILTER | String | '{"never": true}' | Only bundles compliant with this filter will be indexed |
| ARNS_ROOT_HOST | String | undefined | Domain name for ArNS host |
| SANDBOX_PROTOCOL | String | undefined | Protocol setting in process of creating sandbox domain in ArNS (ARNS_ROOT_HOST needs to be set for this env to have any effect) |
| START_WRITERS | Boolean | true | If true, start indexing blocks, tx, ANS104 bundles |
4 changes: 4 additions & 0 deletions envoy/envoy.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ static_resources:
retry_on: '5xx,reset'
num_retries: 5
- match: { prefix: '/' }
response_headers_to_add:
- header:
key: 'Cache-Control'
value: 'public, max-age=30'
route:
cluster: legacy_gateways
retry_policy:
Expand Down