-
Notifications
You must be signed in to change notification settings - Fork 44
fix(dashmate): consensus params in dashmate different than on testnet #2682
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
Conversation
""" WalkthroughThe consensus parameters within the testnet genesis configuration were expanded to include detailed settings for block limits, evidence handling, validator key types, versioning, synchrony, timeout durations, and ABCI behavior. A new migration was added to update the testnet genesis config in existing config files to align with these changes, using deep cloning to avoid reference issues. The import order at the top of the testnet config file was also adjusted. No changes were made to exported function signatures. Changes
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (53)
✅ Files skipped from review due to trivial changes (50)
🚧 Files skipped from review as they are similar to previous changes (2)
🧰 Additional context used📓 Path-based instructions (1)`**/*.rs`: Rust code should be formatted using `cargo fmt --all` Rust code shoul...
📄 Source: CodeRabbit Inference Engine (CLAUDE.md) List of files the instruction was applied to:
🧠 Learnings (2)📓 Common learnings
packages/keyword-search-contract/src/lib.rs (15)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
🔇 Additional comments (2)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/dashmate/configs/getConfigFileMigrationsFactory.js (1)
1089-1096
: Migration logic is correct but add explicit return for consistency.The migration correctly applies the updated genesis configuration to existing testnet configurations, which will ensure they get the new comprehensive consensus parameters. However, for consistency with other migrations in this file, consider adding an explicit return statement.
Object.entries(configFile.configs) .forEach(([name, options]) => { if (options.network === NETWORK_TESTNET) { options.platform.drive.tenderdash.genesis = testnet.get('platform.drive.tenderdash.genesis'); } }); + + return configFile;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/dashmate/configs/defaults/getTestnetConfigFactory.js
(2 hunks)packages/dashmate/configs/getConfigFileMigrationsFactory.js
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`packages/dashmate/**`: Dashmate is the node management tool for setting up and managing Dash Platform nodes.
packages/dashmate/**
: Dashmate is the node management tool for setting up and managing Dash Platform nodes.
📄 Source: CodeRabbit Inference Engine (CLAUDE.md)
List of files the instruction was applied to:
packages/dashmate/configs/defaults/getTestnetConfigFactory.js
packages/dashmate/configs/getConfigFileMigrationsFactory.js
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build JS packages / Build JS
🔇 Additional comments (2)
packages/dashmate/configs/defaults/getTestnetConfigFactory.js (2)
2-2
: LGTM - Minor import organization improvement.Moving the Config import earlier in the list improves organization without affecting functionality.
119-152
: Excellent fix - Comprehensive consensus parameters now match testnet.The expansion from a minimal version object to comprehensive consensus parameters directly addresses the PR objective of fixing the mismatch between dashmate and testnet consensus params. The values appear correct:
- Block limits (2MB max_bytes, ~57B max_gas) are reasonable
- Evidence handling (100k blocks, ~48h duration) aligns with typical settings
- BLS12-381 validator keys are correct for Dash Platform
- Timeout and synchrony parameters are appropriate for testnet
This should resolve the genesis.json inconsistency for newly provisioned testnet nodes.
d9e9415
to
3a375c8
Compare
✅ gRPC Query Coverage Report
|
Issue being fixed or feature implemented
Newly provisioned testnet nodes have wrong genesis.json.
What was done?
Fetched consensus params from testnet with
curl 0:36657/consensus_params?height=1|jq
and added them to testnet config.How Has This Been Tested?
On a local VM.
Breaking Changes
None
Checklist:
For repository code-owners and collaborators only
Summary by CodeRabbit