Skip to content

fix: set validator registration value to 1000uT - #7457

Merged
SWvheerden merged 1 commit into
tari-project:developmentfrom
sdbondi:vn-reg-cost
Sep 1, 2025
Merged

fix: set validator registration value to 1000uT#7457
SWvheerden merged 1 commit into
tari-project:developmentfrom
sdbondi:vn-reg-cost

Conversation

@sdbondi

@sdbondi sdbondi commented Sep 1, 2025

Copy link
Copy Markdown
Member

Description

fix: set validator registration value to 1000uT for localnet and igor

Motivation and Context

The transaction builder checks that you aren't sending less funds than the fee cost. This causes a
registration sending 0 to fail. Send 1000 to cover for this.

How Has This Been Tested?

Tested registration in tari-ootle PR (tari-project/tari-ootle#1560)

Summary by CodeRabbit

  • Chores
    • Raised the minimum validator node registration deposit to 1000 MicroMinotari on localnet and Igor.
    • Users registering validator nodes on these networks must now provide at least 1000 MicroMinotari as a deposit.
    • No changes to public APIs or user interfaces; impact is limited to validator registration requirements.

@coderabbitai

coderabbitai Bot commented Sep 1, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Raised the vn_registration_min_deposit_amount from MicroMinotari(0) to MicroMinotari(1000) in the localnet and igor consensus constant initializations; no public APIs or exported symbols changed.

Changes

Cohort / File(s) Summary
Consensus constants updates
base_layer/transaction_components/src/consensus/consensus_constants.rs
Increased vn_registration_min_deposit_amount from MicroMinotari(0) to MicroMinotari(1000) for localnet and igor; added an inline comment in localnet about covering transaction fees.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • hansieodendaal

Poem

I nudge the knobs with careful hop,
A thousand tiny coins go plop,
Nodes now bring a fuller purse,
Fees met quick — no need to curse.
Hopping on through blocks I cheer, deposits safe, the path is clear 🐇


📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 66974d6 and 5553fc4.

📒 Files selected for processing (1)
  • base_layer/transaction_components/src/consensus/consensus_constants.rs (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • base_layer/transaction_components/src/consensus/consensus_constants.rs
⏰ 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). (9)
  • GitHub Check: test (mainnet, stagenet)
  • GitHub Check: wasm build tests
  • GitHub Check: test (testnet, esmeralda)
  • GitHub Check: test (nextnet, nextnet)
  • GitHub Check: Cucumber tests / FFI
  • GitHub Check: Cucumber tests / Base Layer
  • GitHub Check: cargo check with stable
  • GitHub Check: ci
  • GitHub Check: ledger build tests
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@sdbondi sdbondi changed the title fix: set validator registration value to 1000uT fix: set validator registration value to 1000uT Sep 1, 2025

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 (2)
base_layer/transaction_components/src/consensus/consensus_constants.rs (2)

491-494: Use uT constant and clarify unit in the note

Tiny readability/consistency win: elsewhere this file uses the uT unit helper. Also make the comment explicit about units.

-            // NOTE: the transaction builder checks that you aren't sending less funds than the fee cost. This causes a
-            // registration sending 0 to fail. Send 1000 to cover for this.
-            vn_registration_min_deposit_amount: MicroMinotari(1000),
+            // NOTE: the transaction builder checks that you aren't sending less funds than the fee cost. This causes a
+            // registration sending 0 to fail. Send 1_000 uT to cover this.
+            vn_registration_min_deposit_amount: 1_000 * uT,

562-562: Mirror localnet’s comment and use uT for consistency

Match the explanatory comment and representation used in localnet().

-            vn_registration_min_deposit_amount: MicroMinotari(1000),
+            // See localnet note: enforce a non-zero amount so fees are covered (1_000 uT).
+            vn_registration_min_deposit_amount: 1_000 * uT,
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 84c81d1 and 66974d6.

📒 Files selected for processing (1)
  • base_layer/transaction_components/src/consensus/consensus_constants.rs (2 hunks)
⏰ 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). (9)
  • GitHub Check: test (nextnet, nextnet)
  • GitHub Check: test (mainnet, stagenet)
  • GitHub Check: test (testnet, esmeralda)
  • GitHub Check: ci
  • GitHub Check: cargo check with stable
  • GitHub Check: wasm build tests
  • GitHub Check: ledger build tests
  • GitHub Check: Cucumber tests / FFI
  • GitHub Check: Cucumber tests / Base Layer
🔇 Additional comments (1)
base_layer/transaction_components/src/consensus/consensus_constants.rs (1)

491-494: Sanity-check igor/localnet deposit settings

  • ConsensusConstants entries at lines 620, 732, 787, and 895 still set vn_registration_min_deposit_amount to MicroMinotari(0); update to MicroMinotari(1000) if igor/localnet should enforce the new minimum.
  • No other code or tests reference a zero deposit; manually verify no in-flight 0-deposit registrations exist on those networks to avoid post-upgrade divergence.

@sdbondi

sdbondi commented Sep 1, 2025

Copy link
Copy Markdown
Member Author

Just found the setting to turn that check off in the wallet, however it may be better to use a non-zero registration amount but no rush to merge

@SWvheerden
SWvheerden merged commit ba8d0cb into tari-project:development Sep 1, 2025
14 of 16 checks passed
SWvheerden pushed a commit to SWvheerden/tari that referenced this pull request Sep 1, 2025
Description
---
fix: set validator registration value to 1000uT for localnet and igor

Motivation and Context
---
The transaction builder checks that you aren't sending less funds than
the fee cost. This causes a
registration sending 0 to fail. Send 1000 to cover for this.

How Has This Been Tested?
---
Tested registration in tari-ootle PR
(tari-project/tari-ootle#1560)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Raised the minimum validator node registration deposit to 1000
MicroMinotari on localnet and Igor.
* Users registering validator nodes on these networks must now provide
at least 1000 MicroMinotari as a deposit.
* No changes to public APIs or user interfaces; impact is limited to
validator registration requirements.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
SWvheerden pushed a commit that referenced this pull request Sep 1, 2025
Description
---
fix: set validator registration value to 1000uT for localnet and igor

Motivation and Context
---
The transaction builder checks that you aren't sending less funds than
the fee cost. This causes a
registration sending 0 to fail. Send 1000 to cover for this.

How Has This Been Tested?
---
Tested registration in tari-ootle PR
(tari-project/tari-ootle#1560)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Raised the minimum validator node registration deposit to 1000
MicroMinotari on localnet and Igor.
* Users registering validator nodes on these networks must now provide
at least 1000 MicroMinotari as a deposit.
* No changes to public APIs or user interfaces; impact is limited to
validator registration requirements.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants