Skip to content
Merged
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
12 changes: 12 additions & 0 deletions ansible/galaxy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ collection adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)

### Added

- `decdn_get_logs_max_block_span` (default `""`, daemon default 10000, `>= 1`): the
ceiling on one chain-watcher `eth_getLogs` block span, rendered as
`blockchain.get_logs_max_block_span` (decdn/decdn @ 3ebf5f17). The poller halves
its window on a provider range rejection and grows it back toward this ceiling;
if rejections keep coming, set it to the lowest span reached while they do, not
the provider's quoted limit. A binary built without that commit rejects the key
and the role's `decdn config validate` gate fails the deploy, so leave it unset
there.

- `decdn_network` (default `""`): set it to `arbitrum-sepolia` and `decdn_chain_id`
plus every contract address default to upstream's deployment manifest, mirrored
into `roles/decdn_node/vars/main/networks.yml` by `scripts/sync-network-profiles.py`.
Expand Down Expand Up @@ -69,6 +78,9 @@ collection adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)

### Changed

- The role now tracks the config schema of decdn/decdn @ 3ebf5f17 (was
d3bc7da7).

- `grafana_alloy` fails loud on an architecture Alloy has no package for, instead of
a 404 at download time.

Expand Down
1 change: 1 addition & 0 deletions ansible/molecule/schema/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
decdn_rpc_watchdog_interval_sec: 15
decdn_event_poll_interval_ms: 5000
decdn_fee_shares_poll_interval_sec: 1800
decdn_get_logs_max_block_span: 2000
decdn_redeem_threshold_micro_usdc: 2000000
decdn_redeem_max_vouchers_per_tx: 250
decdn_redeem_interval_secs: 120
Expand Down
2 changes: 1 addition & 1 deletion ansible/molecule/schema/files/gen-schema-keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def main():
"# a leaf-name inventory cannot tell the two apart. See gen-schema-keys.py for\n"
"# the struct -> path mapping and molecule/schema/README.md for why this exists.\n"
"#\n"
f"# Synced from decdn/decdn @ d3bc7da7 (crate version 0.0.0): {len(paths)} paths."
f"# Synced from decdn/decdn @ 3ebf5f17 (crate version 0.0.0): {len(paths)} paths."
)
for path in sorted(paths):
print(path)
Expand Down
3 changes: 2 additions & 1 deletion ansible/molecule/schema/files/schema-keys.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# a leaf-name inventory cannot tell the two apart. See gen-schema-keys.py for
# the struct -> path mapping and molecule/schema/README.md for why this exists.
#
# Synced from decdn/decdn @ d3bc7da7 (crate version 0.0.0): 155 paths.
# Synced from decdn/decdn @ 3ebf5f17 (crate version 0.0.0): 156 paths.
blockchain.buyer_max_approve
blockchain.buyer_working_deposit_micro_usdc
blockchain.capacity_bond_address
Expand All @@ -20,6 +20,7 @@ blockchain.content_blacklist_poll_interval_sec
blockchain.eth_keystore
blockchain.event_poll_interval_ms
blockchain.fee_shares_poll_interval_sec
blockchain.get_logs_max_block_span
blockchain.origin_assignment_address
blockchain.origin_directory_cache_capacity
blockchain.origin_directory_negative_ttl_sec
Expand Down
4 changes: 2 additions & 2 deletions ansible/molecule/schema/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@
exit 1
fi
# Key floor stays a count: knobs are added upstream routinely, so an exact
# number would need editing on every sync. Today's render is 128 (this sync
# removed two knobs), so the slack is 3 — the next upstream removal trips
# number would need editing on every sync. Today's render is 130 (decdn/decdn
# @ 3ebf5f17), so the slack is 5 — the next upstream removals trip
# this, and the fix is to re-count and lower the floor, not to widen it blindly.
if [ "$keys" -lt 125 ]; then
echo "only $keys scalar keys rendered (expected >= 125) — the converge" >&2
Expand Down
19 changes: 17 additions & 2 deletions ansible/molecule/validation/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,21 @@
decdn_rejected: "{{ decdn_rejected + ['range'] }}"
when: ansible_failed_task.name is match('^Validate optional')

# --- Case: range-min1 (0 for a knob the daemon requires strictly positive) ----
# 0 passes the non-negative shape assert, so only the ranges task can reject it.
- name: "Case range-min1 — get_logs_max_block_span of 0"
block:
- name: Run decdn_node with a zero getLogs span ceiling
ansible.builtin.include_role:
name: decdn_node
vars:
decdn_get_logs_max_block_span: 0
rescue:
- name: Record range-min1 rejection (only if the ranges assert failed)
ansible.builtin.set_fact:
decdn_rejected: "{{ decdn_rejected + ['range-min1'] }}"
when: ansible_failed_task.name is match('^Validate optional knob ranges the daemon rejects')

# --- Case: shape (non-numeric string for an integer knob) ---------------------
- name: "Case shape — non-numeric integer knob"
block:
Expand Down Expand Up @@ -1623,8 +1638,8 @@
_decdn_expected:
["cross-field", "binary-format", "binary-check-mode", "arch-mismatch", "arch-unset", "network-unknown",
"network-unknown-noaddr", "network-chain", "backup-secret-key", "backup-bare-string",
"backup-empty", "path-cache-home", "path-backup-home", "path-decommission-cache", "range", "bounded-range",
"shape", "bool",
"backup-empty", "path-cache-home", "path-backup-home", "path-decommission-cache", "range",
"range-min1", "bounded-range", "shape", "bool",
"enum", "dict", "float", "list", "string", "string-newline", "otlp-https",
"otlp-noport", "otlp-path", "otlp-userinfo", "otlp-colon", "otlp-port",
"otlp-newline", "env-control-rpc", "env-control-extra", "env-gate",
Expand Down
9 changes: 7 additions & 2 deletions ansible/roles/decdn_node/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ machine. This is the repo's deployment (`playbooks/site.yml`).
> download. Build the two binaries from a checkout until that changes.

**Schema tracking.** This role renders `node.toml` against the config schema of
`decdn/decdn` main @ `d3bc7da7` (crate version 0.0.0 — unreleased). Upstream marks every config
`decdn/decdn` main @ `3ebf5f17` (crate version 0.0.0 — unreleased). Upstream marks every config
section `#[serde(deny_unknown_fields)]` and defines **no** serde aliases, so a key
this role emits that your binary does not know is a startup crash-loop, not a
warning. The role runs `decdn config validate` against the installed binary after
Expand Down Expand Up @@ -261,7 +261,12 @@ asserts miss. See `defaults/main.yml` for every knob's upstream default, unit an
`decdn_event_poll_interval_ms` (`>= 250`), `decdn_content_blacklist_poll_interval_sec`
(`>= 1`), `decdn_chain_staleness_grace_sec` (seconds the node may go without a
successful chain read before it stops serving — ADR 011; `> 0`, daemon default
`1800`), `decdn_fee_shares_poll_interval_sec`,
`1800`), `decdn_fee_shares_poll_interval_sec`, `decdn_get_logs_max_block_span`
(`>= 1`, daemon default `10000`: the ceiling on one `eth_getLogs` block span. The
poller halves its window on a range rejection and grows it back, so leave this
unset unless `decdn_chain_get_logs_range_rejections_total` keeps rising; then set
it to the lowest `decdn_chain_get_logs_span` reached while it does, not to the
limit your provider quotes),
and the `decdn_origin_directory_*` cache knobs.
- **Network** — `decdn_relay_urls` (list; the singular `relay_url` config key no
longer exists). Operator-run address discovery (#818) via
Expand Down
4 changes: 4 additions & 0 deletions ansible/roles/decdn_node/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ decdn_pool_floor_signer_live_windows: "" # daemon dflt 8; lower-clamped to 1 wi
# --- Blockchain watcher tuning ("" => daemon default) -------------------------
decdn_rpc_watchdog_interval_sec: "" # daemon dflt 30; 0 disables, else >= 10 — RPC watchdog
decdn_event_poll_interval_ms: "" # daemon dflt 7000; >= 250 — multiplexed getLogs poll
# Ceiling on one eth_getLogs block span. The poller halves it on a provider range
# rejection and grows back toward it. If rejections keep coming, set it to the
# lowest span reached while they do, not the provider's quoted limit.
decdn_get_logs_max_block_span: "" # daemon dflt 10_000; >= 1 — getLogs span ceiling
decdn_content_blacklist_poll_interval_sec: "" # daemon dflt 600; >= 1 — blacklist re-scope cadence
# Seconds the node may go without a successful chain read before it stops serving
# (ADR 011 §Serving while chain-stale). Always evaluated (no on/off flag) and only
Expand Down
6 changes: 3 additions & 3 deletions ansible/roles/decdn_node/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@
decdn_pool_min_remaining_deposit_micro_usdc, decdn_pool_floor_signer_live_windows,
decdn_chain_staleness_grace_sec, decdn_rpc_watchdog_interval_sec,
decdn_event_poll_interval_ms, decdn_content_blacklist_poll_interval_sec,
decdn_fee_shares_poll_interval_sec,
decdn_fee_shares_poll_interval_sec, decdn_get_logs_max_block_span,
decdn_origin_directory_positive_ttl_sec, decdn_origin_directory_negative_ttl_sec,
decdn_origin_directory_cache_capacity,
decdn_max_blob_size_mb, decdn_disk_headroom_mb, decdn_max_rate_per_mb, decdn_max_probe_holds,
Expand Down Expand Up @@ -868,12 +868,12 @@
decdn_chain_staleness_grace_sec (>= 1); and each of
decdn_redeem_threshold_micro_usdc, decdn_redeem_max_vouchers_per_tx,
decdn_redeem_interval_secs, decdn_buyer_working_deposit_micro_usdc,
decdn_fee_shares_poll_interval_sec,
decdn_fee_shares_poll_interval_sec, decdn_get_logs_max_block_span,
decdn_voucher_commit_interval_ms must be >= 1 when set ("{{ item }}" is not).
loop: >-
{{ [decdn_redeem_threshold_micro_usdc, decdn_redeem_max_vouchers_per_tx,
decdn_redeem_interval_secs, decdn_buyer_working_deposit_micro_usdc,
decdn_fee_shares_poll_interval_sec,
decdn_fee_shares_poll_interval_sec, decdn_get_logs_max_block_span,
decdn_voucher_commit_interval_ms] }}

# Bounded ranges. Each is a closed interval the daemon range-checks at load, so an
Expand Down
3 changes: 3 additions & 0 deletions ansible/roles/decdn_node/templates/node.toml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ rpc_watchdog_interval_sec = {{ decdn_rpc_watchdog_interval_sec | int }}
{% if decdn_event_poll_interval_ms not in ["", none] %}
event_poll_interval_ms = {{ decdn_event_poll_interval_ms | int }}
{% endif %}
{% if decdn_get_logs_max_block_span not in ["", none] %}
get_logs_max_block_span = {{ decdn_get_logs_max_block_span | int }}
{% endif %}
{% if decdn_fee_shares_poll_interval_sec not in ["", none] %}
fee_shares_poll_interval_sec = {{ decdn_fee_shares_poll_interval_sec | int }}
{% endif %}
Expand Down
1 change: 1 addition & 0 deletions charts/decdn-node/ci/ci-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ config:
rpc_watchdog_interval_sec: 15
event_poll_interval_ms: 5000
fee_shares_poll_interval_sec: 1800
get_logs_max_block_span: 2000
redeem_threshold_micro_usdc: 2000000
redeem_max_vouchers_per_tx: 250
redeem_interval_secs: 120
Expand Down
12 changes: 6 additions & 6 deletions charts/decdn-node/files/monitoring/SOURCE
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# GENERATED by scripts/sync-monitoring.sh -- do not hand-edit.
upstream: decdn/decdn
commit: bdba9e60c0d51becc614bc8c23b7e4508f6418cf
commit: 3ebf5f17eec0399d43a744e6efbb997675e371d7
files:
dashboard-chain.json: sha256:ff74aadb34f42930f11ddbdbed263a097a31f91524a7b13da1d71b1b5c325b1f
dashboard-delivery.json: sha256:2f5faa7e91da9ce5b5136399894cfee2ff87ae2ed290297f5406bf5e2371f9ec
dashboard-node.json: sha256:9f58cb3672abf0d9b63f7fb72bbde402644d7f0df4e1b6509e4bbefed89006a4
grafana-dashboard.json: sha256:c000677c88eeb20f15a4480ae06dacca47199a249000d18f79668a9b0c00a616
prometheus-alerts.yml: sha256:69de9f66074ecefafc1962ac225a42927ac5513c2cbfc0719ef593a5e9f2c858
dashboard-chain.json: sha256:f547f355f93fd17ffbcedb53c2e90c53a78e6f2f3d62f92dc5c84a27aea5000b
dashboard-delivery.json: sha256:bd933f571cb866102bd7b594045906e29d9b30b50cddf4aa4b16dc3543415d1f
dashboard-node.json: sha256:ec73ce192e0cc3823aa42f0b157515fffe58ddf6c6f88d1bc45b7cf1bf6c3ecc
grafana-dashboard.json: sha256:4b3d4512352ae33761152df9ad6bda8bc1b5d20ef709eb0b478113ccc20ab53a
prometheus-alerts.yml: sha256:e1296916f92151afb7d8dc72e5f75e545fe5e306a95addfcb4d178d13bc93be9
Loading
Loading