Repository navigation
chore(node): drop per-IP and per-source rate-limit keys removed in decdn#2873 - #210
Merged
Merged
Conversation
…cdn#2873 decdn/decdn#2873 deletes the per-source dispatch limiter and the per-IP layer of the dht, probe and serve rate limiters, with their config keys and metrics, and lowers the default redeem threshold to 50_000 µUSDC. - node.toml.j2, role defaults, the rate-limit key guard and README: drop security.per_source_*/max_tracked_sources and the per_ip_* / max_tracked_per_ip rate-limit keys. - schema-keys.txt: the 12 removed paths (gen-schema-keys.py output for the #2873 branch). - molecule default/schema/validation and the chart's ci-values: stop setting the removed keys. - Dashboards: drop the per-IP and per-source series and the per-IP term of the unattributed-failures expression. - Redeem threshold default comment: 0.05 USDC. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Note
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.
🟢 Approval recommended
The change consistently removes upstream-deleted per-source/per-IP rate-limit keys and metrics across Ansible/Helm/Molecule fixtures and Grafana dashboards to keep strict deny_unknown_fields configurations deployable on newer node binaries, with no remaining issues indicated in the review evidence.
No open issues 🎉
What changed in this PR
Aligns devops configuration, fixtures, and dashboards with decdn/decdn#2873 by removing deleted per-source and per-IP rate-limit keys/metrics so deny_unknown_fields configs remain deployable on newer node binaries.
Changes:
- Remove deprecated per-source and per-IP rate-limit config keys from Ansible role templates/defaults, deploy-time key guards, Helm chart CI values, and docs.
- Update Molecule schema/validation scenarios and schema key fixtures to reflect the reduced config surface.
- Remove deleted per-source/per-IP Prometheus series from Grafana dashboards and adjust related panel queries/descriptions.
| File | Description |
|---|---|
| monitoring/decdn-node/grafana-dashboard.json | Removes per-IP serve rate-limit metric targets and updates related query/description text to match the remaining metrics. |
| monitoring/decdn-node/dashboard-node.json | Drops per-IP rate-limit series from node dashboard panels and revises descriptions to reflect the remaining limiter layers. |
| monitoring/decdn-node/dashboard-delivery.json | Removes per-source dispatch and per-IP rate-limit series from delivery panels and updates expressions/descriptions accordingly. |
| charts/decdn-node/values.yaml | Updates chart default commentary around externalTrafficPolicy to remove references to per-source rate limiting. |
| charts/decdn-node/README.md | Adjusts chart documentation prose about networking/traffic policy to match behavior after the upstream limiter removals. |
| charts/decdn-node/ci/ci-values.yaml | Deletes removed config keys from CI values used for render/config validation against the node binary. |
| ansible/roles/decdn_node/templates/node.toml.j2 | Stops rendering removed per-source and per-IP rate-limit keys in the generated node.toml. |
| ansible/roles/decdn_node/tasks/main.yml | Updates validation/guard logic to accept only the remaining rate-limit dict keys and removes checks tied to deleted knobs. |
| ansible/roles/decdn_node/README.md | Updates role documentation to remove deprecated variables/keys and describe the new rate-limit dict shape. |
| ansible/roles/decdn_node/defaults/main.yml | Removes defaults for deleted knobs and updates comments to reflect current upstream defaults (including redeem threshold). |
| ansible/molecule/validation/converge.yml | Moves validation coverage to a remaining float-config knob and removes use of deleted keys in the scenario. |
| ansible/molecule/schema/files/schema-keys.txt | Removes the deleted schema paths from the expected key list and updates the total count accordingly. |
| ansible/molecule/schema/converge.yml | Updates schema scenario inputs to avoid removed keys and match the new allowed rate-limit dict keys. |
| ansible/molecule/default/verify.yml | Updates default scenario assertions for the revised rate-limit dict expectations after key removals. |
| ansible/molecule/default/converge.yml | Adjusts default Molecule inputs to exercise remaining rate-limit keys and float knob behavior without deleted settings. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
decdn/decdn#2873 deletes the per-source dispatch limiter and the per-IP layer of the DHT, probe and serve rate limiters. A relay-routed connection carries no client address, so those layers cost honest peers behind one NAT more than they cost an attacker. Their config keys and metrics go with them, and the default redeem threshold drops to 50_000 µUSDC (0.05 USDC). Every config section is
deny_unknown_fields, so anode.tomlthat still sets a removed key fails to parse on a binary that carries #2873.What changes
Config keys removed from
node.toml.j2, the role defaults, the rate-limit key guard intasks/main.yml, the role README, the moleculedefault/schema/validationscenarios andcharts/decdn-node/ci/ci-values.yaml:security.per_source_rate_per_sec,security.per_source_burst,security.max_tracked_sources(role varsdecdn_security_per_source_rate_per_sec,decdn_security_per_source_burst,decdn_security_max_tracked_sources){dht,probe,serve}.rate_limit.per_ip_rate_per_sec,.per_ip_burst,.max_tracked_per_ip(keys of thedecdn_{dht,probe,serve}_rate_limitdicts; the guard now accepts five keys and rejects these at deploy time)ansible/molecule/schema/files/schema-keys.txtloses those 12 paths (166 to 154). The file equalsgen-schema-keys.pyrun against the #2873 branch head, and that output differs from the v0.3.1 output only by these 12 paths.The validation scenario's float case moves to
decdn_serve_economics_discount, and the default scenario's subset case onprobe.rate_limitusesmax_tracked_per_peer.Dashboard series removed (no alert or recording rule used any of them):
decdn_dispatch_rejected_per_source_total,decdn_dispatch_per_source_skipped_no_addr_total(delivery: Connection dispatch)decdn_{probe,dht,serve}_rate_limit_rejected_per_ip_total(node: Rate-limit rejections, Serve rate-limit rejections; delivery and overview: Serve refusals by reason)decdn_{probe,dht,serve}_rate_limit_tracked_per_ip,decdn_{probe,dht,serve}_rate_limit_prune_sweeps_per_ip_total(node: the two bucket panels)INBOUND_FAILURE_REASONS.No panel goes away: each lost only its per-IP or per-source targets, and its description now names the layers that remain.
Redeem threshold. devops never sets it outside test fixtures. The role default comment now reads
daemon dflt 50_000 (0.05 USDC). #2873 has no floor-debt config or metric for devops to drop.Chart prose.
externalTrafficPolicy: Localno longer cites per-source rate limits; it preserves the client source IP the node sees.Deploy ordering
Merge this before, or together with, the decdn release that carries #2873. Merging it earlier is safe:
Optionfield incrates/common/src/config/types.rs, so a config that omits it parses and the daemon applies its built-in default. The role defaults for these keys were all"", so a role-managed node renders the samenode.tomlbefore and after, unless its inventory overrides them.ci/*.yamlwith the newestdecdnof the pinned line. Today that is v0.3.1, which accepts the shorter config. Once a release with #2873 is the newest of the line, the oldci-values.yamlfailsdecdn config validate, so this PR must be onmainby then.per_ip_*keys in a rate-limit dict now fails at deploy time on the key guard, not in a crash loop. The guard rejects those keys on a v0.3.1 host too, so drop them from the inventory when you take this role version. A leftoverdecdn_security_per_source_*var renders nothing.Two side effects until that release ships:
upstream-driftjob diffsschema-keys.txtagainst the newest release of the line (v0.3.1), so it reports the 12 paths as stale. The next decdn bump clears it.Lint
pre-commit run --all-files: all hooks pass except two that could not run locally.markdownlint-cli2failed to install its node env (engine mismatch), so I rannpx markdownlint-cli2on the two changed READMEs: 0 errors.shellcheckneeds Docker; this PR touches no shell.monitoring/decdn-node/*.jsonparse. No field override names a removed refId or legend.make lint-helm,make lint-ansible,make molecule-changed. CI runs them.🤖 Generated with Claude Code