feat(dashmate): plumb Tenderdash consensus DoS rate-limit knobs - #749
Draft
shumkov wants to merge 1 commit into
Draft
feat(dashmate): plumb Tenderdash consensus DoS rate-limit knobs#749shumkov wants to merge 1 commit into
shumkov wants to merge 1 commit into
Conversation
Add three Tenderdash [consensus] rate-limit knobs to the dashmate role so a network can override them via the generated dashmate.json: - verificationRateLimit (default 300) - peerVoteRateLimit (default 600) - peerDataRateLimit (default 500) Changes: - ansible/roles/dashmate/defaults/main.yml: three vars with Tenderdash defaults, following the existing consensus var naming. - ansible/roles/dashmate/templates/dashmate.json.j2: inject the three vars (as JSON numbers) into the consensus object, after peer and before unsafeOverride. The dashmate.json written here is validated by the installed dashmate against its schema, and consensus is additionalProperties:false. So this MUST ship together with a dashmate release whose schema knows these keys; dashmate_version in the network config must be bumped to that release. That release does not exist yet, so dashmate_version is intentionally not bumped here. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
What
Plumbs three Tenderdash
[consensus]rate-limit knobs through thedashmateansible role so a network can override them via the generateddashmate.json:dashmate_platform_drive_tenderdash_consensus_verification_rate_limitverificationRateLimit300dashmate_platform_drive_tenderdash_consensus_peer_vote_rate_limitpeerVoteRateLimit600dashmate_platform_drive_tenderdash_consensus_peer_data_rate_limitpeerDataRateLimit500Changes (2 files)
ansible/roles/dashmate/defaults/main.yml— three vars with the Tenderdash defaults, next to the existing..._consensus_peer_*vars.ansible/roles/dashmate/templates/dashmate.json.j2— inject the three vars (as JSON numbers) into theconsensusobject, after thepeerblock and beforeunsafeOverride.This repo drives dashmate by writing
dashmate.jsonfrom the Jinja template (not viadashmate config set), so the values land in dashmate's config directly.⛔ BLOCKED-ON a dashmate release that carries the new schema keys
The
dashmate.jsonthis template writes is validated by the installed dashmate against its JSON schema, andconsensusisadditionalProperties: false. Emitting these keys against a dashmate build that does not know them is a validation error.dashmate_versionmust be bumped to that release, in lockstep with this PR.dashmate_versionis intentionally not bumped here — a dashmate build containing the keys does not exist yet. Do not merge until it does.Nothing here is on the critical path for a first devnet: with the keys omitted, a Tenderdash node falls back to its compiled-in defaults (
300 / 600 / 500).Per-network override example (dash-network-configs)
Per-network files in
dash-network-configsare flat ansible-var overrides. Config sets live ondevnet-*branches, so rather than a separate PR here is the block to drop into a network's YAML (e.g. adevnet-*branch, alongside the otherdashmate_platform_drive_tenderdash_*keys) to point at a custom image and override the limits:Note:
verification_rate_limitmust be0(disabled) or>= 33; Tenderdash rejects1..32at node start. Overriding only in the network YAML without this PR + the dashmate release does nothing (the Jinja var would be undefined).Dependency order
dashpay/platform#4274 → dashmate release with the keys → this PR (bump
dashmate_version) → per-networkdash-network-configsoverride.Verification
git diffreviewed; both edits are pure adds mirroring existing consensus vars / JSON structure.defaults/main.yml— pass; the three vars parse as integers.json.loads'd the result — valid JSON, values are numbers (not strings) matching the dashmate schema — pass.🤖 Generated with Claude Code