Skip to content

Conversation

@aarshkshah1992
Copy link
Collaborator

@aarshkshah1992 aarshkshah1992 commented Jul 25, 2025

Clients & SPs should now call terminateDataSetPayment on the service contract to terminate the payment rails for their dataset atomically. The service contract will revert the railTerminated callback from the Payments contract if the rail terminator is not the service contract itself.

Piece removal is allowed after the payment is terminated for a dataset but piece addition is not as increasing the rate of a terminated rail is not allowed by the payments contract.

Once the dataset is beyond it's payment end epoch, all operations other than ownership change and dataset deletion are reverted.

@rjan90 rjan90 moved this from 📌 Triage to 🔎 Awaiting review in FS Jul 25, 2025
@rjan90 rjan90 added this to the M2: Pandora Alpha on Mainnet milestone Jul 25, 2025
@rjan90 rjan90 requested a review from Kubuxu July 25, 2025 10:09
@github-project-automation github-project-automation bot moved this from 🔎 Awaiting review to ✔️ Approved by reviewer in FS Jul 25, 2025
@github-project-automation github-project-automation bot moved this from ✔️ Approved by reviewer to ⌨️ In Progress in FS Jul 25, 2025
// Burn one-time fee to register
require(msg.value == SP_REGISTRATION_FEE, "Incorrect registration fee");
(bool sent, ) = BURN_ADDRESS.call{value: msg.value}("");
(bool sent,) = BURN_ADDRESS.call{value: msg.value}("");
Copy link
Member

Choose a reason for hiding this comment

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

nit: unrelated

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just a forge fmt

});
}

function railTerminated(uint256 railId, address terminator, uint256 endEpoch) external override {
Copy link
Member

Choose a reason for hiding this comment

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

For my understanding: After terminateDataSetPayment, this method will now be called up to three times for one data set, once per payment rail. The first call will change the state paymentEndEpoch = endEpoch, the other two calls will be noops and safe to ignore. Right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@juliangruber That is correct !

@github-project-automation github-project-automation bot moved this from ⌨️ In Progress to ✔️ Approved by reviewer in FS Jul 28, 2025
@juliangruber juliangruber changed the title feat: terminate all proofset rails (storange and CDN) atomically feat: terminate all data set rails (storange and CDN) atomically Jul 28, 2025
@aarshkshah1992 aarshkshah1992 merged commit 2c45fb0 into main Jul 28, 2025
1 check passed
@aarshkshah1992 aarshkshah1992 deleted the feat/rail-termination-for-all-rails branch July 28, 2025 09:54
@github-project-automation github-project-automation bot moved this from ✔️ Approved by reviewer to 🎉 Done in FS Jul 28, 2025
@jennijuju jennijuju mentioned this pull request Jul 28, 2025
DarkLord017 pushed a commit to DarkLord017/filecoin-services that referenced this pull request Oct 8, 2025
…Ozone#93)

Clients & SPs should now call `terminateDataSetPayment` on the service
contract to terminate the payment rails for their dataset atomically.
The service contract will revert the `railTerminated` callback from the
Payments contract if the rail terminator is not the service contract
itself.

Piece removal is allowed after the payment is terminated for a dataset
but piece addition is not as increasing the rate of a terminated rail is
not allowed by the payments contract.

Once the dataset is beyond it's payment end epoch, all operations other
than ownership change and dataset deletion are reverted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

5 participants