-
Notifications
You must be signed in to change notification settings - Fork 10
Cap max storage per contract #380
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
base: master
Are you sure you want to change the base?
Conversation
bfbefbf to
f76e763
Compare
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.
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
maxCollateralparameter from validation functions in favor of storage-based limits - Added
requestedContractStoragehelper function to calculate storage from collateral or allowance - Updated
MinRenterAllowanceandMaxHostCollateralto 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.
f76e763 to
42c0627
Compare
Adds a temporary cap of 10TiB per contract. This will eventually replace max collateral and be host configurable.