Skip to content

Conversation

@n8mgr
Copy link
Member

@n8mgr n8mgr commented Jan 22, 2026

Adds a temporary cap of 10TiB per contract. This will eventually replace max collateral and be host configurable.

@n8mgr n8mgr requested review from ChrisSchinnerl and Copilot and removed request for Copilot January 22, 2026 00:07
@n8mgr n8mgr requested a review from lukechampine January 22, 2026 00:07
@github-project-automation github-project-automation bot moved this to In Progress in Sia Jan 22, 2026
@n8mgr n8mgr removed the request for review from lukechampine January 22, 2026 00:07
@n8mgr n8mgr force-pushed the nate/cap-max-storage branch from bfbefbf to f76e763 Compare January 22, 2026 00:26
Copilot AI review requested due to automatic review settings January 22, 2026 00:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds a temporary cap of 10 TiB per contract to replace the existing max collateral validation. The changes introduce a storage-based validation approach that will eventually become host-configurable.

Changes:

  • Introduced a 10 TiB storage cap constant (maxContractStorage)
  • Removed maxCollateral parameter from validation functions in favor of storage-based limits
  • Added requestedContractStorage helper function to calculate storage from collateral or allowance
  • Updated MinRenterAllowance and MaxHostCollateral to respect the storage cap

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
rhp/v4/rhp.go Added maxContractStorage constant, implemented requestedContractStorage function, and updated MinRenterAllowance/MaxHostCollateral to use storage caps
rhp/v4/validation.go Removed maxCollateral parameters from three Validate methods and replaced collateral checks with storage-based validation
.changeset/capped_max_per_contract_storage_to_10tib.md Changeset file documenting the major version change

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@n8mgr n8mgr force-pushed the nate/cap-max-storage branch from f76e763 to 42c0627 Compare January 22, 2026 01:03
@n8mgr n8mgr marked this pull request as draft January 22, 2026 02:50
@n8mgr n8mgr removed the request for review from ChrisSchinnerl January 22, 2026 02:50
@n8mgr n8mgr marked this pull request as ready for review January 22, 2026 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants